/* =============================================
   STARK PIXEL - MOBILE SIDEBAR NAV
   ============================================= */

/* ---- Mobile Top Bar: Logo + Hamburger in same row ---- */

/* Default: hide mobile bar, show desktop logo */
.mobile-top-bar {
    display: none !important;
}
.sp-desktop-logo {
    display: block;
}

@media (max-width: 991px) {
    /* Hide original Bootstrap collapse toggle & desktop logo */
    .main-menu .navbar-header { display: none !important; }
    .sp-desktop-logo { display: none !important; }

    /* Fix theme_menu col on mobile — full width */
    .theme_menu .col-md-3 {
        width: 100% !important;
        float: none !important;
    }
    .theme_menu .menu-column {
        display: none !important;
    }
    /* Show top-bar on mobile, phone number only */
    header.top-bar { display: block !important; padding: 6px 0; }
    header.top-bar .col-md-6:last-child { display: none !important; }
    header.top-bar .top-bar-text li:nth-child(2) { display: none !important; }
    header.top-bar .top-bar-text { float: none !important; text-align: center; }
    header.top-bar .top-bar-text li a { font-size: 13px; font-weight: 600; }

    /* Show mobile top bar as FLEX row */
    .mobile-top-bar {
        display: -webkit-box !important;
        display: -ms-flexbox !important;
        display: flex !important;
        -webkit-box-orient: horizontal !important;
        -webkit-box-direction: normal !important;
        -ms-flex-direction: row !important;
        flex-direction: row !important;
        -webkit-box-align: center !important;
        -ms-flex-align: center !important;
        align-items: center !important;
        -webkit-box-pack: start !important;
        -ms-flex-pack: start !important;
        justify-content: flex-start !important;
        padding: 8px 0;
        width: 100%;
    }

    /* Hamburger button on RIGHT */
    .sp-hamburger-btn {
        -ms-flex-negative: 0;
        flex-shrink: 0;
        margin-left: 12px;
        margin-right: 0;
    }

    /* Logo fills remaining space */
    .mobile-top-bar .main-logo {
        margin: 0 !important;
        -webkit-box-flex: 1;
        -ms-flex: 1;
        flex: 1;
        display: block !important;
    }
    .mobile-top-bar .main-logo img {
        max-height: 42px;
        width: auto;
        display: inline-block !important;
    }
}

/* ---- Hamburger Button ---- */
.sp-hamburger-btn {
    width: 42px;
    height: 42px;
    background: #038ECD;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 5px;
    padding: 10px 9px;
    -webkit-transition: background 0.3s ease;
    transition: background 0.3s ease;
    margin-right: 12px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    outline: none;
}
.sp-hamburger-btn:hover { background: #025f8a; }
.sp-hamburger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    -webkit-transition: all 0.3s ease;
    transition: all 0.3s ease;
}
.sp-hamburger-btn.is-open span:nth-child(1) {
    -webkit-transform: translateY(7px) rotate(45deg);
    transform: translateY(7px) rotate(45deg);
}
.sp-hamburger-btn.is-open span:nth-child(2) { opacity: 0; }
.sp-hamburger-btn.is-open span:nth-child(3) {
    -webkit-transform: translateY(-7px) rotate(-45deg);
    transform: translateY(-7px) rotate(-45deg);
}

/* ---- Sidebar Overlay (dark backdrop) ---- */
.sp-nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99998;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}
.sp-nav-overlay.show {
    display: block;
    opacity: 1;
}

/* ---- Sidebar Panel ---- */
.sp-sidebar {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #0d2a45 60%, #025b85 100%);
    z-index: 99999;
    -webkit-transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    overflow: hidden;
    -webkit-box-shadow: 4px 0 20px rgba(0,0,0,0.4);
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
}
.sp-sidebar.open {
    left: 0;
}

/* ---- Sidebar Header ---- */
.sp-sidebar-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    padding: 16px 18px;
    background: rgba(0,0,0,0.25);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    -ms-flex-negative: 0;
    flex-shrink: 0;
}
.sp-sidebar-header img {
    max-height: 38px;
    width: auto;
    -webkit-filter: brightness(0) invert(1);
    filter: brightness(0) invert(1);
}
.sp-sidebar-close {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
    outline: none;
    padding: 0;
}
.sp-sidebar-close:hover { background: rgba(3,142,205,0.6); }

