/* =========================================================
   HEADER DESIGN SYSTEM
   ========================================================= */

:root {
    --header-primary: #0b5e4b;
    --header-primary-dark: #084b3d;

    --header-secondary: #0b4f8a;
    --header-secondary-dark: #083d6b;

    --header-text: #17212b;
    --header-muted: #66727d;

    --header-white: #ffffff;
    --header-border: #e7ebef;
    --header-hover: #eef7f4;

    --header-shadow:
        0 2px 12px rgba(15, 30, 40, 0.08);

    --header-radius: 8px;

    --header-transition:
        180ms ease;
}


/* =========================================================
   BASIC RESET
   ========================================================= */

html,
body {
    margin: 0;
    padding: 0;

    font-family:
        "Montserrat",
        system-ui,
        sans-serif;
}


.site-header,
.site-header *,
.helpline-modal,
.helpline-modal * {
    box-sizing: border-box;
}


.site-header,
.site-header button,
.site-header input,
.site-header a {
    font-family:
        "Montserrat",
        system-ui,
        sans-serif;
}


.site-header a {
    text-decoration: none;
}


/* =========================================================
   STICKY HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    width: 100%;

    margin: 0;
    padding: 0;

    background: var(--header-white);

    border-radius: 0;

    box-shadow: var(--header-shadow);
}


/* =========================================================
   TOP BAR
   ========================================================= */

.top-bar {
    width: 100%;

    background: var(--header-white);

    color: var(--header-secondary);

    border-bottom:
        1px solid var(--header-border);
}


.top-bar-inner {
    width:
        min(
            calc(100% - 32px),
            1440px
        );

    min-height: 40px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


/* =========================================================
   CONTACT AREA
   ========================================================= */

.top-contact {
    display: flex;
    align-items: center;

    min-width: 0;

    white-space: nowrap;
}


.top-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;
}


.top-link-icon svg {
    display: block;
}


.top-link {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    color: var(--header-secondary);

    font-size: 13px;
    line-height: 1;

    letter-spacing: -0.005em;

    transition:
        opacity var(--header-transition);
}


.top-link:hover,
.top-link:focus-visible {
    opacity: 0.82;
}


.top-link-label {
    font-weight: 400;
}


.top-link-value {
    font-weight: 600;
}


.top-separator {
    margin-inline: 12px;

    opacity: 0.45;
}


/* =========================================================
   HELPLINE BUTTON
   ========================================================= */

.helpline-trigger {
    appearance: none;

    border: 0;

    background: transparent;

    padding: 0;

    cursor: pointer;
}


/* =========================================================
   TOP ACTIONS
   ========================================================= */

.top-actions {
    display: flex;
    align-items: center;

    gap: 18px;

    flex-shrink: 0;
}


.top-action-link {
    color: var(--header-secondary);

    font-size: 13px;
    font-weight: 600;

    letter-spacing: -0.005em;

    transition:
        opacity var(--header-transition);
}


.top-action-link:hover,
.top-action-link:focus-visible {
    opacity: 0.82;
}


.open-account-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    padding: 6px 17px;

    border: 0;
    border-radius: 18px;

    background: var(--header-primary);

    color: var(--header-white);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: -0.01em;

    transition:
        background var(--header-transition),
        transform var(--header-transition);
}


.open-account-button:hover,
.open-account-button:focus-visible {
    background: var(--header-primary-dark);

    color: var(--header-white);
}


.open-account-button:active {
    transform: translateY(1px);
}


/* =========================================================
   MAIN NAVIGATION
   ========================================================= */

.main-navigation {
    position: relative;

    width: 100%;

    margin: 0;
    padding: 0;

    background: var(--header-white);

    border: 0;
    border-radius: 0;
}


.navigation-inner {
    width: 100%;

    min-height: 76px;

    margin: 0;
    padding: 0 24px;

    display: flex;
    align-items: center;
}


/* =========================================================
   LOGO
   ========================================================= */

.site-logo {
    display: flex;
    align-items: center;

    flex: 0 0 auto;

    margin-right: 34px;
}


.site-logo img {
    display: block;

    width: 200px;
    height: auto;

    max-height: 75px;
}


