/* ==========================================================================
   HEADER-EXP.CSS
   Dependent on main.css for core variables and animations.
   ========================================================================== */

/* --- 1. Main Navigation Header --- */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    height: var(--header-height);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--margin-with-screen, 20px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    opacity: 0;
    animation: headerSlideDown var(--anim-slow) var(--ease-smooth) forwards;
    transition: background-color 300ms ease, box-shadow 300ms ease;
}

/* Ensure page content starts below the fixed header */
/* Spacing handled in main.css */

.header-bar {
    display: contents;
}

/* --- 2. Mobile Menu Toggle --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 50px;
    height: 50px;
    aspect-ratio: 1 / 1;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 20;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--black);
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

.menu-toggle.is_active span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle.is_active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.menu-toggle.is_active span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* --- 3. Header Sections: Logo & Navigation --- */
.main-header nav {
    display: contents;
}

.logo-area {
    order: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    opacity: 0;
    animation: dropFromAbove var(--anim-md) var(--ease-smooth) 150ms forwards;
    transition: transform 0.3s ease-in-out;
}

.logo-area .logo-link {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-area img {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
}

.menu_list {
    order: 1;
    display: flex;
    flex-direction: row;
    height: 100%;
    list-style: none;
    opacity: 0;
    animation: dropFromAbove var(--anim-md) var(--ease-smooth) 300ms forwards;
    transition: all 0.3s ease-in-out;
    font-size: var(--text-xs);
}

.menu_list li {
    height: 100%;
}

.menu_list a {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 var(--space-lg);
    color: var(--black);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.menu-spacer {
    order: 2;
    flex: 1;
}

/* --- 4. Interactivity & Effects --- */
.logo-area .logo-link:hover img {
    transform: scale(1.1);
}

.menu_list a span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.menu_list a:hover {
    color: var(--white);
    background-color: var(--yellow);
}

.menu_list a:hover span {
    transform: scale(1.1);
}

/* --- 5. Component Architecture: Video Banner --- */
.banner {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Fallback for older browsers */
    height: 100dvh;
    overflow: hidden;
}

.banner_item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.25, 1, 0.5, 1);
}

.banner_item.active {
    opacity: 1;
    z-index: 2;
}

.banner_overlay {
    position: absolute;
    inset: auto 0 0 0;
    height: 40%;
    z-index: 10;
    padding: var(--space-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--white-glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    opacity: 0;
    animation: riseFromBelow var(--anim-slow) var(--ease-smooth) 400ms forwards;
}

.banner_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background-color: var(--yellow);
    color: var(--white);
    padding: 0.7rem 1.4rem;
    border: none;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none;
    margin-top: var(--space-xs);
    cursor: pointer;
    transition: all 0.3s var(--ease-smooth);
    opacity: 0;
    animation: riseFromBelow var(--anim-slow) var(--ease-smooth) 1000ms forwards;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.banner_btn svg {
    transition: transform 0.3s ease;
}

.banner_btn:hover {
    background-color: var(--black);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.banner_btn:hover svg {
    transform: translateY(2px);
}

.banner_btn:active {
    transform: scale(0.96) translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.banner_title {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-md);
    font-weight: 900;
    color: var(--dark-black);
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-align: center;
    opacity: 0;
    animation: riseFromBelow var(--anim-slow) var(--ease-smooth) 600ms forwards;
}

.banner_subtitle {
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1.6;
    color: var(--dark-black);
    max-width: 900px;
    text-align: center;
    opacity: 0;
    hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
    animation: riseFromBelow var(--anim-slow) var(--ease-smooth) 800ms forwards;
}

.highlight {
    color: var(--yellow);
    text-shadow: 1px 1px 0 var(--black);
}

/* --- Banner Controls --- */
.banner_nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    /* Very transparent */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    cursor: pointer;
    z-index: 30;
    opacity: 1;
    /* Button is opaque so the icon inside is fully visible */
    background: rgba(255, 255, 255, 0.1);
    /* Only the background is transparent */
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Centralized transition logic for all states (hover, click, idle) */
    transition: opacity 0.4s var(--ease-smooth),
        background 0.5s var(--ease-smooth),
        border 0.5s var(--ease-smooth),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    /* Initial smooth catch */

    will-change: transform, opacity;
    padding: 0;
    outline: none;
    opacity: 0;
    animation: riseFromBelowNav var(--anim-slow) var(--ease-smooth) 400ms forwards;
}

/* Specialized version for arrows to preserve the -50% vertical centering */
@keyframes riseFromBelowNav {
    from {
        opacity: 0;
        transform: translateY(calc(-50% + 20px));
    }

    to {
        opacity: 1;
        transform: translateY(-50%);
    }
}

.banner_nav:hover {
    transform: translateY(-50%) scale(1.08);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    /* Continue using the base transition for consistency */
}

.banner_nav svg {
    width: 24px;
    height: 24px;
    stroke: var(--white);
    stroke-width: 2.5;
    transition: stroke 0.3s ease;
}

.banner_nav:hover svg {
    stroke: var(--yellow);
}

.banner_nav.prev {
    left: 40px;
}

.banner_nav.next {
    right: 40px;
}

/* Click "Flash" Effect - Firm press, elastic release */
.banner_nav.clicked {
    background: var(--yellow) !important;
    border-color: var(--yellow) !important;
    transform: translateY(-50%) scale(0.94) !important;
    opacity: 1 !important;
    /* Faster 'press-in' with a firm, professional feel */
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
        background 0.15s ease,
        border 0.15s ease !important;
}

.banner_nav.clicked svg {
    stroke: var(--black) !important;
    transition: stroke 0.3s ease !important;
}

/* Responsive Elastic Return */
.banner_nav:not(.clicked) {
    transition: opacity 0.4s var(--ease-smooth),
        transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        background 0.4s ease,
        border 0.4s ease;
}

.banner_nav:not(.clicked) svg {
    transition: stroke 1s ease;
}

/* Dots Indicator */
.banner_dots {
    display: flex;
    gap: 15px;
    position: absolute;
    top: calc(var(--header-height) + 15px);
    /* Positioned under nav bar */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    opacity: 0;
    animation: dropFromAboveDots var(--anim-slow) var(--ease-smooth) 0ms forwards;
}

/* Specialized version for dots to drop with the header bar */
@keyframes dropFromAboveDots {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.banner_dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    position: relative;
}

/* Invisible hit-area expansion for easier clicking */
.banner_dot::after {
    content: '';
    position: absolute;
    inset: -10px;
    background: transparent;
}

.banner_dot.active {
    background: var(--yellow);
    transform: scale(1.4);
    box-shadow: 0 0 12px var(--yellow-glass), 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Progress Bar at top of overlay */
.banner_progress_container {
    position: absolute;
    top: -1.5px;
    /* Fixed gap with overlay top border */
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    z-index: 50;
    overflow: hidden;
    opacity: 0;
    animation: riseFromBelow var(--anim-slow) var(--ease-smooth) 400ms forwards;
}

.banner_progress_bar {
    height: 100%;
    width: 0%;
    background: var(--yellow);
    transition: width linear;
    /* Duration set by JS */
}