/** css/sheets/header.css **/

@charset "utf-8";

.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 75px;
    margin-top: 85px;
    display: flex;
    align-items: center;
    z-index: 100;
    overflow: visible;
}

.lead-spacer {
    display: inline-block;
    width: 7%;
    height: 100%;
    margin: 0;
    background: #011039;
}

.logo {
    flex: 0 0 auto;
    margin: 0 15px;
    position: relative;
    z-index: 2; 
}

.logo img {
    display: block;
    height: 200px;
    width: auto;
}

.navigation {
    flex: 1;
    height: 100%;
    background: #011039;
    display: flex;
    align-items: center;
}

.main-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(1rem, 1.8vw, 6rem);
    list-style: none;
    margin: 0;
    margin-left: 140px;
    padding: 0;
    height: 100%;
}

.main-menu li {
    height: 100%;
}

.main-menu li a {
    height: 100%;
    padding: 0 1.6rem;
    display: flex;
    align-items: center;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font: normal clamp(1rem, 1.2vw, 2rem) "CandaraB";
    text-transform: uppercase;
}

.main-menu li a:hover {
    background: #288DBE;
}

.main-menu li.header-cta {
    height: calc(100% + 10px);
}

.main-menu li.header-cta a {
    background: #FF7900;
    padding: 2px 1.6rem;
    border-radius: 2px;
    transition: background 0.25s ease;
}

.main-menu li.header-cta a:hover {
    background: #288DBE;
}

/* DROPDOWN BASE */

.has-dropdown {
    position: relative;
}

.dropdown-menu {
    list-style: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 360px;
    background: #ffffff;
    padding: 1.2rem 0;
    box-shadow: 0 30px 80px rgba(1,16,57,0.25);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition:
        opacity 0.25s ease,
        transform 0.25s ease;
    z-index: 200;
}

/* Show on hover or keyboard focus */
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Dropdown items */

.dropdown-menu li {
    width: 100%;
    padding: 5px 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.9rem 1.6rem;
    text-decoration: none;
    background: transparent;
    transition: background 0.2s ease;
}

.dropdown-menu a:hover {
    background: rgba(40,141,190,0.08);
}

/* Title line */
.dropdown-menu span {
    display: block;
    font: bold 1.05rem "CandaraB";
    color: #011039;
}

/* Subtitle line */
.dropdown-menu em {
    display: block;
    font-style: normal;
    font-size: 0.85rem;
    color: #555;
    margin-top: 0.15rem;
    text-align: right;
}

.mobile-toggle {
    display: none;
}

.submenu-toggle {
    display: none;
}




@media (max-width: 780px) {

    .lead-spacer {
        display: none;
    }

    .header {
        margin-top: 0;
        height: 70px;
        background: #011039;
        position: fixed;
    }

    .logo img {
        height: 60px;
    }

    /* Hide desktop nav */
    .navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: #011039;
        flex-direction: column;
        padding-top: 100px;
        transition: right 0.35s ease;
        z-index: 300;
    }

    .navigation.active {
        right: 0;
    }

    .main-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin: 0;
        width: 100%;
    }

    .main-menu li {
        width: 100%;
        height: auto;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .main-menu li a {
        width: calc(100% - 2rem);
        padding: 1rem 1rem;
        font-size: 1rem;
        height: auto;
    }

    .main-menu li.header-cta a {
        margin: 1rem 1.5rem;
        text-align: center;
    }

    /* Hamburger */

    .mobile-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        margin-left: auto;
        margin-right: 20px;
        z-index: 400;
    }

    .mobile-toggle span {
        width: 24px;
        height: 3px;
        background: #ffffff;
        transition: transform 0.3s ease, opacity 0.3s ease, background 0.3s ease;
    }

    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Overlay */

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 90;
    }

    .mobile-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* Submenu */

    .dropdown-menu {
        position: static;
        background: #02215c;
        box-shadow: none;
        opacity: 1;
        min-width: 300px;
        transform: none;
        pointer-events: auto !important;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .dropdown-menu span {
        color: #ffffff;
    }

    /* Subtitle line */
    .dropdown-menu em {
        display: block;
        font-style: normal;
        font-size: 0.85rem;
        color: #555;
        margin-top: 0.15rem;
        text-align: right;
    }

    .has-dropdown.active .dropdown-menu {
        max-height: 600px;
    }

    .submenu-toggle {
        display: block;
        position: absolute;
        right: 15px;
        top: 18px;
        width: 18px;
        height: 18px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .submenu-toggle::after {
        content: "+";
        color: #fff;
        font-size: 1.2rem;
    }

    .has-dropdown.active .submenu-toggle::after {
        content: "–";
    }

}
