/* 1680 */
@media (max-width: 1700px) {}

/* 1500 */
@media (max-width: 1679px) {}

/* 1440 */
@media (max-width: 1499px) {}

/* 1280 */
@media (max-width: 1439px) {}

/* 1025 */
@media (max-width: 1279px) {}

/* 992 */
@media (max-width: 1024px) {}

/* 768 */
@media (max-width: 991px) {}

/* 576 */
@media (max-width: 767px) {}

/* 525 */
@media (max-width: 575px) {}

/* 480 */
@media (max-width: 524px) {}

/* 425 */
@media (max-width: 479px) {}

/* 375 */
@media (max-width: 424px) {}

/* 320 */
@media (max-width: 374px) {}

/* 280 */
@media (max-width: 319px) {}

/* =============================================================
   MOBILE NAV
   ============================================================= */

/* ── Scroll lock ───────────────────────────────────────────── */
/* Prevents layout shift by anchoring body while scroll is locked */
body.scroll-locked {
    overflow: hidden;
    position: fixed;
    left: 0;
    right: 0;
    /* `top` is set dynamically in JS to preserve scroll position */
}

/* ── Overlay backdrop ──────────────────────────────────────── */
/* Appears behind the menu so tapping outside closes it */
.navbar-wrapper::after {
    content: '';
    position: fixed;
    inset: 0;
    /* covers entire viewport */
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    /* invisible = not interactive */
    transition: opacity 0.3s ease;
}

/* Backdrop becomes visible + interactive when menu is open */
.navbar-wrapper.menu-is-open::after {
    opacity: 1;
    pointer-events: auto;
}

/* ── Mobile menu panel ─────────────────────────────────────── */
.navbar-mobile-menu {
    /* Layout */
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: min(320px, 85vw);
    /* never wider than 85% on small phones */
    height: 100dvh;
    /* dvh = dynamic viewport, accounts for mobile URL bars */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    /* Appearance */
    background-color: var(--bg-white);
    padding: 5rem 1.5rem 2rem;
    /* top padding clears the toggle button */
    border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
    z-index: 9999;

    /* Entry animation: slides in from the right */
    transform: translateX(110%);
    /* 110% to hide box-shadow peek */
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        /* spring-like ease-out */
        opacity 0.25s ease;
    opacity: 0;

    /* Hidden from AT and keyboard until opened */
    visibility: hidden;
}

.navbar-mobile-menu.nav-open,
.navbar-mobile-menu.nav-closing {
    display: block;
}

/* ── Open state ────────────────────────────────────────────── */
.navbar-mobile-menu.nav-open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* ── Closing state (exit animation) ───────────────────────── */
/* Applied just before the element is hidden — creates smooth exit */
.navbar-mobile-menu.nav-closing {
    transform: translateX(110%);
    opacity: 0;
    /* Keep visible during animation so user sees the slide-out */
    visibility: visible;
}

/* ── Menu list items — staggered slide-in animation ───────── */
.navbar-mobile-list li {
    opacity: 0;
    transform: translateX(20px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

/* Each item staggers in 60ms apart */
.navbar-mobile-menu.nav-open .navbar-mobile-list li:nth-child(1) {
    opacity: 1;
    transform: none;
    transition-delay: 0.08s;
}

.navbar-mobile-menu.nav-open .navbar-mobile-list li:nth-child(2) {
    opacity: 1;
    transform: none;
    transition-delay: 0.14s;
}

.navbar-mobile-menu.nav-open .navbar-mobile-list li:nth-child(3) {
    opacity: 1;
    transform: none;
    transition-delay: 0.20s;
}

.navbar-mobile-menu.nav-open .navbar-mobile-list li:nth-child(4) {
    opacity: 1;
    transform: none;
    transition-delay: 0.26s;
}

.navbar-mobile-menu.nav-open .navbar-mobile-list li:nth-child(5) {
    opacity: 1;
    transform: none;
    transition-delay: 0.32s;
}

.navbar-mobile-menu.nav-open .navbar-mobile-list li:nth-child(6) {
    opacity: 1;
    transform: none;
    transition-delay: 0.38s;
}

/* ── Menu links styling ────────────────────────────────────── */
.navbar-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.navbar-mobile-list li a {
    display: block;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.navbar-mobile-list li a:hover,
.navbar-mobile-list li a:focus-visible {
    background-color: rgba(255, 107, 0, 0.08);
    color: var(--primary-orange);
    padding-left: 1.5rem;
    /* subtle indent on hover — feels interactive */
    outline: none;
}

/* Focus ring for keyboard users — visible but not ugly */
.navbar-mobile-list li a:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 2px;
}

/* ── Hamburger toggle button ───────────────────────────────── */
.navbar-mobile-toggle {
    display: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    border: none;
    background: transparent;
    transition: background-color 0.2s ease, transform 0.2s ease;
    /* IMPORTANT: must sit above the backdrop overlay */
    position: relative;
    z-index: 10000;
}

.navbar-mobile-toggle:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

/* Rotate the icon container for a satisfying spin on open */
.menu-is-open .navbar-mobile-toggle {
    transform: rotate(90deg);
}

/* Focus ring */
.navbar-mobile-toggle:focus-visible {
    outline: 2px solid var(--primary-orange);
    outline-offset: 3px;
}

/* ── Responsive: show toggle only on mobile ────────────────── */
@media (max-width: 991px) {
    .navbar-mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar-menu {
        display: none !important;
    }
}

/* ── Reduce motion: respect user OS preference ─────────────── */
@media (prefers-reduced-motion: reduce) {

    .navbar-mobile-menu,
    .navbar-mobile-list li,
    .navbar-mobile-toggle,
    .navbar-wrapper::after {
        transition: none !important;
        animation: none !important;
        transition-delay: 0s !important;
    }
}