/* layout.css — Global tokens, reset, typography, navbar, footer */

:root {
    --color-primary: #034694;
    --color-shade-1: #033f85;
    --color-shade-2: #023876;
    --color-shade-3: #023168;
    --color-shade-4: #022a59;
    --color-shade-5: #02234a;
    --color-shade-6: #011c3b;
    --color-shade-7: #01152c;
    --color-shade-8: #010e1e;
    --color-shade-9: #00070f;
    --color-tint-1: #1c599f;
    --color-tint-2: #356ba9;
    --color-tint-3: #4f7eb4;
    --color-tint-4: #6890bf;
    --color-tint-5: #81a3ca;
    --color-tint-6: #9ab5d4;
    --color-tint-7: #b3c8df;
    --color-tint-8: #cddaea;
    --color-tint-9: #e6edf4;
    --color-bg: #ffffff;
    --color-ink: #111827;
    --color-muted: #5b6472;
    --color-line: #e4eaf2;
    --color-soft: #f8fbff;
    --color-dark: #071d37;
    --color-gray: #3f4651;
    /* ── Type scale (industry-standard) ── */
    --fs-display: clamp(2rem, 3.5vw, 3rem); /* 32–48px hero */
    --fs-section-title: clamp(1.625rem, 2.5vw, 2.25rem); /* 26–36px section h2 */
    --fs-h1: 2.25rem; /* 36px */
    --fs-h2: 1.875rem; /* 30px */
    --fs-h3: 1.5rem; /* 24px */
    --fs-h4: 1.25rem; /* 20px */
    --fs-h5: 1.125rem; /* 18px */
    --fs-h6: 1rem; /* 16px */
    --fs-body: .875rem; /* 16px */
    --fs-body-sm: .875rem; /* 14px */
    --fs-caption: .8125rem; /* 13px */
    --fs-small: .75rem; /* 12px */
    /* ── Line heights ── */
    --lh-display: 1.1;
    --lh-section: 1.15;
    --lh-heading: 1.3;
    --lh-body: 1.6;
    --lh-caption: 1.5;
    /* ── Letter spacing ── */
    --ls-display: -.02em;
    --ls-section: -.015em;
    --ls-eyebrow: .18em;
    --ls-nav: .06em;
    --ls-body: .01em;
    --section-py: 80px;
    --section-gap: 1.5rem;
    --space-xs: .25rem;
    --space-sm: .5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --shadow-sm: 0 4px 12px rgba(3, 70, 148, .04);
    --shadow-md: 0 12px 34px rgba(3, 70, 148, .045);
    --shadow-lg: 0 18px 55px rgba(3, 70, 148, .08);
    --shadow-xl: 0 25px 70px rgba(15, 39, 65, .14);
    --border-default: 1px solid var(--color-line);
    --border-primary: 1px solid rgba(3, 70, 148, .24);
    --border-hover: 1px solid rgba(3, 70, 148, .35);
    --radius-card: 6px;
    --radius-btn: 6px;
    --radius-input: 6px;
    --radius-badge: 4px;
    --radius-image: 4px;
    --radius-dropdown: 6px;
    --radius-modal: 8px
}

*,
*::before,
*::after {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%
}

body {
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 300;
    color: var(--color-ink);
    background: var(--color-bg);
    letter-spacing: var(--ls-body);
    line-height: var(--lh-body);
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    position: relative
}

/* Links — themed accent, never underlined */
a {
    color: #ff6d00;
    text-decoration: none
}
.g-5, .gy-5 {
    --bs-gutter-y: 1rem !important;
}
h1,
h2,
h3,
h4,
h5,
h6,
strong,
b,
.fw-bold,
.fw-semibold {
    font-weight: 400 !important
}

/* ── Element-level type scale ── */
h1 {
    font-size: var(--fs-h1);
    line-height: var(--lh-heading);
    letter-spacing: -.015em;
    margin-bottom: .75rem
}

h2 {
    font-size: var(--fs-h2);
    line-height: var(--lh-heading);
    letter-spacing: -.01em;
    margin-bottom: .75rem
}

