/* Header component styles */
.remark-header {
    /* centralize header-related color tokens so related components stay in sync */
    --remark-header-nav-color: #0c1f3f; /* default nav item color */
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.remark-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas: "brand nav-group actions";
    align-items: center;
    padding: 0;
}

.remark-header__nav-center-group {
    grid-area: nav-group;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
}

.remark-header__brand {
    grid-area: brand;
    display: flex;
    align-items: center;
    justify-self: start;
}

.remark-header__logo {
    display: inline-flex;
    align-items: center;
}

.remark-header__logo-img {
    display: block;
    height: 32px;
    width: auto;
}

.remark-header__logo-text {
    font-family: var(--remark-font-title, 'Helvetica Neue', Arial, sans-serif);
    font-weight: 700;
    font-size: 1.25rem;
    color: #093776;
}

/* .remark-header__nav wrapper — styles are defined in the child selectors below */

.remark-header__nav-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.remark-header__nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.remark-header__nav-link,
.remark-header__nav-button {
    font-family: var(--remark-font-body, 'Helvetica Neue', Arial, sans-serif);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--remark-header-nav-color);
    background: transparent;
    border: 0;
    padding: 8px 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.2s ease;
}

.remark-header__nav-link:hover,
.remark-header__nav-link:focus,
.remark-header__nav-button:hover,
.remark-header__nav-button:focus {
    color: #00357A;
}

.remark-header__nav-caret {
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid currentColor;
    margin-left: 2px;
    transition: transform 0.2s ease;
}

.remark-header__nav-item--dropdown[aria-expanded='true'] .remark-header__nav-caret,
.remark-header__nav-button[aria-expanded='true'] .remark-header__nav-caret {
    transform: rotate(-180deg);
}

.remark-header__dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 160px;
    padding: 12px 0;
    background: #ffffff;
    border-radius: 16px;
    /* no drop shadow for cleaner, flatter header */
    box-shadow: none;
    border: 1px solid rgba(12, 31, 63, 0.08);
    z-index: 1000;
}

.remark-header__dropdown[hidden] {
    display: none;
}

.remark-header__dropdown--right {
    left: auto;
    right: 0;
    transform: none;
    z-index: 100;
}

.remark-header__dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.remark-header__dropdown-link {
    display: block;
    padding: 8px 20px;
    font-size: 0.9rem;
    color: #0c1f3f;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.remark-header__dropdown-link:hover,
.remark-header__dropdown-link:focus {
    /* keep background transparent on hover for a flatter look */
    background: transparent;
    color: #00357A;
}

.remark-header__center {
    position: relative;
    top: 21px; /* Adjust this value to get the 60/40 split */
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50%;
    padding: 10px;
}

.remark-header__center-shadow-caster {
    position: fixed;
    z-index: 999;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.remark-header__center-img {
    display: block;
    width: 42px;
    height: 42px;
    object-fit: contain;
    transition: transform 0.3s ease-in-out;
}

.remark-header__center:hover .remark-header__center-img {
    transform: scale(1.1);
}

.remark-header__actions {
    grid-area: actions;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-self: end;
}

.remark-header__social-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    height: 45px;
}

.remark-header__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    transform: scale(1);
    transform-origin: center;
    will-change: transform;
    transition-property: transform, background;
    transition-duration: 0.8s, 0.3s;
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1.6), ease;
}

.remark-header__social-link:hover,
.remark-header__social-link:focus {
    background: transparent;
    transform: scale(1.15);
    transition-duration: 0.8s, 0.3s;
    transition-timing-function: cubic-bezier(0.25, 0.8, 0.25, 1.6), ease;
}

.remark-header__social-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.remark-header__country {
    position: relative;
}

.remark-header__country-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(9, 55, 118, 0.16);
    border-radius: 999px;
    padding: 6px 16px;
    background: #ffffff;
    /* no drop shadow as requested */
    box-shadow: none;
    cursor: pointer;
    font-family: var(--remark-font-body, 'Helvetica Neue', Arial, sans-serif);
    font-size: 0.9rem;
    font-weight: 600;
    color: #00357A;
    transition: border-color 0.2s ease, color 0.2s ease;
    height: 45px;
}

.remark-header__country-button:hover,
.remark-header__country-button:focus {
    border-color: #0b59c9;
    color: #0b59c9;
}

