/* ============================================
   IndusBrush — Responsive Overrides
   Mobile-first breakpoints
   ============================================ */

/* --- Tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .process-timeline {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-lg);
  }

  .process-step:not(:last-child)::after {
    display: none;
  }
}

/* --- Mobile (max-width: 768px) --- */
@media (max-width: 768px) {
  :root {
    --header-height: 72px;
    --space-5xl: 3.5rem;
    --space-4xl: 2.5rem;
  }

  .container {
    padding: 0 var(--space-md);
  }

  /* Header Mobile */
  .logo-image {
    height: 48px !important;
  }
  .site-header.scrolled .logo-image {
    height: 42px !important;
  }

  .main-nav {
    display: none;
  }

  .header-phone {
    display: none;
  }

  .header-cta .btn {
    padding: 0.5rem 1rem;
    font-size: var(--fs-xs);
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Mobile Nav Overlay */
  .mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--bg-primary);
    padding: var(--space-lg);
    overflow-y: auto;
    animation: slideDown 0.25s var(--ease-out);
    border-top: 1px solid var(--border);
  }

  .mobile-nav.active {
    display: block;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-5px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .mobile-nav a {
    display: block;
    padding: var(--space-md);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    transition: all var(--duration-fast);
  }

  .mobile-nav a:hover,
  .mobile-nav a.active {
    color: var(--accent-primary);
    padding-left: calc(var(--space-md) + 4px);
    background: var(--bg-secondary);
  }

  .mobile-nav-sub {
    padding-left: var(--space-md);
    border-left: 2px solid var(--border-light);
    margin: var(--space-xs) 0 var(--space-sm) var(--space-md);
  }

  .mobile-nav-sub a {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--fs-small);
    color: var(--text-muted);
    border-bottom: none;
  }

  .mobile-nav-phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    padding: var(--space-md);
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--accent-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
  }

  /* Hero Mobile */
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-height) + var(--space-2xl));
    padding-bottom: var(--space-3xl);
  }

  .hero h1 {
    font-size: clamp(2rem, 7vw, 2.75rem);
  }

  .hero-stats {
    flex-direction: column;
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .hero-grid {
    display: none;
  }

  /* Products Grid Mobile */
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card-specs {
    flex-wrap: wrap;
  }

  /* Features Mobile */
  .features-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .feature-item {
    display: flex;
    text-align: left;
    gap: var(--space-lg);
    padding: var(--space-lg);
  }

  .feature-icon {
    margin: 0;
    flex-shrink: 0;
  }

  /* Stats Mobile */
  .stats-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .stat-item::after {
    display: none !important;
  }

  .stat-value {
    font-size: var(--fs-h2);
  }

  /* Tables Mobile */
  .spec-table-container {
    margin: 0 calc(-1 * var(--space-md));
    border-radius: 0;
    border-left: none;
    border-right: none;
  }

  .spec-table th,
  .spec-table td,
  .material-table thead th,
  .material-table td {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--fs-xs);
  }

  /* Applications Mobile */
  .applications-grid {
    grid-template-columns: 1fr;
  }

  /* Pattern Grid Mobile */
  .pattern-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Channel Grid Mobile */
  .channel-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact Form Mobile */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* Footer Mobile */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }

  /* CTA Section Mobile */
  .cta-actions {
    flex-direction: column;
    align-items: center;
  }

  .cta-actions .btn {
    width: 100%;
    max-width: 320px;
  }

  /* Page Hero Mobile */
  .page-hero {
    padding-top: calc(var(--header-height) + var(--space-2xl));
    padding-bottom: var(--space-2xl);
  }

  /* Two Column Mobile */
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* --- Small Mobile (max-width: 480px) --- */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-md);
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-description {
    font-size: var(--fs-body);
  }

  .pattern-grid {
    grid-template-columns: 1fr;
  }

  .channel-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stats-row {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .product-card {
    padding: var(--space-lg);
  }

  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    font-size: 1.3rem;
  }
}

/* --- Touch Targets (Accessibility) --- */
@media (pointer: coarse) {
  .main-nav a,
  .nav-dropdown-menu a,
  .footer-links a {
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  .btn {
    min-height: 44px;
  }
}

/* --- Prefers Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --- Print Styles --- */
@media print {
  .site-header,
  .site-footer,
  .whatsapp-float,
  .mobile-menu-toggle,
  .mobile-nav,
  .btn,
  .cta-section {
    display: none !important;
  }

  body {
    background: white;
    color: #1a1a1a;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }
}
