/* Custom navigation styles for The7 Child */

/* Overlay header: sits on top of sliders/hero images */
.custom-nav-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* above sliders/content */
    pointer-events: auto;
}

/* On interior pages with hero image, also overlay */
body:not(.home) .custom-nav-wrapper {
    position: absolute;
}

.custom-mega-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* adjust per design */
    padding: 16px 24px;
}

.custom-nav-list {
    list-style: none;
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
}

.custom-nav-list > li > a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

/* Optional: adjust The7 header container to be transparent on top of hero */
.header-over-hero .masthead,
.header-over-hero .masthead .header-bar {
    background: transparent !important;
    box-shadow: none !important;
}

/* When using The7 global transparent/overlay header, prevent layout push
   when the header switches to opaque (floating) state. Our custom navbar
   is fixed and should not reserve vertical space. */
.transparent .masthead:not(#phantom) .header-bar {
    height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
.transparent #main {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
.transparent .vc_row:first-of-type:not(.sch-nc-intro-row) {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Removed legacy sticky compensation to avoid pushing content down on scroll */

/*
 * style.css – Styling for the Apple‑style dropdown navigation demo.
 *
 * The goal of this stylesheet is to achieve a clean, minimal look that
 * echoes the navigation on Apple.com. The white dropdown panel slides down
 * when hovering over a navigation item on desktop, and three columns fade
 * in sequentially. A blurred overlay appears behind the dropdown to focus
 * attention on the menu. On small screens, the navigation collapses into a
 * hamburger icon which triggers a full‑screen mobile menu.
 */

/* Basic reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    /* Inter with streamlined fallbacks */
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    color: #111;
}

/* Edge-to-edge background image container (component-ready) */
.page-hero {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-image: var(--hero-image);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: 0; /* below brand overlay (800) and menu layers */
}

/* Debug grid overlay and outlines (toggle with 'g' key) */
body.debug-grid::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 2000;
    background-image:
        /* vertical guides every 80px */
        repeating-linear-gradient(
            to right,
            rgba(0, 58, 120, 0.25) 0,
            rgba(0, 58, 120, 0.25) 1px,
            transparent 1px,
            transparent 80px
        ),
        /* horizontal baselines every 8px */
        repeating-linear-gradient(
                to bottom,
                rgba(0, 58, 120, 0.15) 0,
                rgba(0, 58, 120, 0.15) 1px,
                transparent 1px,
                transparent 8px
            );
}

body.debug-grid .menu-grid {
    outline: 1px solid rgba(0, 58, 120, 0.5);
}
body.debug-grid .menu-grid > .column,
body.debug-grid .menu-grid > .contact-card {
    outline: 1px dashed rgba(0, 58, 120, 0.5);
    background: rgba(0, 58, 120, 0.06);
}
body.debug-grid .dropdown-bg {
    outline: 1px solid rgba(0, 0, 0, 0.2);
}
body.debug-grid .navbar {
    outline: 1px solid rgba(255, 0, 0, 0.4);
}

/* Left overlay (below menu) */
.brand-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--overlay-w);
    height: 100vh;
    background: rgba(1, 32, 66, 0.5); /* brand blue #003A78 at 50% */
    z-index: 800; /* below menu/blur/background panels */
    pointer-events: none;
}

/* Bodoni three-word set over the blue overlay */
.overlay-words {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--overlay-w); /* match overlay width */
    height: 100vh;
    z-index: 900; /* above brand overlay, below nav */
    color: #fff;
    pointer-events: none;
    text-align: center;
    /* Prefer Adobe kit name; fall back to other Bodoni/serif families */
    font-family:
        "bodoni-std", "bodoni-urw", "Bodoni 72", Bodoni, Didot, Georgia, serif;
    font-weight: 400;
    font-style: normal;
    line-height: var(--words-line-height, 0.5); /* tight leading */
    /* Responsive tuning knobs for size and spacing */
    --word-small: clamp(24px, 2.4vw, 36px);
    --word-medium: clamp(30px, 3vw, 44px);
    --word-large: clamp(52px, 4.8vw, 80px);
    --stack-gap: clamp(18px, 2.2vw, 36px);
    /* Horizontal offsets: keep BESPOKE centered; nudge CURATED left and TAILORED right.
       Use clamp() to scale with viewport while capping extremes. */
    /* Make CURATED shift further left by increasing the preferred (vw) magnitude */
    --curated-x: clamp(-200px, -6vw, -6px);
    --bespoke-x: 0px;
    --tailored-x: clamp(40px, 3.2vw, 160px);
}

