/**
 * Responsive Styles
 * Media queries and mobile-specific overrides
 */

/* ==========================================
   MOBILE SMALL (up to 479px)
   ========================================== */

@media (max-width: 479px) {
  :root {
    --section-padding: var(--space-10);
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .section-title {
    font-size: var(--text-2xl);
  }

  .btn-large {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    width: 100%;
  }
}

/* ==========================================
   MOBILE LARGE (480px and up)
   ========================================== */

@media (min-width: 480px) {
  :root {
    --container-padding: var(--space-6);
  }
}

/* ==========================================
   TABLET (768px and up)
   ========================================== */

@media (min-width: 768px) {
  :root {
    --section-padding: var(--space-20);
    --container-padding: var(--space-8);
  }

  /* Typography scale up */
  h1 {
    font-size: var(--text-5xl);
  }

  h2 {
    font-size: var(--text-4xl);
  }

  h3 {
    font-size: var(--text-2xl);
  }

  .section-subtitle {
    font-size: var(--text-xl);
  }
}

/* ==========================================
   DESKTOP (1024px and up)
   ========================================== */

@media (min-width: 1024px) {
  :root {
    --section-padding: var(--space-24);
  }

  /* Typography scale up further */
  h1 {
    font-size: var(--text-6xl);
  }

  h2 {
    font-size: var(--text-5xl);
  }

  /* Better hover states on desktop */
  .card:hover,
  .step-card:hover,
  .testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
}

/* ==========================================
   DESKTOP LARGE (1280px and up)
   ========================================== */

@media (min-width: 1280px) {
  :root {
    --container-max: 1280px;
  }
}

/* ==========================================
   DESKTOP XL (1440px and up)
   ========================================== */

@media (min-width: 1440px) {
  html {
    font-size: 18px;
  }
}

/* ==========================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================== */

@media (hover: none) {
  /* Remove hover effects on touch devices */
  .btn:hover {
    transform: none;
  }

  .card:hover,
  .step-card:hover,
  .testimonial-card:hover {
    transform: none;
    box-shadow: none;
  }

  /* Ensure tap targets are large enough */
  .nav-link,
  .dropdown-link,
  .mobile-nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .scroll-indicator-icon::before {
    animation: none;
  }

  /* Disable AOS animations */
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================
   HIGH CONTRAST MODE
   ========================================== */

@media (prefers-contrast: high) {
  :root {
    --border-color: rgba(255, 255, 255, 0.3);
    --text-secondary: #c0c0c0;
    --text-muted: #a0a0a0;
  }

  .btn-ghost {
    border-width: 2px;
  }

  .accordion-item,
  .card,
  .step-card,
  .testimonial-card {
    border-width: 2px;
  }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {
  /* Hide non-essential elements */
  .site-header,
  .mobile-menu,
  .scroll-indicator,
  .hero-video-container,
  .booking-widget-container,
  .map-container iframe,
  .footer-social,
  .newsletter-form,
  .btn {
    display: none !important;
  }

  /* Reset colors for printing */
  body {
    background: white;
    color: black;
  }

  .section {
    background: white !important;
    padding: 1rem 0;
  }

  h1, h2, h3, h4, h5, h6 {
    color: black;
  }

  p, li {
    color: #333;
  }

  /* Ensure links show their URLs */
  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }

  /* Avoid page breaks inside cards */
  .card,
  .step-card,
  .testimonial-card,
  .accordion-item {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ==========================================
   LANDSCAPE MOBILE ADJUSTMENTS
   ========================================== */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--space-16) 0;
  }

  .hero-title {
    font-size: var(--text-3xl);
  }

  .scroll-indicator {
    display: none;
  }
}

/* ==========================================
   DARK MODE MEDIA QUERY
   (Already dark by default, but this ensures system preference)
   ========================================== */

@media (prefers-color-scheme: dark) {
  /* Already using dark colors by default */
}

/* ==========================================
   SAFARI-SPECIFIC FIXES
   ========================================== */

/* Fix for 100vh on iOS Safari */
@supports (-webkit-touch-callout: none) {
  .hero {
    min-height: -webkit-fill-available;
  }
}

/* ==========================================
   CONTAINER QUERIES (Progressive Enhancement)
   ========================================== */

@supports (container-type: inline-size) {
  .testimonials-grid {
    container-type: inline-size;
  }

  @container (min-width: 600px) {
    .testimonial-card {
      padding: var(--space-8);
    }
  }
}
