/*=========================================
MUSEUM HISTORY CONTAINER
=========================================*/
.museum-history {
/*     padding: 120px 0 !important; */
/*     background: #ffffff !important; */
    
    color: #111111;
}

.museum-history .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.history-heading {
    text-align: center !important;
    font-size: 52px !important;
    line-height: 1.2 !important;
    margin-bottom: 80px !important;    
    font-weight: 700 !important;
    letter-spacing: -0.5px;
}

/*=========================================
TIMELINE NAVIGATION & PROGRESS TRACK
=========================================*/
.timeline-navigation-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 15px !important;
    position: relative !important;
}

.timeline-wrapper {
    flex: 1 !important;
    position: relative !important;
    overflow: hidden !important;
    padding-bottom: 30px !important; 
}

/* 1. Base Unfilled Line (Light Gray) */
.timeline-line {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    top: calc(50% + 8px) !important; /* Locks vertically to the exact middle of the dots */
    transform: translateY(-50%) !important;
    height: 2px !important;            /* Slightly thicker for high-contrast visibility */
    background: #e2e2e2 !important;    /* Default light gray */
    z-index: 1 !important;
}

/* 2. Dynamic Progress Overlay (Dark Line)
   If your JS manages a width percentage, this styles it. 
   Otherwise, this ensures standard layout alignment. */
.timeline-progress-bar {
    position: absolute !important;
    left: 0 !important;
    top: calc(50% + 8px) !important;
    transform: translateY(-50%) !important;
    height: 2px !important;
    background:#d09e39 !important;    /* Dark filled progress */
    z-index: 2 !important;
    width: 50%;                        /* Adjust percentage via script or set default */
    transition: width 0.3s ease !important;
}

.timeline-years {
    display: flex !important;
    gap: 80px !important;
    position: relative !important;
    z-index: 3 !important;             /* Sits cleanly on top of the track line */
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    scroll-behavior: smooth !important;
    padding: 10px !important;
}

.timeline-years::-webkit-scrollbar {
    display: none !important;
}

/*=========================================
YEARS & DOTS (Vertical Auto-Align)
=========================================*/
.timeline-year {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    min-width: 80px !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

/* Year Label */
.timeline-year .year-label {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #888888;
    margin-bottom: 15px !important;   /* Strict spacer to prevent text shifting */
    transition: color 0.3s ease, transform 0.3s ease !important;
}

.timeline-year.active .year-label {
    color: #111111 !important;
    font-size: 18px !important;
    transform: translateY(-2px) !important;
}

/* Dot representation (Perfectly centered intersection) */
.timeline-year .dot {
    width: 12px !important;
    height: 12px !important;
    background: #d09e39 !important;   /* Matches the dark progress line fill */
    border: 2px solid #d09e39 !important;
    border-radius: 50% !important;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    box-sizing: border-box !important;
    z-index: 4 !important;             /* Layered directly above the background line */
}

/* Unvisited / Inactive Dots (Optional: Can be light-filled like your mock) */
.timeline-year:not(.active) .dot {
    background: #ffffff !important;
    border: 2px solid #d09e39 !important;
}

.timeline-year.active .dot {
    background: #d09e39 !important;
    transform: scale(1.4) !important;
    transform-origin: center !important;
}

/* Navigation Arrow Controls */
.timeline-arrow {
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #e2e2e2 !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 16px !important;
    color: #555555 !important;
    transition: all 0.3s ease !important;
    z-index: 10;
    margin-top: 30px;                  /* Shifts arrows to share the centerline axis */
}

.timeline-arrow:hover {
    border-color: #d09e39 !important;
    color: #d09e39 !important;
    background: #fbfbfb !important;
}

/*=========================================
CONTENT SECTION
=========================================*/
.history-content {
    display: grid !important;
    grid-template-columns: .5fr 0.9fr !important;
    gap: 20px !important;
    align-items: center !important;
    transition: opacity 0.3s ease;
}

.history-image {
    position: relative !important;
    overflow: hidden !important;
    background: #f7f7f7 !important;
    aspect-ratio: 4 / 3;
}

.history-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: opacity 0.4s ease;
}

.history-text {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}

.history-text h3 {
    font-size: 32px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    margin: 0 0 20px 0 !important;
    color: #111111 !important;
}

.history-text p {
    font-size: 16px !important;
    line-height: 1.75 !important;
    color: #000 !important;
    margin: 0 0 30px 0 !important;
}

#historyButton {
    align-self: flex-start !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #d09e39 !important;
    text-decoration: none !important;
    position: relative !important;
    padding-bottom: 4px !important;
    transition: color 0.3s ease !important;
}

#historyButton::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 1px !important;
    background:#d09e39 !important;
    transition: transform 0.3s ease !important;
    transform-origin: right !important;
    transform: scaleX(1) !important;
}

#historyButton:hover::after {
    transform: scaleX(0) !important;
}

.history-image.loading,
.history-text.loading {
    opacity: 0.1 !important;
}

/*=========================================
RESPONSIVE STYLES
=========================================*/
@media (max-width: 991px) {
    .history-content {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
    
    .history-image {
        aspect-ratio: 16 / 10;
    }

    .history-heading {
        font-size: 40px !important;
        margin-bottom: 50px !important;
    }
}

@media (max-width: 600px) {
    .museum-history {
        padding: 60px 0 !important;
    }

    .timeline-navigation-wrapper {
        gap: 8px !important;
    }

    .timeline-arrow {
        width: 36px !important;
        height: 36px !important;
        font-size: 14px !important;
    }

    .timeline-years {
        gap: 45px !important;
    }

    .history-text h3 {
        font-size: 24px !important;
    }
}