/* =====================================
   Responsive Styles
   Mobile-first media queries
   ===================================== */

/* Tablet - 768px and below */
@media (max-width: 768px) {
  /* Typography adjustments */
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.875rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  /* Hero sections */
  .hero {
    min-height: 500px;
    padding: var(--space-2xl) var(--space-md);
  }

  .hero p {
    font-size: 1.125rem;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
  }

  /* Grid adjustments */
  .grid-2,
  .grid-3,
  .grid-4,
  .grid[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Stats grid */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Section spacing */
  .section {
    padding: var(--space-xl) 0;
  }

  .section-lg {
    padding: var(--space-2xl) 0;
  }

  /* Cards */
  .card {
    padding: var(--space-md);
  }

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

  /* Buttons */
  .btn-large {
    padding: 16px 32px;
    font-size: 1rem;
  }
}

/* Mobile - 576px and below */
@media (max-width: 576px) {
  /* Container padding */
  .container {
    padding: 0 var(--space-sm);
  }

  /* Typography */
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.375rem;
  }

  /* Hero */
  .hero {
    min-height: 450px;
    padding: var(--space-xl) var(--space-sm);
  }

  .hero p {
    font-size: 1rem;
  }

  /* Section headers */
  .section-header {
    margin-bottom: var(--space-lg);
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-subtitle {
    font-size: 1rem;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  /* Feature items */
  .feature-item {
    flex-direction: column;
    text-align: center;
  }

  .feature-icon {
    margin: 0 auto;
  }

  /* Testimonials */
  .testimonial {
    padding: var(--space-lg);
  }

  .testimonial::before {
    font-size: 3rem;
  }

  .testimonial-text {
    font-size: 1rem;
  }

  /* Cards */
  .card-icon {
    width: 56px;
    height: 56px;
    font-size: 1.75rem;
  }

  /* Spacing utilities - mobile adjustments */
  .section {
    padding: var(--space-lg) 0;
  }

  .section-lg {
    padding: var(--space-xl) 0;
  }
}

/* Large Desktop - 1400px and above */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .container-wide {
    max-width: 1600px;
  }

  /* Typography scaling */
  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 3rem;
  }

  .hero {
    min-height: 700px;
  }

  .hero p {
    font-size: 1.375rem;
  }
}

/* High DPI / Retina displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure crisp rendering on retina displays */
  * {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* Landscape mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
  .hero {
    min-height: 400px;
    padding: var(--space-lg) var(--space-md);
  }

  .navbar-menu {
    max-height: calc(100vh - 70px);
    overflow-y: auto;
  }
}

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

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
  /* Uncomment if you want to add dark mode support in the future */
  /*
  :root {
    --white: #1F2937;
    --light-gray: #111827;
    --medium-gray: #9CA3AF;
    --dark-gray: #F9FAFB;
    --black: #FFFFFF;
  }
  */
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 48px;
  }

  .nav-link {
    min-height: 48px;
  }

  .dropdown-item {
    min-height: 48px;
  }

  /* Remove hover-specific effects on touch devices */
  .card:hover {
    transform: none;
  }

  .btn-primary:hover {
    transform: none;
  }

  /* Keep active states for touch feedback */
  .card:active {
    transform: translateY(-4px);
  }

  .btn:active {
    transform: scale(0.98);
  }
}
