/* =========================================
   Premium Mobile Redesign (SH Theme)
   ========================================= */

:root {
    --premium-glass: rgba(255, 255, 255, 0.7);
    --premium-blur: 15px;
    --premium-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.1), 0 4px 12px -4px rgba(0, 0, 0, 0.05);
    --premium-gradient: linear-gradient(135deg, var(--color-primary) 0%, #4facfe 100%);
    --premium-radius: 24px;
}

@media (max-width: 768px) {
    
    /* =========================================
       Global Typography & Spacing
       ========================================= */
    body, #main-content, .header, .footer {
        width: 100% !important;
        margin: 0 !important;
        max-width: 100% !important;
        overflow-x: hidden;
    }

    body {
        font-size: 15px;
        line-height: 1.7;
        color: #2c3e50;
        background-color: #fff; /* Clean white background */
    }

    h1, .display-1, .text-display-1 {
        font-size: 34px !important;
        font-weight: 800 !important;
        line-height: 1.1 !important;
        letter-spacing: -0.02em !important;
        margin-bottom: 20px !important;
    }

    h2, .display-2, .text-display-2 {
        font-size: 28px !important;
        font-weight: 700 !important;
        line-height: 1.2 !important;
        letter-spacing: -0.01em !important;
    }

    .text-body-lead-large {
        font-size: 17px !important;
        line-height: 1.6 !important;
        color: #5d6d7e !important;
    }

    /* Modern Spacing */
    .section-box {
        padding: 60px 0 !important; /* More breathing room */
    }

    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    /* =========================================
       Header & Navigation (Glassmorphism)
       ========================================= */
    .header {
        transition: all 0.3s ease;
        background: transparent !important;
    }

    .header.header-scrolled {
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(var(--premium-blur));
        -webkit-backdrop-filter: blur(var(--premium-blur));
        box-shadow: 0 4px 30px rgba(0,0,0,0.08);
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }

    .header .main-header {
        padding: 25px 20px !important;
    }

    .header-logo img {
        max-height: 40px; /* Slightly larger logo for better visibility */
        width: auto;
    }

    .burger-icon {
        background: rgba(var(--bs-primary-rgb), 0.1); /* Use primary color with low opacity */
        padding: 10px;
        border-radius: 12px;
        width: 44px;
        height: 44px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1001;
    }

    .burger-icon span {
        background-color: var(--color-primary) !important;
        height: 2px;
        width: 22px;
        margin: 3px 0;
        display: block;
        border-radius: 2px;
        transition: all 0.3s cubic-bezier(0.68, -0.6, 0.32, 1.6);
        position: relative;
    }

    .burger-icon.burger-close span.burger-icon-top {
        transform: translateY(8px) rotate(45deg);
    }

    .burger-icon.burger-close span.burger-icon-mid {
        opacity: 0;
        transform: translateX(-20px);
    }

    .burger-icon.burger-close span.burger-icon-bottom {
        transform: translateY(-8px) rotate(-45deg);
    }

    .mobile-header-active {
        background: #ffffff !important; /* Solid white background for reliability */
        @supports (backdrop-filter: blur(1px)) {
            background: rgba(255, 255, 255, 0.9) !important;
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
        }
        width: 100% !important;
        height: 100vh !important;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 10000;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-100%); /* Slide from top for a more modern feel */
        transition: all 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        display: flex !important;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .mobile-header-active.sidebar-visible {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
    }

    .mobile-header-active .mobile-menu li {
        text-align: center;
        margin-bottom: 25px;
        opacity: 0;
        transform: translateY(20px);
    }

    .mobile-header-active.sidebar-visible .mobile-menu li {
        animation: fadeInUp 0.5s forwards;
    }

    @keyframes fadeInUp {
        to { opacity: 1; transform: translateY(0); }
    }

    /* =========================================
       Hero Banner Perfection
       ========================================= */
    .banner-hero {
        min-height: 70vh; /* Reduced height for better fit on small screens */
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
        padding: 100px 20px 40px 20px !important;
        text-align: center;
    }

    /* Animated background elements */
    .banner-hero::before {
        content: '';
        position: absolute;
        top: -10%;
        right: -10%;
        width: 300px;
        height: 300px;
        background: var(--color-primary);
        filter: blur(100px);
        opacity: 0.2;
        z-index: 0;
        animation: float 10s infinite alternate;
    }

    @keyframes float {
        from { transform: translate(0, 0); }
        to { transform: translate(-50px, 50px); }
    }

    .banner-hero .text-display-2 {
        font-size: 36px !important;
        background: linear-gradient(135deg, #111 0%, var(--color-primary) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 15px !important;
    }

    .banner-hero .text-body-lead-large {
        padding-right: 0 !important;
        margin-top: 20px !important;
    }

    .banner-hero .banner-imgs, 
    .banner-hero .banner-imgs img, 
    .banner-hero .video-block {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .banner-hero .banner-imgs img {
        border-radius: var(--premium-radius);
        box-shadow: var(--premium-shadow);
        border: 4px solid #fff;
        max-width: 85%;
        margin: 0 auto;
        animation: fadeInUp 1s ease;
    }

    /* =========================================
       Premium Cards & Sections
       ========================================= */
    .card-grid-style-2, .box-optimized, .list-steps li, .card-grid-1 {
        background: #fff !important;
        border-radius: var(--premium-radius) !important;
        border: 1px solid rgba(0,0,0,0.05) !important;
        box-shadow: var(--premium-shadow) !important;
        padding: 35px 25px !important;
        margin-bottom: 30px !important;
        transition: transform 0.3s ease !important;
    }

    /* Stats Section Grid Fix */
    .section-box .row {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
    }

    .section-box .col-6 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .count {
        font-size: 36px !important;
        font-weight: 800 !important;
        display: block;
        margin-bottom: 5px;
    }

    .text-mb-center {
        text-align: center !important;
    }

    /* Centering all decorative lines/bars */
    .bd-bottom, hr, .divider, [class*="line"], [class*="bar"] {
        margin-left: auto !important;
        margin-right: auto !important;
        float: none !important;
        border-color: rgba(0,0,0,0.1) !important;
    }

    /* Horizontal scroll for lists */
    .list-partners {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding: 10px 0 30px 0 !important;
        -webkit-overflow-scrolling: touch;
        gap: 20px;
    }

    .list-partners li {
        flex: 0 0 140px !important;
        width: auto !important;
        margin-bottom: 0 !important;
        background: #fff;
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    }

    /* =========================================
       Buttons Refinement
       ========================================= */
    .btn {
        border-radius: 16px !important;
        font-weight: 700 !important;
        letter-spacing: 0.5px;
        text-transform: none;
        padding: 16px 25px !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.1);
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    }

    .btn-black {
        background: #111 !important;
        color: #fff !important;
    }

    .btn-link {
        box-shadow: none !important;
        text-decoration: none !important;
        color: var(--color-primary) !important;
    }

    .footer {
        padding-top: 40px !important;
    }

    .pre-footer-sidebar {
        display: none !important;
    }

    /* Newsletter perfection */
    .box-newsletter {
        background: var(--premium-gradient) !important;
        padding: 40px 25px !important;
        overflow: hidden;
    }

    .box-newsletter h3 {
        color: #fff !important;
    }

    .box-newsletter p {
        color: rgba(255,255,255,0.8) !important;
    }

    .box-newsletter .form-newsletter {
        background: #fff;
        border-radius: 12px;
        padding: 5px;
        display: flex;
    }

    .box-newsletter .form-newsletter input {
        border: none !important;
        padding-left: 15px !important;
    }

    .box-newsletter .form-newsletter .btn {
        width: auto !important;
        margin-bottom: 0 !important;
        padding: 10px 20px !important;
    }
}

