/* =========================================================================
   TECHSOLVENT - RESPONSIVE CSS (ALL DEVICES)
   ========================================================================= */

/* Prevent horizontal scroll */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* body overlay when mobile nav is open */
body.nav-open::after {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* =========================================================================
   TABLETS & SMALL DESKTOPS (max-width: 1100px)
   ========================================================================= */
@media (max-width: 1100px) {
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
    .premium-grid-3, .services-grid, .why-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
    .process-grid-4, .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .split-premium { gap: 30px !important; }
    .inner-sec { padding: 60px 15px !important; }
}

/* =========================================================================
   TABLETS PORTRAIT & MOBILE (max-width: 991px)
   ========================================================================= */
@media (max-width: 991px) {
    /* --- Hide desktop nav, show mobile toggle --- */
    .desktop-nav { display: none !important; }
    .header-top-bar { display: none !important; }
    .prod-nav { display: none !important; }

    /* --- Header fixed at top --- */
    .main-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        background: #0a2477 !important;
        box-shadow: 0 2px 15px rgba(0,0,0,0.2) !important;
        padding: 8px 0 !important;
    }

    /* Hero section offset for fixed header */
    .hero-section {
        margin-top: 60px !important;
    }

    /* --- Mobile Toggle (Hamburger) --- */
    .mobile-toggle {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        gap: 5px !important;
        cursor: pointer !important;
        background: none !important;
        border: none !important;
        padding: 8px !important;
        width: 40px !important;
        height: 40px !important;
        z-index: 1002 !important;
        position: relative !important;
    }
    .mobile-toggle span {
        display: block !important;
        width: 24px !important;
        height: 3px !important;
        background: #fff !important;
        border-radius: 3px !important;
        transition: all 0.3s ease !important;
    }
    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg) !important;
    }
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0 !important;
        transform: scaleX(0) !important;
    }
    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg) !important;
    }

    /* --- Mobile Nav (Side Drawer - Right Side) --- */
    .mobile-nav {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        right: -100% !important;
        width: 75% !important;
        max-width: 320px !important;
        height: 100vh !important;
        background: #061550 !important;
        box-shadow: -5px 0 30px rgba(0,0,0,0.6) !important;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
        z-index: 1001 !important;
        overflow-y: auto !important;
        padding-top: 70px !important;
        border-top: none !important;
        max-height: 100vh !important;
    }
    .mobile-nav.open {
        right: 0 !important;
    }

    /* --- Hero Slider: Hide floating cards & arrows --- */
    .hero-visual { display: none !important; }
    .slider-prev, .slider-next { display: none !important; }
    .hero-content {
        grid-template-columns: 1fr !important;
        text-align: center !important;
        padding: 0 20px !important;
    }
    .hero-text {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0 !important;
        padding: 20px 0 !important;
    }
    .hero-section {
        min-height: auto !important;
        max-height: none !important;
        height: auto !important;
    }
    .hero-slide {
        position: relative !important;
        min-height: auto !important;
        height: auto !important;
        display: none !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px 16px !important;
    }
    .hero-slide.active {
        display: flex !important;
    }
    .hero-slider {
        min-height: auto !important;
        height: auto !important;
    }
    .hero-text {
        padding: 0 !important;
        margin-top: 0 !important;
    }
    .hero-text h1 {
        font-size: 26px !important;
        line-height: 1.3 !important;
        margin-bottom: 10px !important;
    }
    .hero-text p {
        font-size: 13px !important;
        line-height: 1.6 !important;
        margin-bottom: 15px !important;
    }
    .hero-btns {
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }
    .hero-tag {
        margin: 0 auto 12px !important;
        font-size: 11px !important;
    }
    .hero-content {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        text-align: center !important;
    }
    /* Hero overlay must not force height */
    .hero-overlay {
        position: absolute !important;
        inset: 0 !important;
        height: 100% !important;
    }

    /* --- Grid layouts --- */
    .about-grid, .split-premium, .split-premium.reverse, .alt-row, .alt-row.reverse {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
    }
    .split-image-wrap .main-placeholder, .alt-image {
        height: 300px !important;
    }
    .pricing-grid {
        grid-template-columns: 1fr !important;
        max-width: 500px !important;
        margin: 0 auto !important;
        gap: 30px !important;
    }
    .solutions-grid { grid-template-columns: 1fr !important; }
    .footer-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px !important;
    }
    .impact-stats {
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 30px !important;
    }
    .contact-grid { grid-template-columns: 1fr !important; }
}

