.container.header {
    width: 100%;
    padding: 0;
    margin: auto;
    transition: all 0.3s;
    position: sticky;
    top: 10px;
    z-index: 100;
}

.offcanvas-backdrop.fade.show {
    display: none;
}

header {
    display: flex;
    justify-content: space-between;
    /* margin: 10px 0px; */
    align-items: center;
    padding: 0;
    background-color: var(--header-bg);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--box-shadow);
    padding: 15px 30px;
}

header .logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--medium-padding);
    padding: 10px;
    position: relative;
}


header .logo #logo-menu {
    display: flex;
    justify-content: center;
    align-items: center;
    /* height: 0; */
    /* width: 0; */
}

header .logo #logo-menu button {
    background-color: var(--button-grey);
    border: 0;
    color: black;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-xxxl);
    transition: all 0.3s;
    width: 40px;
    text-align: center;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

header .logo #logo-menu button[open] {
    /* color: var(--primary-red); */
    transform: rotate(180deg);
    transition: all 0.3s;
    z-index: 1000;
    background: transparent;
}

header .logo img {
    position: relative;
    z-index: 1000;
}

header .logo #logo-menu ul {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 15px;
    list-style: none;
    position: absolute;
    top: 0px;
    right: 2px;
    height: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.3s ease-in-out;
    border-radius: 24px;
    background: white;
    box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.40);
}

header .logo #logo-menu ul[open] {
    height: 153px;
    width: 100%;
    overflow: visible;
    transition: all 0.3s ease-in-out;
    padding-right: 30px;
    padding-top: 40px;
    text-align: center;
}

header .logo #logo-menu ul li {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

header .logo #logo-menu ul li a {
    overflow: hidden;
    color: transparent;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-xxxxl);
}

header .logo #logo-menu ul[open] li a {
    overflow: visible;
    color: black;
    transition: all 0.9s ease-in-out;
    /* font-size: var(--font-size-lg); */
    /* width: 100%; */
    /* text-align: center; */
    /* font-weight: var(--font-weight-xxxxl); */
}


@media (max-width: 780px) {
    header .logo img {
        height: fit-content;
    }

    header .logo #logo-menu ul {
        top: 5px;
        right: 2px;
    }
}

header nav {
}

    header nav ul {
        display: flex;
        justify-content: space-between;
        align-items: center;
        list-style: none;
        gap: 20px;
        width: auto;
        margin: 0;
    }


            header nav ul li a {
                font-size: var(--font-size-xl);
                font-weight: var(--font-weight-xxxl);
                transition: all 0.3s;
                color: black;
                padding: 10px;
                border-radius: var(--border-radius-xl);
                text-align: center;
                text-wrap: nowrap;
            }

                header nav ul li a[active="true"] {
                    font-weight: 900;
                    display: flex;
                    flex-direction: column;
                    /* justify-content: center; */
                    align-items: center;
                }

                    header nav ul li a[active="true"]::after {
                        content: "";
                        float: left;
                        background: var(--primary-red);
                        width: 20px;
                        height: 3px;
                        border-radius: 3px;
                    }

                header nav ul li a:hover {
                    border-radius: var(--border-radius-xl);
                    background-color: rgba(0, 0, 0, 0.2);
                    transition: all 0.3s;
                }


header .action {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

header .action a {
    background-color: var(--primary-red);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius-xl);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-xxxl);
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

header .action a i {
}

header .action button {
    background-color: var(--button-grey);
    color: white;
    padding: 13px 13px;
    border-radius: 50%;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-xxxl);
    transition: background-color 0.3s;
    border: 0;
    display: flex;
    justify-content: center;
}

header .action button i {
    text-align: center;
}

header .menu {
    display: none;
}

#drawer {
    display: none;
}

