/* ===================================================================
   RESPONSIVE CSS - Mobile-first responsive design
   Touch-friendly targets ≥44px for WCAG 2.1 AA
   =================================================================== */

/* ============================================
   MOBILE FIRST (320px+)
   ============================================ */
/* Base styles already mobile-optimized in main.css */

/* ============================================
   SMALL DEVICES (480px+)
   ============================================ */
@media (min-width: 480px) {
  .hero-title {
    font-size: var(--text-4xl);
  }
  
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   TABLETS (768px+)
   ============================================ */
@media (min-width: 768px) {
  /* Typography */
  h1 { font-size: var(--text-6xl); }
  h2 { font-size: var(--text-5xl); }
  h3 { font-size: var(--text-4xl); }
  
  .hero-title {
    font-size: var(--text-5xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-2xl);
  }
  
  /* Layout */
  .container {
    padding: 0 var(--space-8);
  }
  
  section {
    padding: var(--space-20) 0;
  }
  
  /* Grid */
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Cards */
  .card {
    padding: var(--space-8);
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  /* Show desktop nav */
  .main-nav {
    display: flex;
  }
  
  /* Hide mobile menu */
  .mobile-menu-toggle {
    display: none;
  }
  
  .mobile-nav {
    display: none !important;
  }
}

/* ============================================
   DESKTOP (1024px+)
   ============================================ */
@media (min-width: 1024px) {
  .hero {
    padding: var(--space-24) var(--space-8);
  }
  
  .hero-title {
    font-size: var(--text-6xl);
  }
  
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ============================================
   LARGE DESKTOP (1200px+)
   ============================================ */
@media (min-width: 1200px) {
  .container {
    padding: 0 var(--space-10);
  }
  
  .hero {
    padding: var(--space-24) 0;
  }
}

/* ============================================
   MOBILE & TABLET ONLY (< 768px)
   ============================================ */
@media (max-width: 767px) {
  /* Typography */
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  h3 { font-size: var(--text-2xl); }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-lg);
  }
  
  /* Layout */
  section {
    padding: var(--space-12) 0;
  }
  
  .hero {
    padding: var(--space-16) var(--space-4);
  }
  
  /* Header */
  .header-top .container {
    flex-direction: column;
    gap: var(--space-2);
  }
  
  .header-info,
  .header-actions {
    width: 100%;
    justify-content: center;
    gap: var(--space-3);
  }
  
  .logo-title {
    font-size: var(--text-lg);
  }
  
  .logo-subtitle {
    font-size: var(--text-xs);
  }
  
  .logo-img {
    width: 50px;
    height: 50px;
  }
  
  /* Hide desktop nav */
  .main-nav {
    display: none;
  }
  
  /* Show mobile menu toggle */
  .mobile-menu-toggle {
    display: flex;
  }
  
  .mobile-nav {
    display: block;
  }
  
  /* Grid */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .grid {
    gap: var(--space-4);
  }
  
  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
  
  .stat-number {
    font-size: var(--text-4xl);
  }
  
  /* Buttons */
  .hero-cta {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
  
  /* Cards */
  .card {
    padding: var(--space-5);
  }
  
  .card-icon {
    font-size: var(--text-4xl);
  }
  
  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }
  
  /* WhatsApp & Call buttons */
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
  }
  
  .whatsapp-float svg {
    width: 28px;
    height: 28px;
  }
  
  .call-float {
    bottom: 85px;
    right: 20px;
    width: 50px;
    height: 50px;
  }
  
  .call-float svg {
    width: 22px;
    height: 22px;
  }
}

/* ============================================
   MOBILE ONLY (< 480px)
   ============================================ */
@media (max-width: 479px) {
  .container {
    padding: 0 var(--space-4);
  }
  
  .hero-title {
    font-size: var(--text-2xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-base);
  }
  
  .header-link {
    font-size: var(--text-xs);
  }
  
  .stat-number {
    font-size: var(--text-3xl);
  }
  
  .stat-label {
    font-size: var(--text-base);
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-social {
    justify-content: center;
  }
}

/* ============================================
   LANDSCAPE ORIENTATION
   ============================================ */
@media (orientation: landscape) and (max-height: 600px) {
  .hero {
    padding: var(--space-12) var(--space-4);
  }
  
  .hero-title {
    font-size: var(--text-3xl);
  }
  
  .hero-subtitle {
    font-size: var(--text-lg);
    margin-bottom: var(--space-4);
  }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  .btn {
    min-height: 48px;
    padding: var(--space-4) var(--space-6);
  }
  
  .nav-link,
  .mobile-link {
    min-height: 48px;
    padding: var(--space-3) var(--space-4);
  }
  
  .form-input,
  .form-textarea,
  .form-select {
    min-height: 48px;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  /* Remove hover effects */
  .card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
}

/* ============================================
   HIGH CONTRAST MODE
   ============================================ */
@media (prefers-contrast: high) {
  * {
    border-color: currentColor !important;
  }
  
  .btn {
    border-width: 3px;
  }
  
  *:focus-visible {
    outline-width: 4px;
  }
}

/* ============================================
   FORCED COLORS MODE (Windows High Contrast)
   ============================================ */
@media (forced-colors: active) {
  .hero-overlay {
    background: transparent;
  }
  
  .whatsapp-pulse {
    display: none;
  }
  
  *:focus-visible {
    outline: 3px solid;
  }
}

/* ============================================
   PRINT-SPECIFIC RESPONSIVE
   ============================================ */
@media print {
  .hero {
    padding: var(--space-8) 0;
  }
  
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .card {
    break-inside: avoid;
  }
}

/* ============================================
   ANIMATION UTILITIES (Respects reduced motion)
   ============================================ */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-up.animated {
  opacity: 1;
  transform: translateY(0);
}

.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-in.animated {
  opacity: 1;
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.animated {
  opacity: 1;
  transform: translateX(0);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.animated {
  opacity: 1;
  transform: translateX(0);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

[data-reveal].revealed {
  opacity: 1;
  transform: translateY(0);
}

.stagger-in {
  animation: staggerFadeIn 0.5s ease forwards;
}

@keyframes staggerFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Disable animations for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in-up,
  .fade-in,
  .slide-in-left,
  .slide-in-right,
  [data-reveal],
  .stagger-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    animation: none !important;
  }
}