.remark-header__country-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.remark-header__country-label {
    line-height: 1;
}

@media (max-width: 960px) {

    .remark-header__inner {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
        padding: 10px 0;
    }

    .remark-header__actions {
        gap: 12px;
    }

    .remark-header__nav-list {
        flex-wrap: wrap;
        gap: 18px;
    }

    .remark-header__country-button {
        padding: 6px 12px;
    }
}

.remark-section--header {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100vw;
    z-index: 1000;
    padding: 0 24px;
    box-sizing: border-box;
}

.admin-bar .remark-section--header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .remark-section--header {
        top: 46px;
    }
    .remark-section--header {
        padding: 0;
    }
}

.remark-header__nav--left .remark-header__nav-list {
    justify-content: flex-end;
}

.remark-header__nav--right .remark-header__nav-list {
    justify-content: flex-start;
}

.remark-header__desktop-group {
    display: contents;
}

.remark-header__mobile-group {
    display: none; /* Hidden by default */
}

/* Hamburger */
.remark-header__hamburger {
    display: inline-block;
    cursor: pointer;
    background-color: transparent;
    border: 0;
    padding: 8px;
    margin: 0;
}

@media (max-width: 992px) {
    .remark-header__inner {
        grid-template-columns: auto 1fr;
        grid-template-areas: "brand mobile-group";
        justify-content: space-between;
        justify-items: stretch;
        padding: 0 16px;
    }

    .remark-header__desktop-group {
        display: none;
    }

    .remark-header__mobile-group {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }

    .remark-header__bottom-bar {
        display: none;
    }
}

/* Mobile Nav */
.remark-mobile-nav {
     position: fixed;
     top: 0;
     right: 0;
     width: 90vw;
     max-width: 600px;
     /* Use a JS-updated CSS variable to match the real viewport height (accounts
         for mobile browser chrome). Fallback to 100dvh / 100vh if the variable
         isn't set. */
     min-height: var(--remark-app-height, 100dvh);
     max-height: var(--remark-app-height, 100dvh);
     /* fallbacks for browsers that don't support dynamic viewport units */
     max-height: 100dvh;
     max-height: 100vh;
     background-color: #ffffff;
     transform: translateX(100%);
     transition: transform 0.3s ease-in-out;
     z-index: 1001;
     /* make the panel a column flex container so its content can stretch
         and the actions block can be pushed to the bottom via margin-top:auto */
     display: flex;
     flex-direction: column;
     overflow-y: auto;
     /* animate height changes so when the browser chrome expands/collapses
         the panel adjusts smoothly instead of jumping */
     transition: max-height 240ms cubic-bezier(.22,.9,.26,1), min-height 240ms cubic-bezier(.22,.9,.26,1);
     box-shadow: none;
}

@media (min-width: 993px) {
    .remark-mobile-nav {
        display: none;
    }
}

.remark-mobile-nav.is-open {
    transform: translateX(0);
}

.remark-mobile-nav__close {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2.5rem;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #0c1f3f;
    z-index: 10;
    line-height: 1;
}

.remark-mobile-nav__content {
    padding: 80px 20px 20px;
    display: flex;
    flex-direction: column;
    /* allow this area to grow to fill the available panel space so
       margin-top:auto on the actions container pushes it to the bottom */
    flex: 1 1 auto;
}

/* Align mobile nav items under the country button's left edge (20px)
   We move the nav content to start at 20px and ensure nav list is left-aligned. */
.remark-mobile-nav__content {
    padding-left: 30px; /* create left gutter matching country button (30px requested) */
    padding-right: 20px; /* keep right padding symmetric */
    box-sizing: border-box;
}

/* Move the country button in the mobile nav to the top-left of the panel */
.remark-mobile-nav .remark-header__country {
    position: absolute;
    /* align vertically with the close (×) button */
    top: 20px;
    left: 20px; /* match the close button's right gap */
    z-index: 1100;
}

.remark-mobile-nav .remark-header__country-button {
    height: 40px;
    padding: 6px 12px;
    border-radius: 999px;
}

/* Ensure the close button remains visible/top-right */
.remark-mobile-nav__close {
    z-index: 1110;
}

/* When WP admin bar is present the mobile nav is pushed down; keep country button lower than the close button */
.admin-bar .remark-mobile-nav .remark-header__country {
    top: 20px; /* match the close button offset so they align */
    left: 20px;
}

