/* ==========================================================================
   INNER PAGE NAVBAR — Rolls-Royce Luxury System v2
   Applied ONLY to inner pages via body.inner-page class.
   Home page is completely unaffected.
   ========================================================================== */

/* ── Scroll padding so anchors clear the sticky nav ─────────── */
body.inner-page {
    scroll-padding-top: 100px;
}

/* ── Prevent horizontal overflow on mobile for all inner pages ── */
@media (max-width: 768px) {
    body.inner-page,
    body.inner-page html {
        overflow-x: hidden;
        max-width: 100vw;
    }
}

/* ══════════════════════════════════════════════════════════════
   TRUE FULL-WIDTH NAVBAR — Hard overrides of navbar.css capsule
   body.inner-page scope keeps home page 100% untouched.
══════════════════════════════════════════════════════════════ */
body.inner-page .navbar {
    /* POSITION — edge-to-edge, no centering */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 72px !important;
    padding: 0 clamp(20px, 4vw, 56px) !important;

    /* Kill capsule shape from navbar.css */
    transform: none !important;
    border-radius: 0 !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;

    /* Layout */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    box-sizing: border-box !important;

    /* Premium dark glass */
    background: rgba(6, 6, 6, 0.80) !important;
    backdrop-filter: blur(30px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(160%) !important;

    /* Hairline bottom only */
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;

    /* Elevation */
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04),
        0 12px 48px rgba(0, 0, 0, 0.4) !important;

    z-index: 1000 !important;

    /* Cinematic transitions — GPU-only properties */
    transition:
        transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
        opacity   0.5s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Scrolled: deeper glass */
body.inner-page .navbar.scrolled {
    background: rgba(4, 4, 4, 0.92) !important;
    border-bottom-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06),
        0 20px 60px rgba(0, 0, 0, 0.55) !important;
    width: 100vw !important;
}

/* Scroll-hide state (added by inner-navbar.js) */
body.inner-page .navbar.nav-hidden {
    transform: translateY(-100%) !important;
    opacity: 0 !important;
}

/* ── Noise texture layer — luxury tactile surface ─────────── */
body.inner-page .navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.02;
    pointer-events: none;
    z-index: 0;
}

/* ── Warm accent line at top edge ─────────────────────────── */
body.inner-page .navbar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        rgba(107, 20, 33, 0.5) 20%,
        rgba(180, 40, 60, 0.3) 50%,
        rgba(107, 20, 33, 0.5) 80%,
        transparent
    );
    pointer-events: none;
}

/* ══════════════════════════════════════════════════════════════
   LOGO / BRAND
══════════════════════════════════════════════════════════════ */
body.inner-page .nav-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    gap: 0;
}

