/* ─────────────────────────────────────────────────────────────────
   Mobile menu — off-canvas panel overhaul
   Full-width dark navy panel, editorial serif items, staggered
   drop-in, gold accent on hover, expanded sub-menus visible inline.
   ───────────────────────────────────────────────────────────────── */
#offcanvas-navbar {
    background: var(--ndm-dark-blue);
    color: #fff;
    width: 100vw !important;
    max-width: 100vw;
    box-shadow: -12px 0 40px rgba(0, 0, 0, 0.35);
}
#offcanvas-navbar .offcanvas-header {
    padding: 0.85rem 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
}
#offcanvas-navbar .offcanvas-title {
    font-family: var(--font-heading-secondary);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--ndm-gold);
    letter-spacing: 0.03em;
    text-transform: none;
    font-weight: 400;
}
#offcanvas-navbar .btn-close {
    filter: invert(1);
    opacity: 0.75;
    transition: opacity 0.2s;
}
#offcanvas-navbar .btn-close:hover { opacity: 1; }

#offcanvas-navbar .offcanvas-body {
    padding: 1.25rem 1.75rem 3rem;
}

/* Top-level nav items — big serif, one per row with a hairline separator */
#offcanvas-navbar .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
#offcanvas-navbar .navbar-nav .nav-item:last-child { border-bottom: none; }

#offcanvas-navbar .navbar-nav > .nav-item > .nav-link {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: #fff !important;
    padding: 1.15rem 0;
    line-height: 1.15;
    letter-spacing: -0.01em;
    transition: color 0.2s, padding-left 0.2s;
    position: relative;
}
#offcanvas-navbar .navbar-nav > .nav-item > .nav-link:hover,
#offcanvas-navbar .navbar-nav > .nav-item > .nav-link:focus {
    color: var(--ndm-gold) !important;
    padding-left: 0.5rem;
}

/* Sub-menus — collapsed by default, tap-to-expand via +/− button */
#offcanvas-navbar .dropdown-menu {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    position: static !important;
    display: block !important;
    margin: 0 !important;
    float: none !important;
    min-width: 0 !important;
    padding: 0 0 0 1rem !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
#offcanvas-navbar .menu-item-has-children.is-open > .dropdown-menu {
    max-height: 2000px;
    padding: 0.5rem 0 0.85rem 1rem !important;
}
#offcanvas-navbar .dropdown-menu .dropdown-item,
#offcanvas-navbar .dropdown-menu > li > a {
    color: rgba(255, 255, 255, 0.72) !important;
    font-family: var(--font-main);
    font-size: 0.95rem;
    padding: 0.35rem 0 !important;
    background: transparent !important;
    border: none !important;
    white-space: normal;
    display: block;
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
}
#offcanvas-navbar .dropdown-menu .dropdown-item:hover,
#offcanvas-navbar .dropdown-menu .dropdown-item:focus,
#offcanvas-navbar .dropdown-menu > li > a:hover {
    color: var(--ndm-gold) !important;
    padding-left: 0.4rem !important;
}
#offcanvas-navbar .dropdown-menu .dropdown-menu { padding-left: 1rem !important; }

/* +/− toggle button on each parent that has children.
   Because #offcanvas-navbar is the SAME element used as the desktop nav (via
   .navbar-expand-lg), we must hide the toggle on lg+ so it doesn't leak into
   the desktop nav after a mobile-first page load. */