/* mobile nav emblem styles removed — emblem no longer included in mobile markup */

.remark-mobile-nav__nav {
    display: block;
    margin-bottom: 30px;
}

.remark-mobile-nav__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.remark-mobile-nav__item {
    margin-bottom: 0;
}

.remark-mobile-nav__link,
.remark-mobile-nav__toggle {
    display: block;
    width: 100%;
    text-align: left;
    padding: 16px 0;
    font-size: 18px;
    font-weight: 500;
    color: #0c1f3f;
    text-decoration: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    transition: color 0.2s ease;
    /* removed border-bottom divider for mobile nav */
    border-bottom: none;
}

.remark-mobile-nav__link:hover,
.remark-mobile-nav__toggle:hover {
    color: #00357A;
}

.remark-mobile-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* keep label and arrow together */
    gap: 8px; /* small gap between label and arrow */
    font-family: inherit;
}

.remark-mobile-nav__label {
    flex: none; /* do not stretch label to push arrow to far right */
}

.remark-mobile-nav__arrow {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    margin-left: 0; /* gap handled by `gap` on the toggle */
}

.remark-mobile-nav__toggle[aria-expanded="true"] .remark-mobile-nav__arrow {
    transform: rotate(180deg);
}

.remark-mobile-nav__submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.remark-mobile-nav__submenu.is-open {
    max-height: 500px; /* Adjust based on expected content */
}

.remark-mobile-nav__submenu-item {
    margin: 0;
}

.remark-mobile-nav__submenu-link {
    display: block;
    padding: 12px 0 12px 20px;
    font-size: 16px;
    font-weight: 600;
    color: #0c1f3f;
    text-decoration: none;
    transition: color 0.2s ease, padding-left 0.2s ease;
    /* ensure no divider on submenu links either */
    border-bottom: none;
}

.remark-mobile-nav__submenu-link:hover {
    color: #00357A;
    padding-left: 24px;
}

.remark-mobile-nav__nav .remark-header__nav-list { align-items: center; }

/* stronger selector to override any other rules that may push the arrow to the far right */
.remark-mobile-nav__nav .remark-mobile-nav__toggle {
    justify-content: flex-start !important;
    gap: 8px !important;
}
.remark-mobile-nav__nav .remark-mobile-nav__label {
    flex: none !important;
}
.remark-mobile-nav__nav .remark-mobile-nav__arrow {
    margin-left: 0 !important;
}

/* Final override to ensure no dividers appear between mobile nav items */
.remark-mobile-nav__nav .remark-mobile-nav__link,
.remark-mobile-nav__nav .remark-mobile-nav__toggle,
.remark-mobile-nav__nav .remark-mobile-nav__submenu-link {
    border-bottom: none !important;
    box-shadow: none !important;
}

/* enforce border removal at a more granular level */
.remark-mobile-nav__nav .remark-mobile-nav__link,
.remark-mobile-nav__nav .remark-mobile-nav__toggle {
    border-bottom-width: 0 !important;
    border-bottom-style: none !important;
    border-bottom-color: transparent !important;
}

.remark-mobile-nav__actions {
    margin-top: auto;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* left-align contents */
    gap: 20px;
    /* remove extra bottom/left padding per request */
    padding-bottom: 0;
    padding-left: 0;
    width: 100%;
}

.remark-mobile-nav__actions .remark-header__social-list {
    justify-content: flex-start; /* align icons to the left */
    /* reduced gap between social icons in the mobile actions area */
    gap: 8px;
    /* remove fixed list height on mobile so icons can sit tight */
    height: auto;
    padding-left: 0;
    margin-left: 0;
}

/* Make social anchors wrap the icon tightly inside the mobile nav actions area
   (removes circular padding only for mobile panel). Desktop circular buttons
   remain unchanged. */