/* =========================================================
   DESKTOP MENU
   ========================================================= */

.desktop-menu {
    display: flex;
    align-items: stretch;

    height: 76px;

    flex: 1;
}


.nav-link,
.nav-dropdown-toggle {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding: 0 14px;

    border: 0;

    background: transparent;

    color: var(--header-text);

    font-size: 14px;
    font-weight: 600;

    letter-spacing: -0.01em;
    line-height: 1;

    white-space: nowrap;

    cursor: pointer;

    transition:
        color var(--header-transition),
        background var(--header-transition);
}


.nav-link::after,
.nav-dropdown-toggle::after {
    content: "";

    position: absolute;

    left: 14px;
    right: 14px;
    bottom: 0;

    height: 3px;

    border-radius:
        3px 3px 0 0;

    background: transparent;

    transition:
        background var(--header-transition);
}


.nav-link:hover,
.nav-dropdown-toggle:hover,
.nav-link:focus-visible,
.nav-dropdown-toggle:focus-visible {
    color: var(--header-primary);

    background: var(--header-hover);
}


.nav-link:hover::after,
.nav-dropdown-toggle:hover::after,
.nav-link.active::after,
.nav-dropdown.active-parent .nav-dropdown-toggle::after {
    background: var(--header-primary);
}


.nav-link.active,
.nav-dropdown.active-parent .nav-dropdown-toggle {
    color: var(--header-primary);
}


/* =========================================================
   DROPDOWN
   ========================================================= */

.nav-dropdown {
    position: relative;

    display: flex;
    align-items: stretch;
}


.nav-dropdown-toggle {
    height: 100%;
}


.submenu-icon {
    display: inline-flex;

    transition:
        transform var(--header-transition);
}


.nav-dropdown.open .submenu-icon {
    transform: rotate(180deg);
}


.submenu {
    position: absolute;

    top: calc(100% + 1px);
    left: 0;

    min-width: 230px;

    padding: 8px;

    background: var(--header-white);

    border:
        1px solid var(--header-border);

    border-top:
        3px solid var(--header-primary);

    border-radius:
        0 0
        var(--header-radius)
        var(--header-radius);

    box-shadow:
        0 12px 30px rgba(15, 30, 40, 0.12);

    visibility: hidden;
    opacity: 0;

    transform: translateY(-6px);

    pointer-events: none;

    transition:
        opacity var(--header-transition),
        transform var(--header-transition),
        visibility var(--header-transition);

    z-index: 1100;
}


.nav-dropdown.open .submenu {
    visibility: visible;
    opacity: 1;

    transform: translateY(0);

    pointer-events: auto;
}


.submenu a {
    display: flex;
    align-items: center;

    min-height: 42px;

    padding: 9px 13px;

    border-radius: 5px;

    color: var(--header-text);

    font-size: 13px;
    font-weight: 500;

    transition:
        background var(--header-transition),
        color var(--header-transition);
}


.submenu a:hover,
.submenu a:focus-visible {
    color: var(--header-primary);

    background: var(--header-hover);
}


/* =========================================================
   MOBILE MENU BUTTON
   ========================================================= */

.mobile-menu-button {
    display: none;

    width: 44px;
    height: 44px;

    margin-left: auto;

    padding: 9px;

    border:
        1px solid var(--header-border);

    border-radius: 7px;

    background: var(--header-white);

    cursor: pointer;
}


.mobile-menu-button span {
    display: block;

    width: 100%;
    height: 2px;

    margin: 5px 0;

    background: var(--header-text);

    border-radius: 2px;

    transition:
        transform var(--header-transition),
        opacity var(--header-transition);
}


.mobile-menu-button.open span:nth-child(1) {
    transform:
        translateY(7px)
        rotate(45deg);
}


.mobile-menu-button.open span:nth-child(2) {
    opacity: 0;
}


.mobile-menu-button.open span:nth-child(3) {
    transform:
        translateY(-7px)
        rotate(-45deg);
}


/* =========================================================
   MOBILE MENU
   ========================================================= */

