/* ============================================================
   NAV-MOBILE — shared mobile hamburger + overlay drawer
   Loaded by: admin, customer, and landing layouts.
   ============================================================ */

/* ── Hamburger button (hidden on desktop) ── */
.nav-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.4rem;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
}
.nav-hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}
/* Animate bars to × when open */
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Full-screen overlay ── */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999;
}
.mobile-nav-overlay.open { display: block; }

/* Dark backdrop — click to close */
.mobile-nav-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

/* ── Slide-in drawer from the right ── */
.mobile-nav-drawer {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 72vw;
    max-width: 28rem;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-nav-overlay.open .mobile-nav-drawer {
    transform: translateX(0);
}

/* ── Drawer header (dark bar with brand + close) ── */
.mobile-nav-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.6rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: #0f172a;
}
.mobile-nav-drawer-brand {
    font-family: 'Raleway', sans-serif;
    font-weight: 700;
    font-size: 1.6rem;
    color: #ffffff;
    text-decoration: none;
}
.mobile-nav-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 2.2rem;
    line-height: 1;
    color: #94a3b8;
    padding: 0 0.2rem;
}
.mobile-nav-close:hover { color: #ffffff; }

/* ── Logged-in user label (customer + admin layouts) ── */
.mobile-nav-user {
    padding: 1.4rem 2rem 1rem;
    font-size: 1.35rem;
    color: #64748b;
    border-bottom: 1px solid #f1f5f9;
}
.mobile-nav-user strong { color: #0f172a; }

/* ── Nav link list ── */
.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    flex: 1;
}
.mobile-nav-links a {
    display: block;
    padding: 1.3rem 2rem;
    font-size: 1.6rem;
    font-weight: 500;
    color: #1e293b;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.15s, border-color 0.15s;
}
.mobile-nav-links a:hover,
.mobile-nav-links a:focus {
    background: #f8fafc;
    border-left-color: #0f172a;
    color: #0f172a;
}

/* ── Logout button (customer + admin layouts) ── */
.mobile-nav-logout {
    padding: 1.6rem 2rem;
    border-top: 1px solid #e2e8f0;
}
.mobile-nav-logout a {
    display: block;
    text-align: center;
    background: #0f172a;
    color: #ffffff;
    border-radius: 1rem;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.mobile-nav-logout a:hover { background: #1e293b; }

/* ── CTA section (landing layout only) ── */
.mobile-nav-cta {
    padding: 1.6rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mobile-nav-cta a {
    display: block;
    text-align: center;
    border-radius: 1rem;
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.mob-btn-primary {
    background: #0f172a;
    color: #ffffff;
}
.mob-btn-primary:hover { background: #1e293b; }
.mob-btn-outline {
    background: transparent;
    color: #0f172a;
    border: 2px solid #0f172a;
}
.mob-btn-outline:hover { background: #0f172a; color: #ffffff; }

/* ── Mobile breakpoint ── */
@media (max-width: 520px) {
    /* Cloudflare Turnstile — prevent iframe overflow */
    .cf-turnstile { overflow: hidden; max-width: 100%; }
    .cf-turnstile iframe { max-width: 100% !important; }

    /* Show hamburger */
    .nav-hamburger { display: flex !important; }
}
