/* ==========================================================================
   GLS Off-canvas Mobile Navigation
   Auto-hidden slide-in side menu, toggled by a hamburger button.
   Only takes effect at <=991px; desktop nav is completely untouched.
   ========================================================================== */

.gls-nav-toggle {
    display: none;
    position: relative;
    width: 42px;
    height: 38px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 1201;
    flex-shrink: 0;
}
.gls-nav-toggle span {
    display: block;
    position: absolute;
    left: 6px;
    right: 6px;
    height: 3px;
    border-radius: 3px;
    background: #800020;
    transition: transform .25s ease, opacity .2s ease;
}
.gls-nav-toggle span:nth-child(1) { top: 9px; }
.gls-nav-toggle span:nth-child(2) { top: 18px; }
.gls-nav-toggle span:nth-child(3) { top: 27px; }
.gls-nav-toggle.active span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.gls-nav-toggle.active span:nth-child(2) { opacity: 0; }
.gls-nav-toggle.active span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

.gls-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 8, 6, .55);
    z-index: 1198;
    opacity: 0;
    transition: opacity .3s ease;
}
.gls-nav-overlay.active {
    display: block;
    opacity: 1;
}

.gls-nav-close {
    display: none;
}

@media screen and (max-width: 991px) {

    .gls-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* The nav list itself becomes the sliding side panel, hidden by default */
    .menu-1 ul.gls-desktop-nav {
        position: fixed !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        bottom: 0 !important;
        height: 100vh !important;
        width: 82% !important;
        max-width: 320px !important;
        margin: 0 !important;
        transform: translateX(100%) !important;
        transition: transform .35s cubic-bezier(.4, 0, .2, 1) !important;
        z-index: 1200 !important;
        overflow-y: auto !important;
        box-shadow: -12px 0 45px rgba(0, 0, 0, .35) !important;
        padding: 80px 25px 30px !important;
        border-radius: 0 !important;
    }

    .menu-1 ul.gls-desktop-nav.active {
        transform: translateX(0) !important;
    }

    .gls-nav-close-item {
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .gls-nav-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 18px;
        right: 18px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, .25);
        background: rgba(255, 255, 255, .08);
        color: #ffffff;
        font-size: 22px;
        line-height: 1;
        cursor: pointer;
    }

    body.gls-nav-open {
        overflow: hidden;
    }
}

/* Admin dashboard sidebar gets the same auto-hide treatment on mobile */
.gls-mobile-topbar {
    display: none;
}
@media screen and (max-width: 900px) {
    .gls-mobile-topbar {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 18px;
        background: #10141b;
        position: sticky;
        top: 0;
        z-index: 1150;
    }
    .gls-mobile-topbar .gls-nav-toggle span { background: #ffffff; }
    .gls-mobile-topbar-logo {
        height: 30px;
        width: auto;
    }

    .gls-app-wrapper .gls-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        height: 100vh !important;
        transform: translateX(-100%) !important;
        transition: transform .35s cubic-bezier(.4, 0, .2, 1) !important;
        z-index: 1200 !important;
        overflow-y: auto !important;
        box-shadow: 12px 0 45px rgba(0, 0, 0, .35) !important;
    }
    .gls-app-wrapper .gls-sidebar.active {
        transform: translateX(0) !important;
    }
    .gls-app-wrapper .gls-sidebar .gls-nav-close {
        display: flex !important;
        position: absolute;
        top: 14px;
        right: 14px;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 1px solid rgba(255, 255, 255, .25);
        background: rgba(255, 255, 255, .08);
        color: #ffffff;
        font-size: 20px;
        cursor: pointer;
    }
}