.mobile-menu {
    display: none;

    background: var(--header-white);

    border-top:
        1px solid var(--header-border);

    max-height:
        calc(100vh - 116px);

    overflow-y: auto;
}


.mobile-menu-inner {
    padding:
        10px 16px 20px;
}


.mobile-nav-link,
.mobile-dropdown-toggle {
    width: 100%;

    min-height: 48px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 12px 5px;

    border: 0;

    border-bottom:
        1px solid var(--header-border);

    background: transparent;

    color: var(--header-text);

    font-size: 15px;
    font-weight: 600;

    text-align: left;

    cursor: pointer;
}


.mobile-nav-link.active,
.mobile-dropdown.active .mobile-dropdown-toggle {
    color: var(--header-primary);
}


.mobile-nav-link:hover,
.mobile-dropdown-toggle:hover,
.mobile-nav-link:focus-visible,
.mobile-dropdown-toggle:focus-visible {
    color: var(--header-primary);
}


.mobile-dropdown-icon {
    font-size: 22px;
    font-weight: 300;

    line-height: 1;

    transition:
        transform var(--header-transition);
}


.mobile-dropdown.open .mobile-dropdown-icon {
    transform: rotate(45deg);
}


.mobile-submenu {
    display: none;

    padding:
        5px 0 7px 15px;

    border-bottom:
        1px solid var(--header-border);
}


.mobile-dropdown.open .mobile-submenu {
    display: block;
}


.mobile-submenu a {
    display: block;

    padding: 10px 5px;

    color: var(--header-muted);

    font-size: 14px;
    font-weight: 500;
}


.mobile-submenu a:hover,
.mobile-submenu a:focus-visible {
    color: var(--header-primary);
}


/* =========================================================
   MOBILE ACTIONS
   ========================================================= */

.mobile-menu-actions {
    display: grid;

    grid-template-columns:
        1fr 1.5fr;

    gap: 10px;

    padding-top: 18px;
}


.mobile-login-button,
.mobile-open-account-button {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;

    border-radius: 6px;

    font-size: 14px;
    font-weight: 700;
}


.mobile-login-button {
    border:
        1px solid var(--header-secondary);

    color: var(--header-secondary);

    background: var(--header-white);
}


.mobile-open-account-button {
    border:
        1px solid var(--header-primary);

    color: var(--header-white);

    background: var(--header-primary);
}


/* =========================================================
   HELPLINE MODAL
   ========================================================= */

.helpline-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;

    visibility: hidden;
    opacity: 0;

    pointer-events: none;

    transition:
        opacity var(--header-transition),
        visibility var(--header-transition);
}


.helpline-modal.open {
    visibility: visible;
    opacity: 1;

    pointer-events: auto;
}


/* =========================================================
   OVERLAY
   ========================================================= */

.helpline-overlay {
    position: absolute;
    inset: 0;

    background:
        rgba(8, 25, 35, .48);
}


/* =========================================================
   DIALOG
   ========================================================= */

.helpline-dialog {
    position: relative;
    z-index: 1;

    width: min(100%, 460px);

    max-height:
        calc(100dvh - 40px);

    overflow-y: auto;

    padding: 28px;

    border:
        1px solid var(--header-border);

    border-radius: 16px;

    background: var(--header-white);

    box-shadow:
        0 20px 60px rgba(0, 0, 0, .18);

    transform: translateY(10px);

    transition:
        transform var(--header-transition);
}


.helpline-modal.open .helpline-dialog {
    transform: translateY(0);
}


/* =========================================================
   CLOSE BUTTON
   ========================================================= */

.helpline-close {
    position: absolute;

    top: 12px;
    right: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;

    border: 0;
    border-radius: 50%;

    background: #f3f6f7;

    color: var(--header-muted);

    font-size: 23px;
    line-height: 1;

    cursor: pointer;

    transition:
        background var(--header-transition),
        color var(--header-transition);
}


.helpline-close:hover,
.helpline-close:focus-visible {
    background: var(--header-hover);

    color: var(--header-primary);
}


/* =========================================================
   HELPLINE CONTENT
   ========================================================= */

.helpline-content {
    padding-right: 28px;
}


