/* ==================================================
   Navigation base
================================================== */

.site-header,
.site-header *,
.site-header *::before,
.site-header *::after {
    box-sizing: border-box;
}

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

    width: 100%;
    background: rgba(197, 241, 67, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(243, 241, 237, 0.7);
    /* border: 2px solid var(--border); */
}

.navigation-container {
    position: relative;
    z-index: 1001;
    width: min(100% - 3rem, 1400px);
    min-height: 62px;
    margin: 0 auto;

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

    margin-bottom: 10px;
    border: 2px solid var(--border);
    border-bottom-right-radius: 80px 40px;
    border-left: none;
    border-right: none;
    border-top: none;
}

.main-navigation {
    width: 50%;
}

.navigation-list {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 50vw;
    height: auto;
    gap: 0.25rem;

    margin: 0;
    padding: 0;

    list-style: none;
}

.navigation-item {
    position: relative;
}

.navigation-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;

    min-height: 44px;
    padding: 0.3rem 0.5rem;

    color: #333;
    background: transparent;
    border: 0;
    border-radius: 4px;

    font: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;

    cursor: pointer;

    transition:
        color 180ms ease,
        background-color 180ms ease;
}

.navigation-link:hover,
.navigation-link:focus-visible,
.navigation-item.menu-open > .navigation-link {
    color: #f3f1ed;
    /* background: #333; */
    background: #333;

}

.navigation-link:focus-visible,
.mega-menu a:focus-visible,
.mobile-menu-toggle:focus-visible {
    outline: 3px solid #f1b400;
    outline-offset: 3px;
}

.dropdown-icon {
    display: inline-block;

    font-size: 0.75em;

    transition: transform 180ms ease;
}

.navigation-item.menu-open .dropdown-icon {
    transform: rotate(180deg);
}

/* ==================================================
   Desktop dropdown menu
================================================== */
.navigation-item {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    z-index: 30;

    width: min(230px, calc(100vw - 2rem));
    padding: 0.75rem;

    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.16);

    transform: translateX(-50%);
}

/* Small arrow above the dropdown */
.mega-menu::before {
    position: absolute;
    top: -6px;
    left: 50%;

    width: 10px;
    height: 10px;

    background: #ffffff;
    border-top: 1px solid #dddddd;
    border-left: 1px solid #dddddd;

    content: "";
    transform: rotate(45deg);
}

.mega-menu::after {
    position: absolute;
    top: -0.75rem;
    right: 0;
    left: 0;

    height: 0.75rem;

    content: "";
}

.mega-menu[hidden] {
    display: none !important;
}

.navigation-item:first-child .mega-menu {
    left: 0;
    transform: none;
}

.navigation-item:last-child .mega-menu {
    right: 0;
    left: auto;
    transform: none;
}

.navigation-item:first-child .mega-menu::before {
    left: 1.5rem;
    transform: rotate(45deg);
}

.navigation-item:last-child .mega-menu::before {
    right: 1.5rem;
    left: auto;
    transform: rotate(45deg);
}

.mega-menu[hidden] {
    display: none;
}

.mega-menu-inner {
    position: relative;
    z-index: 1;

    display: block;
}

.mega-menu-columns {
    display: block;
}

.mega-menu-column {
    margin: 0;
}

.mega-menu-column + .mega-menu-column {
    margin-top: 1rem;
    padding-top: 1rem;

    border-top: 1px solid #eeeeee;
}

.mega-menu-column h2 {
    margin: 0.1rem 0 0.35rem;
    padding: 0 0.4rem;

    /* color: #666666; */
    color: var(--highlight);

    font-family: "Nunito", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.4;
    text-transform: uppercase;
}

.mega-menu-column ul {
    display: block;

    margin: 0;
    padding: 0;

    list-style: none;
}

.mega-menu-column li {
    margin: 0;
    padding: 0;
}

.mega-menu-column a {
    display: block;

    padding: 0.7rem 0.5rem;

    color: #222222;
    border-radius: 4px;

    font-family: "Nunito", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;

    transition:
        color 180ms ease,
        background-color 180ms ease;
}

.mega-menu-column a:hover,
.mega-menu-column a:focus-visible {
    color: #222222;
    background: #f2f2f2;
}

.mega-menu-item-label {
    display: block;
}

.mega-menu-description {
    display: block;
    margin-top: 0.2rem;
    color: #77736d;
    font-family: "Nunito", sans-serif;
    font-size: 0.78rem;
    font-weight: 400;
    line-height: 1.3;
    white-space: normal;
    padding-left: 0.5rem;
}

/*
   The navigation uses text links rather than images.
*/

.mega-menu-image {
    display: none;
}

.mobile-logo {
  display: none;
}