.overlay-words .word {
    position: absolute;
    left: 50%;
    letter-spacing: 0.02em;
}

.overlay-words .word.small {
    font-size: var(--word-small);
}
.overlay-words .word.medium {
    font-size: var(--word-medium);
}
.overlay-words .word.large {
    font-size: var(--word-large);
}

/* Center the middle word exactly; place others around it */
.overlay-words .bespoke {
    top: 50%;
    transform: translate(calc(-50% + var(--bespoke-x)), -50%);
}
.overlay-words .curated {
    top: calc(50% - var(--stack-gap));
    transform: translate(calc(-50% + var(--curated-x)), -100%);
}
.overlay-words .tailored {
    top: calc(50% + var(--stack-gap));
    transform: translate(calc(-50% + var(--tailored-x)), 0);
}

/* Global CSS variables */
:root {
    --nav-height: 110px; /* navbar height controlling dropdown/overlay offset */
    --overlay-w: 33%; /* width of left overlay section */
}

/* Navigation bar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        backdrop-filter 0.25s ease;
    z-index: 4000;
}

/* Offset for WordPress admin bar when logged in */
/* Admin bar offsets removed per request; we will live with overlap while logged in. */

/* Opaque navbar only when a dropdown is active */
.navbar.active,
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: none;
    backdrop-filter: saturate(180%) blur(20px);
}

.logo {
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: -0.02em;
    position: absolute;
    left: calc(var(--overlay-w) / 2); /* center of overlay */
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
}

/* Nav items */
.nav-items {
    list-style: none;
    display: flex;
    gap: 40px; /* increased spacing */
    margin-left: auto; /* keep items right-aligned with absolute logo */
}

.nav-item {
    position: relative;
    font-size: 1rem; /* larger primary nav */
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
    color: #fff; /* white by default */
    font-weight: 600; /* Inter SemiBold for primary nav */
}

/* Anchor inside each .nav-item — real navigation target, gated on .fully-open
   by JS until the dropdown has finished its fade-in. Padding lives here (not
   on the .nav-item li) so the entire hover area is also the click target. */
.nav-item-link {
    color: inherit;
    text-decoration: none;
    display: block;
    padding: 15px 0;
    cursor: pointer;
    /* Labels stored normal-case in markup; uppercased here so screen readers
       don't read them letter-by-letter. Visually identical to literal caps. */
    text-transform: uppercase;
}

.nav-item:hover {
    color: #1c75bc; /* updated hover blue */
}

/* When a dropdown is active, turn ALL items blue */
.navbar.active .nav-item,
.navbar.scrolled .nav-item {
    color: #003e7e;
}

/* Hamburger button for small screens */
.hamburger {
    display: none;
    background: none;
    border: none;
    padding: 12px;
    cursor: pointer;
    flex-direction: row; /* Layout label and icon horizontally */
    gap: 12px;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    margin-left: auto; /* Push to the right */
}

.menu-label {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600; /* Inter SemiBold */
    letter-spacing: 0.1em;
    font-family: inherit;
    text-transform: uppercase; /* label stored as "Menu"; display all caps */
    transition: color 0.3s ease;
}

.hamburger-icon {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger .hamburger-icon span {
    display: block;
    width: 24px;
    height: 2px;
    background: #fff; /* White by default for contrast */
    transition:
        transform 0.3s ease,
        opacity 0.3s ease,
        background-color 0.25s ease;
}

/* Ensure hamburger is visible (Brand Blue) when navbar is white (scrolled) */
.navbar.scrolled .hamburger .menu-label {
    color: #003e7e;
}
.navbar.scrolled .hamburger .hamburger-icon span {
    background: #003e7e;
}

/* Transform hamburger into an "X" when the menu is open */
.hamburger.open .hamburger-icon span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: #fff; /* Keep white on open (dark menu bg) */
}
.hamburger.open .hamburger-icon span:nth-child(2) {
    opacity: 0;
}
.hamburger.open .hamburger-icon span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: #fff; /* Keep white on open */
}

