/* =============================================
   ABOUT PAGE
   ============================================= */
.page-about { margin-top: var(--header-h); }

/* ─── Hero ────────────────────────────────────────────── */
.about-hero {
    background-image: url('../images/banners/banner8.webp');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-color: var(--color-primary);
    color: var(--color-bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 5vw, 4rem);
    position: relative;
}
.about-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.12) 50%, rgba(0,0,0,0.22) 100%);
    pointer-events: none;
}
.about-hero h1,
.about-hero p { position: relative; z-index: 1; animation: fadeInUp 1s ease-out 0.2s both; }
.about-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.25rem, 6vw, 5rem);
    color: var(--color-bg);
    margin-bottom: 1rem;
    line-height: 1.05;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    letter-spacing: -0.02em;
}
.about-hero p {
    font-family: var(--font-nav);
    font-size: clamp(0.75rem, 1.125vw, 1rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-secondary);
    text-shadow: 0 1px 6px rgba(0,0,0,0.35);
    font-weight: 300;
}

/* ─── Text Break Dividers ─────────────────────────────── */
.about-text-break {
    padding: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 6vw, 6rem);
    background: var(--color-bg);
}
.text-break-inner {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.75rem;
}
.about-text-break--history .text-break-inner {
    max-width: 1100px;
}
section.about-text-break--history {
    padding-bottom: clamp(2.5rem, 5vw, 4rem);
}
.about-text-break--history + .about-timeline-v2 {
    padding-top: clamp(2.5rem, 5vw, 4rem);
}
.text-break-rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(226,176,126,0.45));
    min-width: 0;
}
.text-break-inner .text-break-rule:last-child {
    background: linear-gradient(to left, transparent, rgba(226,176,126,0.45));
}
.text-break-inner p {
    font-family: var(--font-nav);
    font-size: clamp(0.65rem, 0.8vw, 0.78rem);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-primary);
    opacity: 0.55;
    line-height: 1.7;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0;
}
.text-break-inner .about-history-title {
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 3.3vw, 2.75rem);
    letter-spacing: 0;
    text-transform: none;
    color: var(--color-primary);
    opacity: 1;
    line-height: 1.15;
    white-space: normal;
    text-align: center;
    flex: 0 1 820px;
    max-width: 820px;
    width: 100%;
}
.about-history-title span {
    display: block;
    white-space: nowrap;
}

/* ─── Video ───────────────────────────────────────────── */
.about-video {
    width: 100%;
    height: 100vh;
    padding: 0;
    margin: 0;
    overflow: hidden;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.about-video-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    position: relative;
    z-index: 1;
}
.about-video-controls {
    position: absolute;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.about-video-btn {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.6);
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
    padding: 0;
    outline: none;
}
.about-video-btn:hover { border-color: #fff; background: rgba(0,0,0,0.4); transform: scale(1.08); }
.about-video-btn:focus-visible { border-color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,0.4); }
.about-video-btn svg { width: 1.25rem; height: 1.25rem; display: block; flex-shrink: 0; }
.about-video-btn--play .icon-pause { display: block; }
.about-video-btn--play .icon-play  { display: none; }
.about-video-btn--play[data-state="paused"] .icon-pause { display: none; }
.about-video-btn--play[data-state="paused"] .icon-play  { display: block; }
.about-video-btn--sound .icon-muted { display: block; }
.about-video-btn--sound .icon-sound { display: none; }
.about-video-btn--sound[data-state="on"] .icon-muted { display: none; }
.about-video-btn--sound[data-state="on"] .icon-sound { display: block; }
.about-video-loading {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    z-index: 4;
    background: rgba(255,255,255,0.15);
    overflow: hidden;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.about-video-loading--active { opacity: 1; }
.about-video-loading-bar {
    display: block;
    height: 100%;
    width: 40%;
    background: var(--color-secondary, #E2B07E);
    animation: videoLoadScan 1.4s ease-in-out infinite;
}
@keyframes videoLoadScan {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* ─── Timeline v2 ─────────────────────────────────────── */
.about-timeline-v2 {
    padding: clamp(80px, 12vw, 140px) 0;
    background: var(--color-bg);
    overflow-x: hidden;
}
.tl-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(24px, 5vw, 80px);
    position: relative;
}

/* Vertical spine */
.tl-spine {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--color-secondary) 6%,
        var(--color-secondary) 94%,
        transparent 100%
    );
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

/* Each row */
.tl-row {
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    align-items: center;
    min-height: 340px;
    margin-bottom: clamp(60px, 8vw, 110px);
    position: relative;
}
.tl-row:last-child { margin-bottom: 0; }

/* Left & right panels — animation driven by JS */
.tl-left {
    padding-right: clamp(2rem, 3.5vw, 4.5rem);
    will-change: transform;
}
.tl-right {
    padding-left: clamp(2rem, 3.5vw, 4.5rem);
    will-change: transform;
}

/* Alternating rows: text left | dot | image right */
.tl-row--reverse .tl-left {
    grid-column: 3;
    padding-right: 0;
    padding-left: clamp(2rem, 3.5vw, 4.5rem);
}
.tl-row--reverse .tl-axis {
    grid-column: 2;
    grid-row: 1;
}
.tl-row--reverse .tl-right {
    grid-column: 1;
    grid-row: 1;
    padding-left: 0;
    padding-right: clamp(2rem, 3.5vw, 4.5rem);
}
.tl-row--reverse .tl-right.tl-text-side .tl-content-wrap { text-align: right; }
.tl-row--reverse .tl-right.tl-text-side .tl-content-wrap p { margin-left: auto; }

/* Text alignment: text on left side → right-align toward spine */
.tl-left.tl-text-side .tl-content-wrap { text-align: right; }
.tl-left.tl-text-side .tl-content-wrap p { margin-left: auto; }

/* Axis column */
.tl-axis {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

/* Clickable node */
.tl-node {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}
.tl-node-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: var(--color-secondary);
    border: 2px solid var(--color-bg);
    box-shadow: 0 0 0 2px rgba(226,176,126,0.6);
    position: absolute;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    pointer-events: none;
}
.tl-node-ring {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(226,176,126,0.4);
    position: absolute;
    transform: scale(0);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
    pointer-events: none;
}
.tl-node:hover .tl-node-dot {
    transform: scale(1.5);
    box-shadow: 0 0 0 5px rgba(226,176,126,0.18), 0 0 16px rgba(226,176,126,0.28);
}
.tl-node:hover .tl-node-ring { transform: scale(1); opacity: 1; }
.tl-node:focus-visible { outline: 2px solid var(--color-secondary); outline-offset: 4px; border-radius: 50%; }

/* Text content */
.tl-year {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 3.75rem);
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 0.9rem;
    letter-spacing: -0.02em;
}
.tl-content-wrap p {
    font-size: clamp(0.78rem, 0.9vw, 0.88rem);
    color: var(--color-text);
    line-height: 1.9;
    max-width: 400px;
    opacity: 0.75;
    margin: 0;
    text-align: justify;
    text-indent: 2em;
}
.tl-section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 2.1vw, 2rem);
    color: var(--color-primary);
    line-height: 1.08;
    letter-spacing: 0;
    max-width: 500px;
    margin: 0 auto 1rem;
    text-align: center;
    text-wrap: balance;
    overflow-wrap: normal;
    word-break: normal;
}
.tl-row--reverse .tl-right.tl-text-side .tl-section-title,
.tl-left.tl-text-side .tl-section-title {
    margin-left: auto;
    margin-right: auto;
}

