/* ============================================================
   style.css — CivitasPeduli
   PERUBAHAN:
   1. Tambah class .reveal, .reveal-left, .reveal-right
      untuk animasi scroll-triggered (dipakai di semua halaman)
   2. Tambah .infinite-scroll-wrapper untuk foto dokumentasi
   3. Semua animasi overkill sebelumnya dibiarkan, hanya ditambah
      yang baru dan lebih elegan
   ============================================================ */

/* Import Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Plus Jakarta Sans", sans-serif;
    background-color: #ffffff;
    color: #343a40;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 700;
}

/* ============================================================
   SCROLL-TRIGGERED REVEAL ANIMATIONS
   Cara pakai: tambahkan class "reveal" (atau varian lain)
   ke elemen HTML. JS di main.js yang akan memicunya.
   ============================================================ */

/* Arah bawah ke atas (paling umum) */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

/* Arah kiri ke kanan */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

/* Arah kanan ke kiri */
.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

/* Muncul dari tengah (scale) */
.reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

/* Saat JS tambahkan class .visible, animasi berjalan */
.reveal.visible,
.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
    opacity: 1;
    transform: none;
}

/* Delay kelas untuk efek stagger (berurutan) */
.delay-100 { transition-delay: 0.10s; }
.delay-200 { transition-delay: 0.20s; }
.delay-300 { transition-delay: 0.30s; }
.delay-400 { transition-delay: 0.40s; }
.delay-500 { transition-delay: 0.50s; }

/* ============================================================
   INFINITE SIDE-SCROLL FOTO DOKUMENTASI
   Cara pakai: lihat contoh HTML di bawah (di index.php)
   ============================================================ */

/* Pembungkus luar — sembunyikan overflow agar tidak ada scroll bar */
.photo-marquee-wrapper {
    overflow: hidden;
    width: 100%;
    padding: 12px 0;
    /* Gradient fade di kiri & kanan agar terlihat elegan */
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

/* Trek yang bergerak — isinya DUPLIKAT 2x agar loop mulus */
.photo-marquee-track {
    display: flex;
    gap: 16px;
    width: max-content;                    /* selebar konten */
    animation: marqueeScroll 35s linear infinite;
}

/* Pause saat di-hover */
.photo-marquee-wrapper:hover .photo-marquee-track {
    animation-play-state: paused;
}

/* Keyframe animasi geser ke kiri */
@keyframes marqueeScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }   /* -50% karena isi duplikat 2x */
}

/* Setiap foto di dalam trek */
.photo-marquee-item {
    flex-shrink: 0;
    width: 220px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.photo-marquee-item:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 10px 28px rgba(1, 0, 192, 0.18);
}

.photo-marquee-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder jika foto belum ada */
.photo-marquee-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(1,0,192,0.08), rgba(252,201,0,0.12));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 32px;
}

/* Section pembungkus marquee di index.php */
.dokumentasi-preview-section {
    padding: 60px 0 40px;
    background: #f5f7fa;
}

.dokumentasi-preview-section .section-label {
    display: inline-block;
    background: linear-gradient(135deg, #0100C0, #3a3ab5);
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 6px 16px;
    border-radius: 50px;
    margin-bottom: 14px;
}

.dokumentasi-preview-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
}

.dokumentasi-preview-section p {
    color: #666;
    font-size: 15px;
    margin-bottom: 32px;
}


