/* ==========================================================================
   MenThee — site-wide design layer
   Loaded last on every page. Refines typography, header, navigation,
   footer, focus states and motion without changing page markup.
   ========================================================================== */

:root {
    --mt-primary: #1b4b94;
    --mt-primary-600: #0a4e98;
    --mt-primary-700: #0b3a75;
    --mt-accent: #1b89d3;
    --mt-accent-soft: #e8f3fc;
    --mt-ink: #0f1f33;
    --mt-text: #42536a;
    --mt-muted: #64748b;
    --mt-surface: #f5f8fc;
    --mt-border: #e2e8f0;
    --mt-success: #0f8a5f;
    --mt-danger: #c0392b;
    --mt-radius-sm: 8px;
    --mt-radius: 14px;
    --mt-radius-lg: 20px;
    --mt-shadow-sm: 0 1px 2px rgba(15, 31, 51, .06), 0 1px 3px rgba(15, 31, 51, .08);
    --mt-shadow: 0 10px 30px -12px rgba(15, 31, 51, .18);
    --mt-shadow-lg: 0 24px 60px -20px rgba(15, 31, 51, .28);
    --mt-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --mt-font-heading: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --mt-ease: cubic-bezier(.22, 1, .36, 1);
    --mt-header-h: 76px;
}

/* ---------- Base ---------- */
html {
    scroll-padding-top: calc(var(--mt-header-h) + 12px);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--mt-font);
    color: var(--mt-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6,
.section-header h3,
.product-title,
.benefit-title {
    font-family: var(--mt-font-heading);
    letter-spacing: -0.005em;
}

button, input, select, textarea {
    font-family: inherit;
}

::selection {
    background: rgba(27, 137, 211, .18);
    color: var(--mt-ink);
}

/* menu.js wraps <body> in .wsmenucontainer with overflow:hidden, which breaks
   position:sticky. `clip` keeps horizontal overflow hidden without creating a
   scroll container. */
.wsmenucontainer {
    overflow: visible;
    overflow-x: clip;
}

/* Visible, consistent keyboard focus everywhere */
a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(27, 137, 211, .55);
    outline-offset: 2px;
    border-radius: 6px;
}

.mt-skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100000;
    padding: 10px 16px;
    background: var(--mt-primary);
    color: #fff !important;
    border-radius: var(--mt-radius-sm);
    font-weight: 600;
    text-decoration: none;
    transition: top .2s ease;
}

.mt-skip-link:focus {
    top: 12px;
}

/* ---------- Announcement bar ---------- */
.demo-bar12 {
    background: linear-gradient(90deg, #0b2a55 0%, #12407d 100%);
    border-bottom: 0;
    padding: 9px 0;
    animation: none;
}

.demo-bar12 .demo-message {
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .92);
    animation: none;
}

.demo-bar12 .demo-message i {
    color: #7cc4f5;
}

.demo-bar12 .demo-btn {
    background: #fff;
    color: var(--mt-primary-600);
    border-radius: 999px;
    padding: 7px 18px;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: none;
    transition: background-color .2s ease, transform .2s var(--mt-ease);
}

.demo-bar12 .demo-btn:hover {
    background: #e8f3fc;
    transform: translateY(-1px);
    box-shadow: none;
}

@media (max-width: 768px) {
    .demo-bar12 {
        padding: 8px 0;
    }

    .demo-bar12 .demo-content {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 12px;
        text-align: left;
    }

    .demo-bar12 .demo-message {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 12.5px;
        line-height: 1.35;
    }

    .demo-bar12 .demo-message i {
        display: none;
    }

    .demo-bar12 .demo-btn {
        flex-shrink: 0;
        padding: 7px 14px;
        font-size: 12.5px;
        white-space: nowrap;
    }
}

/* ---------- Header / navigation ---------- */
.navbar.navbar-default,
.navbar.navbar-default.affix,
.navbar.navbar-default.affix-top {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
    margin-bottom: 0;
    padding: 12px 0;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border: 0;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    box-shadow: none;
    transition: box-shadow .25s ease, border-color .25s ease, padding .25s ease;
}

.navbar.navbar-default.is-scrolled {
    border-bottom-color: var(--mt-border);
    box-shadow: 0 6px 24px -14px rgba(15, 31, 51, .35);
}

