/* ================================================
   BELT CONVEYORS PRO — RESPONSIVE (Full Rewrite)
   Mobile-first layout optimisation
   ================================================ */

/* ── Large / Wide screens ── */
@media (min-width: 1400px) {
    :root { --container-width: 1380px; }
    .products-grid { grid-template-columns: repeat(4, 1fr); }
    .hero-title { font-size: 4.5rem; }
}

/* ── Standard Desktop (1200px and below) ── */
@media (max-width: 1200px) {
    .hero-title { font-size: 3.2rem; }
    .why-us-grid { grid-template-columns: repeat(3, 1fr); }
    .industries-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Tablet Landscape (1024px and below) ── */
@media (max-width: 1024px) {
    :root { --header-height: 72px; }

    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .about-home-grid,
    .about-overview-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .why-us-grid { grid-template-columns: repeat(3, 1fr); }
    .industries-grid { grid-template-columns: repeat(3, 1fr); }
    .cta-inner { flex-direction: column; text-align: center; }
    .cta-actions { justify-content: center; }

    /* Service pages */
    .service-card-full { grid-template-columns: 1fr; }
    .service-card-full.reverse { grid-template-columns: 1fr; }
    .service-card-full.reverse .service-icon-big { order: 0; }
    .service-icon-big { width: 110px; height: 110px; }
    .service-points { grid-template-columns: 1fr 1fr; }

    /* Product detail pages */
    .product-detail-card,
    .product-detail-card.reverse { grid-template-columns: 1fr; }
    .product-detail-card.reverse .product-detail-visual { order: 0; }

    /* Header nav */
    .cp-menu .menu-item a { padding: 0 14px; font-size: 0.85rem; }
}

/* ── Tablet Portrait (768px and below) ── */
@media (max-width: 768px) {
    :root { --header-height: 68px; }

    /* Hide desktop elements */
    .cp-topbar,
    .cp-navigation,
    .btn-header { display: none !important; }
    .cp-menu-toggle { display: flex !important; }

    /* Typography scale */
    .hero-title { font-size: clamp(1.9rem, 6vw, 3rem); line-height: 1.2; }
    .page-hero-title { font-size: clamp(1.8rem, 5.5vw, 2.8rem); }
    .section-title { font-size: clamp(1.5rem, 4vw, 2.2rem); }

    /* Hero */
    .cp-hero { min-height: 90vh; }
    .hero-content { padding-top: 20px; }
    .hero-stats { gap: 16px; flex-wrap: wrap; }
    .hero-stat { flex: 1 1 120px; min-width: 110px; }
    .stat-number { font-size: 2rem; }
    .hero-scroll-indicator { display: none; }

    /* Sections */
    .cp-section { padding: 60px 0; }
    .section-header { margin-bottom: 32px; }
    .section-subtitle { font-size: 0.95rem; }

    /* Grid overrides */
    .products-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
    .why-us-grid { grid-template-columns: 1fr 1fr; }
    .industries-grid { grid-template-columns: 1fr 1fr; }
    .infra-grid { grid-template-columns: repeat(2, 1fr); }
    .quality-process-grid { grid-template-columns: 1fr; }
    .certs-grid { grid-template-columns: repeat(3, 1fr); }
    .testimonials-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .industries-detail-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .footer-bottom-inner { flex-direction: column; gap: 10px; text-align: center; }
    .mv-grid { grid-template-columns: 1fr; }

    /* Process timeline */
    .process-timeline::before { left: 30px; }
    .process-step { gap: 16px; }
    .process-number { width: 60px; height: 60px; font-size: 0.9rem; flex-shrink: 0; }

    /* About page */
    .about-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .about-home-visual { display: none; } /* hide image stack on small tablet to save space */

    /* Specs table: horizontal scroll */
    .specs-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .specs-table { min-width: 540px; }

    /* Clients marquee: reduce speed */
    .marquee-track { animation-duration: 25s; }

    /* Footer */
    .footer-about { max-width: 100%; }
    .footer-widget-title { margin-top: 12px; }

    /* Mobile action bar body offset */
    body { padding-bottom: 62px; }
}

/* ── Mobile (480px and below) ── */
@media (max-width: 480px) {
    :root { --header-height: 60px; }

    .container { padding: 0 14px; }

    /* Hero */
    .cp-hero { min-height: auto; padding: 90px 0 50px; }
    .hero-tag { font-size: 0.7rem; padding: 6px 12px; }
    .hero-actions { flex-direction: column; gap: 10px; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-stats { flex-direction: column; gap: 12px; }
    .hero-stat { text-align: left; display: flex; align-items: center; gap: 10px; flex: none; width: 100%; }
    .stat-number { font-size: 1.8rem; }

    /* Grid: single column on very small */
    .products-grid { grid-template-columns: 1fr; }
    .product-card-home { padding: 20px 16px; }
    .why-us-grid { grid-template-columns: 1fr; }
    .industries-grid { grid-template-columns: 1fr; }
    .infra-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: 1fr; }
    .certs-grid { grid-template-columns: repeat(2, 1fr); }
    .about-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; }

    /* Forms */
    .form-row { grid-template-columns: 1fr; }
    .contact-form-wrapper { padding: 20px 16px; }

    /* CTA section */
    .cta-inner { padding: 36px 20px; }
    .cta-actions { flex-direction: column; width: 100%; }
    .cta-actions .btn { width: 100%; justify-content: center; }

    /* Error page */
    .error-title { font-size: 4.5rem; }
    .error-actions { flex-direction: column; align-items: center; }

    /* Product detail */
    .product-detail-card { padding: 20px 16px; }
    .product-detail-placeholder { padding: 32px; min-height: 180px; }

    /* Floating elements — above mobile action bar */
    .cp-whatsapp-float { bottom: 72px; right: 14px; width: 50px; height: 50px; font-size: 1.3rem; }
    .cp-back-to-top { bottom: 72px; right: 72px; width: 42px; height: 42px; font-size: 0.9rem; }

    /* Service pages */
    .service-points { grid-template-columns: 1fr; }
    .service-icon-big { width: 80px; height: 80px; }

    /* Specs table scroll hint */
    .specs-table-wrapper::after {
        content: '← Scroll →';
        display: block;
        text-align: center;
        font-size: 0.75rem;
        color: #94a3b8;
        margin-top: 8px;
    }
}

/* ── Tiny phones (360px and below) ── */
@media (max-width: 360px) {
    .container { padding: 0 12px; }
    .hero-title { font-size: 1.7rem; }
    .tl-wordmark { font-size: 0.85rem; }
    .tl-wordmark strong { font-size: 0.9rem; }
    .tl-badge { font-size: 0.6rem; padding: 4px 6px; }
    .nav-cta, .btn-header { display: none; }
}

/* ── Print styles ── */
@media print {
    .cp-topbar,
    .cp-header,
    .cp-mobile-menu,
    .cp-mobile-action-bar,
    .cp-back-to-top,
    .cp-whatsapp-float,
    .cp-preloader { display: none !important; }
    body { padding-bottom: 0; }
    a[href]::after { content: " (" attr(href) ")"; }
}