/* Dropdown container */
.dropdown {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    /* No vertical slide for content; background is global */
    transition: opacity 0.25s ease;
    z-index: 950;
}

/* When a dropdown is open, fade it in and slide into place */
.dropdown.open {
    opacity: 1;
    pointer-events: auto;
}

/* A11y: hide dropdowns when [hidden] present (JS toggles [hidden]) */
.dropdown[hidden] { display: none !important; }

/* Disable per-menu backgrounds (we use a global one) */
.dropdown .dropdown-background {
    display: none !important;
}

/* Global white background panel that stays steady */
.dropdown-bg {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: 0;
    background: #fff;
    border-bottom: none; /* avoid 1px line under navbar when closed */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: height 0.3s ease;
    z-index: 940; /* Above blur overlay, below content */
}

.dropdown-bg.open {
    height: 208px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); /* show divider only when open */
}

/* Container for columns */
.dropdown-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px 40px;
}

/* Inner grid controlling columns and contact card */
.menu-grid {
    width: min(1200px, calc(100% - 80px));
    margin: 0 auto;
    display: grid;
    column-gap: 90px; /* 80–110px gutter */
    row-gap: 8px;
    align-items: start;
}

.menu-grid.cols-1 {
    /* Spacer, col, spacer, card */
    grid-template-columns: 1fr 240px 90px 280px;
}

.menu-grid.cols-2 {
    /* Spacer, col1, col2, spacer, card */
    grid-template-columns: 1fr 240px 240px 90px 280px;
}

.menu-grid.cols-3 {
    grid-template-columns: 1fr 240px 240px 240px 90px 280px; /* spacer, col1, col2, col3, spacer, card */
}

/* Individual column */
.dropdown-content .column {
    flex: 1;
    max-width: 280px;
    /* Children will fade in top-down */
}

/* Allow dynamic horizontal alignment */
.single-col .menu-grid > .column,
.two-col .menu-grid > .column {
    transform: translateX(var(--alignment-shift, 0));
}

/* Heading styles inside columns */
.dropdown-content .column h4 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 700; /* use Heavy for headings */
    /* Use same sans-serif as nav; keep headings all caps */
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Link styles inside columns */
.dropdown-content .column a {
    display: block;
    text-decoration: none;
    color: #333;
    font-size: 0.95rem; /* larger submenu text */
    line-height: 1.25; /* slightly tighter line height */
    margin: 0.2rem 0; /* reduce vertical spacing */
    transition: color 0.15s ease;
}

.dropdown-content .column a:hover {
    color: #1c75bc; /* updated hover blue */
}

/* Top-down fade-in for items within each column */
.dropdown .dropdown-content .column > * {
    opacity: 0;
    transition: opacity 0.28s ease;
    transition-delay: var(--fade-delay, 0ms); /* delay only affects opacity */
}

/* ===========================
   A11y: Focus-visible rings for interactive items (no visual change otherwise)
   =========================== */
:where(.navbar, .dropdown, .mobile-menu) :is(a, button, [role="button"], [tabindex]) {
    outline: none; /* suppress default until focus-visible */
}
:where(.navbar, .dropdown, .mobile-menu) :is(a, button, [role="button"], [tabindex]):focus-visible {
    outline: 2px solid rgba(28, 117, 188, 0.65); /* brand blue */
    outline-offset: 2px;
}
/* Slightly stronger for top-level anchors if present */
.nav-items a:focus-visible {
    outline: 2px solid rgba(28, 117, 188, 0.75);
    outline-offset: 3px;
}
/* Mobile accordion headers if marked focusable */
.mobile-link-head[role="button"]:focus-visible {
    outline: 2px solid rgba(28, 117, 188, 0.65);
    outline-offset: 2px;
}

.dropdown.open .dropdown-content .column > * {
    opacity: 1;
}

/* Contact card styles (right-aligned) */
.contact-card {
    align-self: start;
    padding-left: 24px;
    border-left: 1px solid #e8edf6; /* light divider */
    color: #2a2a2a;
    min-width: 240px;
    max-width: 320px;
    opacity: 0;
    transition: opacity 0.25s ease;
    /* Use calculated card shift */
    transform: translateX(var(--card-shift, 0));
    /* Vertical alignment tweak */
    margin-top: 5px;
}

