/* ================================
   BOOSTFLOW MOBILE MENU SYSTEM
   Full-Screen Overlay (MilliSec Style)
   ================================ */

/* ===================================
   HAMBURGER BUTTON - PREMIUM DESIGN
   =================================== */
.boostflow-hamburger {
    display: none;
    position: absolute;
    /* Scrolls with the page */
    top: 35px;
    /* Pushed down to match header */
    right: 20px;
    width: 44px;
    /* Standard touch target */
    height: 44px;
    background: rgba(255, 255, 255, 0.1) !important;
    /* Glass effect */
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    /* Soft square */
    cursor: pointer;
    z-index: 9995 !important;
    /* Higher than header (9990) */
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    /* Tighter gap */
    padding: 0 !important;
    transition: all 0.3s ease;
}

.boostflow-hamburger span {
    display: block !important;
    width: 22px !important;
    height: 2px !important;
    /* Thinner lines */
    background-color: #ffffff !important;
    border-radius: 2px !important;
    margin: 0 !important;
    padding: 0 !important;
    transition: all 0.3s ease !important;
}

.boostflow-hamburger:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(46, 139, 29, 0.6) !important;
}

.boostflow-hamburger:active {
    transform: scale(0.95);
}

.boostflow-hamburger.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.boostflow-hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.boostflow-hamburger.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* ===================================
   FULL-SCREEN OVERLAY MENU
   =================================== */
.boostflow-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.boostflow-mobile-menu.active {
    pointer-events: all;
    opacity: 1;
}

/* ===================================
   OVERLAY BACKGROUND
   =================================== */
.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(5, 5, 5, 0.98) 0%,
            rgba(15, 25, 15, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* ===================================
   MENU PANEL - FULL SCREEN CENTER
   =================================== */
.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 30px 80px;
    overflow-y: auto;
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.boostflow-mobile-menu.active .mobile-menu-panel {
    transform: scale(1);
    opacity: 1;
}

/* ===================================
   CLOSE BUTTON (X) - HIDDEN
   =================================== */
.mobile-menu-close {
    display: flex !important;
    /* Make it visible again */
    position: absolute;
    top: 35px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    z-index: 10002;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.mobile-menu-close span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    position: absolute;
}

.mobile-menu-close span:nth-child(1) {
    transform: rotate(45deg);
}

.mobile-menu-close span:nth-child(2) {
    transform: rotate(-45deg);
}

.mobile-menu-close:hover {
    background: #2D5A1E;
    border-color: #44D62C;
}

/* ===================================
   LOGO IN MENU - TOP LEFT
   =================================== */
.mobile-menu-logo {
    display: none !important;
}

.mobile-menu-logo img {
    max-width: 140px;
    height: auto;
    filter: drop-shadow(0 4px 12px rgba(68, 214, 44, 0.3));
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* ===================================
   NAVIGATION LINKS - CENTERED
   =================================== */
.mobile-menu-nav {
    text-align: center;
    width: 100%;
}

.mobile-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-menu-nav ul li {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Stagger animation for menu items */
.boostflow-mobile-menu.active .mobile-menu-nav ul li:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.1s;
}

.boostflow-mobile-menu.active .mobile-menu-nav ul li:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.2s;
}

.boostflow-mobile-menu.active .mobile-menu-nav ul li:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.3s;
}

.boostflow-mobile-menu.active .mobile-menu-nav ul li:nth-child(4) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.4s;
}

.mobile-menu-nav ul li a {
    display: inline-block;
    padding: 15px 40px;
    color: #ffffff;
    font-size: 36px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    font-family: 'Manrope', sans-serif;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Underline effect */
.mobile-menu-nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #44D62C, transparent);
    transition: width 0.3s ease;
}

.mobile-menu-nav ul li a:hover {
    color: #44D62C;
    transform: scale(1.05);
}

.mobile-menu-nav ul li a:hover::after {
    width: 100%;
}

.mobile-menu-nav ul li a.active {
    color: #44D62C;
}