h3 {
    font-size: var(--fs-h3);
    line-height: var(--lh-heading);
    letter-spacing: -.005em;
    margin-bottom: .5rem
}

h4 {
    font-size: var(--fs-h4);
    line-height: var(--lh-heading);
    margin-bottom: .5rem
}

h5 {
    font-size: var(--fs-h5);
    line-height: var(--lh-heading);
    margin-bottom: .5rem
}

h6 {
    font-size: var(--fs-h6);
    line-height: var(--lh-heading);
    letter-spacing: .01em;
    margin-bottom: .5rem
}

p {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    letter-spacing: var(--ls-body);
    margin-bottom: 1rem
}

/* ── Utility type classes ── */
.display-title {
    font-size: var(--fs-display);
    line-height: var(--lh-display);
    letter-spacing: var(--ls-display)
}

.section-title {
    font-size: var(--fs-section-title);
    line-height: var(--lh-section);
    letter-spacing: var(--ls-section)
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: var(--fs-small);
    letter-spacing: var(--ls-eyebrow);
    color: var(--color-primary);
    font-weight: 500
}

/* Refined hairline accent for section eyebrows (not the home hero) */
.eyebrow:not(.hero-eyebrow)::before {
    content: "";
    width: 26px;
    height: 1px;
    margin-right: .7rem;
    background: currentColor;
    opacity: .5;
    flex: 0 0 auto
}

/* Consistent breathing room between eyebrow and the heading that follows */
.eyebrow + h1,
.eyebrow + h2,
.eyebrow + .section-title,
.eyebrow + .display-title {
    margin-top: .85rem
}

.hero .eyebrow {
    color: #b7d3f5
}

.lead {
    font-size: var(--fs-body);
    line-height: var(--lh-body);
    font-weight: 300;
    max-width: 780px
}

/* Sections */
.section {
    padding: var(--section-py) 0
}

.section-light {
    background: var(--color-bg);
    border-top: var(--border-default)
}

.section-soft {
    background: linear-gradient(180deg, var(--color-soft) 0%, var(--color-bg) 100%);
    border-top: var(--border-default);
    border-bottom: var(--border-default)
}

/* Navbar */
.navbar {
    min-height: 76px;
    background: rgba(255, 255, 255, .98);
    backdrop-filter: blur(12px);
    border-bottom: var(--border-primary);
    font-family: 'Poppins', sans-serif;
    z-index: 1040;
    transition: box-shadow .25s ease, background .25s ease
}

.navbar-scrolled {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 24px rgba(3, 70, 148, .08)
}

.navbar-brand {
    padding: 0;
    background: none;
    border-radius: 0
}

.navbar-brand img {
    height: 34px
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    font-size: var(--fs-body);
    letter-spacing: var(--ls-nav);
    color: #384150 !important;
    padding: .5rem .85rem !important;
    transition: color .15s ease
}

.nav-link:focus,
.nav-link:focus-visible,
.dropdown-toggle:focus,
.dropdown-toggle:focus-visible {
    outline: none !important;
    box-shadow: none !important
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary) !important
}

.navbar-cta {
    white-space: nowrap
}

.dropdown-toggle::after {
    transition: transform .2s ease
}

.hover-menu:hover>.dropdown-toggle::after {
    transform: rotate(180deg)
}

.dropdown-menu {
    border-radius: var(--radius-dropdown);
    border: var(--border-default);
    box-shadow: 0 15px 40px rgba(15, 39, 65, .1);
    margin-top: 0
}

.dropdown-item {
    font-weight: 300;
    font-size: .92rem;
    padding: .65rem 1rem;
    border-radius: var(--radius-badge)
}

.dropdown-item i {
    color: #555d68
}