.contact-card h4 {
    font-size: 0.9rem; /* match submenu heading size */
    margin-bottom: 0.5rem;
    font-family: inherit; /* sans-serif */
    text-transform: uppercase; /* all caps */
    letter-spacing: 0.06em;
    color: #003e7e;
}

.contact-card a {
    display: block;
    text-decoration: none;
    color: #333; /* match submenu link color */
    font-size: 0.95rem; /* match submenu font size */
    line-height: 1.25; /* match submenu line height */
    margin: 0.2rem 0; /* match submenu spacing */
}

.contact-card a:hover {
    color: #1c75bc; /* match submenu hover color */
}

.contact-card .cta {
    margin-top: 0.4rem;
    font-weight: 600;
}

/* Column-level left→right fade of blocks; card fades last */
.menu-grid > .column {
    opacity: 0;
    transition: opacity 0.25s ease;
}
.dropdown.open .menu-grid > .column:nth-of-type(1) {
    opacity: 1;
    transition-delay: 60ms;
}
.dropdown.open .menu-grid > .column:nth-of-type(2) {
    opacity: 1;
    transition-delay: 120ms;
}
.dropdown.open .menu-grid > .column:nth-of-type(3) {
    opacity: 1;
    transition-delay: 180ms;
}
.dropdown.open .menu-grid > .contact-card {
    opacity: 1;
    transition-delay: 260ms;
}

/* Explicit placement to account for left spacer tracks */
.single-col .menu-grid > .column {
    grid-column: 2;
}
.single-col .menu-grid > .contact-card {
    grid-column: 4;
}

.two-col .menu-grid > .column:nth-of-type(1) {
    grid-column: 2;
}
.two-col .menu-grid > .column:nth-of-type(2) {
    grid-column: 3;
}
.two-col .menu-grid > .contact-card {
    grid-column: 5;
}

.three-col .menu-grid > .column:nth-of-type(1) {
    grid-column: 2;
}
.three-col .menu-grid > .column:nth-of-type(2) {
    grid-column: 3;
}
.three-col .menu-grid > .column:nth-of-type(3) {
    grid-column: 4;
}
.three-col .menu-grid > .contact-card {
    grid-column: 6;
}

/* (Removed duplicate old placement rules; using column 4 for single-col, 6 for card) */

/* Blur overlay behind the dropdown */
.overlay-blur {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--nav-height));
    backdrop-filter: blur(6px);
    background: rgba(0, 0, 0, 0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 925;
}

/* Ensure any theme sticky overlay doesn't intercept clicks over our header */
.sticky-header-overlay {
    pointer-events: none;
}

/* Force-hide The7 mobile header elements so only the custom mobile menu is used */
.dt-mobile-header,
.mobile-header,
.mobile-sticky-header-overlay,
.dt-mobile-menu-icon,
.menu-toggle,
.menu-close-toggle {
    display: none !important;
}

/* Logo image sizing within navbar */
.logo img {
    display: block;
    height: 62px;
    width: auto;
}

/* Stack two logos and cross-fade on navbar focus */
.logo {
    position: absolute;
}
.logo .logo-active {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.navbar.active .logo .logo-active,
.navbar.scrolled .logo .logo-active {
    opacity: 1;
}
.navbar.active .logo .logo-main,
.navbar.scrolled .logo .logo-main {
    opacity: 0;
}

/* Show overlay when dropdown is active */
.overlay-blur.show {
    opacity: 1;
    pointer-events: auto;
}

/* Main content styling */
.main-content {
    max-width: 800px;
    margin: 120px auto;
    padding: 0 20px;
    line-height: 1.6;
}

.main-content h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.main-content p {
    margin-bottom: 1rem;
}

/* Mobile full‑screen menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98); /* More opaque for clarity */
    backdrop-filter: blur(12px);
    color: #111;
    z-index: 3990; /* Below navbar (4000) and above page content */
    transform: translateY(-100%);
    /* Classier ease-in-out easing */
    transition: transform 0.6s cubic-bezier(0.65, 0, 0.35, 1);
    padding: calc(var(--nav-height) + 20px) 20px 60px;
    overflow-y: auto;
}

