/* Hide toggle on desktop */
@media screen and (min-width: 1025px) {
    .submenu-toggle {
        display: none;
    }

    .page-our-team .committee-member {
        max-width: calc(33% - 15px);
    }
}

@media screen and (max-width: 1280px) {
    .resources-grid .resources-type-item {
        width: 50%;
    }
}

@media screen and (max-width: 1024px) {
    /* Submenu toggle button */
    header .menu-mainmenu-container ul li {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
    }

    header .menu-mainmenu-container ul li > a {
        flex: 1;
    }

    .submenu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
        width: 44px;
        height: 44px;
        padding: 0;
        color: var(--global-color-light-1);
        transition: transform 0.3s ease;
        outline: none;
    }

    .submenu-toggle[aria-expanded="true"] {
        transform: rotate(180deg);
    }

    header .menu-mainmenu-container ul .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        padding: 0;
        transition: max-height 0.3s ease;
    }

    header .menu-mainmenu-container ul .sub-menu.open {
        max-height: 500px;
    }

    /* Override desktop hover behavior on mobile */
    header .menu-mainmenu-container ul li:hover .sub-menu {
        max-height: 0;
        opacity: 1;
        visibility: visible;
    }

    header .menu-mainmenu-container ul li:hover .sub-menu.open {
        max-height: 500px;
    }

    .resources-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    header.site-header {
        padding-left: 20px;
        padding-right: 20px;
    }

    header .header-menu {
        position: fixed;
        top: 0;
        width: 95%;
        max-width: 455px;
        left: auto;
        background: var(--global-color-primary-dark);
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 35px;
        right: -100%;
        transition: all 0.8s ease-in-out;
    }

    header .header-menu.open {
        right: 0;
    }

    header .header-menu:before {
        content: "";
        position: fixed;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.3);
        z-index: -2;
        top: 0;
        right: -100vw;
        transition: all 0.6s ease-in-out;
    }

    header .header-menu.open:before {
        right: 0;
    }

    header .header-menu:after {
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        background: var(--global-color-primary-dark);
        z-index: -1;
        top: 0;
        left: 0;
    }

    header .menu-mainmenu-container {
        flex: unset;
        display: block;
        max-width: 240px;
    }

    header .menu-mainmenu-container ul {
        flex-direction: column;
    }

    header .menu-mainmenu-container ul li a {
        color: var(--global-color-light-1);
        font-size: 18px;
        padding: 14px 26px;
    }

    header .btn-donate-box {
        display: none;
    }

    header .header-menu .btn-donate-box {
        display: inline-flex;
        width: auto;
        justify-content: center;
        flex-direction: column;
    }

    header .header-menu .btn-donate-box a {
        border-color: #FFF;
    }

    header .btn-search-box {
        display: none;
    }

    header .container {
        justify-content: space-between;
    }

    header .button-icon-menu {
        display: block;
        background: transparent;
        border: unset;
        width: 48px;
        height: 48px;
    }

    header .header-right {
        justify-content: flex-end;
        gap: 30px;
    }


    header .btn-cart {
        margin-top: -7px;
    }

    header .btn-cart img {
        width: 35px;
        height: 35px;
    }

    header .logo {
        margin-bottom: -46px;
    }

    header.scroll .logo a,
    header .logo a {
        max-width: 85px;
    }


    .header-menu .header-social {
        display: flex;
        align-items: center;
        gap: 20px;
        margin-bottom: 20px;
    }

    .header-menu .header-social a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: rgba(251, 251, 251, 0.2);
    }

    .header-menu .header-social a:first-child img {
        width: 27px;
    }

    .header-menu .header-social a:last-child img {
        width: 26px;
    }

    .header-menu .frm-search {
        display: flex;
        align-items: center;
    }

    .header-menu .frm-search input {
        border: unset;
        border-radius: 0;
        height: 50px;
    }

    .header-menu .frm-search button {
        border: unset;
        border-radius: 0;
        background: var(--global-color-primary);
        max-width: 45px;
        min-width: 45px;
        height: 50px;
    }

    .header-menu .frm-search button img {
        width: 30px;
    }

    .header-menu .button-close {
        display: block;
        position: absolute;
        top: 30px;
        right: 20px;
        width: 65px;
        height: 65px;
        background: transparent;
        border: unset;
        cursor: pointer;
    }

    header .logo:before {
        bottom: -35px;
        left: -99px;
        width: 300px;
    }

    #footer {
        padding: 60px 0;
    }

    #footer .wrap {
        padding-left: 30px;
        padding-right: 30px;
    }

    .footer-top {
        flex-direction: column;
        gap: 30px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .footer-bottom .col-left {
        width: 100%;
    }

    .footer-bottom .col-center {
        width: 100%;
        text-align: center;
    }

    .footer-bottom .col-right {
        width: 100%;
    }

    .footer-excerpt {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer_item {
        text-align: center;
    }

    .footer_item a {
        text-align: center;
        display: inline-block;
        width: auto;
    }

    .footer-bottom .col-center h3, .footer-bottom .col-right h3 {
        text-align: center;
    }

    .footer-bottom .col-center h3:after, .footer-bottom .col-right h3:after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links {
        align-items: center;
        margin-top: 34px;
        margin-bottom: 21px;
    }

    .footer-bottom .col-right .intro_text {
        text-align: center;
    }

    .footer-bottom .col-right form {
        flex-direction: row;
        padding-left: 50px;
        padding-right: 50px;
        gap: 15px;
        align-items: center;
    }

    .footer-bottom .col-right button {
        width: 202px;
        margin-top: 0;
    }

    .copy-right {
        padding: 20px 0;
    }

    .footer-bottom .col-center h3:after,
    .footer-bottom .col-right h3:after {
        width: 10%;
    }
}

@media screen and (max-width: 768px) {
    .page-about-us .section-caring .box {
        flex-direction: column;
    }

    .resources-list {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .resources-grid .resources-type-item {
        width: 100%;
    }

    header.site-header {
        padding-left: 10px;
        padding-right: 10px;
    }

    header .logo {
        max-width: 70px;
        margin-bottom: -32px;
    }

    header.scroll .logo a, header .logo a {
        max-width: 100%;
    }

    header .header-right {
        width: auto;
    }

    header .logo:before {
        bottom: -39px;
        left: -65px;
        width: 210px;
    }

    .footer-bottom .col-right form {
        flex-direction: column;
        padding-left: 0;
        padding-right: 0;
    }

    .footer-bottom .col-right button {
        width: 100%;
    }

    .footer-logo {
        max-width: 59%;
    }

    header .btn-cart-box,
    header .btn-search-box {
        width: auto;
    }
}
