/* Responsive Design - Mobile First Approach */

/* Mobile Styles (< 640px) - Base styles in main.css */

/* Tablet Styles (640px - 1024px) */
@media (min-width: 640px) {
  .nav-container {
    flex-wrap: nowrap;
  }

  .nav-search {
    max-width: 400px;
  }

  .hero-content h2 {
    font-size: 2.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop Styles (> 1024px) */
@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-content h2 {
    font-size: 3rem;
  }
}

/* Mobile-specific adjustments */
@media (max-width: 640px) {
  .nav-container {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-brand {
    text-align: center;
  }

  .nav-search {
    width: 100%;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding: var(--spacing-xl) var(--spacing-md);
  }

  .hero-content h2 {
    font-size: 1.75rem;
  }

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

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  #social-links {
    align-items: center;
  }

  .debug-menu-container {
    flex-direction: column;
    align-items: flex-start;
  }

  #debug-menu-items {
    width: 100%;
  }
}

/* Touch-friendly tap targets for mobile */
@media (hover: none) and (pointer: coarse) {
  .nav-links a,
  .btn,
  .debug-toggle,
  .autocomplete-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Print Styles */
@media print {
  .debug-menu,
  .main-nav,
  .footer {
    display: none;
  }

  .hero {
    background: white;
    color: black;
  }

  .feature-card {
    break-inside: avoid;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --border: #000000;
    --text-secondary: #000000;
  }

  .btn-secondary {
    border-width: 3px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  :root {
    --background: #111827;
    --surface: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --border: #374151;
  }

  .debug-menu {
    background-color: #000000;
  }

  .hero {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
  }
}
