.header {
    width: 100%;
    background: white;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 100;
}

.header__inner {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header__logo img {
    width: 150px;
    height: auto;
    display: block;
}

.header__nav ul {
    display: flex;
    align-items: center;
    gap: 50px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__nav a {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: var(--navy);
    letter-spacing: 0.08em;
    text-decoration: none;

    transition:
        background-color 0.3s ease,
        color 0.3s ease;
    padding: 15px;
    background: transparent;
    border-radius: 6px;
}

.header__nav a:hover {
    background: var(--lightblue);
    /*color: var(--white);*/
    /*color: white;*/
}

.submenu-toggle {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
}

.header__burger,
.header__close {
    display: none;
}


/* =========================
   SERVICES DROPDOWN
   ========================= */

.header__services {
    position: relative;
}

.header__services-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Small chevron */
.header__services-arrow {
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--navy);
    border-bottom: 1.5px solid var(--navy);
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.2s ease;
}

/* Dropdown box */
.header__services-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;

    width: 350px;
    padding: 8px;

    background: white;
    border: 1px solid rgba(0, 45, 85, 0.08);
    border-radius: 4px;

    box-shadow: 0 14px 35px rgba(0, 35, 70, 0.12);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateX(-50%) translateY(8px);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;

    z-index: 1000;
}

/* Override normal header link styling for dropdown links */
.header__nav .header__services-dropdown a {
    display: block;
    padding: 13px 16px;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.03em;

    color: var(--navy);
    background: transparent;
    border-radius: 3px;
}

/* Dropdown item hover */
.header__nav .header__services-dropdown a:hover {
    background: var(--lightblue);
    color: var(--burgundy);
}

/* Open dropdown */
.header__services:hover .header__services-dropdown,
.header__services:focus-within .header__services-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateX(-50%) translateY(0);
}

/* Turn arrow upwards when open */
.header__services:hover .header__services-arrow,
.header__services:focus-within .header__services-arrow {
    transform: rotate(225deg);
    margin-top: 3px;
}

/* Invisible bridge prevents dropdown closing
   while moving mouse from menu item to dropdown */
.header__services::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 18px;
}


/* =========================
   ABOUT US DROPDOWN
   ========================= */

.header__about {
    position: relative;
}

.header__about-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header__about-arrow {
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--navy);
    border-bottom: 1.5px solid var(--navy);
    transform: rotate(45deg);
    margin-top: -3px;
    transition: transform 0.2s ease;
}

.header__about-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;

    width: 190px;
    padding: 8px;

    background: white;
    border: 1px solid rgba(0, 45, 85, 0.08);
    border-radius: 4px;

    box-shadow: 0 14px 35px rgba(0, 35, 70, 0.12);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateX(-50%) translateY(8px);

    transition:
        opacity 0.18s ease,
        transform 0.18s ease,
        visibility 0.18s ease;

    z-index: 1000;
}

.header__nav .header__about-dropdown a {
    display: block;
    padding: 13px 16px;

    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.03em;

    color: var(--navy);
    background: transparent;
    border-radius: 3px;
}

.header__nav .header__about-dropdown a:hover {
    background: var(--lightblue);
    color: var(--burgundy);
}

.header__about:hover .header__about-dropdown,
.header__about:focus-within .header__about-dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;

    transform: translateX(-50%) translateY(0);
}

.header__about:hover .header__about-arrow,
.header__about:focus-within .header__about-arrow {
    transform: rotate(225deg);
    margin-top: 3px;
}

.header__about::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 18px;
}

.header__nav-logo {
    display: none;
}


/* Mobile */
@media (max-width: 768px) {

    .header {
        position: sticky;
        top: 0;
        z-index:100;
    }

    .header__inner {
        min-height: 90px;
    }

    .header__logo img {
        width: 150px;
    }

    .header__burger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .header__burger span {
        width: 30px;
        height: 3px;
        background: var(--navy);
        display: block;
    }

    .header__nav {
        position: fixed;

        top: 20px;
        left: 20px;
        right: 20px;

        width: auto;
        max-height: calc(100dvh - 40px);

        overflow-y: auto;
        overflow-x: hidden;

        box-sizing: border-box;

        background: var(--navy);

        padding: 140px 34px 35px;

        display: none;

        z-index: 1000;
    }

    .header__nav a,
    .header__nav .header__about-dropdown a,
    .header__nav .header__services-dropdown a {
        color: var(--cream) !important;
    }

    .header__nav.is-open {
        display: block;
    }


    .header__nav .header__nav-logo {
        display: block;
        position: absolute;

        top: 10px;
        left: 28px;

        width: 125px !important;
        
        padding: 0 !important;
        margin: 0;

        z-index: 2;
    }

    .header__nav .header__nav-logo img {
        display: block;
        width: 125px;
        height: auto;
    }



    /* -----------------------------
       MAIN NAV
    ----------------------------- */

    .header__nav > ul {
        display: block;
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .header__nav li {
        position: static;
        display: block;
        width: 100%;
        margin: 0 0 20px;
    }

    .header__nav a {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;

        padding: 8px 0;

        font-size: 16px;

        white-space: normal;
    }


    /* Remove desktop hover box on mobile */

    .header__nav a:hover {
        background: transparent;
    }


    /* -----------------------------
       ALL SUBMENUS
       Services + About Us
    ----------------------------- */

    /* MOBILE DROPDOWNS */

    .header__about-dropdown,
    .header__services-dropdown {
        position: static !important;

        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        left: auto !important;

        transform: none !important;

        display: block !important;

        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;

        margin: 4px 0 0 !important;
        padding: 0 0 0 15px !important;

        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;

        background: transparent !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;

        box-sizing: border-box;
    }

    .header__about-dropdown a,
    .header__services-dropdown a {
        display: block !important;
        width: 100% !important;

        padding: 7px 10px !important;

        font-size: 14px;
        white-space: normal !important;

        box-sizing: border-box;
    }

    .header__about-dropdown li,
    .header__services-dropdown li {
        width: 100% !important;
        margin: 0 !important;
    }

    .header__about::after,
    .header__services::after {
        display: none;
    }

    .header__about-arrow,
    .header__services-arrow {
        display: none;
    }


    /* -----------------------------
       CLOSE BUTTON
    ----------------------------- */

    .header__close {
        display: block;

        position: absolute;
        top: 38px;
        right: 28px;

        background: none;
        border: none;

        color: var(--gold);
        font-size: 28px;
        line-height: 1;

        cursor: pointer;

        z-index: 2;
    }


    /* Mobile: dropdowns are permanently expanded */
        .header__services::after,
        .header__about::after {
        display: none;
    }


}