/* ==========================================================================
   VARIABEL & BASE STYLES
   ========================================================================== */
:root {
    --accent-orange: #ea580c;
    --text-main: #475569;
    --text-heading: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --line-gray: #e2e8f0;
    --badge-bg: #f1f5f9;
}

main {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.7;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    width: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('../img/gup tampak depan.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--white);
    text-align: center;
    padding: 190px 20px;
    margin-bottom: 60px;
}

@media (max-width: 800px) {
    .hero-section {
        padding: 170px 20px 120px 20px;
    }
}

.hero-section h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
    font-size: 1.1rem;
    opacity: 0.95;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* ==========================================================================
   TIMELINE LAYOUT & GARIS PROGRES
   ========================================================================== */
.timeline {
    position: relative;
    padding-bottom: 60px;
}

/* Garis tengah vertikal statis (Abu-abu) */
.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 4px;
    background: var(--line-gray);
    border-radius: 4px;
    z-index: 1;
}

/* Garis progres interaktif mengikuti scroll (Oranye) */
.timeline-progress {
    position: absolute;
    top: 0;
    left: 20px;
    width: 4px;
    background: var(--accent-orange);
    border-radius: 4px;
    height: 0;
    z-index: 2;
    /* Garis oranye di atas garis abu-abu */
    transition: height 0.15s ease-out;
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 50px;
    /* FIX 2: Tidak ada efek transform di parent agar posisi bullet terkunci paten */
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

/* FIX 3: Bullet pada timeline diperbesar dan z-index dinaikkan */
.timeline-item::before {
    content: '';
    position: absolute;
    left: 12px;
    /* Garis di 20px, lebar garis 4px (tengah 22px). Lebar bullet 20px -> 22 - 10 = 12px */
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--white);
    border: 4px solid #cbd5e1;
    /* Abu-abu agak gelap agar lebih terlihat */
    border-radius: 50%;
    z-index: 10;
    /* SELALU DI DEPAN LAYER MANAPUN */
    transition: all 0.4s ease;
    box-shadow: 0 0 0 3px var(--bg-light);
    /* Efek potongan dari garis */
}

/* ==========================================================================
   TIMELINE CONTENT & TYPOGRAPHY
   ========================================================================== */
.timeline-content {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid transparent;
    /* FIX 1: Border transparan agar tidak melompat */
    /* FIX 2: Efek skala dan gerak dipindah ke konten, bukan parent */
    transform: translateY(30px) scale(0.96);
    transition: all 0.5s ease-out;
}

.timeline-badge {
    display: inline-block;
    background-color: var(--badge-bg);
    color: var(--accent-orange);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.timeline-content h2 {
    font-size: 1.5rem;
    color: var(--text-heading);
    margin-bottom: 15px;
}

.timeline-content p {
    margin-bottom: 15px;
    color: var(--text-main);
}

.historical-note {
    background-color: var(--bg-light);
    border-left: 4px solid var(--accent-orange);
    padding: 15px;
    font-style: italic;
    border-radius: 0 8px 8px 0;
    margin-top: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.feature-list {
    list-style-type: none;
    margin-bottom: 15px;
}

.feature-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    color: var(--text-main);
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-orange);
    font-weight: bold;
}

/* ==========================================================================
   EFEK ANIMASI & FOKUS BACA
   ========================================================================== */
/* Container utama muncul */
.timeline-item.visible {
    opacity: 1;
}

/* FIX 1: Gunakan opacity transparan untuk tidak fokus. JANGAN gunakan filter: grayscale karena bikin shadow jadi hitam */
.timeline-item.visible:not(.active) .timeline-content {
    opacity: 0.5;
    transform: translateY(0) scale(0.96);
}

/* Saat difokuskan di tengah layar */
.timeline-item.active .timeline-content {
    opacity: 1;
    transform: translateY(0) scale(1);
    box-shadow: 0 15px 30px -5px rgba(234, 88, 12, 0.15);
    border: 1px solid rgba(234, 88, 12, 0.2);
}

/* Lingkaran timeline menyala terang saat aktif */
.timeline-item.active::before {
    background: var(--accent-orange);
    border: 5px solid var(--white);
    /* Border sedikit ditebalkan */
    box-shadow: 0 0 0 6px rgba(234, 88, 12, 0.35);
    /* Pancaran cahaya oranye */
}

/* ==========================================================================
   BENTO GRID GALLERY
   ========================================================================== */
.bento-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    margin-top: 25px;
}

.bento-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.bento-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bento-item:hover img {
    transform: scale(1.1);
}

.img-overlay {
    position: absolute;
    inset: 0;
    background: rgba(234, 88, 12, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.bento-item:hover .img-overlay {
    opacity: 1;
}

/* ==========================================================================
   LIGHTBOX (GLASSMORPHISM)
   ========================================================================== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transform: scale(0.95);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 40px;
    color: white;
    font-size: 45px;
    cursor: pointer;
    transition: color 0.2s ease;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
    color: var(--accent-orange);
}

/* ==========================================================================
   RESPONSIVE DESIGN: DESKTOP (Min 768px)
   ========================================================================== */
@media (min-width: 768px) {

    .timeline::before,
    .timeline-progress {
        left: 50%;
        transform: translateX(-50%);
    }

    .timeline-item {
        width: 50%;
        padding: 0;
        padding-right: 40px;
    }

    .timeline-item:nth-child(even) {
        margin-left: auto;
        padding-right: 0;
        padding-left: 40px;
    }

    .timeline-item::before {
        left: 100%;
        transform: translateX(-50%);
    }

    .timeline-item:nth-child(even)::before {
        left: 0;
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN: MOBILE (Max 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 1.8rem;
        padding: 0 10px;
    }

    .hero-section p {
        font-size: 0.95rem;
    }

    .timeline::before,
    .timeline-progress {
        left: 10px;
    }

    .timeline-item {
        padding-left: 30px;
        margin-bottom: 30px;
    }

    /* Penyesuaian offset bullet untuk mobile */
    /* Garis di 10px, lebar 4px (Tengah 12px). Lebar bullet 20px. 12 - 10 = 2px */
    .timeline-item::before {
        left: 2px;
        width: 20px;
        height: 20px;
    }

    .timeline-content {
        padding: 15px;
        border-radius: 8px;
    }

    .timeline-content h2 {
        font-size: 1.2rem;
    }

    .timeline-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }

    .bento-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .bento-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }

    .bento-item {
        border-radius: 6px;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN: EXTRA SMALL MOBILE (Max 350px / 300px)
   ========================================================================== */
@media (max-width: 350px) {
    .container {
        padding: 0 10px;
    }

    .timeline-content {
        padding: 12px;
    }

    .timeline-badge {
        font-size: 0.75rem;
        padding: 2px 8px;
    }
}

/* ==========================================================================
   PENGECUALIAN UNTUK LAYAR DENGAN HEIGHT SANGAT TINGGI (TALL SCREENS)
   ========================================================================== */
@media (min-height: 1000px) {

    /* Mematikan efek redup dan mengecil untuk item yang tidak fokus */
    .timeline-item.visible:not(.active) .timeline-content {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

    /* Memastikan bullet tidak redup */
    .timeline-item::before {
        opacity: 1;
    }
}