/* =============================================
   Responsive Styles - Complete Mobile-First Overhaul
   ============================================= */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    :root { --container-max: 1340px; }
}

/* Desktop (max 1200px) */
@media (max-width: 1200px) {
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .footer-grid .footer-column:last-child { grid-column: 1 / -1; }
    .nav-menu a { padding: 6px 8px; font-size: 0.8rem; }
    .nav-status { display: none !important; }
}

/* Laptop safety (prevent nav clipping on right side) */
@media (max-width: 1024px) {
    .nav-menu { display: none !important; }
    .menu-toggle { display: flex !important; }
}

/* Tablet Landscape (max 1024px) */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .container,
    .container-sm { padding-left: 18px; padding-right: 18px; }
    
    /* Hero Advanced Fixes */
    .hero-advanced { padding: 120px 0 60px; }
    .hero-flex {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        order: 1;
    }
    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-trust-indicators {
        justify-content: center;
        flex-wrap: wrap;
    }
    .hero-visual {
        justify-content: center;
        order: 2;
    }
    
    /* Process Timeline → left-aligned vertical */
    .process-timeline::before { left: 30px; }
    .process-step { 
        flex-direction: column !important; 
        align-items: flex-start !important;
        padding-left: 75px; 
    }
    .process-step:nth-child(even) { flex-direction: column !important; }
    .process-step-content { width: 100%; }
    .process-step-number { 
        position: absolute;
        left: 6px; 
        transform: none; 
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    
    /* Full-screen mobile menu */
    .nav-menu { 
        display: none; 
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(10, 22, 40, 0.99);
        -webkit-backdrop-filter: blur(25px);
        backdrop-filter: blur(25px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        z-index: 1000;
        padding: 80px 20px 30px;
        overflow-y: auto;
    }
    
    .nav-menu.active { display: flex; }
    
    .nav-menu a {
        font-size: 1.1rem;
        padding: 14px 30px;
        width: 85%;
        max-width: 350px;
        text-align: center;
        border-radius: var(--radius-md);
        border: 1px solid transparent;
    }
    
    .nav-menu a::after { display: none; }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background: rgba(212, 168, 67, 0.08);
        border-color: rgba(212, 168, 67, 0.15);
    }

    .nav-cta {
        margin-left: 0 !important;
        margin-top: 15px;
        width: 85% !important;
        max-width: 350px !important;
        justify-content: center;
    }

    .menu-toggle { display: flex; }
}