.mobile-menu.open {
    transform: translateY(0);
}

/* Increase mobile menu top padding when admin bar is present */
/* Admin bar offsets removed. */

.mobile-menu ul {
    list-style: none;
    font-size: 1.2rem;
    padding: 0;
}

/* Mobile Menu Items */
.mobile-item {
    border-bottom: 1px solid #eee;
}

.mobile-link-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0; /* slightly tighter */
    cursor: pointer;
    font-weight: 600; /* Inter SemiBold */
    color: #333; /* match desktop submenu default */
    line-height: 1.2; /* slightly tighter */
    text-transform: uppercase; /* top-level labels stored normal-case; sub-menu items unaffected */
    text-decoration: none; /* HOME/NEWSFEED/CONNECT are now <a> — suppress underline */
    transition: color 0.2s ease;
}

.mobile-link-head:hover,
.mobile-item.active .mobile-link-head {
    color: #1c75bc; /* match desktop hover */
}

.toggle-icon {
    font-weight: 400;
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 0.4s ease;
}

.mobile-item.active .toggle-icon {
    transform: rotate(45deg);
}

/* Sub-menus: Container animation (Wipe effect) */
.mobile-sub-menu {
    max-height: 0;
    overflow: hidden;
    padding-left: 0;
    /* Closing: Wait for items to fade out (0.2s), then wipe up quickly */
    transition:
        max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s,
        padding 0.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
    font-size: 1rem;
}

.mobile-item.active .mobile-sub-menu {
    max-height: 550px; /* Tightened to just above largest content to prevent "hard break" */
    padding-bottom: 12px; /* slightly tighter */
    /* Opening: Slow, soft ease to mask the max-height speedup */
    transition:
        max-height 1.2s cubic-bezier(0.25, 1, 0.3, 1),
        padding 1.2s cubic-bezier(0.25, 1, 0.3, 1);
}

/* Mobile Menu Content Animation */
.mobile-menu ul,
.mobile-contact-footer,
.mobile-contact-card {
    opacity: 0;
    transform: translateY(-10px);
    transition:
        opacity 0.3s ease,
        transform 0.3s ease;
}

.mobile-menu.open ul,
.mobile-menu.open .mobile-contact-footer,
.mobile-menu.open .mobile-contact-card {
    opacity: 1;
    transform: translateY(0);
    /* Delayed fade in for luxury feel */
    transition:
        opacity 0.5s ease 0.2s,
        transform 0.5s ease 0.2s;
}