.helpline-label {
    display: block;

    margin-bottom: 6px;

    color: var(--header-primary);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: .09em;
    line-height: 1.2;

    text-transform: uppercase;
}


.helpline-content h2 {
    margin: 0 0 9px;

    color: var(--header-text);

    font-size: 24px;
    font-weight: 750;

    letter-spacing: -.025em;
    line-height: 1.2;
}


.helpline-content p {
    margin: 0 0 18px;

    color: var(--header-muted);

    font-size: 13px;
    line-height: 1.55;
}


/* =========================================================
   SUPPORT LIST
   ========================================================= */

.support-number-list {
    display: grid;

    grid-template-columns: 1fr;

    gap: 9px;

    width: 100%;
}


/* =========================================================
   SUPPORT CARD
   ========================================================= */

.support-number {
    display: grid;

    grid-template-columns:
        40px
        minmax(0, 1fr)
        auto;

    align-items: center;

    column-gap: 11px;

    width: 100%;
    min-width: 0;

    padding: 12px 13px;

    border:
        1px solid var(--header-border);

    border-radius: 11px;

    background: #fafcfd;

    color: var(--header-text);

    text-decoration: none;

    transition:
        border-color var(--header-transition),
        background var(--header-transition),
        transform var(--header-transition);
}


.support-number:hover,
.support-number:focus-visible {
    border-color:
        rgba(11, 94, 75, .28);

    background: var(--header-hover);

    transform: translateY(-1px);
}


/* =========================================================
   SUPPORT ICON
   ========================================================= */

.support-number-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border-radius: 10px;

    background: #e8f4f0;

    color: var(--header-primary);

    flex-shrink: 0;
}


.support-number-icon svg {
    display: block;

    width: 20px;
    height: 20px;
}


/* =========================================================
   SUPPORT INFORMATION
   ========================================================= */

.support-number-info {
    display: flex;
    flex-direction: column;

    min-width: 0;
}


.support-number-info strong {
    display: block;

    overflow: hidden;

    color: var(--header-text);

    font-size: 12px;
    font-weight: 750;

    line-height: 1.3;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.support-number-info small {
    display: block;

    margin-top: 2px;

    color: var(--header-muted);

    font-size: 9px;

    line-height: 1.35;
}


.support-number-info em {
    display: block;

    margin-top: 4px;

    color: var(--header-primary);

    font-size: 8px;
    font-style: normal;
    font-weight: 700;

    line-height: 1.3;
}


/* =========================================================
   PHONE NUMBER
   ========================================================= */

.support-number-call {
    display: block;

    color: var(--header-primary);

    font-size: 12px;
    font-weight: 750;

    line-height: 1.2;

    white-space: nowrap;
}


/* =========================================================
   HELPLINE — TABLET
   ========================================================= */

@media (max-width: 700px) {

    .helpline-dialog {
        width: min(100%, 440px);

        padding: 24px 18px;
    }


    .helpline-content {
        padding-right: 24px;
    }


    .support-number {
        grid-template-columns:
            38px
            minmax(0, 1fr);

        column-gap: 10px;

        padding: 11px 12px;
    }


    .support-number-icon {
        width: 38px;
        height: 38px;
    }


    .support-number-icon svg {
        width: 19px;
        height: 19px;
    }


    .support-number-call {
        grid-column: 2;

        justify-self: start;

        margin-top: 5px;
        padding-top: 5px;

        border-top:
            1px solid var(--header-border);

        font-size: 12px;
    }

}


/* =========================================================
   HELPLINE — MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .helpline-modal {
        align-items: flex-end;

        /*
         * Reserve space above the fixed Sticky CTA.
         * Safe-area support protects iPhone home-indicator space.
         */
        padding:
            10px
            10px
            calc(
                76px +
                env(safe-area-inset-bottom)
            )
            10px;
    }


    .helpline-dialog {
        width: 100%;

        max-height:
            calc(
                100dvh
                - 86px
                - env(safe-area-inset-bottom)
            );

        padding: 22px 15px;

        border-radius: 16px;
    }


    .helpline-content {
        padding-right: 22px;
    }


    .helpline-label {
        font-size: 10px;
    }


    .helpline-content h2 {
        font-size: 21px;
    }


    .helpline-content p {
        margin-bottom: 15px;

        font-size: 12px;
    }


    .support-number-list {
        gap: 8px;
    }


    .support-number {
        grid-template-columns:
            36px
            minmax(0, 1fr);

        column-gap: 9px;

        padding: 10px;
    }


    .support-number-icon {
        width: 36px;
        height: 36px;

        border-radius: 9px;
    }


    .support-number-icon svg {
        width: 18px;
        height: 18px;
    }


    .support-number-info strong {
        font-size: 11px;
    }


    .support-number-info small {
        font-size: 8px;
    }


    .support-number-info em {
        font-size: 8px;
    }


    .support-number-call {
        grid-column: 2;

        margin-top: 4px;
        padding-top: 5px;

        font-size: 12px;
    }

}