.remark-mobile-nav__actions .remark-header__social-link {
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.remark-mobile-nav__actions .remark-header__country {
    margin: 0;
}

.remark-mobile-nav__nav .remark-header__nav-list {
    flex-direction: column;
    align-items: flex-start; /* left-align items */
    gap: 10px;
    width: 100%;
    padding-left: 0; /* reset any inherited left padding */
}

.remark-mobile-nav__nav .remark-header__nav-item {
    width: 100%;
    text-align: left; /* align text with the left gutter */
}

.remark-mobile-nav__nav .remark-header__nav-link,
.remark-mobile-nav__nav .remark-header__nav-button {
    width: 100%;
    padding: 10px 0;
    font-size: 1.2rem;
    justify-content: flex-start; /* keep content flush with left edge */
    padding-left: 0; /* since content is within the padded container */
}

/* Highest specificity override targeted at the open mobile panel */
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__link,
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__toggle,
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__submenu-link {
    border-bottom-width: 0 !important;
    border-bottom-style: none !important;
    border-bottom-color: transparent !important;
    box-shadow: none !important;
}

/* Ensure submenu links inside the open mobile panel are bold */
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__submenu-link {
    font-weight: 600;
}

/* Disable tap highlight and active flash on mobile nav items */
/* include country button in mobile panel to prevent tap highlight */
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__link,
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__toggle,
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__submenu-link,
#remark-mobile-nav.remark-mobile-nav .remark-header__country-button {
    -webkit-tap-highlight-color: transparent !important; /* Android/Chrome */
    -webkit-touch-callout: none !important; /* iOS Safari */
    -webkit-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* Ensure no background appears on touch/active/focus states (include country button) */
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__link:active,
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__toggle:active,
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__submenu-link:active,
#remark-mobile-nav.remark-mobile-nav .remark-header__country-button:active,
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__link:focus,
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__toggle:focus,
#remark-mobile-nav.remark-mobile-nav .remark-mobile-nav__nav .remark-mobile-nav__submenu-link:focus,
#remark-mobile-nav.remark-mobile-nav .remark-header__country-button:focus {
    background: transparent !important;
    background-color: transparent !important;
    color: inherit !important;
    outline: none !important;
}

.remark-mobile-nav__nav .remark-header__dropdown {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    padding-left: 20px;
}

/* Country dropdown styling for mobile nav (country button is already absolutely positioned at top-left) */
.remark-mobile-nav .remark-header__country .remark-header__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    min-width: 160px;
    background: #ffffff;
    border: 1px solid rgba(12, 31, 63, 0.12);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 8px 0;
    z-index: 1200;
}

.remark-mobile-nav .remark-header__country .remark-header__dropdown[hidden] {
    display: none;
}

.remark-mobile-nav .remark-header__country .remark-header__dropdown-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.remark-mobile-nav .remark-header__country .remark-header__dropdown-item {
    margin: 0;
}

.remark-mobile-nav .remark-header__country .remark-header__dropdown-link {
    display: block;
    padding: 10px 16px;
    font-size: 0.95rem;
    color: #0c1f3f;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Ensure mobile country dropdown uses Inter at regular weight and slightly smaller size */
#remark-mobile-country .remark-header__dropdown-link {
    font-family: 'Inter', Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
}

.remark-mobile-nav .remark-header__country .remark-header__dropdown-link:hover,
.remark-mobile-nav .remark-header__country .remark-header__dropdown-link:active {
    background-color: rgba(0, 53, 122, 0.05);
    color: #00357A;
}

/* Ensure country button text and caret use the same primary blue in the mobile panel */
#remark-mobile-nav.remark-mobile-nav .remark-header__country-button {
    color: #00357A;
}

html.mobile-nav-is-open,
body.mobile-nav-is-open {
    overflow-x: hidden;
}

.admin-bar .remark-mobile-nav {
    top: 32px;
     /* when WP admin bar is present keep the panel within the reduced viewport
         using the JS-updated app height */
     min-height: calc(var(--remark-app-height, 100vh) - 32px);
     max-height: calc(var(--remark-app-height, 100vh) - 32px);
     /* fallbacks */
     max-height: calc(100dvh - 32px);
     max-height: calc(100vh - 32px);
}

@media screen and (max-width: 782px) {
    .admin-bar .remark-mobile-nav {
        top: 46px;
        min-height: calc(var(--remark-app-height, 100vh) - 46px);
        max-height: calc(var(--remark-app-height, 100vh) - 46px);
        /* fallbacks */
        max-height: calc(100dvh - 46px);
        max-height: calc(100vh - 46px);
    }
}

/* Mega Menu */
.remark-header__nav-item--mega-menu {
    position: static;
}

