@import url(https://fonts.googleapis.com/css?family=Ek+Mukta:200);

body {
    margin: 0;
    line-height: 1.4;
    position: relative; /* Context for absolute positioning */
}

/* Hide sleek-mobile-menu on desktop */
.sleek-mobile-menu {
    display: none !important; /* Ensure hidden on desktop */
    visibility: hidden; /* Additional layer of hiding */
}

/* Desktop menu styling (add your own styles here or in your theme) */
/* Example: If you have a separate desktop menu, style it outside the media query */
/*
nav.menu-desktop {
    display: block;
}
nav.menu-desktop ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
nav.menu-desktop li {
    display: inline-block;
    margin-right: 20px;
}
nav.menu-desktop a {
    color: #000;
    text-decoration: none;
}
*/

/* Mobile menu styles (1200px and below) */
@media (max-width: 1199px) { /* Changed from 1023px to 1200px */
    .sleek-mobile-menu {
        display: block !important; /* Override desktop hiding */
        visibility: visible; /* Make visible on mobile */
        position: relative; /* Position within parent, non-sticky */
        width: 100%; /* Full width of parent */
        z-index: 10000;
        background: transparent; /* No background when closed */
        transition: background 0.3s ease-in-out; /* Smooth background transition */
    }

    .menu-opened .sleek-mobile-menu {
        background: rgba(0, 0, 0, 0.8); /* Show background when opened */
    }

    .burger-container {
        position: absolute; /* Position within .sleek-mobile-menu, scrolls with page */
        display: block; /* Ensure visible by default */
        height: 50px;
        width: 50px;
        cursor: pointer;
        transform: rotate(0deg);
        transition: all 0.3s cubic-bezier(0.4, 0.01, 0.165, 0.99);
        user-select: none;
        -webkit-tap-highlight-color: transparent;
        right: 0px; /* Relative to parent width */
        top: -28px; /* Adjusted for padding */
        z-index: 10001;
        background: #f7b81a;
    }

    #burger {
        width: 18px;
        height: 8px;
        position: relative;
        display: block;
        margin: -4px auto 0;
        top: 50%;
    }

    .bar {
        width: 100%;
        height: 2px;
        display: block;
        position: relative;
        background: white;
        transition: all 0.3s cubic-bezier(0.4, 0.01, 0.165, 0.99);
    }

    .bar.topBar {
        transform: translateY(0px) rotate(0deg);
    }

    .bar.btmBar {
        transform: translateY(6px) rotate(0deg);
    }

    ul.menu {
        position: fixed; /* Fixed only for open/close transition */
        display: block;
        padding: 0; /* No padding when closed */
        list-style: none;
        background: #27A7D9;
        background: linear-gradient(180deg,rgba(39, 167, 217, 1) 0%, rgba(0, 183, 255, 1) 100%);
        width: 100vw; /* Full viewport width */
        max-height: 0;
        margin: 0;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 10000;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, padding 0.5s ease-in-out;
    }

    .menu-opened .menu {
        max-height: 100vh; /* Expand to viewport height */
        opacity: 1; /* Fade in */
        padding: 70px 48px 0; /* Apply padding only when opened */
    }

    li.menu-item {
        margin-top: 10px;
        transform: scale(1.15) translateY(-30px);
        opacity: 0;
        transition: transform 0.5s cubic-bezier(0.4, 0.01, 0.165, 0.99), opacity 0.6s cubic-bezier(0.4, 0.01, 0.165, 0.99);
    }

    li.menu-item:nth-child(1) { transition-delay: 0.49s; }
    li.menu-item:nth-child(2) { transition-delay: 0.42s; }
    li.menu-item:nth-child(3) { transition-delay: 0.35s; }
    li.menu-item:nth-child(4) { transition-delay: 0.28s; }
    li.menu-item:nth-child(5) { transition-delay: 0.21s; }
    li.menu-item:nth-child(6) { transition-delay: 0.14s; }
    li.menu-item:nth-child(7) { transition-delay: 0.07s; }

    /* Style for parent items with submenus */
    li.menu-item-has-children {
        position: relative;
    }

    ul.sub-menu {
        display: none;
        margin-top: 0px;
        list-style: none;
        padding-left: 0 !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;
    }

    .menu-opened .menu-item-has-children.open ul.sub-menu {
        display: block;
        max-height: 500px;
        opacity: 1;
    }

    li.menu-item a {
        display: block;
        position: relative;
        color: #fff;
        font-family: "Plus Jakarta Sans", Sans-serif;
        font-weight: 500 !important;
        text-transform: uppercase;
        text-decoration: none;
        font-size: 17px;
        line-height: 2.35;
        font-weight: 200;
        width: 100%;
        padding-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .menu-opened ul.menu li.menu-item {
        transform: scale(1) translateY(0px) !important;
        opacity: 1 !important;
    }

    .menu-opened ul.menu li.menu-item:nth-child(1) { transition-delay: 0.27s; }
    .menu-opened ul.menu li.menu-item:nth-child(2) { transition-delay: 0.34s; }
    .menu-opened ul.menu li.menu-item:nth-child(3) { transition-delay: 0.41s; }
    .menu-opened ul.menu li.menu-item:nth-child(4) { transition-delay: 0.48s; }
    li.menu-item:nth-child(5) { transition-delay: 0.55s; }
    li.menu-item:nth-child(6) { transition-delay: 0.62s; }
    li.menu-item:nth-child(7) { transition-delay: 0.69s; }

    .menu-opened .burger-container {
        transform: rotate(90deg);
    }

    .menu-opened .burger-container #burger .bar.topBar {
        transform: translateY(4px) rotate(45deg);
        transition: all 0.4s cubic-bezier(0.4, 0.01, 0.165, 0.99);
        transition-delay: 0.2s;
    }

    .menu-opened .burger-container #burger .bar.btmBar {
        transform: translateY(2px) rotate(-45deg);
        transition: all 0.4s cubic-bezier(0.4, 0.01, 0.165, 0.99);
        transition-delay: 0.2s;
    }
}

@media screen and (max-width: 767px) {
    .menu-opened .menu {
        padding: 70px 15px 0; /* Apply padding only when opened */
    }
}