/* =========================================================
   VERY SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {

    .helpline-modal {
        padding:
            8px
            8px
            calc(
                70px +
                env(safe-area-inset-bottom)
            )
            8px;
    }


    .helpline-dialog {
        padding: 20px 12px;

        max-height:
            calc(
                100dvh
                - 78px
                - env(safe-area-inset-bottom)
            );
    }


    .helpline-content h2 {
        font-size: 20px;
    }


    .support-number {
        padding: 9px;
    }


    .support-number-info strong {
        font-size: 10px;
    }


    .support-number-info small,
    .support-number-info em {
        font-size: 7.5px;
    }


    .support-number-call {
        font-size: 11px;
    }

}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .site-logo {
        margin-right: 18px;
    }


    .site-logo img {
        width: 200px;
    }


    .nav-link,
    .nav-dropdown-toggle {
        padding-inline: 9px;

        font-size: 13px;
    }


    .nav-link::after,
    .nav-dropdown-toggle::after {
        left: 9px;
        right: 9px;
    }

}


@media (max-width: 900px) {

    .desktop-menu {
        display: none;
    }


    .mobile-menu-button {
        display: block;
    }


    .mobile-menu {
        display: block;

        max-height: 0;

        overflow: hidden;

        border-top: 0;

        transition:
            max-height 220ms ease;
    }


    .mobile-menu.open {
        max-height:
            calc(100vh - 116px);

        border-top:
            1px solid var(--header-border);
    }


    .navigation-inner {
        min-height: 68px;
    }


    .site-logo img {
        width: 200px;

        max-height: 44px;
    }

}


/* =========================================================
   TABLET / SMALL MOBILE TOP BAR
   ========================================================= */

@media (max-width: 600px) {

    .top-bar-inner {
        width: calc(100% - 20px);

        min-height: 38px;

        gap: 8px;
    }


    .contact-link .top-link-label {
        display: none;
    }


    .helpline-trigger .top-link-label {
        display: inline;
    }


    .top-link {
        font-size: 11px;

        gap: 4px;
    }


    .top-link-value {
        font-size: 11px;
    }


    .top-separator {
        margin-inline: 7px;
    }


    .top-actions {
        gap: 9px;
    }


    .top-action-link {
        font-size: 11px;
    }


    .open-account-button {
        min-height: 27px;

        padding-inline: 10px;

        font-size: 10px;
    }


    .navigation-inner {
        width: calc(100% - 20px);

        min-height: 64px;
    }


    .site-logo {
        margin-right: 0;
    }


    .site-logo img {
        width: 200px;

        max-height: 65px;
    }

}


/* =========================================================
   VERY SMALL SCREENS
   ========================================================= */

@media (max-width: 380px) {

    .top-bar-inner {
        width: calc(100% - 14px);
    }


    .top-link-value {
        font-size: 10px;
    }


    .top-actions {
        gap: 6px;
    }


    .top-action-link {
        font-size: 10px;
    }


    .open-account-button {
        padding-inline: 8px;

        font-size: 9px;
    }


    .navigation-inner {
        width: calc(100% - 14px);
    }


    .site-logo img {
        width: 150px;
    }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .site-header *,
    .helpline-modal,
    .helpline-modal * {
        transition: none !important;
        animation: none !important;
    }

}