@media (min-width: 992px) {
    #offcanvas-navbar .ndm-mm-toggle { display: none !important; }
}
#offcanvas-navbar .menu-item-has-children > .nav-link,
#offcanvas-navbar .dropdown-menu li.menu-item-has-children > a {
    padding-right: 3.25rem !important;
    position: relative;
}
#offcanvas-navbar .menu-item-has-children { position: relative; }
#offcanvas-navbar .ndm-mm-toggle {
    position: absolute;
    right: 0;
    /* Fixed offset from top so the toggle stays parked with the parent link
       and doesn't drift into the middle when the sub-menu expands below. */
    top: 1.15rem;
    transform: none;
    width: 34px;
    height: 34px;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    background: transparent;
    color: #fff;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    z-index: 3;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
}
/* Nested (in-dropdown) parents get a smaller borderless +/− (no circle) */
#offcanvas-navbar .dropdown-menu .menu-item-has-children > .ndm-mm-toggle {
    top: 0.15rem;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
}
#offcanvas-navbar .dropdown-menu .menu-item-has-children > .ndm-mm-toggle::before {
    font-size: 1.35rem;
}
#offcanvas-navbar .dropdown-menu .menu-item-has-children.is-open > .ndm-mm-toggle {
    background: transparent;
    border: none;
    color: var(--ndm-gold);
}
/* Open state: swap the '−' character for a CSS-drawn horizontal line so it
   reads as a proper minus (not a tiny dot). */
#offcanvas-navbar .dropdown-menu .menu-item-has-children.is-open > .ndm-mm-toggle::before {
    content: '';
    width: 14px;
    height: 2.5px;
    background: #fff;
    display: block;
    border-radius: 2px;
    transform: none;
}
#offcanvas-navbar .dropdown-menu .menu-item-has-children > .ndm-mm-toggle:hover {
    color: var(--ndm-gold);
    background: transparent;
    border: none;
}
/* Top-level toggle glyph — two drawn bars (avoid font-glyph render bugs).
   Vertical bar hides when open so you see '+' → '−' with no content-swap. */
#offcanvas-navbar .navbar-nav > .menu-item-has-children > .ndm-mm-toggle::before,
#offcanvas-navbar .navbar-nav > .menu-item-has-children > .ndm-mm-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: currentColor;
    border-radius: 2px;
    transition: opacity 0.2s, transform 0.2s;
}
#offcanvas-navbar .navbar-nav > .menu-item-has-children > .ndm-mm-toggle::before {
    width: 14px;
    height: 2.5px;
    transform: translate(-50%, -50%);
}
#offcanvas-navbar .navbar-nav > .menu-item-has-children > .ndm-mm-toggle::after {
    width: 2.5px;
    height: 14px;
    transform: translate(-50%, -50%);
}
#offcanvas-navbar .navbar-nav > .menu-item-has-children.is-open > .ndm-mm-toggle {
    background: var(--ndm-gold);
    border-color: var(--ndm-gold);
    color: var(--ndm-dark-blue);
}
#offcanvas-navbar .navbar-nav > .menu-item-has-children.is-open > .ndm-mm-toggle::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Fallback default for any nested/other toggles: keep the '+' character */
#offcanvas-navbar .dropdown-menu .menu-item-has-children > .ndm-mm-toggle::before {
    content: '+';
    font-family: var(--font-heading-secondary);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
    color: inherit;
    display: block;
    transform: translateY(-1px);
    position: static;
    background: transparent;
    width: auto;
    height: auto;
    border-radius: 0;
}
#offcanvas-navbar .ndm-mm-toggle:hover {
    border-color: var(--ndm-gold);
    color: var(--ndm-gold);
}