/* Tablet Portrait (max 768px) */
@media (max-width: 768px) {
    :root { --header-height: 72px; }
    html, body { overflow-x: hidden; }
    .container,
    .container-sm { padding-left: 16px; padding-right: 16px; }
    iframe,
    video,
    embed,
    object {
        max-width: 100%;
        height: auto;
    }
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .section { padding: 55px 0; }
    .section-header { margin-bottom: 35px; }
    
    .hero { min-height: 65vh; }
    .hero-content { padding: 30px 20px; }
    .hero h1 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
    .hero .subtitle { font-size: 0.95rem; }
    .hero .description { font-size: 0.88rem; margin-bottom: 25px; }
    .hero-badge { font-size: 0.78rem; padding: 5px 14px; }
    .hero-buttons { 
        flex-direction: column; 
        align-items: center; 
        gap: 12px;
    }
    .hero-buttons .btn { 
        width: 100%; 
        max-width: 320px; 
        justify-content: center; 
    }
    
    /* Grids → single column */
    .grid-2 { grid-template-columns: 1fr !important; gap: 20px !important; }
    .grid-3 { grid-template-columns: 1fr !important; gap: 20px !important; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    
    /* Pricing → stacked */
    .pricing-grid { grid-template-columns: 1fr; max-width: 420px; gap: 20px; }
    .pricing-card.popular { transform: none; }
    .pricing-card { padding: 30px 25px; }
    .pricing-price { font-size: 2.2rem; }
    .pricing-badge {
        right: auto !important;
        left: 50% !important;
        top: -12px !important;
        transform: translateX(-50%) !important;
        padding: 5px 14px !important;
        border-radius: 14px !important;
        font-size: 0.74rem !important;
    }

    .hero-advanced { overflow-x: hidden; }
    .hero-title { font-size: clamp(1.75rem, 7vw, 2.3rem); line-height: 1.2; }
    .hero-subtitle { font-size: 0.96rem; line-height: 1.65; }
    .hero-action-group {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        width: 100%;
        max-width: 320px;
        margin-left: auto;
        margin-right: auto;
    }
    .hero-action-group .btn {
        width: 100%;
        justify-content: center;
    }
    .about-content-side .section-title-modern { font-size: clamp(1.35rem, 6vw, 1.9rem); line-height: 1.25; }
    .about-content-side .lead-text { font-size: 0.92rem; line-height: 1.65; }

    /* Homepage founder image badge should not cover the image on mobile */
    .image-box {
        padding-right: 0;
        padding-bottom: 0;
    }
    .exp-floating {
        position: static;
        margin-top: 12px;
        width: 100%;
        border-radius: 16px;
        padding: 14px 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        text-align: left;
    }
    .exp-floating .number {
        font-size: 1.8rem;
        line-height: 1;
    }
    .exp-floating .text {
        font-size: 0.78rem;
        line-height: 1.2;
    }
    
    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 25px; }
    .footer-brand { grid-column: 1 / -1; }
    .footer-top { padding: 40px 0 30px; }
    
    /* Page hero */
    .page-hero { padding: 80px 0 35px; }
    .page-hero h1 { font-size: 1.6rem; }
    .page-hero p { font-size: 0.92rem; }
    
    /* Stats */
    .stat-value { font-size: 1.6rem; }
    .stat-card { padding: 22px 16px; }
    .stat-icon { font-size: 1.5rem; margin-bottom: 10px; }
    .stat-label { font-size: 0.82rem; }
    
    /* Gallery */
    .gallery-grid { column-count: 2; column-gap: 12px; }
    /* removed fixed aspect ratio */
    
    /* Section badge */
    .section-badge { font-size: 0.72rem; padding: 4px 12px; letter-spacing: 1px; }
    .section-header h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
    .section-header p { font-size: 0.9rem; }
    .section-divider { width: 60px; height: 2px; }
    
    /* Cards */
    .card { padding: 22px; }
    .card h3 { font-size: 1.05rem; }
    .card-icon { width: 48px; height: 48px; font-size: 1.2rem; margin-bottom: 14px; }
    
    /* Service cards */
    .service-card-header { padding: 20px 20px 12px; }
    .service-card-body { padding: 0 20px 20px; }
    .service-price .current { font-size: 1.3rem; }
    .service-card-header h3 { font-size: 1.05rem; }
    .service-card-header .icon { width: 46px; height: 46px; font-size: 1.2rem; margin-bottom: 12px; }
    
    /* Testimonials */
    .testimonial-card { padding: 22px; }
    .testimonial-content { font-size: 0.9rem; }
    .testimonial-card::before { font-size: 3rem; top: 10px; right: 15px; }
    
    /* Blog cards */
    .blog-card-image { height: 180px; }
    .blog-card-body { padding: 16px; }
    .blog-card-body h3 { font-size: 1rem; }
    
    /* Credential items */
    .credential-item { padding: 12px 14px; gap: 12px; }
    .credential-icon { width: 36px; height: 36px; font-size: 0.95rem; }
    .credential-text { font-size: 0.85rem; }
    
    /* Expertise cards */
    .expertise-card { padding: 18px; }
    .expertise-icon { width: 46px; height: 46px; font-size: 1.2rem; margin-bottom: 10px; }
    .expertise-card h4 { font-size: 0.88rem; }
    .expertise-card p { font-size: 0.78rem; }
    
    /* Buttons */
    .btn { padding: 11px 22px; font-size: 0.9rem; }
    .btn-lg { padding: 13px 28px; font-size: 0.95rem; }
    .btn-sm { padding: 7px 14px; font-size: 0.82rem; }
    
    /* Forms */
    .form-control { padding: 10px 14px; font-size: 0.9rem; }
    textarea.form-control { min-height: 100px; }
    .form-group label { font-size: 0.85rem; }
    
    /* Inline grids in forms/about */
    div[style*="grid-template-columns: 1fr 1fr"] { 
        grid-template-columns: 1fr !important; 
    }
    div[style*="grid-template-columns:1fr 1fr"] { 
        grid-template-columns: 1fr !important; 
    }
    div[style*="grid-template-columns: 1fr 1fr 1fr"],
    div[style*="grid-template-columns:1fr 1fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr 1fr 1fr"],
    div[style*="grid-template-columns:1fr 1fr 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* About page: avoid clipping in custom hero/content blocks */
    .about-x .hero-shell,
    .about-x .story-grid,
    .about-x .cred-grid,
    .about-x .exp-grid,
    .about-x .floating-highlights,
    .about-x .story-points {
        grid-template-columns: 1fr !important;
    }
    .about-x .portrait {
        position: static !important;
        top: auto !important;
    }
    .about-x .portrait-sign {
        left: 10px;
        top: 10px;
    }
    .about-x .hero-title,
    .about-x .hero-sub,
    .about-x .story h2,
    .about-x .story h3,
    .about-x .story p,
    .about-x .sec-head h2,
    .about-x .sec-head p {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* Mobile (max 576px) */
@media (max-width: 576px) {
    html { font-size: 15px; }
    
    .container { padding: 0 16px; }
    
    .topbar { font-size: 0.75rem; padding: 7px 16px; line-height: 1.4; }
    
    .logo-text .name { font-size: 1rem; }
    .logo-text .title { font-size: 0.58rem; letter-spacing: 0.5px; }
    .logo img { height: 66px; }
    .logo { gap: 10px; }
    
    .section { padding: 40px 0; }
    .section-header { margin-bottom: 25px; }
    .section-header h2 { font-size: 1.35rem; }
    .section-header p { font-size: 0.85rem; }
    
    .hero { min-height: 55vh; }
    .hero h1 { font-size: 1.55rem; }
    .hero .subtitle { font-size: 0.88rem; }
    .hero .description { font-size: 0.82rem; }
    .hero-badge { font-size: 0.72rem; }
    
    .grid-4 { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px 12px; }
    .stat-value { font-size: 1.4rem; }
    .stat-icon { font-size: 1.3rem; margin-bottom: 8px; }
    .stat-label { font-size: 0.75rem; }
    
    .card { padding: 18px; }
    .card-icon { width: 44px; height: 44px; font-size: 1.1rem; margin-bottom: 12px; }
    .card h3 { font-size: 1rem; }
    .card p { font-size: 0.85rem; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 25px; }
    .footer-top { padding: 35px 0 25px; }
    .footer-column h4 { font-size: 0.95rem; margin-bottom: 14px; }
    .footer-links a { font-size: 0.85rem; }
    .footer-contact li { font-size: 0.85rem; }
    .footer-brand .name { font-size: 1.15rem; }
    .footer-brand p { font-size: 0.82rem; }
    .footer-bottom p { font-size: 0.75rem; }
    .footer-social { gap: 8px; }
    .footer-social a { width: 36px; height: 36px; font-size: 0.9rem; }
    
    .gallery-grid { column-count: 2; column-gap: 10px; }
    /* removed fixed aspect ratio */
    
    .chatbot-toggle { width: 50px; height: 50px; bottom: 18px; right: 14px; font-size: 1.4rem; }
    .chatbot-container { bottom: 85px; right: 14px; width: calc(100% - 28px); max-height: 400px; }
    
    .whatsapp-float { width: 50px; height: 50px; bottom: 18px; left: 14px; right: auto; font-size: 1.4rem; }
    .back-to-top { bottom: 85px; right: 16px; width: 36px; height: 36px; font-size: 0.9rem; }
    
    .blog-card-image { height: 160px; }
    .blog-card-body { padding: 14px; }
    .blog-card-body h3 { font-size: 0.95rem; }
    .blog-card-excerpt { font-size: 0.82rem; }
    
    .process-step { padding-left: 60px; margin-bottom: 35px; }
    .process-step-number { width: 38px; height: 38px; font-size: 0.85rem; }
    .process-timeline::before { left: 24px; }
    .process-step-content { padding: 20px; }
    .process-step h3 { font-size: 1rem; }
    .process-step .step-subtitle { font-size: 0.8rem; }
    .process-step p { font-size: 0.85rem; }
    
    .pricing-card { padding: 25px 20px; }
    .pricing-name { font-size: 1.15rem; }
    .pricing-price { font-size: 2rem; }
    .pricing-description { font-size: 0.85rem; }
    .pricing-features li { font-size: 0.85rem; padding: 6px 0; }
    .pricing-badge {
        right: auto !important;
        left: 50% !important;
        top: -10px !important;
        transform: translateX(-50%) !important;
        font-size: 0.66rem !important;
        padding: 4px 10px !important;
        border-radius: 12px !important;
        white-space: normal;
        text-align: center;
        max-width: 84%;
    }

    .hero-title,
    .hero-subtitle,
    .about-content-side .section-title-modern,
    .about-content-side .lead-text {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .about-x .about-hero { padding: 86px 0 52px !important; }
    .about-x .story-card,
    .about-x .impact-panel,
    .about-x .cred-card,
    .about-x .exp-card { padding: 18px !important; }
    .about-x .portrait-panel { padding: 12px; border-radius: 18px; }
    .about-x .portrait-badge {
        width: 90px;
        right: -8px;
        bottom: -8px;
        border-width: 4px;
    }
    .about-x .portrait-badge strong { font-size: 1.25rem; }
    .about-x .portrait-badge span { font-size: 0.56rem; }

    .exp-floating {
        padding: 12px 14px;
        border-radius: 14px;
        gap: 8px;
    }
    .exp-floating .number { font-size: 1.55rem; }
    .exp-floating .text { font-size: 0.72rem; }

    .btn-group-modern {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .flash-message { 
        right: 10px; 
        left: 10px; 
        max-width: none; 
        font-size: 0.82rem; 
        padding: 10px 16px; 
    }
    
    .breadcrumb { font-size: 0.78rem; gap: 5px; }
    .page-hero { padding: 70px 0 30px; }
    .page-hero p { font-size: 0.85rem; }
    
    /* Service meta tags */
    .service-meta { gap: 6px; }
    .service-meta span { font-size: 0.72rem; padding: 3px 8px; }
    
    /* Service features */
    .service-features li { font-size: 0.82rem; padding: 4px 0; }
    
    /* Lightbox */
    .lightbox img { max-width: 95%; }
    .lightbox-close { top: 12px; right: 12px; width: 38px; height: 38px; font-size: 1.2rem; }
}

/* Very Small Mobile (max 380px) */
@media (max-width: 380px) {
    html { font-size: 14px; }
    .container { padding: 0 12px; }
    .hero h1 { font-size: 1.4rem; }
    .hero .subtitle { font-size: 0.82rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .stat-card { padding: 14px 10px; }
    .stat-value { font-size: 1.25rem; }
    .stat-label { font-size: 0.7rem; }
    .grid-4 { grid-template-columns: 1fr; }
    .logo-text .name { font-size: 0.92rem; }
    .logo-text .title { display: none; }
    .footer-bottom p { font-size: 0.7rem; }
    .section-header h2 { font-size: 1.2rem; }
    .page-hero { padding: 65px 0 25px; }
    .page-hero h1 { font-size: 1.3rem; }
}

/* ---- Print Styles ---- */
@media print {
    .main-header, .topbar, .whatsapp-float, .back-to-top, .menu-toggle { display: none !important; }
    body { background: white; color: black; }
    .section { padding: 20px 0; }
    .card { border: 1px solid #ddd; }
}

@media (max-width: 768px) { .gallery-grid-modern { grid-template-columns: 1fr; gap: 15px; } .gallery-item-large { height: 260px; } .gallery-sub-grid { grid-template-columns: 1fr 1fr; gap: 10px; } .gallery-item-small { height: 140px; } }

