/* ============================================================
   Services Mobile Renovation
   Applies to: service_custom_web_applications, service_ecommerce,
   service_seo, service_cms, service_digital_marketing, service_maintenance
   Loaded LAST, after services.css and service-ecommerce.css.
   ============================================================ */

@media (max-width: 768px) {

    /* Global guard against horizontal overflow */
    html, body { overflow-x: hidden; max-width: 100%; }

    /* ---------- Hero ---------- */
    .ecommerce-hero,
    .service-hero {
        padding: 5rem 0 2.5rem !important;
        min-height: auto !important;
    }
    .ecommerce-hero .container,
    .service-hero .container { padding: 0 1rem !important; }

    .hero-badge {
        font-size: 0.7rem !important;
        padding: 0.4rem 0.85rem !important;
        margin-bottom: 1rem !important;
    }
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.15 !important;
        margin-bottom: 0.85rem !important;
    }
    .hero-title .gradient-text,
    .hero-title .highlight { font-size: inherit !important; }

    .hero-subtitle {
        font-size: 0.95rem !important;
        line-height: 1.55 !important;
        margin-bottom: 1.5rem !important;
    }

    .hero-cta {
        flex-direction: column !important;
        gap: 0.75rem !important;
        width: 100%;
    }
    .hero-cta .btn,
    .hero-cta a {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.85rem 1rem !important;
        font-size: 0.95rem !important;
    }

    .hero-stats {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 0.75rem !important;
        margin-top: 1.5rem !important;
    }
    .hero-stats .stat,
    .hero-stats .stat-item {
        flex: 1 1 calc(50% - 0.4rem) !important;
        min-width: 0 !important;
        padding: 0.75rem 0.5rem !important;
    }
    .hero-stats .stat-number,
    .hero-stats .stat-value {
        font-size: 1.4rem !important;
    }
    .hero-stats .stat-label {
        font-size: 0.7rem !important;
    }

    /* Decorative grid overlay - keep but smaller */
    .grid-overlay { opacity: 0.3 !important; }

    /* ---------- Section headers ---------- */
    .section-header { margin-bottom: 2rem !important; padding: 0 1rem !important; }
    .section-badge {
        font-size: 0.7rem !important;
        padding: 0.35rem 0.85rem !important;
        margin-bottom: 0.75rem !important;
    }
    .section-header h2,
    .section-title {
        font-size: 1.6rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.75rem !important;
    }
    .section-header p,
    .section-subtitle {
        font-size: 0.9rem !important;
        line-height: 1.55 !important;
    }

    /* ---------- Generic section spacing ---------- */
    section { padding: 2.5rem 0 !important; }
    .ecommerce-features-section,
    .process-section,
    .tech-stack-section,
    .capabilities-banner,
    .ecommerce-cta { padding: 2.5rem 0 !important; }
    main .container,
    section .container { padding: 0 1rem !important; }

    /* ---------- Feature / e-commerce grid ---------- */
    .ecommerce-grid,
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
        padding: 0 1rem !important;
    }
    .grid-item { border-radius: 14px !important; }

    .grid-image-wrapper { height: 160px !important; }
    .grid-image { font-size: 2.5rem !important; }

    .grid-content { padding: 1.1rem !important; }
    .grid-content h3 {
        font-size: 1.15rem !important;
        margin-bottom: 0.5rem !important;
    }
    .grid-content p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.75rem !important;
    }
    .feature-list li {
        font-size: 0.8rem !important;
        padding: 0.3rem 0 !important;
    }

    /* ---------- Capabilities banner ---------- */
    .capabilities-banner .container { padding: 0 1rem !important; }
    .banner-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1rem !important;
        padding: 1.5rem 1.25rem !important;
        border-radius: 14px !important;
    }
    .banner-icon { font-size: 2rem !important; }
    .banner-text h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.4rem !important;
    }
    .banner-text p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }
    .banner-cta { width: 100%; }
    .banner-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.8rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* ---------- Process timeline ---------- */
    .process-timeline {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 1rem !important;
    }
    .process-timeline::before { display: none !important; }
    .process-step {
        flex-direction: row !important;
        gap: 0.85rem !important;
        padding: 1rem !important;
        border-radius: 12px !important;
        align-items: flex-start !important;
    }
    .step-number {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
        flex-shrink: 0 !important;
    }
    .step-content { padding: 0 !important; flex: 1; min-width: 0; }
    .step-content h3 {
        font-size: 1rem !important;
        margin-bottom: 0.4rem !important;
    }
    .step-content p {
        font-size: 0.82rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.5rem !important;
    }
    .step-features { gap: 0.3rem !important; }
    .step-features span,
    .step-features li {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.55rem !important;
    }

    /* ---------- Tech grid ---------- */
    .tech-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem !important;
        padding: 0 1rem !important;
    }
    .tech-card {
        padding: 1rem 0.85rem !important;
        border-radius: 10px !important;
        min-height: 0 !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-align: center !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    .tech-card * { max-width: 100% !important; }
    .tech-card img,
    .tech-card svg { width: 32px !important; height: 32px !important; }
    .tech-card h4,
    .tech-card h5,
    .tech-card span {
        font-size: 0.85rem !important;
        line-height: 1.25 !important;
        margin: 0 0 0.35rem 0 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
    }
    .tech-card p {
        font-size: 0.72rem !important;
        line-height: 1.35 !important;
        margin: 0 !important;
        color: rgba(255,255,255,0.7) !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    .tech-glow { display: none !important; }

    /* ---------- CTA ---------- */
    .ecommerce-cta { padding: 2.5rem 0 !important; }
    .ecommerce-cta .container { padding: 0 1rem !important; }
    .cta-content {
        flex-direction: column !important;
        text-align: center !important;
        gap: 1.25rem !important;
        padding: 1.75rem 1.25rem !important;
        border-radius: 14px !important;
    }
    .cta-text h2 {
        font-size: 1.5rem !important;
        line-height: 1.2 !important;
        margin-bottom: 0.5rem !important;
    }
    .cta-text p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }
    .cta-buttons {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.65rem !important;
    }
    .cta-buttons .btn,
    .cta-buttons a {
        width: 100% !important;
        justify-content: center !important;
        padding: 0.85rem 1rem !important;
        font-size: 0.92rem !important;
    }

    /* ---------- Outcomes / benefits / generic card lists ---------- */
    .outcomes-grid,
    .benefits-grid,
    .challenges-grid,
    .results-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 1rem !important;
    }
    .outcome-card,
    .benefit-card,
    .challenge-card,
    .result-card {
        padding: 1.1rem !important;
        border-radius: 12px !important;
    }
    .outcome-card h3,
    .benefit-card h3,
    .challenge-card h3,
    .result-card h3 {
        font-size: 1.05rem !important;
        margin-bottom: 0.5rem !important;
    }
    .outcome-card p,
    .benefit-card p,
    .challenge-card p,
    .result-card p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
    }

    /* Decorative elements that hurt mobile perf / clutter */
    .floating-shapes,
    .hero-decoration,
    .section-decoration { display: none !important; }
}

@media (max-width: 480px) {

    .hero-title { font-size: 1.7rem !important; }
    .hero-subtitle { font-size: 0.9rem !important; }
    .section-header h2,
    .section-title { font-size: 1.4rem !important; }

    .hero-stats .stat,
    .hero-stats .stat-item {
        flex: 1 1 100% !important;
    }

    .tech-grid { grid-template-columns: repeat(2, 1fr) !important; }

    .grid-image-wrapper { height: 140px !important; }
    .grid-content { padding: 1rem !important; }
    .grid-content h3 { font-size: 1.05rem !important; }

    .step-number { width: 32px !important; height: 32px !important; font-size: 0.9rem !important; }

    .cta-text h2 { font-size: 1.3rem !important; }
    .banner-text h3 { font-size: 1.1rem !important; }
}