.mobile-menu-nav ul li a.active::after {
    width: 80%;
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */
@media (max-width: 991px) {

    .boostflow-hamburger,
    .boostflow-mobile-menu {
        display: block;
    }

    .header-area .col-xl-10.col-lg-10 {
        display: none !important;
    }

    .header-area,
    .header-area .menu-area,
    .header-area .container,
    .header-area .second-menu,
    .header-area .row {
        padding: 0 !important;
        margin: 0 !important;
        min-height: auto !important;
    }

    .header-area {
        position: absolute !important;
        /* Scrolls with the page */
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 9990 !important;
        /* High, but lower than hamburger */
        background-color: #050505 !important;
        /* Solid black background */
        background: #050505 !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        height: 110px !important;
        /* Taller to perfectly fit logo and menu */
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 20px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
        /* Stronger shadow */
        transform: translateZ(0);
        /* Force hardware boost */
    }

    /* Target sticky/sticky-menu classes potentially added by JS */
    .header-area.sticky,
    .header-area.sticky-menu,
    header.sticky {
        background-color: #050505 !important;
    }

    .header-area .logo {
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        height: 100% !important;
        flex: 1;
        overflow: visible !important;
        /* Prevent cutoff */
    }

    /* FIX: Reset Header Logo Column Negative Margin */
    .header-area .col-xl-2,
    .header-area .desktop-logo-col {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    /* FIX: Reset Hero Text Column Transform/Shift */
    .slider-area .col-lg-6 {
        transform: none !important;
        margin-left: 0 !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .header-area .logo img {
        width: auto !important;
        max-width: 160px !important;
        /* Increased for better visibility */
        height: auto !important;
        max-height: 60px !important;
        /* Constrain height to keep proportions */
        margin-left: 10px !important;
        margin-top: 0 !important;
        /* Removed nudge for cleaner flex centering */
        display: block !important;
        object-fit: contain !important;
        /* Key for aspect ratio */
        filter: brightness(1.2) contrast(1.1);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        image-rendering: -webkit-optimize-contrast;
        image-rendering: auto;
    }

    /* Remove extra space from empty containers */
    .mobile-menu {
        display: none !important;
    }

    .header-area .col-12 {
        display: none !important;
    }

    .mean-container {
        display: none !important;
    }

    body.mobile-menu-open {
        overflow: hidden;
    }

    /* Hero Section Mobile Optimization */
    main,
    .slider-area,
    .slider-area .container,
    .slider-area .p-relative {
        padding-top: 0 !important;
        margin-top: 0 !important;
        top: 0 !important;
    }

    .slider-bg {
        min-height: 550px !important;
        padding-top: 0 !important;
        padding-bottom: 20px !important;
        display: flex !important;
        align-items: flex-start !important;
    }

    .slider-area .container {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .slider-area .row {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .slider-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
        text-align: center !important;
    }

    .hero-subtitle {
        margin-top: 210px !important;
        /* Pushed down further */
        margin-bottom: 15px !important;
        letter-spacing: 3px !important;
        font-weight: 800 !important;
    }

    .hero-title {
        font-size: 32px !important;
        margin-bottom: 20px !important;
        line-height: 1.3 !important;
    }

    .hero-desc {
        font-size: 15px !important;
        margin-bottom: 25px !important;
        padding: 0 10px;
    }

    .slider-btn {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 20px !important;
    }

    .hero-btn,
    .services-all-btn,
    .about-read-btn,
    .solution-btn {
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 240px !important;
        /* Increased width to prevent text-icon overlap */
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 12px 0 25px !important;
        height: 54px !important;
        border-radius: 50px !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        text-align: left !important;
    }

    .hero-btn {
        margin: 20px auto !important;
    }

    .services-all-btn,
    .about-read-btn,
    .solution-btn {
        margin: 30px 0 !important;
    }

    .hero-btn i,
    .services-all-btn i,
    .about-read-btn i,
    .solution-btn i {
        margin: 0 !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 12px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        background: #fff !important;
        color: #44D62C !important;
        border-radius: 50% !important;
    }

    .review-badge {
        margin-top: 30px !important;
        /* Increased top margin */
        margin-bottom: 50px !important;
        text-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        /* Stack stars above text */
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
        /* Space between stars and text */
    }

    .review-badge .stars {
        display: flex !important;
        flex-direction: row !important;
        /* Stars side by side */
        justify-content: center !important;
        align-items: center !important;
        gap: 8px !important;
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .review-badge .stars i {
        font-size: 20px !important;
        /* Bigger stars */
        color: #FFD700 !important;
        display: inline-block !important;
    }

    .review-badge span {
        display: block !important;
        max-width: 300px !important;
        /* Constrain text width for better readability */
        margin: 0 auto !important;
        font-size: 14px !important;
        line-height: 1.6 !important;
        color: #cccccc !important;
    }

    /* CTA Area Mobile Optimization */
    .cta-area .quantum-cta-box {
        padding: 50px 20px !important;
        border-radius: 24px !important;
        margin: 0 15px !important;
    }

    .cta-area .section-title h5 {
        font-size: 14px !important;
        letter-spacing: 2px !important;
    }

    .cta-area .section-title h2 {
        font-size: 30px !important;
        line-height: 1.2 !important;
    }

    .cta-area .section-title p {
        font-size: 15px !important;
        line-height: 1.6 !important;
        padding: 0 10px;
    }

    .cta-area .slider-btn {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 25px !important;
        margin-top: 40px !important;
        width: 100% !important;
    }

    .cta-area .slider-btn .btn {
        width: 100% !important;
        max-width: 190px !important;
        margin: 0 !important;
        padding: 0 12px 0 25px !important;
        height: 54px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        border-radius: 50px !important;
        font-size: 13px !important;
        font-weight: 800 !important;
        text-align: left !important;
    }

    .cta-area .slider-btn .btn i {
        margin: 0 !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 12px !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        background: #fff !important;
        color: #44D62C !important;
        border-radius: 50% !important;
    }
}

/* Smaller screens */
@media (max-width: 767px) {
    .mobile-menu-nav ul li a {
        font-size: 28px;
        padding: 12px 30px;
    }
}

@media (max-width: 480px) {
    .mobile-menu-nav ul li a {
        font-size: 24px;
        padding: 10px 20px;
    }

    .mobile-menu-nav ul {
        gap: 15px;
    }

    /* Partner Grid Redesign */
    .partner-logos-slider {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        padding: 0 10px !important;
    }

    .logo-slide {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 20px 10px !important;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.02);
        height: 100px !important;
    }

    .logo-slide img {
        max-width: 80% !important;
        max-height: 40px !important;
        opacity: 0.7 !important;
        filter: brightness(0) invert(1) !important;
    }

    /* Testimonial Section Mobile Optimization */
    .testimonial-area .section-title h2 {
        font-size: 32px !important;
        line-height: 1.2 !important;
    }

    .testimonial-wrapper {
        padding-bottom: 20px !important;
        overflow-x: auto !important;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .testimonial-row {
        gap: 15px !important;
    }

    .single-testimonial-card {
        min-width: 85vw !important;
        scroll-snap-align: center;
        margin-right: 0 !important;
        background: transparent !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        padding: 20px !important;
    }

    .single-testimonial-card p {
        font-size: 18px !important;
        /* Increased font size */
        line-height: 1.5 !important;
        color: #d1d5db !important;
        /* Lighter text color */
    }

    /* Hide desktop nav buttons on mobile */
    .nav-btn {
        display: none !important;
    }
}

@media (min-width: 992px) {

    .boostflow-hamburger,
    .boostflow-mobile-menu {
        display: none !important;
    }
}

/* =========================================
   CONTACT SECTION MOBILE OPTIMIZATION
   ========================================= */
@media (max-width: 991px) {

    /* 1. Contact Section Padding */
    .contact-area3 {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    /* 2. Form Container Card */
    .contact-bg03 {
        padding: 30px 20px !important;
        /* Reduce padding */
        border-radius: 20px !important;
        background: rgba(15, 15, 15, 0.8) !important;
        /* Darker glass equivalent */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border: 1px solid rgba(68, 214, 44, 0.15) !important;
        /* Subtle green border */
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5) !important;
        margin: 0 10px !important;
        /* Side spacing */
    }

    /* 3. Section Title */
    .contact-bg03 .section-title h2 {
        font-size: 32px !important;
        /* Smaller headline */
        margin-bottom: 20px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .contact-bg03 .section-title p {
        font-size: 15px !important;
        line-height: 1.6 !important;
        margin-bottom: 30px !important;
        padding: 0 10px;
        text-align: center !important;
    }

    /* 4. Input Fields */
    .contact-field input,
    .contact-field textarea {
        background: rgba(255, 255, 255, 0.05) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 12px !important;
        padding: 15px 20px !important;
        font-size: 16px !important;
        /* Prevents zoom on iOS */
        color: #fff !important;
        transition: all 0.3s ease;
        margin-bottom: 15px !important;
        /* Ensure spacing */
    }

    /* Input Focus State */
    .contact-field input:focus,
    .contact-field textarea:focus {
        border-color: #44D62C !important;
        background: rgba(68, 214, 44, 0.05) !important;
        box-shadow: 0 0 15px rgba(68, 214, 44, 0.1);
    }

    /* Increase Clickable Area */
    .contact-field input {
        height: 55px !important;
    }

    /* 5. Submit Button */
    .contact-form .btn3 {
        background: linear-gradient(135deg, #44D62C 0%, #298c1b 100%) !important;
        color: #000 !important;
        font-weight: 800 !important;
        border-radius: 50px !important;
        /* Pill shape */
        padding: 18px 0 !important;
        font-size: 16px !important;
        letter-spacing: 2px !important;
        box-shadow: 0 10px 25px rgba(68, 214, 44, 0.3) !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
    }

    .contact-form .btn3 span {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .contact-form .btn3 i {
        margin-left: 10px !important;
        transform: rotate(45deg) !important;
        font-size: 18px !important;
        color: #000 !important;
    }
}