/* Cascade reveal of sub-menu items when a parent opens */
@keyframes ndm-mm-sub-in {
    from { opacity: 0; transform: translateX(14px); }
    to   { opacity: 1; transform: translateX(0); }
}
#offcanvas-navbar .is-open > .dropdown-menu > li {
    animation: ndm-mm-sub-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(1)  { animation-delay: 0.04s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(2)  { animation-delay: 0.08s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(3)  { animation-delay: 0.12s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(4)  { animation-delay: 0.16s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(5)  { animation-delay: 0.20s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(6)  { animation-delay: 0.24s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(7)  { animation-delay: 0.28s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(8)  { animation-delay: 0.32s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(9)  { animation-delay: 0.36s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(10) { animation-delay: 0.40s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(11) { animation-delay: 0.44s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(12) { animation-delay: 0.48s; }
#offcanvas-navbar .is-open > .dropdown-menu > li:nth-child(n+13) { animation-delay: 0.50s; }

/* Staggered drop-in on open — items cascade with a small delay */
@keyframes ndm-mobile-menu-stagger {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}
#offcanvas-navbar.show .navbar-nav > .nav-item {
    animation: ndm-mobile-menu-stagger 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(1)  { animation-delay: 0.05s; }
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(2)  { animation-delay: 0.10s; }
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(3)  { animation-delay: 0.15s; }
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(4)  { animation-delay: 0.20s; }
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(5)  { animation-delay: 0.25s; }
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(6)  { animation-delay: 0.30s; }
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(7)  { animation-delay: 0.35s; }
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(8)  { animation-delay: 0.40s; }
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(9)  { animation-delay: 0.45s; }
#offcanvas-navbar.show .navbar-nav > .nav-item:nth-child(10) { animation-delay: 0.50s; }

/* Backdrop with slight blur so the site behind reads as "paused" */
.offcanvas-backdrop.show {
    background: rgba(13, 59, 97, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
}

/* Kill dropdown carets — sub-menus are always expanded here */
#offcanvas-navbar .dropdown-toggle::after { display: none !important; }

/* ─────────────────────────────────────────────────────────────
   Mobile menu — logo replaces "Menu" text
   ───────────────────────────────────────────────────────────── */
#offcanvas-navbar .ndm-mm-title { display: flex; align-items: center; }
#offcanvas-navbar .ndm-mm-title .custom-logo-link,
#offcanvas-navbar .ndm-mm-title a { display: inline-flex; align-items: center; padding: 0; }
#offcanvas-navbar .ndm-mm-title img {
    display: block;
    max-height: 48px;
    width: auto;
    /* Use approved logo colors as-is; the shield detail is important. */
}

/* ─────────────────────────────────────────────────────────────
   Recently Viewed block inside off-canvas menu
   ───────────────────────────────────────────────────────────── */
.ndm-recent-viewed {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.ndm-recent-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}
.ndm-recent-label {
    font-family: var(--font-heading-secondary);
    font-style: italic;
    font-size: 0.95rem;
    color: var(--ndm-gold);
    letter-spacing: 0.02em;
}
.ndm-recent-clear {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    padding: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.ndm-recent-clear:hover { color: var(--ndm-gold); }
.ndm-recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: recent-counter;
}
.ndm-recent-list li {
    counter-increment: recent-counter;
    padding: 0.4rem 0 0.4rem 1.75rem;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ndm-recent-list li:last-child { border-bottom: none; }
.ndm-recent-list li::before {
    content: counter(recent-counter);
    position: absolute;
    left: 0;
    top: 0.4rem;
    font-family: var(--font-heading-secondary);
    font-style: italic;
    font-size: 0.85rem;
    color: rgba(244, 178, 35, 0.7);
    width: 1.25rem;
    text-align: left;
}
.ndm-recent-list a {
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.95rem;
    line-height: 1.35;
    display: block;
    transition: color 0.2s, padding-left 0.2s;
}
.ndm-recent-list a:hover { color: var(--ndm-gold) !important; padding-left: 0.3rem; }

/* ─────────────────────────────────────────────────────────────
   Mobile menu search bar (top of off-canvas body)
   ───────────────────────────────────────────────────────────── */
.ndm-mm-search {
    display: flex;
    align-items: stretch;
    margin: 0 0 1rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: border-color 0.2s;
}
.ndm-mm-search:focus-within {
    border-color: var(--ndm-gold);
    background: rgba(255, 255, 255, 0.10);
}
.ndm-mm-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-main);
    font-size: 0.95rem;
    padding: 0.85rem 1rem;
}
.ndm-mm-search-input::placeholder { color: rgba(255, 255, 255, 0.45); }
.ndm-mm-search-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 0 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}
.ndm-mm-search-btn:hover { color: var(--ndm-gold); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ─────────────────────────────────────────────────────────────
   Mobile menu — quick-action pills, event chip, utility, contact
   ───────────────────────────────────────────────────────────── */

/* Quick action pills */
.ndm-mm-quick {
    display: flex;
    gap: 0.5rem;
    margin: 0 0 1rem;
}
.ndm-mm-pill {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none !important;
    padding: 0.45rem 0;
    margin: 0;
    font-family: var(--font-main);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff !important;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    text-transform: none;
    line-height: 1;
}
.ndm-mm-pill:hover, .ndm-mm-pill:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--ndm-gold);
    color: var(--ndm-gold) !important;
}
.ndm-mm-pill.ndm-mm-pill-primary {
    background: var(--ndm-gold);
    border-color: var(--ndm-gold);
    color: var(--ndm-dark-blue) !important;
}
.ndm-mm-pill.ndm-mm-pill-primary:hover,
.ndm-mm-pill.ndm-mm-pill-primary:focus {
    background: #fff;
    border-color: #fff;
    color: var(--ndm-dark-blue) !important;
}

/* Featured event chip */
.ndm-mm-event {
    display: flex;
    align-items: stretch;
    gap: 0.85rem;
    text-decoration: none !important;
    padding: 0.85rem 1rem;
    margin: 0 0 1.25rem;
    background: rgba(156, 196, 230, 0.10);
    border-left: 3px solid var(--ndm-gold);
    color: #fff !important;
    transition: background 0.2s;
}
.ndm-mm-event:hover { background: rgba(156, 196, 230, 0.18); }
.ndm-mm-event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding-right: 0.85rem;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}
.ndm-mm-event-month {
    font-family: var(--font-main);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ndm-gold);
    letter-spacing: 0.06em;
    line-height: 1;
}
.ndm-mm-event-day {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-top: 0.15rem;
}
.ndm-mm-event-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.ndm-mm-event-label {
    font-family: var(--font-heading-secondary);
    font-style: italic;
    font-size: 0.8rem;
    color: var(--ndm-gold);
    letter-spacing: 0.02em;
    line-height: 1.1;
    margin-bottom: 0.15rem;
}
.ndm-mm-event-title {
    font-family: var(--font-main);
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ndm-mm-event-arrow {
    display: flex;
    align-items: center;
    color: var(--ndm-gold);
    font-size: 1.15rem;
    transition: transform 0.2s;
}
.ndm-mm-event:hover .ndm-mm-event-arrow { transform: translateX(4px); }

/* Utility strip */
.ndm-mm-utility {
    margin: 2rem 0 1.75rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
}
.ndm-mm-utility a {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none;
    font-family: var(--font-main);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}
.ndm-mm-utility a:hover { color: var(--ndm-gold) !important; }

/* Contact block */
.ndm-mm-contact {
    margin-top: 0;
    padding: 0.5rem 0 0;
}
.ndm-mm-address {
    font-family: var(--font-main);
    font-size: 0.88rem;
    font-style: normal;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.45;
    margin: 0 0 0.75rem;
}
.ndm-mm-phone {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--ndm-gold) !important;
    text-decoration: none !important;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
    transition: color 0.2s;
}
.ndm-mm-phone:hover { color: #fff !important; }
.ndm-mm-social {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}
.ndm-mm-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.ndm-mm-social a:hover {
    background: var(--ndm-gold);
    color: var(--ndm-dark-blue);
}
.ndm-mm-social i { line-height: 1; }

/* Explicit display overrides for elements hidden by default in ndm-theme.css.
   Because mobile-menu.css only loads on mobile viewports, these show ONLY there. */
.ndm-mm-search { display: flex !important; }
.ndm-mm-quick { display: flex !important; }
.ndm-mm-event { display: flex !important; }
.ndm-mm-utility { display: flex !important; }
.ndm-mm-contact { display: block !important; }
.ndm-recent-viewed { display: block !important; }
/* The Recently Viewed section starts hidden via the HTML `hidden` attribute
   and is un-hidden by JS once populated — respect that. */
.ndm-recent-viewed[hidden] { display: none !important; }
