.header {
    width: 100%;
    background-color: var(--al-white);
    /* position: relative; */
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* .header > .container {
    width: 100%;
    max-width: var(--max-container);
    padding: 0 80px;
}

@media (max-width: 767.98px) {
    .header > .container {
        padding: 0 24px;
    }
} */

.logo_wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 120px;
    width: 100%;
}
/* 
.header__logo img {
    width: 75px;
    object-fit: contain;
} */

.nav_menu {
    display: flex;
    align-items: center;
    gap: 40px;
}

.menu_items {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
    overflow: visible;
}

.menu_items li {
    position: relative;
    /* padding-bottom: 5px; */
    /* Creates a larger hover area */
}

.menu_items li a {
    font-family: var(--font-medium);
    font-size: var(--font-size-medium);
    line-height: var(--line-height-medium);
    color: var(--al-black);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

.menu_items li a.active {
    color: var(--al-red);
}

.menu_items li a:hover {
    color: var(--al-red);
}

/* ── FIGMA ACTIVE/HOVER UNDERLINES ── */
.menu_items li a::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--al-red);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu_items li a:hover::after,
.menu_items li a.active::after {
    transform: scaleX(1);
}

.btn-donate::after {
    display: none !important;
}

/* .nav-arrow {
    font-size: 10px;
    margin-left: 6px;
    transition: transform 0.3s ease;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif !important;
    font-weight: 900 !important;
    display: inline-block;
} */

.nav-arrow {
    margin-top: 6px;
    margin-left: 4px;
}  

/* ── DROPDOWN ── */
.dropdown_menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--al-white);
    min-width: 220px;
    list-style: none;
    padding: 16px 0;
    margin: 0;
    /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); */
    border: 1px solid var(--al-light-grey);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

/* Nesting: Grandchildren (Level 3+) fly out to the right */
.dropdown_menu .dropdown_menu {
    top: 0;
    left: 100%;
    margin-top: -1px;
    transform: translateX(10px);
}

.has-dropdown:hover>.dropdown_menu {
    opacity: 1;
    visibility: visible;
    transform: translate(0);
}


.dropdown_menu li {
    padding-bottom: 0;
}

.dropdown_menu li a {
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--al-black);
    text-decoration: none;
    font-size: 1.6rem;
    transition: all 0.2s ease;
}

/* Disable underlining in secondary/dropdown flyouts */
.dropdown_menu li a::after {
    display: none;
}

.dropdown_menu li a:hover {
    background-color: var(--al-light-grey);
    color: var(--al-red);
}

.btn-donate {
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 24px;
    background-color: var(--al-red);
    color: var(--al-white) !important;
    font-family: var(--font-heading-semi-bold);
    font-size: var( --font-size-large);
    line-height: var(--line-height-large);
    text-decoration: none;
    border: none;
    border-radius: 0;
    cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  letter-spacing: 3%;
}

.btn-donate,
.btn-donate:hover,
.btn-donate:focus,
.btn-donate:active {
    text-decoration: none !important;
    border: none !important;
}

.btn-donate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    color: var(--al-white) !important;
}

/* ── HAMBURGER ── */
.hamburger_menu {
    background: none;
    border: none;
    font-size: 0px;
    color: var(--al-black);
    cursor: pointer;
    padding: 0px;
}

/* ── MOBILE OVERLAY ── */
.mobile_overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--al-white);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.4s ease-in-out, visibility 0.4s ease-in-out;
    padding: 0;
    display: flex;
    flex-direction: column;
    visibility: hidden; /* Prevents off-screen overflow and scrollbars */
}

.mobile_overlay.is-open {
    transform: translateX(0);
    visibility: visible;
}


.mobile_overlay__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0px;
}

.close_menu {
    background: none;
    border: none;
    font-size: 0px;
    color: var(--al-black);
    cursor: pointer;
    padding: 10px;
}

.mobile_nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    /* padding: 40px 16px; */
    overflow-y: auto;
    margin-top: 32px;
    overflow-x: clip;
}

.mobile_menu_items {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile_menu_items li {
    border-bottom: none;
}

.mobile-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--al-red);
}

.mobile_menu_items > li:first-child > .mobile-nav-row > a {
    padding-top: 0;
}

.mobile_menu_items > li:last-child > .mobile-nav-row {
    border-bottom: none;
}

.mobile_menu_items > li:last-child > .mobile-nav-row > a {
    padding-bottom: 0;
}

.mobile-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: var(--al-black);
    transition: color 0.3s ease, transform 0.3s ease;
    -webkit-appearance: none;
    appearance: none;
}

.mobile-toggle-btn:hover,
.mobile-toggle-btn:focus {
    background: none !important;
    color: inherit;
}

.menu_items li a.active .nav-arrow path,
.menu_items li a:hover .nav-arrow path {
    fill: currentColor;
}

.mobile-nav-link.active ~ .mobile-toggle-btn .nav-arrow path {
    fill: var(--al-red);
}

.mobile_menu_items li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 0;
    color: var(--al-black);
    text-decoration: none;
    font-family: var(--font-medium);
    font-size: var(--font-size-medium);
    line-height: var(--line-height-medium);
}

.mobile_menu_items li a.active {
    color: var(--al-red);
}

.mobile_menu_items li a i {
    font-size: 16px;
    padding: 10px;
    margin: -10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.mobile-nav-item.is-expanded > a > .mobile-toggle {
    transform: rotate(180deg);
}

.mobile_submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: var(--al-light-grey);
}

.mobile_footer {
    margin: 40px 0px;
}

.mobile_footer .btn-donate {
    width: 100%;
    height: 60px;

}

/* ── RESPONSIVE DESIGN ── */
@media (max-width: 1023.98px) {
    .header {
        height: 72px;
    }

    .logo_wrapper {
        height: 72px;
    }

    .header__logo img {
        width: 33px;
        height: 40px;
    }

    .nav_menu {
        display: none;
    }

    .hamburger_menu {
        display: block;
    }

    .mobile_footer .btn-donate {
        padding: 16px 0px;
    }
    .nav-arrow {
        margin-top: 0px;
        margin-left: 0px;
    }  
}

@media (min-width: 1023.98px) {
    .hamburger_menu {
        display: none;
    }
}

/* Hide overlay entirely on desktop to avoid any parent transform overflow issues */
@media (min-width: 1023.98px) {
    .mobile_overlay {
        display: none !important;
    }
}