/* Image panels */
.tl-media-inner {
    aspect-ratio: 4/3;
    overflow: hidden;
    border: 1px solid rgba(0,75,73,0.07);
    transition: box-shadow 0.45s ease;
}
.tl-row:hover .tl-media-inner {
    box-shadow: 0 20px 56px rgba(0,0,0,0.1);
}

/* Era gradient backgrounds */
.tl-media--era-1980 { background: linear-gradient(135deg, #8B7355 0%, #D2B48C 50%, #CD853F 100%); }
.tl-media--era-1990 { background: linear-gradient(135deg, #4A4E69 0%, #9A8C98 50%, #C9ADA7 100%); }
.tl-media--era-2000 { background: linear-gradient(135deg, #264653 0%, #2A9D8F 50%, #E9C46A 100%); }
.tl-media--era-2010 { background: linear-gradient(135deg, #1B4965 0%, #2E8B9E 50%, #A4D7E1 100%); }
.tl-media--era-2020 { background: linear-gradient(135deg, #424856 0%, #6C757D 50%, #ADB5BD 100%); }
.tl-media--era-2026 { background: linear-gradient(135deg, #004B49 0%, #E2B07E 50%, #F5F5F0 100%); }

/* ─── Map ─────────────────────────────────────────────── */
.about-map {
    height: 500px;
    overflow: hidden;
    background: #e8e5e0;
    border-top: 1px solid rgba(0,75,73,0.1);
}
.about-map iframe { width: 100%; height: 100%; border: none; display: block; }

/* ─── Keyframes ───────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 700px) {
    .text-break-inner { flex-direction: column; gap: 0.6rem; }
    .text-break-inner p { white-space: normal; text-align: center; }
    .text-break-rule { width: 80px; flex: none;
        background: linear-gradient(to right, transparent, rgba(226,176,126,0.45)) !important; }

    /* Mobile timeline: single-column with left spine */
    .tl-spine { left: clamp(20px, 4vw, 32px); transform: none; }
    .tl-row {
        grid-template-columns: 36px 1fr;
        grid-template-rows: auto auto;
        min-height: auto;
        gap: 0 1rem;
        margin-bottom: clamp(48px, 8vw, 72px);
    }
    .tl-row .tl-left  { grid-column: 2; grid-row: 1; padding: 0 0 1rem; }
    .tl-row .tl-axis  { grid-column: 1; grid-row: 1 / 3; align-items: flex-start; padding-top: 6px; }
    .tl-row .tl-right { grid-column: 2; grid-row: 2; padding: 0; }
    .tl-row--reverse .tl-left  { grid-column: 2; grid-row: 1; }
    .tl-row--reverse .tl-axis  { grid-column: 1; }
    .tl-row--reverse .tl-right { grid-column: 2; grid-row: 2; }
    /* Reset text alignment on mobile */
    .tl-left.tl-text-side .tl-content-wrap { text-align: left; }
    .tl-left.tl-text-side .tl-content-wrap p { margin-left: 0; }
    .tl-section-title {
        font-size: clamp(1.18rem, 5vw, 1.55rem);
        max-width: 100%;
    }
    /* Reset transforms on mobile (JS also checks viewport) */
    .tl-left, .tl-right { transform: none !important; transition: none !important; }
}
