/* ==========================================================================
   Header Menu
   Overrides for: arrow removal, education dropdown, burger, mobile menu
   ========================================================================== */

:root
{
    --bg-green: #9bbc10;
    --bg-hover-green: #cbe94f;

    --bg-yellow: #ffba13;
    --bg-hover-yellow: #ffcf59;

    --bg-blue: #7095e2;
    --bg-hover-blue: #91b1f3;

    --bg-purple: #b861be;
    --bg-hover-purple: #d080d6;

}

.header__container {
    gap: 1rem;
}

#menu {
    width: 100%;
}

.menu__link {
    font-weight: 400;
    font-size: clamp(1.60rem, calc(1.000rem + 0.417vw), 1.80rem);
}

.menu__list {
    gap: 0;
    align-items: center;
    justify-content: space-between;
}
.menu__link.link-menu {
    padding: 0;
}
.menu__list li {
    margin-right: 0;
}

.link-menu::after {
    display: none !important;
}

.link-menu--has-chevron svg {
    position: relative;
    top: 0.2rem;
}

.menu__chevron {
    display: inline-block;
    vertical-align: middle;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.link-menu--has-chevron:hover svg{
    transform: rotate(-180deg);
}

.link-menu--has-chevron {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dropdown--education {
    position: relative;
}

.dropdown--education.open .menu__chevron {
    transform: rotate(180deg);
}


.education-dropdown {
    display: none;
    position: absolute;
    top: 2rem;
    right: 0;
    width: auto;
    white-space: nowrap;
    background: transparent;
    z-index: 10;
    left: inherit;
}

.education-dropdown .container {
    background-color: var(--white);
    border-bottom-left-radius: 2rem;
    border-bottom-right-radius: 2rem;
    padding: 1.6rem 2rem 2rem;
    border-bottom: 1px solid #D7DCE2;
}

.education-dropdown__list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 560px;
}

.education-dropdown__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 10px 20px;
    border-radius: 8px;
    font-family: 'Futura PT', sans-serif;
    font-size: 16px;
    font-weight: 450;
    line-height: 1.3;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.education-dropdown__item:hover {
    color: var(--white);
}

.education-dropdown__item-text {
    flex: 1;
    position: relative;
    padding-right: 1rem;
}

.education-dropdown__item-text::after {
    content: "";
    display: block;
    border-right: 1px dashed var(--white);
    width: 1px;
    height: 6rem;
    position: absolute;
    top: -2rem;
    right: -0.3rem;
}
.education-dropdown__item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    margin-left: 12px;
    color: #fff;
}

.education-dropdown__item--yellow {
    background-color: var(--bg-yellow);
}

.education-dropdown__item--yellow:hover {
    background-color: var(--bg-hover-yellow);
}

.education-dropdown__item--green {
    background-color: var(--bg-green);
}

.education-dropdown__item--green:hover {
    background-color: var(--bg-hover-green);
}

.education-dropdown__item--blue {
    background-color: var(--bg-blue);
}

.education-dropdown__item--blue:hover {
    background-color: var(--bg-hover-blue);
}

.education-dropdown__item--purple {
    background-color: var(--bg-purple);
}

.education-dropdown__item--purple:hover {
    background-color: var(--bg-hover-purple);
}

.dropdown--education.open > .link-menu--has-chevron {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.header.hovered .dropdown--education.open > .link-menu--has-chevron {
    color: var(--white) !important;
}

.header.hovered .menu__chevron {
    color: var(--white);
}

.burger__icon,
.burger__close {
    width: 40px;
    height: 40px;
    fill: none;
}

/* Support icon next to burger — hidden on desktop, shown on burger breakpoint */
.header__support-burger {
    display: none;
}

.header__support-burger img {
    width: 28px;
    height: 28px;
}

/* ---- Burger / panel menu (<=1439px) ---- */

@media (max-width: 1439px) {
    .header__scroll-menu {
        display: none !important;
    }

    /* Show burger */
    .burger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 8px;
        background-color: transparent;
        margin-left: 1rem;
        z-index: 3;
    }

    /* Hide horizontal nav, convert to right-side panel */
    .menu {
        position: fixed;
        top: 0;
        right: -100%;
        left: auto;
        width: 50%;
        max-width: 500px;
        min-width: 320px;
        height: 100%;
        background-color: #fff;
        z-index: 2;
        transition: right 0.4s ease-in-out;
        overflow-y: auto;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
    }

    .menu._active {
        right: 0;
        top: 0;
        z-index: 3;
    }

    /* Menu list — vertical layout */
    .menu__list {
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 3rem 3rem 3rem;
    }

    .menu__list li {
        width: 100%;
        margin: 0;
        padding: 1.2rem 0;
        border-bottom: 1px solid #EDEDF5;
    }

    .menu__list li:last-child {
        border-bottom: none;
    }

    .menu__link {
        font-size: 1.8rem !important;
        font-weight: 400;
    }

    .menu__list li:last-child {
        display: none;
    }

    .header__support-burger {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        z-index: 3;
        position: relative;
        margin-right: 1.5rem;
    }

    .header__container {
        height: 72px;
    }

    .header__body {
        display: flex;
        width: auto;
    }

    .header__top {
        display: none;
    }

    .header._active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.4);
        z-index: 1;
    }

    .dropdown--education {
        position: static;
    }

    .menu._active .dropdown--education .education-dropdown {
        display: none;
        position: static;
        width: 100% !important;
        left: auto !important;
        white-space: normal;
    }

    .menu._active .dropdown--education.open .education-dropdown {
        display: block;
    }

    .menu._active .education-dropdown .container {
        background: transparent;
        border: none;
        padding: 0.8rem 0 0;
        border-radius: 0;
    }

    .menu._active .education-dropdown__list {
        max-width: 100%;
    }

    .menu._active .education-dropdown__item {
        font-size: 14px;
        padding: 10px 12px 10px 16px;
    }

    .menu._active .education-dropdown__item-text::after {
        display: none;
    }

    .menu._active .menu__chevron {
        width: 20px;
        height: 20px;
    }

    .menu._active .link-menu--has-chevron {
        gap: 8px;
    }

    .link-menu--has-chevron:hover svg {
        transform: none;
    }

    .menu._active .dropdown--education.open .link-menu--has-chevron svg {
        transform: rotate(-180deg);
    }
}

@media (max-width: 1280px) {
    .header__logo {
        max-width: inherit;
    }
}

@media (max-width: 650px) {
    .menu {
        width: 75%;
    }

    .menu__list {
        padding: 80px 2rem 2rem 2rem;
    }

    .menu__link {
        font-size: 1.6rem !important;
    }
}

@media (max-width: 400px) {
    .menu {
        width: 85%;
    }
    .header__logo-img {
        max-width: 20rem;
    }
    .header__support-burger {
        display: none;
    }
}