/* ---- Sidebar CTA strip ---- */
.sp-sidebar-cta {
    padding: 10px 18px;
    background: rgba(3,142,205,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    -ms-flex-negative: 0;
    flex-shrink: 0;
}
.sp-sidebar-cta a {
    display: block;
    background: #038ECD;
    color: #fff !important;
    text-align: center;
    padding: 9px 16px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}
.sp-sidebar-cta a:hover { background: #025f8a; }

/* ---- Sidebar Navigation ---- */
.sp-sidebar-nav {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
    /* Scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.2) transparent;
}
.sp-sidebar-nav::-webkit-scrollbar { width: 4px; }
.sp-sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sp-sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.sp-sidebar-nav ul { list-style: none; margin: 0; padding: 0; }

.sp-sidebar-nav > ul > li { border-bottom: 1px solid rgba(255,255,255,0.06); }

.sp-sidebar-nav > ul > li > a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 13px 18px;
    color: rgba(255,255,255,0.88) !important;
    font-size: 14px;
    font-weight: 500;
    font-family: Poppins, sans-serif;
    -webkit-transition: all 0.25s ease;
    transition: all 0.25s ease;
    position: relative;
}
.sp-sidebar-nav > ul > li > a .nav-icon {
    width: 22px;
    font-size: 15px;
    color: #038ECD;
    margin-right: 12px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
}
.sp-sidebar-nav > ul > li > a:hover,
.sp-sidebar-nav > ul > li.sp-active > a {
    color: #fff !important;
    background: rgba(3,142,205,0.2);
    padding-left: 24px;
}
.sp-sidebar-nav > ul > li > a:hover .nav-icon,
.sp-sidebar-nav > ul > li.sp-active > a .nav-icon {
    color: #5dd2ff;
}

/* Arrow for dropdown items */
.sp-arrow-btn {
    margin-left: auto;
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    font-size: 11px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    -webkit-transition: -webkit-transform 0.3s ease;
    transition: transform 0.3s ease;
}
.sp-sidebar-nav > ul > li.sp-open > a .sp-arrow-btn {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
    background: rgba(3,142,205,0.4);
}

/* Submenu accordion */
.sp-submenu-inner {
    display: none;
    background: rgba(0,0,0,0.25);
    border-top: 1px solid rgba(255,255,255,0.06);
}
.sp-sidebar-nav > ul > li.sp-open .sp-submenu-inner { display: block; }

.sp-submenu-inner li a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    padding: 10px 18px 10px 52px;
    color: rgba(255,255,255,0.7) !important;
    font-size: 13px;
    -webkit-transition: all 0.2s ease;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.sp-submenu-inner li:last-child a { border-bottom: none; }
.sp-submenu-inner li a::before {
    content: '›';
    margin-right: 8px;
    color: #038ECD;
    font-size: 16px;
    line-height: 1;
}
.sp-submenu-inner li a:hover { color: #fff !important; background: rgba(3,142,205,0.15); padding-left: 58px; }

/* ---- Sidebar Footer ---- */
.sp-sidebar-footer {
    padding: 14px 18px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
    -ms-flex-negative: 0;
    flex-shrink: 0;
}
.sp-sidebar-footer .footer-contact {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.sp-sidebar-footer .footer-contact i {
    color: #038ECD;
    font-size: 14px;
    width: 16px;
}
.sp-sidebar-footer .footer-contact a {
    color: rgba(255,255,255,0.82) !important;
    font-size: 13px;
}
.sp-sidebar-social {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.sp-sidebar-social a {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: rgba(255,255,255,0.8) !important;
    font-size: 13px;
    -webkit-transition: background 0.2s;
    transition: background 0.2s;
}
.sp-sidebar-social a:hover { background: #038ECD; color: #fff !important; }

/* ---- Desktop: Hide sidebar elements ---- */
@media (min-width: 992px) {
    .sp-nav-overlay,
    .sp-sidebar,
    .sp-hamburger-btn { display: none !important; }
    .mobile-top-bar { display: none !important; }
}