@media screen and (max-width: 1400px) {
    .offcanvas-backdrop.fade.show {
        display: block;
    }

    #drawer {
        display: block;
    }

    .container.header {
        width: 100%;
        padding: 10px;
        position: sticky;
        top: 0;
    }

    .offcanvas-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        width: 100%;
    }

    .offcanvas-header .btn-close {
        margin: 0;
    }

    header {
        gap: 10px;
        padding: 0 10px;
        justify-content: space-between;
    }

    header .logo {
        width: auto;
        height: 60px;
    }


    header .action {
        display: none;
    }

    header .menu {
        display: block;
    }

    header .menu button {
        background-color: var(--button-grey);
        color: black;
        padding: 10px 10px;
        border-radius: 50%;
        font-size: var(--font-size-xl);
        font-weight: var(--font-weight-xxxl);
        transition: background-color 0.3s;
        border: 0;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    header .menu button i {
        font-size: 17px;
    }

    header .menu button:hover {
        background-color: rgba(0, 0, 0, 0.2);
        color: black;
        transition: all 0.3s;
    }

/.mobile-nav {
/
    /*    display: none;*/
    /* */
/
}/
#drawer {
    height: 100%;
    overflow: auto;
}

    #drawer ul {
        padding: 0;
        list-style: none;
        height: 80vh;
        overflow: auto;
        overflow-x: hidden;
    }

    #drawer ul li {
        overflow: hidden;
        display: flex;
        justify-content: center;
        align-items: start;
        padding: 10px;
        border-radius: var(--border-radius-xl);
        transition: all 0.3s;
    }

    #drawer ul li a {
        font-size: var(--font-size-xl);
        font-weight: var(--font-weight-xxxl);
        transition: all 0.3s;
        color: black;
        padding: 10px;
        border-radius: var(--border-radius-xl);
        text-decoration: none;
        width: 100%;
        text-align: start;
    }

    #drawer ul li:hover {
        background-color: rgba(0, 0, 0, 0.2);
        transition: all 0.3s;
        color: var(--primary-red);
    }


    #drawer ul li:hover ul li:hover {
        background-color: transparent;
        color: var(--primary-red);
        transition: all 0.3s;
    }

    .offcanvas-search {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .offcanvas-search input:focus {
        box-shadow: none;
        border-color: var(--primary-red);
    }

    .offcanvas-search button {
        background-color: var(--primary-red);
        color: white;
        font-size: var(--font-size-xl);
        font-weight: var(--font-weight-xxxl);
        transition: background-color 0.3s;
        border: 0;
    }

    .offcanvas-search button:hover {
        background-color: rgba(0, 0, 0, 0.2);
        color: black;
        transition: all 0.3s;
    }

    .offcanvas-search button:focus {
        box-shadow: none;
    }
}

@media screen and (max-width: 998px) {
    header nav {
        display: none;
    }

    header .action {
        display: none;
    }

    header .menu {
        display: block;
    }
}


.desktop-search {
    display: none;
    transition: all 0.3s;
    position: absolute;
    width: 100%;
}

.desktop-search[open="true"] {
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: var(--header-bg);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--box-shadow);
}

.desktop-search input {
    border-radius: var(--border-radius-md);
    border: none;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-xxxl);
    width: 100%;
    padding: 10px;
}

.desktop-search input:focus {
    box-shadow: none;
    border-color: var(--primary-red);
    outline: none;
}

.desktop-search button:focus {
    box-shadow: none;
    outline: none;
}

.desktop-search button {
    background-color: var(--primary-red);
    color: white;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-xxxl);
    transition: background-color 0.3s;
    padding: 8px;
    border: 0;
    border-radius: var(--border-radius-xs);
}

.desktop-search button:hover {
    background-color: rgba(0, 0, 0, 0.2);
    color: black;
    transition: all 0.3s;
}

.fa-solid.fa-magnifying-glass {
    color: black;
}

.container.header {
    position: sticky;
    z-index: 10;
    top: 10px;
}

.close-search {
    display: none !important;
}

.search-active .submit-btn {
    display: none;
}

.search-active .close-search {
    display: flex !important;
}

.search-active {
    display: block;
}


nav {
    transition: opacity 0.3s ease-in-out;
}

.desktop-search {
    position: relative;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 20;
    display: none; /* Initially hidden */
}

/* Ensure logo remains visible */
.logo {
    position: relative;
    z-index: 30; /* Higher than search and menu */
}

