/* ============================================================
   responsive.css — RGB Group Limited  (v2 — stronger specificity)
   Uses html body prefix on critical rules to win specificity
   battles against styles.css embedded media queries.
   ============================================================ */

/* ---- Global overflow fix — must come first ---------------- */
html, body { overflow-x: hidden !important; max-width: 100%; }
*, *::before, *::after { box-sizing: border-box; }
img, video, iframe { max-width: 100%; height: auto; }

/* ===================== 1024px ============================== */
@media (max-width: 1024px) {

    html body .grid-2 {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    html body .about-img-wrap {
        max-width: 500px;
        margin: 0 auto;
    }

    html body .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px;
    }

    html body .locations-grid {
        flex-direction: column !important;
        align-items: center;
    }

    html body .location-card { max-width: 100%; width: 100%; }

    html body .service-cards-grid { grid-template-columns: 1fr !important; }

    html body .service-detail-card {
        grid-template-columns: 1fr !important;
        padding: 40px;
    }

    html body .testimonial-card {
        width: calc((100% - 24px) / 2) !important;
    }

    html body .process-steps {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    html body .process-steps::before { display: none !important; }

    html body .values-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    html body .footer-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 40px;
    }

    html body .pd-grid {
        grid-template-columns: 1fr !important;
        gap: 40px;
    }

    html body .related-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    html body .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    html body .products-sidebar { display: none !important; }
    html body .mobile-filter-btn { display: flex !important; }
}

/* ===================== 992px =============================== */
@media (max-width: 992px) {

    html body .section,
    html body .about-section,
    html body .global-section,
    html body .services-home-section,
    html body .featured-section,
    html body .cta-section,
    html body .process-section,
    html body .values-section,
    html body .md-spotlight-section,
    html body .testimonials-section,
    html body .products-section,
    html body .services-section,
    html body .contact-section { padding: 70px 0 !important; }

    html body .hero h1 { font-size: 2.6rem !important; }
    html body .trust-badges { flex-wrap: wrap; justify-content: center; }
    html body .about-text h2 { font-size: 2.2rem !important; }
    html body .section-title h2 { font-size: 2.2rem !important; }
    html body .cta-section h2 { font-size: 2.4rem !important; }

    html body .cta-btns {
        flex-direction: column !important;
        align-items: center;
    }

    html body .md-spotlight-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 40px 30px !important;
        gap: 30px !important;
    }
    html body .md-contact-links { justify-content: center !important; }

    html body .page-hero { padding: 130px 0 60px !important; }
    html body .page-hero h1 { font-size: 2.8rem !important; }
}

/* ===================== 768px =============================== */
@media (max-width: 768px) {

    /* ----- NAV ----- */
    html body .nav-links {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: #fff !important;
        flex-direction: column !important;
        padding: 8px 0 !important;
        box-shadow: 0 10px 30px rgba(0,0,0,0.12) !important;
        text-align: center !important;
        gap: 0 !important;
        z-index: 999 !important;
    }

    html body .nav-links.open {
        display: flex !important;
    }

    html body .nav-links li {
        padding: 0 !important;
        border-bottom: 1px solid #f0f0f0 !important;
        width: 100%;
    }

    html body .nav-links a {
        display: block !important;
        padding: 14px 20px !important;
        color: var(--dark) !important;
        font-size: 1rem !important;
        width: 100%;
    }

    html body .nav-links a::after { display: none !important; }

    html body .nav-cta { display: none !important; }

    html body .menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    /* ----- HERO ----- */
    html body .hero h1 { font-size: 2rem !important; }
    html body .hero p  { font-size: 1rem !important; }

    html body .hero-btns {
        flex-direction: column !important;
        align-items: center !important;
        gap: 14px !important;
    }

    html body .hero-float { display: none !important; }
    html body .trust-badges { flex-wrap: wrap !important; }

    /* ----- STATS ----- */
    html body .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
        margin-top: 40px !important;
    }

    html body .stat-card { padding: 28px 16px !important; }
    html body .stat-card h3 { font-size: 2rem !important; }

    /* ----- TESTIMONIALS ----- */
    html body .testimonials-section .section-title h2 { font-size: 2rem !important; }
    html body .testimonial-card { width: 100% !important; }
    html body .carousel-prev { left: -10px !important; }
    html body .carousel-next { right: -10px !important; }

    html body .trust-bar {
        padding: 24px 16px !important;
        flex-wrap: wrap !important;
    }
    html body .trust-item { width: 50% !important; padding: 10px 16px !important; }
    html body .trust-divider { display: none !important; }

    /* ----- PROCESS & VALUES ----- */
    html body .process-steps { grid-template-columns: 1fr !important; }
    html body .values-grid   { grid-template-columns: 1fr !important; }

    /* ----- PRODUCT DETAIL ----- */
    html body .pd-title { font-size: 1.9rem !important; }
    html body .pd-actions { flex-direction: column !important; }
    html body .pd-inquire-btn,
    html body .pd-share-btn { justify-content: center !important; }
    html body .features-grid { grid-template-columns: 1fr !important; }

    /* ----- PAGE HERO ----- */
    html body .page-hero h1 { font-size: 2.2rem !important; }

    /* ----- FOOTER ----- */
    html body .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 32px !important;
    }
    html body .footer { padding: 60px 0 24px !important; }

    /* ----- CTA ----- */
    html body .cta-section h2 { font-size: 2rem !important; }
    html body .about-text h2  { font-size: 2rem !important; }
}