/* ============================================================
   ANIMASI BAWAAN (tidak diubah, hanya dipertahankan)
   ============================================================ */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px rgba(1, 0, 192, 0.5); }
    50%       { box-shadow: 0 0 20px rgba(1, 0, 192, 0.8); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.fade-in       { animation: fadeIn 0.8s ease-out forwards; opacity: 0; }
.fade-in-up    { animation: fadeInUp 0.8s ease-out forwards; opacity: 0; }
.fade-in-down  { animation: fadeInDown 0.8s ease-out forwards; opacity: 0; }
.slide-in-left { animation: slideInLeft 0.8s ease-out forwards; opacity: 0; }
.slide-in-right{ animation: slideInRight 0.8s ease-out forwards; opacity: 0; }
.scale-in      { animation: scaleIn 0.8s ease-out forwards; opacity: 0; }
.pulse         { animation: pulse 2s infinite; }
.glow          { animation: glow 2s infinite; }
.bounce        { animation: bounce 2s infinite; }

/* Hover effects */
.hover-scale {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.hover-scale:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.hover-glow {
    transition: all 0.3s ease;
}
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(1, 0, 192, 0.5);
    transform: scale(1.02);
}

.hover-3d {
    transition: all 0.3s ease;
    transform-style: preserve-3d;
}
.hover-3d:hover {
    transform: rotateY(5deg) rotateX(5deg) scale(1.05);
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
    overflow: hidden;
}
.card:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}
.card-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Buttons */
.btn-gradient {
    background: linear-gradient(135deg, #0100C0 0%, #0100C0 100%);
    color: white;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
    padding: 10px 25px;
    border-radius: 50px;
}
.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(1, 0, 192, 0.4);
    color: white;
}
.btn-gradient:active {
    transform: translateY(-1px);
}
.btn-outline-gradient {
    border: 2px solid #0100C0;
    color: #0100C0;
    background: transparent;
    transition: all 0.3s ease;
}
.btn-outline-gradient:hover {
    background: #0100C0;
    color: white;
    box-shadow: 0 8px 20px rgba(1, 0, 192, 0.3);
}

/* Backgrounds */
.bg-gradient-primary   { background: linear-gradient(135deg, #0100C0 0%, #0100C0 100%); }
.bg-gradient-secondary { background: linear-gradient(135deg, #0100C0 0%, #FCC900 100%); }
.bg-gradient-success   { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); }
.bg-gradient-warning   { background: linear-gradient(135deg, #FCC900 0%, #FCC900 100%); }

/* Text */
.text-gradient {
    background: linear-gradient(135deg, #0100C0 0%, #FCC900 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.text-shadow-light  { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); }
.text-shadow-medium { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); }
.text-shadow-dark   { text-shadow: 0 6px 12px rgba(0, 0, 0, 0.2); }
.text-glow          { text-shadow: 0 0 10px rgba(1, 0, 192, 0.5); animation: glow 2s infinite; }

/* Shadows */
.shadow-light  { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.shadow-medium { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
.shadow-dark   { box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15); }
.shadow-xl     { box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2); }

/* Border radius */
.rounded-xl  { border-radius: 20px; }
.rounded-2xl { border-radius: 28px; }
.rounded-3xl { border-radius: 36px; }

/* Transitions */
.transition-smooth    { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.transition-smooth-lg { transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); }

/* Forms */
.form-control {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 12px 15px;
    transition: all 0.3s ease;
}
.form-control:focus {
    border-color: #0100C0;
    box-shadow: 0 0 0 4px rgba(1, 0, 192, 0.1);
}
.form-select {
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}
.form-select:focus {
    border-color: #0100C0;
    box-shadow: 0 0 0 4px rgba(1, 0, 192, 0.1);
}
.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* Colors */
.text-primary  { color: #0100C0 !important; }
.text-accent   { color: #FCC900 !important; }
.bg-primary    { background-color: #0100C0 !important; }
.bg-accent     { background-color: #FCC900 !important; }
.border-primary{ border-color: #0100C0 !important; }
.border-accent { border-color: #FCC900 !important; }
.accent-left-border { border-left: 5px solid #FCC900; padding-left: 15px; }

/* Spacing */
.mt-xs { margin-top: 5px; }
.mb-xs { margin-bottom: 5px; }
.p-xl  { padding: 40px; }

/* Scrollbar */
::-webkit-scrollbar       { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: linear-gradient(135deg, #0100C0, #0100C0); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #0100C0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 991.98px) {
    .navbar-collapse { text-align: center; }
    .navbar-nav .nav-item { margin: 0.5rem 0; }
    h1 { font-size: 28px !important; }
    h2 { font-size: 24px !important; }
}

@media (max-width: 768px) {
    .container { padding-left: 15px; padding-right: 15px; }
    h1 { font-size: 24px !important; }
    h2 { font-size: 20px !important; }
    h3 { font-size: 18px !important; }
    .btn-gradient { padding: 8px 20px; font-size: 14px; }
    .photo-marquee-item { width: 160px; height: 110px; }
}

@media (max-width: 576px) {
    h1 { font-size: 20px !important; }
    h2 { font-size: 18px !important; }
    h3 { font-size: 16px !important; }
    .shadow-dark { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
    .photo-marquee-item { width: 140px; height: 95px; }
}