/* header.css — site header, desktop nav, mobile full-screen overlay */

/* ─── Global ──────────────────────────────────────────────────────────────── */
body { overflow-x: hidden; }
header { position: relative; z-index: 1000; }

/* ─── Desktop header bar ─────────────────────────────────────────────────── */
.header-container {
    display: none !important; /* shown only at ≤768 via media query */
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #fff;
    min-height: 64px;
}
.logo-container .logo-image { max-width: 150px; height: auto; margin: 0; display: block; }

/* ─── Hamburger button ───────────────────────────────────────────────────── */
.hamburger {
    display: none !important; /* shown only at ≤768 via media query */
    background: transparent !important;
    background-color: transparent !important;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    padding: 12px;
    flex: 0 0 auto;
    /* Above the overlay (z-index 2000) so it stays tappable when menu is open */
    position: relative;
    z-index: 2100;
    width: 48px !important;
    height: 48px !important;
    /* Kill all browser tap highlights */
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
/* Remove focus ring everywhere — re-added via focus-visible for keyboard users only */
.hamburger:hover,
.hamburger:focus,
.hamburger:active,
.hamburger.active {
    background: transparent !important;
    background-color: transparent !important;
}
.hamburger:focus        { outline: none; }
.hamburger:focus-visible { outline: 2px solid #FFC107; outline-offset: 2px; border-radius: 4px; }

.hamburger .bar {
    display: block;
    width: 26px;
    height: 3px;
    background-color: #FFC107;
    margin: 5px auto;
    transform-origin: center;
    border-radius: 2px;
    transition: transform 0.28s ease-in-out, opacity 0.28s ease-in-out;
}
/* Animate to X when active */
.hamburger.active .bar:nth-child(2) { opacity: 0; }
.hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ─── Mobile call strip ──────────────────────────────────────────────────── */
.mobile-call { display: none; }

/* ─── Desktop nav (.upper-none) ─────────────────────────────────────────── */
.upper-none { display: none !important; }
.upper-none .nav_menu { list-style: none; margin: 0; padding: 0; display: flex; }
.upper-none .nav_menu li a { padding: 12px 15px; color: #333; text-decoration: none; font-size: 16px; font-family: 'Roboto', sans-serif; }
.upper-none .nav_menu li a.active { color: #8a6a00; }
.upper .icons a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.call-us { display: none !important; }

/* ─── Backdrop ───────────────────────────────────────────────────────────── */
.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1900;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.32s ease;
    -webkit-tap-highlight-color: transparent;
}
.nav-backdrop.open {
    display: block;
    opacity: 1;
}

/* ─── Full-screen overlay panel ─────────────────────────────────────────── */
.nav-none {
    display: none !important;
    position: fixed;
    top: 0;
    right: 0;
    width: min(360px, 92vw);
    height: 100%;
    z-index: 2000;
    background: #1a1a1a;
    transform: translateX(100%);
    transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: -6px 0 40px rgba(0, 0, 0, 0.5);
}
.nav-none.open { transform: translateX(0); }

/* Inner flex column — fills the full panel height */
.nav-overlay-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
}

/* Brand strip at top */
.nav-overlay-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid rgba(255, 193, 7, 0.18);
    flex-shrink: 0;
}
.nav-overlay-logo { display: inline-block; line-height: 0; }
.nav-overlay-logo img {
    width: 110px;
    height: auto;
    display: block;
    /* Boost contrast of the logo against the dark background */
    filter: brightness(1.15) drop-shadow(0 1px 4px rgba(0,0,0,0.4));
}

/* ─── Nav links — flex-column filling remaining height ──────────────────── */
.topnav {
    background: transparent;
    flex: 1;          /* takes all available space between header and footer */
    display: flex;
    flex-direction: column;
}

.topnav .mobile-nav {
    list-style: none;
    margin: 0;
    padding: 8px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Each item grows equally to fill the available height */
.topnav .mobile-nav li {
    display: none !important;
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.topnav .mobile-nav li a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 28px;
    color: #d4d4d4;
    text-decoration: none;
    font-size: 20px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    letter-spacing: 0.2px;
    /* Kill tap highlight */
    -webkit-tap-highlight-color: transparent;
    outline: none;
    transition: color 0.15s;
    position: relative;
}

/* Focus ring for keyboard users only — not tap */
.topnav .mobile-nav li a:focus        { outline: none; }
.topnav .mobile-nav li a:focus-visible { outline: 2px solid #FFC107; outline-offset: -2px; }

/* Gold left accent bar */
.topnav .mobile-nav li a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    height: 50%;
    width: 4px;
    background: #FFC107;
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity 0.15s;
}

/* Active page: gold text + left bar */
.topnav .mobile-nav li a.active {
    color: #FFC107 !important;
    font-weight: 700;
}
.topnav .mobile-nav li a.active::before { opacity: 1; }

/* Keep active link yellow on all mobile interaction states */
.topnav .mobile-nav li a.active:hover,
.topnav .mobile-nav li a.active:focus,
.topnav .mobile-nav li a.active:visited {
    color: #FFC107 !important;
}

/* Hover (non-active) */
.topnav .mobile-nav li a:not(.active):hover { color: #FFC107; }
.topnav .mobile-nav li a:not(.active):hover::before { opacity: 0.4; }

/* Show all items when the overlay is open */
.nav-none.open .topnav .mobile-nav li { display: flex !important; }

/* ─── Overlay footer: phone + social ────────────────────────────────────── */
.nav-overlay-footer {
    flex-shrink: 0;
    padding: 20px 24px 28px;
    border-top: 1px solid rgba(255, 193, 7, 0.18);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.nav-overlay-phone {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #FFC107;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Roboto', sans-serif;
    -webkit-tap-highlight-color: transparent;
    outline: none;
}
.nav-overlay-phone:hover { opacity: 0.8; }
.nav-overlay-phone i { font-size: 14px; }

.nav-overlay-social { display: flex; gap: 12px; }
.nav-overlay-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 193, 7, 0.4);
    color: #FFC107;
    font-size: 15px;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.nav-overlay-social a:hover {
    background: #FFC107;
    border-color: #FFC107;
    color: #1a1a1a;
}

/* ─── Accessibility utility ───────────────────────────────────────────────── */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ─── Mobile breakpoint (≤768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .header-container { display: flex !important; }
    .nav-none { display: block !important; }
    .upper-none { display: none !important; }
    .hamburger { display: block !important; }
    .call-us { display: block !important; text-align: center; padding: 10px 0; }
    .mobile-call { display: block !important; }
    .logo-container .logo-image {
        width: auto !important;
        max-width: 120px !important;
        max-height: 60px;
        height: auto !important;
        object-fit: contain;
    }
}

/* ─── Desktop breakpoint (≥769px) ─────────────────────────────────────────── */
@media (min-width: 769px) {
    .upper-none { display: block !important; }
    .mobile-call { display: none !important; }
    /* Hard-hide overlay on desktop regardless of JS open state */
    .nav-none,
    .nav-none.open { display: none !important; transform: none; }
    .nav-backdrop,
    .nav-backdrop.open { display: none !important; }
}