/* Show search bar when active */
.header.search-active .desktop-search {
    display: flex;
    column-gap: 10px;
    overflow: visible;
}

.search-active nav, .search-active .action {
    display: none;
}

.search-active .page-header {
    column-gap: 20px;
}

.close-search {
    border-radius: 50%;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-xxxl);
    background-color: var(--button-grey);
    padding: 10px 15px;
    border: none;
}

.offcanvas-body {
    height: max-content;
    padding: 11px;
    overflow-y: hidden;
    margin: 0;
}

.offcanvas-body ul li {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

.offcanvas-body ul li > div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    text-align: end;
}

.offcanvas-body ul li > div button {
    text-align: center;
    background-color: transparent;
    color: black;
    padding: 10px 26px;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-xxxl);
    border: 0;
    /* display: flex; */
    /* justify-content: center; */
}

.offcanvas-body ul li > div button i {
    text-align: center;
}

.offcanvas-body ul li > div button:hover {
    transition: all 0.3s;
}

.offcanvas-body ul li > div button:focus {
    box-shadow: none;
}

.offcanvas-body ul li > div button i {
    font-size: 17px;
    transition: all 0.3s;
}

.offcanvas-body ul li > div button[open] i {
    transform: rotate(180deg);
    transition: all 0.3s;
}


.offcanvas-body ul li a {
    /* width: 100%; */
}

.offcanvas-body ul li ul {
    max-height: 0;
    overflow: hidden !important;
    transition: max-height 0.3s ease-in-out;
}

.offcanvas-body ul li ul[open] {
    max-height: 500px;
    overflow: hidden !important;
    transition: max-height 0.3s ease-in-out;
}

.desktop-search {
    width: 0;
    height: 0;
    overflow: hidden;
    transition: width 1s ease-in-out, height 0s ease-in-out;
    display: block;
    position: absolute;
}

.desktop-submenus {
    position: relative;
    transition: all 0.3s;
}

.desktop-submenus ul {
    display: none;
}

.desktop-submenus:hover ul {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: absolute;
    background-color: var(--header-bg);
    top: 43px;
    padding: 0;
    border-radius: 24px;
}

.desktop-submenus i {
    transition: all 0.3s;
}

.desktop-submenus:hover i {
    transform: rotate(180deg);
    transition: all 0.3s;
}

.desktop-submenus:hover ul li {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    border-radius: 0;
    transition: all 0.3s;
}

.search-active .desktop-search {
    height: 56px;
    display: flex;
    width: 100%;
    margin-right: auto;
    position: relative;
    transition: width 0.2s ease-in-out, height 0.2s ease-in-out;
}

.desktop-search nav {
    position: relative;
    width: 100%;
    transition: width 0.2s ease-in-out;
}

.search-active .desktop-search nav {
    position: absolute;
    width: 0;
    overflow: hidden;
    transition: width 0.2s ease-out;
}


@media (min-width: 1000px) and (max-width: 1400px) {
    .page-header ul > li {
        display: none;
    }

    .page-header ul > li:nth-child(1), .page-header ul > li:nth-child(2), .page-header ul > li:nth-child(4) {
        display: block;
    }
}


@media (max-width: 1400px) {

    /*   New design for mobile */
    .desktop-search {
        display: block;
    }

    header .action {
        display: flex !important;
    }

    header .logo {
        order: 1;
    }

    .header.search-active .desktop-search {
        order: 2;
    }

    header nav {
        order: 2;
    }

    .search-active .close-search {
        order: 3;
    }

    header .logo #logo-menu {
        display: none;
    }

    header .action {
        display: block;
        order: 3;
        margin-right: auto;
    }

    .container.header.search-active button#search-btn {
        display: none;
    }

    .container.header.search-active .action a {
        display: none;
    }

    .container.header.search-active .action {
        display: none !important;
    }

    .desktop-search input {
        height: 75%;
        margin: auto;
    }

    header .action span {
        display: none;
        position: absolute;
    }

    header .action a {
        border-radius: 50%;
        padding: 12px 15px;
    }

    .search-active .logo, .search-active #menu-button {
        display: none;
    }
}