/* =========================================================================
   LARGE PHONES (max-width: 767px)
   ========================================================================= */
@media (max-width: 767px) {
    .premium-grid-3, .services-grid, .why-grid, .process-grid-4, .stats-grid {
        grid-template-columns: 1fr !important;
    }
    .sol-features {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .timeline-wrap::after { left: 20px !important; }
    .timeline-step {
        width: 100% !important;
        padding-left: 50px !important;
        padding-right: 15px !important;
        text-align: left !important;
        left: 0 !important;
    }
    .timeline-step::after { left: 10px !important; }
    .cta-premium { padding: 40px 20px !important; }
    .cta-premium h2 { font-size: 28px !important; }
    .premium-banner { padding: 100px 15px 50px !important; }
    .premium-banner h1 { font-size: 32px !important; }
    .form-row { grid-template-columns: 1fr !important; }
    .footer-grid { grid-template-columns: 1fr !important; }
    .mob-grid { grid-template-columns: 1fr !important; }
    .footer-bottom-inner {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
    }
    .review-grid { grid-template-columns: 1fr !important; }
    .testimonial-card { min-width: 100% !important; }
    .bento-grid { grid-template-columns: 1fr !important; }
    .bento-item {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    /* === FOOTER MOBILE ACCORDION === */
    
    /* Footer background */
    .main-footer {
        background: #060f2e !important;
        padding: 0 !important;
    }
    .footer-top { padding: 0 !important; }
    .footer-inner { padding: 0 !important; }
    
    /* First col: show logo + social, hide description/rating/newsletter */
    .footer-col:first-child {
        padding: 20px 16px !important;
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    }
    .footer-col:first-child p,
    .footer-rating,
    .footer-newsletter {
        display: none !important;
    }
    .footer-logo {
        display: flex !important;
        justify-content: flex-start !important;
        margin-bottom: 12px !important;
    }
    .footer-social {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        gap: 10px !important;
        margin: 0 !important;
    }
    .footer-social a {
        width: 34px !important;
        height: 34px !important;
        background: rgba(255,255,255,0.07) !important;
        border: 1px solid rgba(255,255,255,0.12) !important;
        border-radius: 50% !important;
        color: #cdd5e0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
        text-decoration: none !important;
    }

    /* Footer Grid: single column */
    .footer-grid {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Each footer col (except first which is handled above) */
    .footer-col {
        border-bottom: 1px solid rgba(255,255,255,0.08) !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    /* Accordion headings — EXACTLY like screenshot */
    .footer-col h5 {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 16px 16px !important;
        padding-bottom: 16px !important;   /* override style.css padding-bottom:12px */
        margin: 0 !important;
        margin-bottom: 0 !important;
        border-bottom: none !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #d8e0f0 !important;
        cursor: pointer !important;
        text-transform: none !important;
        letter-spacing: 0 !important;
        background: transparent !important;
        line-height: 1 !important;
        position: relative !important;    /* needed so ::after positioning overrides work */
    }
    
    /* Remove any existing before pseudo-element */
    .footer-col h5::before { 
        display: none !important; 
        content: none !important; 
    }
    
    /* Right-side > arrow — exactly like photo */
    /* IMPORTANT: Override style.css which sets content:'' and position:absolute */
    .footer-col h5::after {
        content: '\f105' !important;  /* fa-angle-right */
        font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free' !important;
        font-weight: 900 !important;
        font-size: 16px !important;
        color: #8090b0 !important;
        transition: transform 0.3s ease, color 0.3s ease !important;
        flex-shrink: 0 !important;
        /* Critical: Override the absolute positioning from style.css */
        position: static !important;
        bottom: auto !important;
        left: auto !important;
        width: auto !important;
        height: auto !important;
        background: none !important;
        border-radius: 0 !important;
    }
    /* When open: arrow rotates down */
    .footer-col h5.active {
        color: #fff !important;
    }
    .footer-col h5.active::after {
        transform: rotate(90deg) !important;
        color: #6ea8ff !important;
    }

    /* Links hidden by default */
    .footer-links, .footer-contact {
        display: none !important;
        padding: 4px 16px 16px !important;
        margin: 0 !important;
    }
    .footer-links.show-mobile, .footer-contact.show-mobile {
        display: block !important;
    }
    
    /* Individual link items */
    .footer-links li {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 !important;
        border-bottom: 1px solid rgba(255,255,255,0.04) !important;
    }
    .footer-links li:last-child { border-bottom: none !important; }
    .footer-links li a {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
        font-size: 13px !important;
        padding: 9px 0 !important;
        color: rgba(200,215,240,0.75) !important;
        text-decoration: none !important;
    }
    .footer-links li a i {
        font-size: 11px !important;
        color: #6ea8ff !important;
        width: 14px !important;
    }
    .footer-links li a:hover { color: #fff !important; }
    
    .footer-contact {
        padding: 4px 16px 16px !important;
    }
    .footer-contact li {
        display: flex !important;
        align-items: flex-start !important;
        gap: 10px !important;
        font-size: 13px !important;
        padding: 8px 0 !important;
        color: rgba(200,215,240,0.75) !important;
        border-bottom: 1px solid rgba(255,255,255,0.04) !important;
    }
    .footer-contact li:last-child { border-bottom: none !important; }
    .footer-contact li i {
        color: #6ea8ff !important;
        width: 16px !important;
        text-align: center !important;
        margin-top: 2px !important;
        flex-shrink: 0 !important;
    }
    .footer-contact li a {
        color: rgba(200,215,240,0.75) !important;
        text-decoration: none !important;
    }
    
    /* Footer bottom */
    .footer-bottom {
        background: #030a1e !important;
        padding: 14px 16px !important;
    }
    .footer-bottom-inner {
        flex-direction: column !important;
        text-align: center !important;
        gap: 0 !important;
    }
    .footer-bottom-inner p {
        font-size: 11px !important;
        color: rgba(180,195,225,0.5) !important;
        margin: 0 !important;
    }
    .footer-legal { display: none !important; }
}

/* =========================================================================
   SMALL PHONES (max-width: 480px)
   ========================================================================= */
@media (max-width: 480px) {
    .hero-text h1 { font-size: 26px !important; }
    .hero-btns {
        flex-direction: column !important;
        width: 100% !important;
    }
    .btn-primary-hero, .btn-outline-hero {
        text-align: center !important;
        width: 100% !important;
        display: block !important;
    }
    .impact-stats { grid-template-columns: 1fr !important; }
    .split-image-wrap .main-placeholder, .alt-image { height: 220px !important; }
    .contact-form-wrap, .login-container { padding: 20px 15px !important; }
    .sec-head h2 { font-size: 26px !important; }
    .login-container {
        margin-top: 100px !important;
        padding-bottom: 40px !important;
    }
   
}

/* =========================================================================
   GENERAL FIXES
   ========================================================================= */

/* Responsive images */
img, video, iframe {
    max-width: 100% !important;
    height: auto;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p, span, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Hide slider icons on mobile (desktop only) */
@media (max-width: 991px) {
    .slider-prev, .slider-next { display: none !important; }
    .hero-card-float { display: none !important; }
}

/* Show slider icons only on desktop */
@media (min-width: 992px) {
    .slider-prev, .slider-next { display: flex !important; }
}