.navbar .logo {
    flex-shrink: 0;
}

/* The logo PNG has generous transparent padding (1000x600), so it is drawn
   tall and trimmed with negative margins, as the original theme did. */
.navbar .logo img {
    height: 112px;
    width: auto;
    max-width: none;
    margin: -34px 0;
}

#nav-menu-container .animated-menu {
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 0;
    align-items: center;
    font-family: var(--mt-font);
    font-weight: 600;
}

#nav-menu-container .animated-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--mt-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    transition: color .2s ease, background-color .2s ease;
}

#nav-menu-container .animated-menu li a::after {
    display: none;
}

#nav-menu-container .animated-menu > li > a:hover,
#nav-menu-container .animated-menu > li > a:focus-visible,
#nav-menu-container .animated-menu > li.dropdown.is-open > a {
    color: var(--mt-primary-600);
    background: var(--mt-accent-soft);
    border-radius: 10px;
}

#nav-menu-container .animated-menu li.menu-active > a {
    color: var(--mt-primary-600);
    background: transparent;
    box-shadow: inset 0 -2px 0 var(--mt-accent);
    border-radius: 0;
}

/* Caret on dropdown triggers */
#nav-menu-container .animated-menu > li.dropdown > a::before {
    content: "";
    order: 2;
    width: 7px;
    height: 7px;
    margin-top: -3px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    opacity: .55;
    transition: transform .25s var(--mt-ease), margin .25s var(--mt-ease);
}

#nav-menu-container .animated-menu > li.dropdown:hover > a::before,
#nav-menu-container .animated-menu > li.dropdown.is-open > a::before {
    transform: rotate(-135deg);
    margin-top: 3px;
}

/* Dropdown panels: animated, and reachable by keyboard (focus-within) */
#nav-menu-container .animated-menu .dropdown-menu {
    display: block;
    min-width: 240px;
    margin-top: 10px;
    padding: 8px;
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    background: #fff;
    box-shadow: var(--mt-shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .2s ease, transform .25s var(--mt-ease), visibility 0s linear .25s;
    font-weight: 500;
}

/* Hover bridge so the menu doesn't close while moving the pointer into it */
#nav-menu-container .animated-menu .dropdown-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -14px;
    height: 14px;
}

#nav-menu-container .animated-menu .dropdown:hover .dropdown-menu,
#nav-menu-container .animated-menu .dropdown:focus-within .dropdown-menu,
#nav-menu-container .animated-menu .dropdown.is-open .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity .2s ease, transform .25s var(--mt-ease), visibility 0s;
}

#nav-menu-container .animated-menu .dropdown-menu li {
    padding: 0;
}

#nav-menu-container .animated-menu .dropdown-menu li a {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--mt-ink);
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color .15s ease, color .15s ease;
}

#nav-menu-container .animated-menu .dropdown-menu li a:hover,
#nav-menu-container .animated-menu .dropdown-menu li a:focus-visible {
    background: var(--mt-surface);
    color: var(--mt-primary-600);
}

@media (min-width: 993px) and (max-width: 1199px) {
    #nav-menu-container .animated-menu {
        gap: 2px;
    }

    #nav-menu-container .animated-menu > li > a {
        padding: 10px 9px;
        font-size: 14.5px;
    }

    .navbar .logo img {
        height: 96px;
        margin: -28px 0;
    }
}

/* Mobile menu */
.navbar .mobile-menu-btn {
    width: 44px;
    height: 44px;
    padding: 10px 7px;
    border-radius: 10px;
}

.navbar .mobile-menu-btn .bar {
    left: 9px;
    width: 26px;
    height: 2.5px;
    background: var(--mt-ink);
}

.navbar .mobile-menu-btn .bar:nth-child(1) { top: 13px; }
.navbar .mobile-menu-btn .bar:nth-child(2) { top: 21px; }
.navbar .mobile-menu-btn .bar:nth-child(3) { top: 29px; }
.navbar .mobile-menu-btn.open .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.navbar .mobile-menu-btn.open .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.navbar .mobile-menu-popup {
    right: 16px;
    left: auto;
    width: min(340px, calc(100vw - 32px));
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--mt-border);
    border-radius: var(--mt-radius);
    box-shadow: var(--mt-shadow-lg);
    overscroll-behavior: contain;
}

