/* ============================================================
   Rhino Thai Boxing Gym — Header & navigation
   Ported from the concept-1 prototype (assets/styles.css).
   Transparent-over-hero header that transitions to solid black on
   scroll; mobile hamburger drawer. Transition timing uses
   --dur-slow (300ms) per the scroll-header requirement (Req 13.3).
   The Elementor Pro Theme Builder header renders the live markup;
   these styles back the theme's fallback header and shared classes.
   ============================================================ */

.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    background: transparent;
    transition: background var(--dur-slow), box-shadow var(--dur-slow), padding var(--dur-slow);
    padding: 22px 0;
}
.site-header.scrolled { background: var(--atmo0); box-shadow: var(--shadow-nav); padding: 14px 0; }

.header-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; }

.logo { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 22px; text-transform: uppercase; color: #fff; letter-spacing: 0.02em; }
.logo:hover { color: #fff; }
.logo i { color: var(--brand); font-size: 26px; }
.logo span { color: var(--brand); }

.nav { display: flex; align-items: center; gap: 28px; }
/* wp_nav_menu and the fallback both emit ul.menu > li > a — flatten to a row. */
.nav ul.menu { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav li { margin: 0; }
.nav a { color: #fff; font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; padding: 6px 0; position: relative; display: inline-block; }
.nav a::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--brand); transition: width var(--dur-base); }
.nav a:hover, .nav a.active, .nav .current-menu-item > a { color: var(--brand); }
.nav a:hover::after, .nav a.active::after, .nav .current-menu-item > a::after { width: 100%; }

.header-right { display: flex; align-items: center; gap: 18px; }

/* Language switcher (anchor-based; reloads page in selected locale, Req 13.8) */
.lang-switch { display: flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; }
.lang-switch__item { color: var(--placeholder); padding: 4px 6px; text-transform: uppercase; }
.lang-switch__item:hover { color: #fff; }
.lang-switch__item.is-active { color: var(--brand); }

.menu-toggle { display: none; background: none; border: none; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 6px; }

/* Accessible skip link — visually hidden until focused. */
.screen-reader-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
    position: fixed; top: 10px; left: 10px; z-index: 100000;
    width: auto; height: auto; clip: auto; padding: 12px 20px;
    background: var(--brand); color: #000; border-radius: var(--radius-md);
}

/* === Mobile navigation drawer (Req 13.9, 13.10) === */
.mobile-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 300;
    width: min(82vw, 360px);
    background: var(--atmo1);
    border-left: 1px solid var(--border);
    padding: 88px 28px 32px;
    display: flex; flex-direction: column; gap: 28px;
    transform: translateX(100%);
    transition: transform var(--dur-slow) var(--ease-out); /* opens within 300ms */
    overflow-y: auto;
    visibility: hidden;
}
.mobile-drawer.open { transform: translateX(0); visibility: visible; }

.mobile-drawer__nav ul.menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mobile-drawer__nav a {
    display: block; color: #fff; font-family: var(--font-display);
    text-transform: uppercase; letter-spacing: 0.04em; font-size: 20px;
    padding: 12px 0; border-bottom: 1px solid var(--border);
}
.mobile-drawer__nav a:hover, .mobile-drawer__nav .current-menu-item > a { color: var(--brand); }

.mobile-drawer__actions { display: flex; flex-direction: column; gap: 18px; }
.mobile-drawer__actions .lang-switch { font-size: 15px; }
.mobile-drawer__actions .drawer-book { width: 100%; justify-content: center; }

.mobile-drawer-backdrop {
    position: fixed; inset: 0; z-index: 250;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0; transition: opacity var(--dur-slow) ease;
}
.mobile-drawer-backdrop.visible { opacity: 1; }

body.rhino-drawer-open { overflow: hidden; }

@media (max-width: 768px) {
    /* Collapse primary nav + desktop controls into the hamburger drawer. */
    .nav { display: none; }
    .header-right .lang-switch--header { display: none; }
    .header-right .header-book { display: none; }
    .menu-toggle { display: inline-flex; align-items: center; }
}

/* Drawer is only interactive on mobile; keep it out of the way otherwise. */
@media (min-width: 769px) {
    .mobile-drawer, .mobile-drawer-backdrop { display: none; }
}