/* Show a small down-arrow to indicate a mega menu on nav items */
.remark-header__nav-item--mega-menu > .remark-header__nav-link::after {
    content: "";
    display: inline-block;
    width: 12px;
    height: 8px;
    margin-left: 0;
    vertical-align: middle;
    /* Inline SVG using currentColor so the arrow inherits link color */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M12 1.51653L10.59 -6.16331e-08L6 4.92601L1.41 -4.62904e-07L-6.62894e-08 1.51652L6 7.96982L12 1.51653Z' fill='currentColor'/></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

/* Slight rotate when parent gets an 'is-open' class (if JS toggles it) */
.remark-header__nav-item--mega-menu.is-open > .remark-header__nav-link::after {
    transform: rotate(-180deg);
}

.remark-mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
}

/* Show mega menu when JS adds the `is-open` class */
.remark-mega-menu.is-open {
    opacity: 1;
    visibility: visible;
}

.remark-mega-menu__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 0;
}

.remark-mega-menu__brand-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.remark-mega-menu__brand-item {
    text-align: center;
    flex: 0 0 8%;
}

.remark-mega-menu__brand-link {
    display: block;
    text-decoration: none;
    color: #0c1f3f;
    transition: color 0.2s ease;
}

.remark-mega-menu__brand-link:hover {
    color: #0b59c9;
}

.remark-mega-menu__brand-logo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 60px; /* limit height to 60px as requested */
}

.remark-mega-menu__brand-logo {
    max-width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

.remark-mega-menu__brand-name {
    display: none;
}

/* Custom Mega Menu (non-brands) styles */
/* Layout: left = title, right = stacked menu items */
.remark-mega-menu--custom {
    /* Center the custom mega menu content horizontally and vertically within the dropdown area */
    display: flex;
    align-items: center;
    justify-content: center;
}

.remark-mega-menu--custom .remark-mega-menu__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 0;
    display: grid;
    grid-template-columns: auto 260px; /* left column for items, right for title */
    gap: 0 40px;
    align-items: center; /* vertically center title and items */
}

.remark-mega-menu--custom .remark-mega-menu__title {
    font-size: 1.05rem;
    font-weight: 700;
    /* use the same nav color variable so the title always matches nav items */
    color: var(--remark-header-nav-color);
    margin: 0;
    grid-column: 2; /* place title in the right column */
    grid-row: 1;
    align-self: center; /* vertically center the title within the inner grid */
    text-align: center; /* center title horizontally within its column */
    justify-self: center; /* center the title block in the grid column */
}

.remark-mega-menu--custom .remark-mega-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column; /* stack items vertically */
    gap: 8px;
    grid-column: 1; /* items live in the left column */
    align-items: flex-start; /* left-align items horizontally within the list */
    margin-left: 0; /* will be set dynamically to align under trigger */
}

.remark-mega-menu__item {
    padding: 0;
}

/* Scope link hover/animation for custom menus only */
.remark-mega-menu--custom .remark-mega-menu__link {
    display: block;
    color: #0c1f3f;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    /* match primary nav color transition so hover feels consistent */
    transition: color 0.2s ease;
    background: transparent; /* no background */
    text-align: left; /* left-align the link text */
}

.remark-mega-menu--custom .remark-mega-menu__link:hover,
.remark-mega-menu--custom .remark-mega-menu__link:focus {
    background: transparent; /* explicitly keep transparent */
    /* match primary nav hover color (nav link hover uses #00357A) */
    color: #00357A;
    outline: none;
    transform: none;
}

/* Accessible focus-visible fallback (still useful for keyboard users) */
.remark-mega-menu--custom .remark-mega-menu__link:focus-visible {
    box-shadow: 0 0 0 3px rgba(11, 89, 201, 0.14);
}

/* Responsive: collapse to single column on smaller viewports for custom menus */
@media (max-width: 800px) {
    .remark-mega-menu--custom .remark-mega-menu__inner {
        grid-template-columns: 1fr;
        padding: 28px 16px;
    }
    .remark-mega-menu--custom .remark-mega-menu__title {
        grid-column: 1;
        margin-top: 12px;
    }
    .remark-mega-menu--custom .remark-mega-menu__list {
        grid-column: 1;
    }
}

/* Ensure the mega menu doesn't block interactions when hidden */
.remark-mega-menu {
    pointer-events: none;
}
.remark-mega-menu.is-open {
    pointer-events: auto;
}