.mobile-sub-menu li {
    border: none;
    padding: 6px 0; /* slightly tighter */
    font-weight: 400;
    opacity: 0;
    transform: translateY(-10px);
    /* Closing: Fade out immediately */
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.mobile-item.active .mobile-sub-menu li {
    opacity: 1;
    transform: translateY(0);
    /* Opening: Fade in slowly */
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

/* Stagger delays: Start AFTER container begins opening (0.15s offset) */
.mobile-item.active .mobile-sub-menu li:nth-child(1) {
    transition-delay: 0.15s;
}
.mobile-item.active .mobile-sub-menu li:nth-child(2) {
    transition-delay: 0.2s;
}
.mobile-item.active .mobile-sub-menu li:nth-child(3) {
    transition-delay: 0.25s;
}
.mobile-item.active .mobile-sub-menu li:nth-child(4) {
    transition-delay: 0.3s;
}
.mobile-item.active .mobile-sub-menu li:nth-child(5) {
    transition-delay: 0.35s;
}
.mobile-item.active .mobile-sub-menu li:nth-child(6) {
    transition-delay: 0.4s;
}
.mobile-item.active .mobile-sub-menu li:nth-child(7) {
    transition-delay: 0.45s;
}
.mobile-item.active .mobile-sub-menu li:nth-child(8) {
    transition-delay: 0.5s;
}
.mobile-item.active .mobile-sub-menu li:nth-child(9) {
    transition-delay: 0.55s;
}
.mobile-item.active .mobile-sub-menu li:nth-child(10) {
    transition-delay: 0.6s;
}

.mobile-sub-menu a {
    text-decoration: none;
    color: #333;
    display: block;
    font-size: 0.95rem; /* match desktop submenu size */
    line-height: 1.2; /* slightly tighter */
}

.mobile-sub-menu a:hover {
    color: #1c75bc; /* updated hover blue */
}

/* Update hamburger open colors to Brand Blue */
.hamburger.open .menu-label {
    color: #003e7e;
}
.hamburger.open .hamburger-icon span {
    background: #003e7e !important; /* Override inline/previous styles */
}

/* Responsive adjustments */
@media (max-width: 1100px), (hover: none) and (pointer: coarse) {
    /* Restore original nav/logo sizing on mobile/tablet */
    :root {
        --nav-height: 92px;
    }
    .logo img {
        height: 52px;
    }

    .nav-items {
        display: none;
    }
    /* Ensure seamless wipe: navbar stays transparent so the menu background is visible sliding behind it */
    .navbar.active {
        background: transparent;
        backdrop-filter: none;
    }
    .hamburger {
        display: flex;
    }
    /* Ensure mobile menu is display:block so transform works */
    .mobile-menu {
        display: block;
        padding: 0; /* Remove padding from container */
        overflow-y: hidden; /* Disable scroll on container */
    }

    /* Scrollable wrapper starting below navbar */
    .mobile-scroll-wrapper {
        margin-top: var(--nav-height);
        height: calc(100vh - var(--nav-height));
        overflow-y: auto;
        padding: 20px 20px 60px; /* Original padding moved here */
    }
    /* Admin bar offsets removed. */
    /* Hide dropdowns entirely on mobile since the hamburger menu is used */
    .dropdown {
        display: none;
    }
    .overlay-blur {
        display: none;
    }
    .main-content {
        margin-top: 70px;
    }
    .mobile-contact-footer {
        position: relative;
        width: 100%;
        background: transparent;
        border-top: none;
        padding: 12px 8px;
        margin-top: 24px;
    }
    /* New stacked contact card at bottom of mobile menu */
    .mobile-contact-card {
        position: relative;
        width: 100%;
        background: transparent;
        border-top: none; /* avoid double separator; rely on last menu item's border-bottom */
        padding: 14px 8px 20px;
        margin-top: 10px;
        text-align: left;
    }
    .mobile-contact-card h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #003e7e;
    }
    .mobile-contact-card a {
        display: block;
        color: #333;
        text-decoration: none;
        font-size: 0.95rem;
        line-height: 1.25;
        margin: 0.2rem 0;
    }
    .mobile-contact-card a:hover {
        color: #1c75bc;
    }
    .mobile-contact-card .cta {
        margin-top: 0.6rem;
        font-weight: 600;
        color: #003e7e;
    }
    .mobile-contact-inner {
        display: flex;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
        font-size: 0.95rem;
        color: #333;
    }
    .mobile-contact-footer .label {
        font-family: inherit; /* sans-serif */
        text-transform: uppercase; /* all caps */
        letter-spacing: 0.06em;
        color: #003e7e;
    }
    .mobile-contact-footer a {
        color: #003e7e;
        text-decoration: none;
    }
}

/* Tighten mobile contact row on narrow phones so items don’t wrap mid-token */
@media (max-width: 430px) {
    .mobile-contact-inner {
        font-size: 0.9rem; /* slightly smaller to avoid wrap */
        gap: 8px; /* tighter spacing */
        flex-wrap: wrap; /* allow wrapping between items */
        row-gap: 6px; /* add vertical spacing when wrapped */
    }
    .mobile-contact-inner .label,
    .mobile-contact-inner a {
        white-space: nowrap; /* keep each item intact on one line */
    }
}

/* Slider Revolution fade-in once fully initialized (robust, versioned here) */
/* Start SR6 modules invisible; we'll fade them in on the "loaded" event or window.load fallback */
rs-module-wrap,
.rev_slider_wrapper {
    opacity: 0;
    transition: opacity 0.35s ease;
}

/* Class we add from JS once a slider is fully initialized */
rs-module-wrap.rs-ready,
.rev_slider_wrapper.rs-ready {
    opacity: 1;
}

/* Fix logo position on narrow screens to prevent cut-off */
@media (max-width: 850px) {
    .logo {
        left: 20px;
        transform: translateY(-50%);
    }
}
