/* ==========================================================================
   VARIABLE & SETUP GLOBAL
   ========================================================================== */
#sejarah {
    background: var(--brown-dark);
    color: var(--cream);
    font-family: 'Cormorant Garamond', serif;
    line-height: 1.8;
    overflow-x: hidden;
    padding: 1px;
}

/* Container Utama */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 120px 2rem 80px;
}

/* ==========================================================================
   PEMBAHARUAN: PAGE HEADER (BACKGROUND PREMIUM & AGUNG)
   ========================================================================== */
/* ==========================================================================
   PEMBAHARUAN: PAGE HEADER (GRADASI MELINGKAR / RADIAL LUXURY)
   ========================================================================== */
.page-header {
    text-align: center;
    padding-top: 140px;
    border-radius: 8px;
    background: radial-gradient(ellipse at center,  #3d1a03 15%, var(--brown-dark) 65%, var(--brown-dark) 100%);
    min-height: 90vh;
    overflow: hidden;
}
@media (max-width: 1168px)  {
    .hero-scroll-indicator{
        display: none !important;
    }
}


/* Memastikan konten teks berada di atas overlay background */
.sejarah-label, .sejarah-title, .divider-custom, .history-tabs-container {
    position: relative;
    z-index: 2;
}

.sejarah-label {
    font-family: 'Josefin Sans', sans-serif;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 6px;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.sejarah-title {
    font-family: 'Playfair Display', serif;
    line-height: 1.3;
    margin-bottom: 2rem;
    color: var(--cream);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

/* Modifikasi Garis Pembatas (Divider) yang Elegan */
.divider-custom {
    width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    margin: 0 auto 3rem auto;
}

/* ==========================================================================
   KONTROL VISUAL TAB KONTEN & TOMBOL (RINGKAS & ESTETIK)
   ========================================================================== */
.history-tab-content {
    display: none;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.history-tab-content.active-content {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.history-tabs-container {
    display: inline-flex;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    background: rgba(28, 15, 6, 0.6); /* Diambil dari kontras warna --text-dark */
    border-radius: 30px;
    border: 1px solid rgba(212, 162, 80, 0.15);
}

.tab-btn {
    background: transparent;
    color: var(--cream-dark);
    border: none;
    padding: 8px 24px;
    font-size: 0.85rem;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-btn:hover {
    color: var(--gold);
}

.tab-btn.active {
    background: var(--gold);
    color: var(--text-dark); /* Teks gelap di atas tombol emas agar terbaca tajam */
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(212, 162, 80, 0.3);
}

/* ==========================================================================
   DESKTOP TIMELINE SYSTEM (Gambar di Seberang Teks)
   ========================================================================== */
.timeline-detailed {
    margin: 4rem 0;
    position: relative;
    width: 100%;
}

.timeline-detailed::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    transform: translateX(-50%);
    width: 2px;
    background: rgba(212, 162, 80, 0.25);
    z-index: 1;
}

.timeline-node {
    display: flex;
    width: 100%;
    margin-bottom: 8rem;
    position: relative;
    align-items: center;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.node-text, .node-image {
    width: 50%;
    position: relative;
    z-index: 2;
}

.timeline-node.node-left {
    flex-direction: row;
}

.timeline-node.node-left .node-text {
    padding-right: 5rem;
    text-align: right;
}

.timeline-node.node-left .node-image {
    padding-left: 5rem;
    display: flex;
    justify-content: flex-start;
}

.timeline-node.node-right {
    flex-direction: row-reverse;
}

.timeline-node.node-right .node-text {
    padding-left: 5rem;
    text-align: left;
}

.timeline-node.node-right .node-image {
    padding-right: 5rem;
    display: flex;
    justify-content: flex-end;
}

.node-year {
    font-family: 'Josefin Sans', sans-serif;
    color: var(--gold);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.node-text h3 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1rem;
    color: var(--cream-dark);
    font-size: 1.8rem;
    transition: color 0.3s ease;
}

.node-text p {
    color: rgba(240, 224, 204, 0.65);
}

/* Card Gambar Arsitektur Mewah */
.image-card {
    width: 100%;
    max-width: 420px;
    height: 340px;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(212, 162, 80, 0.2);
    background: rgba(255, 255, 255, 0.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
}

.image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    object-position: top; 
}

/* ==========================================================================
   INTERAKSI HOVER GLOBAL
   ========================================================================== */
.timeline-node:hover {
    transform: translateY(-5px);
}

.timeline-node:hover .image-card img {
    transform: scale(1.05);
}

.timeline-node:hover .image-card {
    border-color: var(--gold);
    box-shadow: 0 20px 40px rgba(212, 162, 80, 0.15);
}

.timeline-node:hover .node-text h3 {
    color: var(--gold);
}

.timeline-node:hover .node-year {
    color: var(--cream);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.timeline-node::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: var(--gold);
    border-radius: 50%;
    z-index: 3;
    transition: all 0.3s ease;
}

.timeline-node:hover::after {
    background: var(--cream);
    box-shadow: 0 0 0 6px rgba(212, 162, 80, 0.4);
    transform: translate(-50%, -50%) scale(1.2);
}

/* Story Blocks & Highlights */
.story-container {
    margin-top: 8rem;
}

.story-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(212, 162, 80, 0.1);
    padding: 4rem;
    margin-bottom: 4rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-card h2 {
    font-family: 'Playfair Display', serif;
    color: var(--gold);
    margin-bottom: 2rem;
}

.story-card p {
    margin-bottom: 1.5rem;
    text-align: justify;
    color: rgba(240, 224, 204, 0.8);
}

.story-card:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(212, 162, 80, 0.4);
    transform: translateY(-10px);
}
.end{
    background: radial-gradient(ellipse at center,  #3d1a03 15%, var(--brown-dark) 65%, var(--brown-dark) 100%);
    padding: 40px;
}
.highlight-box {
    border-top: 1px solid var(--gold);
    border-bottom: 1px solid var(--gold);
    padding: 3rem;
    margin: 5rem 0;
    text-align: center;
    transition: all 0.6s ease;
}

.highlight-box blockquote {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    color: var(--cream);
}

.highlight-box:hover {
    background: rgba(212, 162, 80, 0.03);
}

/* ==========================================================================
   MOBILE RESPONSIVE SYSTEM (SISTEM LAYAR HP)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .container {
        padding: 60px 1rem 60px !important;
    }

    .page-header {
        padding: 40px 20px;
        margin-bottom: 3.5rem;
    }

    .sejarah-title {
        font-size: 1.8rem;
    }

    .timeline-detailed {
        padding: 10px 0;
    }

    .timeline-detailed::before {
        left: 4px !important;
        transform: none !important;
        height: 100% !important;
    }

    .timeline-node {
        display: flex !important;
        flex-direction: column !important; 
        align-items: flex-start !important;
        width: 100% !important; 
        left: 0 !important;
        padding: 0 !important;
        margin-bottom: 4rem !important;
    }

    .timeline-node:nth-child(odd),
    .timeline-node:nth-child(even) {
        left: 0 !important;
        text-align: left !important;
    }

    /* MENUKAR URUTAN MOBILE: Gambar Atas, Teks Bawah */
    .timeline-node .node-image {
        order: 1 !important;        
        margin-bottom: 1.2rem !important; 
        width: 100% !important;
        padding-left: 15px !important; 
        padding-right: 0 !important;
    }

    .timeline-node .node-text,
    .timeline-node .node-content {
        order: 2 !important;        
        width: 100% !important;
        padding-left: 20px !important; 
        padding-right: 0 !important;
        text-align: left !important;
    }

    .image-card {
        max-width: 100% !important;
        width: 100% !important;
        height: 200px !important;   
    }

    .image-card img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .timeline-node::after {
        left: 4px !important;      
        top: -15px !important;       
        right: auto !important;
        transform: translateX(-50%) !important; 
    }

    .timeline-node:hover::after {
        transform: translateX(-50%) scale(1.2) !important;
    }

    .story-card {
        padding: 2rem 1.5rem;
    }

    .highlight-box {
        padding: 2.5rem 1rem !important;
    }
}