/* Premium logo holder — full navbar height */
body.inner-page .nav-brand-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: stretch;    /* Fills full navbar height */
    height: 100%;
    /* Soft red-tinted glass */
    background: rgba(107, 20, 33, 0.15);
    border: 1px solid rgba(107, 20, 33, 0.3);
    border-radius: 8px;
    padding: 0; /* Remove vertical padding for full-height logo */
    overflow: hidden; /* Ensure image corners don't overlap border-radius */
    transition:
        background    0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color  0.5s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow    0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow:
        0 0 12px rgba(107, 20, 33, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

body.inner-page .nav-brand:hover .nav-brand-badge {
    background: rgba(107, 20, 33, 0.28);
    border-color: rgba(107, 20, 33, 0.55);
    box-shadow:
        0 0 20px rgba(107, 20, 33, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Logo image — vertically centered, proportional */
body.inner-page .nav-brand img {
    height: 100%;
    width: auto;
    display: block;
    filter: none;
    mix-blend-mode: normal;
    opacity: 1;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

body.inner-page .nav-brand:hover img {
    opacity: 0.9;
}

/* ══════════════════════════════════════════════════════════════
   NAVIGATION LINKS
══════════════════════════════════════════════════════════════ */
body.inner-page .nav-links {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: clamp(24px, 3vw, 44px);
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (max-width: 900px) {
    body.inner-page .nav-links { display: none; }
}

body.inner-page .nav-link {
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 0.68rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: rgba(248, 246, 241, 0.65);
    text-decoration: none;
    display: inline-block;
    padding-bottom: 2px;
    transition: color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Hover underline — gold gradient */
body.inner-page .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(107, 20, 33, 0.9),
        rgba(180, 60, 80, 0.7),
        rgba(107, 20, 33, 0.9)
    );
    transition: width 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

body.inner-page .nav-link:hover {
    color: rgba(248, 246, 241, 0.95);
}

body.inner-page .nav-link:hover::after {
    width: 100%;
}

/* ── ACTIVE PAGE STATE — Auto-detected by JS ─────────────── */
body.inner-page .nav-link.active {
    color: rgba(248, 246, 241, 1);
    font-weight: 600;
}

body.inner-page .nav-link.active::after {
    width: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(248, 246, 241, 0.6),
        transparent
    );
}

/* ══════════════════════════════════════════════════════════════
   HAMBURGER BUTTON
══════════════════════════════════════════════════════════════ */
body.inner-page .nav-toggle {
    position: relative;
    z-index: 1;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    transition:
        background 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 900px) {
    body.inner-page .nav-toggle { display: flex; }
}

body.inner-page .nav-toggle:hover {
    background: rgba(107, 20, 33, 0.2);
    border-color: rgba(107, 20, 33, 0.5);
}

body.inner-page .nav-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: rgba(248, 246, 241, 0.75);
    border-radius: 2px;
    transition:
        transform 0.55s cubic-bezier(0.16, 1, 0.3, 1),
        opacity   0.35s ease,
        background 0.4s ease;
}

body.inner-page .nav-toggle.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
    background: rgba(248, 246, 241, 0.9);
}
body.inner-page .nav-toggle.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
body.inner-page .nav-toggle.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
    background: rgba(248, 246, 241, 0.9);
}


/* ══════════════════════════════════════════════════════════════
   INNER-PAGE MOBILE MENU — Overrides for full-width navbar context
   Base drawer styles (70vw panel, animation, typography) are in
   navbar.css. This section only patches inner-page specifics.
══════════════════════════════════════════════════════════════ */

/* Ensure backdrop uses !important to beat navbar.css base */
body.inner-page .mobile-menu {
    background: rgba(0, 0, 0, 0.62) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.inner-page .mobile-menu.active {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Panel — ensure it stays right and uses inner-page sizing */
body.inner-page .mobile-nav-links {
    transform: translateX(100%) !important;
    transition: transform 2.0s cubic-bezier(0.16, 1, 0.3, 1) !important;
    padding: clamp(7rem, 18vh, 10rem) clamp(2.8rem, 8vw, 3.8rem) clamp(4rem, 10vh, 6rem) !important;
}

body.inner-page .mobile-menu.active .mobile-nav-links {
    transform: translateX(0) !important;
}

/* Link base — ensure no conflicts with old fullscreen styles */
body.inner-page .mobile-nav-link {
    font-family: 'Playfair Display', Georgia, serif !important;
    font-size: clamp(1.9rem, 6vw, 2.6rem) !important;
    font-weight: 400 !important;
    color: rgba(248, 246, 241, 0.80) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.02em !important;
    line-height: 1.1 !important;
    padding: 0.75em 0 !important; /* Restored elegant desktop padding */
    display: block !important;
    text-decoration: none !important;
    width: 100% !important;
    position: relative !important;

    /* Hidden state — NO !important so .active rule can override */
    opacity: 0;
    transform: translateX(20px);
    transition:
        opacity    0.65s cubic-bezier(0.16, 1, 0.3, 1),
        transform  0.65s cubic-bezier(0.16, 1, 0.3, 1),
        color      0.30s ease,
        font-style 0.30s ease;
}

/* Revealed — !important guarantees visibility */
body.inner-page .mobile-menu.active .mobile-nav-link {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

/* Stagger — timed after the 2s panel slide settles */
body.inner-page .mobile-menu.active .mobile-nav-links li:nth-child(1) .mobile-nav-link { transition-delay: 0.85s !important; }
body.inner-page .mobile-menu.active .mobile-nav-links li:nth-child(2) .mobile-nav-link { transition-delay: 1.00s !important; }
body.inner-page .mobile-menu.active .mobile-nav-links li:nth-child(3) .mobile-nav-link { transition-delay: 1.15s !important; }
body.inner-page .mobile-menu.active .mobile-nav-links li:nth-child(4) .mobile-nav-link { transition-delay: 1.30s !important; }
body.inner-page .mobile-menu.active .mobile-nav-links li:nth-child(5) .mobile-nav-link { transition-delay: 1.45s !important; }

/* Hover */
body.inner-page .mobile-nav-link:hover {
    color: rgba(248, 246, 241, 1) !important;
    font-style: italic !important;
}

/* Active page indicator */
body.inner-page .mobile-nav-link.active {
    color: rgba(200, 155, 160, 0.65) !important;
    font-style: italic !important;
}

/* Close button */
body.inner-page .mobile-close-btn {
    position: fixed !important;
    top: clamp(16px, 3vw, 22px) !important;
    right: clamp(16px, 3vw, 22px) !important;
    width: 42px !important;
    height: 42px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    background: rgba(6, 6, 6, 0.7) !important;
    color: rgba(248, 246, 241, 0.55) !important;
    font-size: 0.8rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 1002 !important;
    transition:
        background   0.35s ease,
        border-color 0.35s ease,
        color        0.35s ease,
        transform    0.45s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

body.inner-page .mobile-close-btn:hover {
    background: rgba(107, 20, 33, 0.35) !important;
    border-color: rgba(107, 20, 33, 0.5) !important;
    color: rgba(248, 246, 241, 0.95) !important;
    transform: rotate(90deg) scale(1.06) !important;
}

/* Responsive tweaks for inner pages */
@media (max-width: 480px) {
    body.inner-page .mobile-nav-links {
        width: 82vw !important;
        max-width: 320px !important;
    }
    body.inner-page .mobile-nav-link {
        font-size: clamp(1.6rem, 5.5vw, 2.1rem) !important;
    }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE BREAKPOINTS — Override navbar.css mobile rules too
══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    body.inner-page .navbar {
        /* Full width on mobile too — beats navbar.css mobile capsule */
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        height: 64px !important;
        padding: 0 clamp(16px, 4vw, 24px) !important;
        border-radius: 0 !important;
        transform: none !important;
    }
    body.inner-page .navbar.nav-hidden {
        transform: translateY(-100%) !important;
    }
    body.inner-page .nav-brand img {
        height: 28px;
    }
    body.inner-page .nav-brand-badge {
        padding: 0;
        height: 100%;
        display: flex;
        align-items: center;
    }
    body.inner-page .nav-brand-badge img {
        height: 100%;
        width: auto;
        display: block;
        object-fit: contain;
    }
    /* Drawer link size — constrained to panel width, NOT full viewport */
    body.inner-page .mobile-nav-link {
        font-size: clamp(1.6rem, 5.5vw, 2.2rem) !important;
    }
    /* Drawer panel width on very small screens */
    body.inner-page .mobile-nav-links {
        width: 80vw !important;
        max-width: 300px !important;
    }
}

@media (max-width: 390px) {
    body.inner-page .navbar {
        height: 60px !important;
    }
    body.inner-page .mobile-nav-link {
        font-size: clamp(1.5rem, 5vw, 2rem) !important;
    }
}

/* Mobile-only massive luxury padding */
@media (max-width: 768px) {
    body.inner-page .mobile-nav-link {
        padding: 1.5em 0 !important;
    }
}