/* ── Mega Menu Shell ── */
.mega-menu {
    left: 0;
    right: 0;
    top: 100%;
    padding: 0;
    border-radius: 0 0 10px 10px;
    border: none;
    border-top: 2px solid var(--color-primary);
    box-shadow: 0 20px 60px rgba(3, 31, 68, .12), 0 4px 16px rgba(3, 31, 68, .06);
    background: var(--color-bg);
    margin-top: 0;
    overflow: hidden
}

.mega-wrap {
    padding: 0
}

/* ── Section Header inside mega ── */
.mega-section-header {
    padding: 1.1rem 1.5rem .6rem;
    border-bottom: 1px solid var(--color-line);
    display: flex;
    align-items: baseline;
    gap: 1rem
}

.mega-section-label {
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: var(--ls-nav);
    color: var(--color-primary)
}

.mega-section-sub {
    font-size: .76rem;
    color: var(--color-muted);
    letter-spacing: .01em
}

/* ── Mega Card (replaces mega-link) ── */
.mega-card {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    text-decoration: none;
    color: var(--color-ink);
    padding: .85rem;
    border: 1px solid transparent;
    border-radius: 8px;
    height: 100%;
    position: relative;
    transition: all .22s ease
}

.mega-card:hover {
    background: linear-gradient(135deg, rgba(3, 70, 148, .04) 0%, rgba(3, 70, 148, .08) 100%);
    border-color: rgba(3, 70, 148, .15);
    color: var(--color-ink);
    transform: translateY(-2px)
}

.mega-card-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(3, 70, 148, .08) 0%, rgba(3, 70, 148, .04) 100%);
    border: 1px solid rgba(3, 70, 148, .1);
    flex: 0 0 auto;
    font-size: 1rem;
    color: var(--color-primary);
    transition: all .22s ease
}

.mega-card:hover .mega-card-icon {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(3, 70, 148, .25)
}

.mega-card strong {
    display: block;
    font-size: .82rem;
    line-height: 1.3;
    letter-spacing: .01em
}

.mega-card small {
    display: block;
    color: var(--color-muted);
    font-size: .72rem;
    line-height: 1.45
}

.mega-card:hover strong {
    color: var(--color-primary)
}

/* ── Mega Highlight Panel (right side) ── */
.mega-highlight {
    background: linear-gradient(160deg, #034694 0%, #022a59 40%, #011c3b 100%);
    color: #fff;
    height: 100%;
    padding: 1.6rem 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden
}

.mega-highlight::before {
    content: "";
    position: absolute;
    top: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .06) 0%, transparent 70%);
    pointer-events: none
}

.mega-highlight::after {
    content: "";
    position: absolute;
    bottom: -30px;
    left: -20px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(129, 163, 202, .08) 0%, transparent 70%);
    pointer-events: none
}

.mega-highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .68rem;
    font-weight: 400;
    letter-spacing: var(--ls-eyebrow);
    color: rgba(255, 255, 255, .85);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50px;
    padding: .3rem .75rem;
    margin-bottom: .9rem;
    width: fit-content
}

.mega-highlight-badge i {
    font-size: .72rem;
    color: #7cb6f5
}

.mega-highlight-stat {
    font-size: 2.8rem;
    font-weight: 500;
    letter-spacing: -.03em;
    line-height: 1;
    background: linear-gradient(135deg, #fff 30%, #7cb6f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.mega-highlight-label {
    font-size: .78rem;
    color: rgba(255, 255, 255, .7);
    letter-spacing: .04em;
    margin-bottom: .7rem
}

.mega-highlight p {
    font-size: .76rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .7);
    margin-bottom: .9rem
}

.mega-highlight-features {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-bottom: 1rem
}

.mega-highlight-feature {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .72rem;
    color: rgba(255, 255, 255, .85)
}

.mega-highlight-feature i {
    font-size: .7rem;
    color: #7cb6f5;
    width: 16px;
    text-align: center
}

.mega-highlight-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .76rem;
    font-weight: 400;
    color: #fff;
    text-decoration: none;
    padding: .5rem .9rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 6px;
    transition: all .2s ease;
    margin-top: auto;
    width: fit-content
}

.mega-highlight-btn:hover {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .35);
    color: #fff;
    gap: .6rem
}

