/**
 * ISANGE MODERN ALUMINIUM LTD — Responsive Overrides v2
 * Breakpoints: xl 1200, lg 992, md 768, sm 576 (Bootstrap 5 scale)
 * Each breakpoint gets an intentionally adapted layout, not a scaled-down desktop.
 */

/* ===================================================================
   LARGE DESKTOP → LAPTOP (<=1199.98px)
=================================================================== */
@media (max-width: 1199.98px) {
  :root { --fs-hero: 2.75rem; --fs-h1: 2.2rem; }
  section { padding: var(--space-xl) 0; }
  .hero { min-height: 600px; }
  .card-service-body { padding: 40px 20px 22px; }
}

/* ===================================================================
   TABLET (<=991.98px)
   Nav collapses to an off-canvas panel; hero drops to a stacked,
   centered layout; stat bar becomes a 2x2 grid instead of 1x4.
=================================================================== */
@media (max-width: 991.98px) {
  :root {
    --fs-hero: 2.3rem;
    --fs-h1: 1.9rem;
    --fs-h2: 1.6rem;
    --fs-stat: 1.9rem;
    --navbar-height: 72px;
  }

  .topbar { display: none !important; }

  .site-navbar .navbar-collapse {
    background: var(--color-white);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    margin-top: 12px;
    box-shadow: var(--shadow-elevated);
    border: 1px solid var(--color-border);
  }
  .navbar-nav { gap: 2px; }
  .nav-link { padding: 0.85rem 0.75rem !important; border-radius: var(--radius-sm); }
  .nav-link.active { background: var(--color-orange-tint); }
  .nav-link.active::after { display: none; }
  .navbar-cta {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border);
    flex-wrap: wrap;
  }
  .navbar-cta .btn-brand { width: 100%; text-align: center; order: 2; }
  .btn-icon-whatsapp { order: 1; }

  /* Hero: stacked, centered, image still visible behind gradient */
  .hero {
    min-height: auto;
    padding: var(--space-xl) 0 calc(var(--space-lg) + 56px);
    text-align: center;
  }
  .hero-eyebrow { justify-content: center; }
  .hero-title, .hero-subtext { max-width: 100%; margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }

  /* Stats: 2-column grid instead of 4-across */
  .stats-bar { margin-top: -56px; padding: var(--space-sm) var(--space-md); }
  .stat-item { justify-content: flex-start; text-align: left; }

  /* Cards: 2-up grids everywhere instead of 3/4-up */
  .card-service-body { padding: 38px 20px 20px; }

  .why-item { gap: 14px; }

  .cta-band { text-align: center; padding: var(--space-lg) var(--space-md); }
  .cta-band .d-flex { flex-direction: column; }
  .cta-band .btn { margin-top: var(--space-sm); width: 100%; }

  .footer-top { padding: var(--space-xl) 0 var(--space-md); text-align: center; }
  .footer-social { display: flex; justify-content: center; }
  .footer-contact li { justify-content: center; }
  .footer-links { display: inline-block; text-align: left; }
}

/* ===================================================================
   MOBILE (<=767.98px)
   Single-column throughout; hero and cards get mobile-specific sizing,
   not just smaller desktop versions.
=================================================================== */
@media (max-width: 767.98px) {
  section { padding: var(--space-lg) 0; }
  .section-title { font-size: 1.55rem; }
  .section-subtitle { font-size: 0.95rem; }
  .eyebrow { font-size: 0.72rem; letter-spacing: 1.5px; }

  .hero { padding: var(--space-lg) 0 calc(var(--space-lg) + 46px); }
  .hero-title { font-size: 1.9rem; letter-spacing: -0.01em; }
  .hero-subtext { font-size: 0.95rem; }
  .hero-actions { flex-direction: column; width: 100%; gap: 0.75rem; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .stats-bar {
    margin-top: -40px;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
  }
  .stat-item { gap: 12px; }
  .stat-icon { width: 42px; height: 42px; font-size: 1.1rem; border-radius: 8px; }
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: 0.7rem; }

  /* Service/product cards: full width single column, image height reduced */
  .card-service-img { height: 180px; }
  .card-service-body { padding: 34px 18px 18px; }
  .card-product-img { height: 170px; }

  .card-project { height: 230px; }
  .card-project-overlay { padding: 18px; }

  .filter-pills { justify-content: center; }
  .filter-pill { padding: 8px 16px; font-size: 0.82rem; }

  .why-choose .row > div { margin-bottom: var(--space-xs); }

  .testimonial-card { padding: var(--space-sm); }

  .footer-bottom .container { flex-direction: column; text-align: center; gap: 8px; }

  .whatsapp-float, .back-to-top { width: 48px; height: 48px; font-size: 1.3rem; bottom: 18px; }
  .whatsapp-float { left: 18px; }
  .back-to-top { right: 18px; }

  .page-header { padding: var(--space-lg) 0; }
  .page-header h1 { font-size: 1.65rem; }
}

/* ===================================================================
   SMALL MOBILE (<=575.98px)
=================================================================== */
@media (max-width: 575.98px) {
  .hero-title { font-size: 1.65rem; }
  .hero-subtext { font-size: 0.9rem; }

  .stat-item { flex-direction: column; align-items: flex-start; gap: 8px; }

  .card-service-icon { width: 50px; height: 50px; font-size: 1.2rem; bottom: -25px; left: 18px; }
  .card-service-body { padding: 32px 16px 16px; }

  .cta-band h3 { font-size: 1.25rem; }

  .navbar-brand img { height: 36px; }
}

/* ===================================================================
   TOUCH DEVICES — remove hover-only interactions that trap on tap
=================================================================== */
@media (hover: none) {
  .card-service:hover,
  .card-product:hover,
  .card-category:hover,
  .testimonial-card:hover {
    transform: none;
    box-shadow: var(--shadow-xs);
  }
  .btn-brand:hover,
  .btn-outline-navy:hover,
  .btn-outline-light-nav:hover {
    transform: none;
  }
}