/* ===================== 576px =============================== */
@media (max-width: 576px) {

    html body .container   { padding: 0 16px !important; }
    html body .pd-container { padding: 24px 16px 60px !important; }
    html body .contact-form-container { padding: 24px 16px !important; }

    html body .hero h1     { font-size: 1.75rem !important; line-height: 1.2 !important; }
    html body .hero p      { font-size: 0.95rem !important; }

    html body .btn-lg      { padding: 14px 28px !important; font-size: 1rem !important; }

    html body .section-title h2 { font-size: 1.7rem !important; }
    html body .about-text h2    { font-size: 1.7rem !important; }
    html body .cta-section h2   { font-size: 1.75rem !important; }

    html body .service-detail-card { padding: 24px 16px !important; }
    html body .service-detail-card h2 { font-size: 1.8rem !important; }

    html body .products-page-hero { padding: 110px 0 40px !important; }
    html body .products-page-hero h1 { font-size: 2rem !important; }

    html body .products-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
    }

    html body .products-grid { grid-template-columns: 1fr !important; }
    html body .related-grid  { grid-template-columns: 1fr !important; }
    html body .modal-form-row { grid-template-columns: 1fr !important; }
    html body .search-wrap   { max-width: 100% !important; }

    html body .page-hero     { padding: 110px 0 50px !important; }
    html body .page-hero h1  { font-size: 1.8rem !important; }

    html body .trust-item    { width: 100% !important; justify-content: center !important; }

    html body .md-spotlight-card { padding: 30px 20px !important; }
    html body .md-avatar         { width: 140px !important; height: 140px !important; }
}

/* ===================== 480px =============================== */
@media (max-width: 480px) {

    html body .hero h1     { font-size: 1.6rem !important; }

    html body .hero-btns .btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 20px !important;
    }

    html body .stats-grid  { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    html body .stat-card   { padding: 20px 12px !important; }
    html body .stat-card h3 { font-size: 1.6rem !important; }

    html body .logo-img    { height: 38px !important; }
    html body .logo::after { width: 120px !important; height: 38px !important; }
}

/* ===================== 360px =============================== */
@media (max-width: 360px) {
    html body .hero h1     { font-size: 1.45rem !important; }
    html body .section-title h2 { font-size: 1.5rem !important; }
    html body .about-text h2    { font-size: 1.5rem !important; }
    html body .stat-card h3     { font-size: 1.4rem !important; }
    html body .pd-title         { font-size: 1.6rem !important; }
    html body .btn-lg           { padding: 12px 20px !important; font-size: 0.95rem !important; }
}

/* ===================== Touch target minimum size =========== */
@media (max-width: 768px) {
    html body .menu-toggle,
    html body .filter-btn,
    html body .category-btn,
    html body .btn {
        min-height: 44px;
    }
}