.mega-highlight-btn i {
    font-size: .7rem;
    transition: transform .2s ease
}

.mega-highlight-btn:hover i {
    transform: translateX(3px)
}

/* ── Desktop hover behaviour ── */
@media(min-width:992px) {
    .navbar .hover-menu>.dropdown-menu {
        opacity: 0;
        visibility: hidden;
        display: block;
        transform: translateY(6px);
        transition: opacity .22s ease, visibility .22s ease, transform .22s ease
    }

    .navbar .hover-menu:hover>.dropdown-menu,
    .navbar .hover-menu:focus-within>.dropdown-menu {
        opacity: 1;
        visibility: visible;
        display: block;
        transform: translateY(0)
    }

    .mega-menu::before {
        content: "";
        position: absolute;
        top: -14px;
        left: 0;
        right: 0;
        height: 14px;
        background: transparent
    }
}

/* Footer */
.footer {
    background: var(--color-dark);
    color: #fff;
    padding: 72px 0 28px
}

.footer h6 {
    /* text-transform: uppercase; */
    letter-spacing: var(--ls-nav)
}

.footer a {
    color: rgba(255, 255, 255, .68);
    text-decoration: none;
    transition: color .15s ease
}

    .footer a:hover {
        color: #fff;
        background-color: #071D37;
    }

.footer-logo {
    height: 32px
}

.footer-list {
    list-style: none;
    padding: 0;
    margin: 0
}

.footer-list li {
    margin: .5rem 0
}

.footer-list a {
    font-size: var(--fs-body-sm)
}

.text-muted-light {
    color: rgba(255, 255, 255, .65) !important
}

.social a {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: var(--radius-badge);
    margin-right: .45rem;
    transition: background .2s ease, border-color .2s ease
}

.social a:hover {
    background: rgba(255, 255, 255, .1);
    border-color: rgba(255, 255, 255, .4)
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    margin-top: 50px;
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
    color: rgba(255, 255, 255, .58);
    font-size: .85rem
}

/* Buttons */
.btn {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 400;
    border-radius: var(--radius-btn);
    padding: .82rem 1.35rem;
    letter-spacing: .02em;
    font-size: var(--fs-body-sm);
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease
}

.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary)
}

.btn-primary:hover {
    background: var(--color-shade-1);
    border-color: var(--color-shade-1)
}

.btn-outline-primary {
    border-color: var(--color-primary);
    color: var(--color-primary)
}

.btn-outline-primary:hover {
    background: var(--color-primary);
    color: #fff
}

.btn-outline-light:hover {
    color: var(--color-primary)
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--radius-input);
    border-color: var(--color-line);
    padding: .85rem;
    transition: border-color .2s ease, box-shadow .2s ease
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 .2rem rgba(3, 70, 148, .12)
}

/* ── Hamburger Toggler (custom 3-bar → X animation) ── */
.navbar-toggler {
    width: 38px;
    height: 38px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none !important;
    outline: none !important;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-shrink: 0;
    z-index: 1060
}

.navbar-toggler:hover,
.navbar-toggler:focus,
.navbar-toggler:active {
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
    border: none !important
}

.toggler-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-ink);
    border-radius: 2px;
    transition: transform .3s ease, opacity .3s ease
}

/* X animation when menu is open */
.navbar-toggler[aria-expanded="true"] .toggler-bar.top {
    transform: translateY(7px) rotate(45deg)
}

.navbar-toggler[aria-expanded="true"] .toggler-bar.mid {
    opacity: 0;
    transform: scaleX(0)
}

.navbar-toggler[aria-expanded="true"] .toggler-bar.bot {
    transform: translateY(-7px) rotate(-45deg)
}