.navbar .mobile-menu {
    font-family: var(--mt-font);
}

.navbar .mobile-menu li {
    margin-bottom: 2px;
}

.navbar .mobile-menu li a,
.navbar .mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 14px;
    border-radius: 10px;
    color: var(--mt-ink);
    font-size: 15.5px;
    font-weight: 600;
}

.navbar .mobile-dropdown-toggle {
    justify-content: space-between;
}

.navbar .mobile-dropdown-menu {
    padding-left: 8px;
    margin: 0 0 6px;
    border-left: 2px solid var(--mt-border);
    margin-left: 14px;
}

.navbar .mobile-dropdown-menu li a {
    min-height: 42px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--mt-text);
}

.navbar .mobile-menu li a:hover,
.navbar .mobile-dropdown-toggle:hover {
    background: var(--mt-surface);
    color: var(--mt-primary-600);
}

/* ---------- Inner-page banners ----------
   A global h1 colour (#120036) made page titles navy-on-blue and nearly
   unreadable on every product, blog, industry and policy page. */
.bp-hero h1,
.events-hero h1,
.history-hero h1 {
    color: #fff;
    font-weight: 800;
    letter-spacing: -0.015em;
    text-shadow: 0 1px 2px rgba(7, 19, 38, .18);
}

/* ---------- Section headings (shared across pages) ---------- */
.section-header h3 {
    color: var(--mt-ink);
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 800;
    letter-spacing: .02em;
}

.section-header h3::before {
    display: none;
}

.section-header h3::after {
    width: 48px;
    height: 4px;
    left: calc(50% - 24px);
    border-radius: 4px;
    background: linear-gradient(90deg, var(--mt-primary-600), var(--mt-accent));
}

/* ---------- Footer refinements ---------- */
footer.ultra-compact-footer {
    background: linear-gradient(160deg, #0d3466 0%, #071d3a 100%);
}

footer.ultra-compact-footer .footer-links a,
footer.ultra-compact-footer .footer-menu a {
    transition: color .2s ease;
}

footer.ultra-compact-footer .footer-links a:hover,
footer.ultra-compact-footer .footer-menu a:hover {
    color: #fff;
}

footer.ultra-compact-footer .address-content,
footer.ultra-compact-footer .address-content p {
    font-size: 13px;
    line-height: 1.55;
    color: rgba(255, 255, 255, .72);
}

footer.ultra-compact-footer .address-content strong {
    font-size: 13.5px;
}

@media (max-width: 768px) {
    footer.ultra-compact-footer .footer-links a {
        display: inline-block;
        padding: 5px 0;
        font-size: 14px;
    }
}

/* ---------- Chat assistant: clearly visible close button ----------
   The original close control was a small white "x" on a light gradient.
   Inline styles on the markup require !important here. */
#chatbot-box > div:first-child {
    background: linear-gradient(135deg, #12407d, #1b89d3) !important;
}

/* The header logo carries width/height="2134" attributes; on pages without a
   global img{height:auto} it rendered 2134px tall, pushing the chat header
   (and its close button) far above the top of the screen. */
#chatbot-box > div:first-child img {
    width: 30px !important;
    height: 30px !important;
    object-fit: contain;
    flex-shrink: 0;
}

#chatbot-box button[aria-label="Close chat"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .2) !important;
    color: #fff !important;
    font-size: 22px !important;
    font-weight: 400;
    line-height: 1 !important;
    transition: background-color .2s ease, transform .2s ease !important;
}

#chatbot-box button[aria-label="Close chat"]:hover,
#chatbot-box button[aria-label="Close chat"]:focus-visible {
    background: rgba(255, 255, 255, .35) !important;
}

/* ---------- Cookie banner / chat launcher: keep clear of each other ---------- */
#cookieConsentBanner {
    font-family: var(--mt-font);
}

/* ---------- Reveal on scroll (opt-in via [data-reveal], driven by premium.js) ---------- */
.mt-reveal-ready [data-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s ease, transform .7s var(--mt-ease);
}

.mt-reveal-ready [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }

    .wow {
        visibility: visible !important;
        animation: none !important;
    }
}