/* ===================================================
   ⚠ TWO-COLUMN MEGA MENU (DESKTOP) — added 2026-10-27
=================================================== */

@media (min-width: 981px) {

    /* Single-column menus: original narrow panel */
    .mega-menu {
        width: min(240px, calc(100vw - 2rem));
    }

    /* Two-column menus: fits exactly two columns */
    .mega-menu--multi {
        width: min(500px, calc(100vw - 2rem));
    }

    /* Columns sit side by side and share the panel evenly */
    .mega-menu-columns {
        display: flex;
        align-items: flex-start;
    }

    .mega-menu-column {
        flex: 1 1 185px;
        min-width: 0;
    }

    /* Vertical divider instead of the horizontal one */
    .mega-menu-column + .mega-menu-column {
        margin-top: 0;
        padding-top: 0;
        border-top: 0;

        margin-left: 2rem;
        padding-left: 2rem;
        border-left: 1px solid #eeeeee;
    }
}

/* ==================================================
   Mobile menu button
================================================== */

.mobile-menu-toggle {
    display: none;

    width: 46px;
    height: 46px;
    margin-left: auto;
    padding: 0.65rem;

    color: #ffffff;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid #ffffff;
    border-radius: 5px;

    cursor: pointer;
}

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

    width: 100%;
    height: 2px;
    margin: 5px 0;

    background: #ffffff;

    transition:
        transform 180ms ease,
        opacity 180ms ease;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}
    

/* ==================================================
   Mobile navigation
================================================== */

@media (max-width: 980px) {

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 9999;

        max-width: 100%;

        background: rgba(84, 109, 132, 0.9);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        isolation: isolate;
    }

    .mobile-logo {
        display: unset;
        width: 10rem;
    }

    .logo {
        display: none;
    }

    .navigation-container {
        width: 100%;
        min-height: 70px;
        padding: 0 1rem;

        justify-content: flex-end;
        border: none;
    }

    .mobile-menu-toggle {
        position: relative;
        z-index: 52;

        display: block;
    }

    .main-navigation {
        position: absolute;
        top: 100%;
        right: 0;
        z-index: 51;

        display: block;

        width: 80%;
        max-height: calc(100vh - 70px);
        overflow-y: auto;

        padding: 0 1rem 1rem;

        background: #f3f1ed;
        border-bottom: 1px solid #dddddd;
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
    }

    .main-navigation[hidden] {
        display: none;
    }

    .navigation-list {
        display: block;

        width: 100%;
        max-width: 700px;
        margin: 0 auto;
        padding-top: 0.75rem;
    }

    .navigation-item {
        border-bottom: 1px solid #eeeeee;
    }

    .navigation-link {
        display: flex;

        width: 100%;
        min-height: 50px;
        padding: 0.85rem 0;

        justify-content: space-between;

        color: #222222;
        border-radius: 0;

        text-align: left;
    }

    .navigation-link:hover,
    .navigation-link:focus-visible,
    .navigation-item.menu-open > .navigation-link {
        color: #222222;
        background: transparent;
    }

    .navigation-link:active,
    .navigation-link:focus-visible,
    .navigation-item.menu-open > .navigation-link  {
        color: purple;
        background: #ccc;
        padding: 0 0.5rem;
        border-radius: 10px 10px 0 0;
    }

    /*
       Keep the navigation above the visual image
       without modifying .visual-image itself.
    */

    .site-header {
        isolation: isolate;
    }

    .mega-menu {
        position: static;

        width: 100%;
        padding: 0.25rem 0 1rem 0;

        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: rgba(220, 220, 220, 0.7);

        border-bottom-left-radius: 50px 20px;
        border-bottom-right-radius: 50px 20px; 

        transform: none;
    }

    .mega-menu::before {
        display: none;
    }

    .mega-menu-inner {
        display: block;
    }

    .mega-menu-columns {
        display: block;
    }

    .mega-menu-column {
        margin: 0;
    }

    .mega-menu-column + .mega-menu-column {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }

    .mega-menu-column h2 {
        margin: 0.5rem 0 0.25rem;
        padding: 0 0 0 20px;

        font-size: 0.75rem;
        /* text-indent: 20px; */
    }

    .mega-menu-column a {
        padding: 0.6rem 0 0 20px;

        font-size: 0.9rem;
        /* text-indent: 20px; */
    }

    .mega-menu-description {
        font-size: 0.78rem;
    }
}
/* ==================================================
   Prevent page scrolling while mobile menu is open
================================================== */

body.nav-open {
    overflow: hidden;
}

/* ==================================================
   Reduced motion
================================================== */

@media (prefers-reduced-motion: reduce) {
    .site-header *,
    .site-header *::before,
    .site-header *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