/* Responsive */
@media(max-width:991px) {
    :root {
        --section-py: 62px;
        --section-gap: 1rem;
        --fs-h1: 1.75rem;
        --fs-h2: 1.5rem;
        --fs-h3: 1.25rem;
        --fs-h4: 1.125rem;
        --fs-h5: 1rem;
        --fs-h6: .9375rem
    }

    .display-title {
        letter-spacing: -.015em
    }

    /* Fixed navbar — prevent logo shift, stay above drawer */
    .navbar {
        padding-top: 0;
        padding-bottom: 0;
        background: #fff !important;
        z-index: 1070
    }

    .navbar.fixed-top {
        z-index: 1070
    }

    .navbar > .container {
        flex-wrap: nowrap;
        align-items: center;
        min-height: 76px
    }

    .navbar-brand {
        flex: 0 0 auto;
        z-index: 1060;
        position: relative
    }

    .navbar-toggler {
        z-index: 1060;
        position: relative
    }

    /* Full-screen drawer from left, sits BELOW the fixed navbar */
    .navbar-collapse {
        position: fixed;
        top: 76px;
        left: 0;
        width: 100%;
        height: calc(100vh - 76px);
        height: calc(100dvh - 76px);
        background: #fff;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1.25rem 1.5rem 2rem;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform .35s cubic-bezier(.4, 0, .2, 1);
        display: flex !important;
        flex-direction: column;
        visibility: hidden
    }

    .navbar-collapse.show {
        transform: translateX(0);
        visibility: visible
    }

    .navbar-collapse.collapsing {
        display: flex !important;
        flex-direction: column;
        height: calc(100vh - 76px) !important;
        height: calc(100dvh - 76px) !important;
        transform: translateX(-100%);
        visibility: visible;
        transition: transform .35s cubic-bezier(.4, 0, .2, 1)
    }

    /* Override Bootstrap inline height on collapsing */
    .navbar-collapse.collapsing[style] {
        height: calc(100vh - 76px) !important;
        height: calc(100dvh - 76px) !important
    }

    .navbar-nav {
        width: 100%;
        gap: .25rem
    }

    .nav-link {
        font-size: .95rem !important;
        padding: .75rem .5rem !important;
        border-bottom: 1px solid var(--color-line)
    }

    /* Mega-menu as clean themed sub-panel — no default shadow/border */
    .mega-menu {
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: var(--radius-card) !important;
        background: var(--color-soft);
        margin: .25rem 0 .5rem;
        overflow: hidden
    }

    .mega-highlight {
        display: none
    }

    .mega-section-header {
        flex-direction: column;
        gap: .2rem;
        padding: .85rem 1rem .55rem;
        border-bottom: 1px solid rgba(3, 70, 148, .1)
    }

    .mega-section-label {
        color: var(--color-primary)
    }

    /* Mega cards inside mobile dropdown */
    .mega-menu .mega-card {
        background: #fff;
        border: 1px solid var(--color-line);
        border-radius: var(--radius-card)
    }

    .mega-menu .mega-card:hover,
    .mega-menu .mega-card:active {
        background: linear-gradient(135deg, rgba(3, 70, 148, .05) 0%, rgba(3, 70, 148, .1) 100%);
        border-color: rgba(3, 70, 148, .25);
        transform: none
    }

    /* Toggle visibility purely via .show (no sticky :hover on touch) */
    .navbar .hover-menu>.dropdown-menu {
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none
    }

    .navbar .hover-menu.show>.dropdown-menu {
        display: block
    }

    /* Rotate dropdown arrow when open on mobile */
    .navbar .hover-menu.show>.dropdown-toggle::after {
        transform: rotate(180deg)
    }

    .navbar .hover-menu.show>.dropdown-toggle {
        color: var(--color-primary) !important
    }

    /* "View All" card accent */
    .mega-card-all {
        border: 1px dashed rgba(3, 70, 148, .3) !important;
        background: rgba(3, 70, 148, .03) !important
    }

    .mega-card-all:hover {
        border-style: solid !important
    }

    .navbar-cta {
        margin-top: 1.25rem;
        text-align: center;
        display: block;
        width: 100%
    }

    /* Prevent body scroll when mobile menu is open */
    body.mobile-nav-open {
        overflow: hidden
    }
}