/* ===================================
   Responsive Design
   Whistol Website
   Mobile-First Approach
   =================================== */

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

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

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

/* ========================================
   Desktop (1024px - 1439px)
   ======================================== */
/* Most styles are default for this range */

/* ========================================
   Tablet (768px - 1023px)
   ======================================== */
@media (max-width: 1023px) {
  /* Global */
  section {
    padding-top: var(--spacing-16);
    padding-bottom: var(--spacing-16);
  }

  .section__header {
    margin-bottom: var(--spacing-12);
  }

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

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

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

  /* Container */
  .container {
    padding-left: var(--spacing-4);
    padding-right: var(--spacing-4);
  }
}

/* ========================================
   Mobile (320px - 767px)
   ======================================== */
@media (max-width: 767px) {
  /* Global */
  section {
    padding-top: var(--spacing-12);
    padding-bottom: var(--spacing-12);
  }

  .section__header {
    margin-bottom: var(--spacing-8);
  }

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

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

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

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

  .section__subtitle {
    font-size: var(--text-lg);
  }

  .section__desc {
    font-size: var(--text-base);
  }

  /* Buttons */
  .btn {
    width: 100%;
    padding: var(--spacing-3) var(--spacing-6);
  }

  .btn-group {
    flex-direction: column;
    gap: var(--spacing-3);
  }

  /* Container */
  .container {
    padding-left: var(--spacing-4);
    padding-right: var(--spacing-4);
  }
}

/* ========================================
   Small Mobile (320px - 479px)
   ======================================== */
@media (max-width: 479px) {
  /* Typography */
  h1 {
    font-size: var(--text-2xl);
  }

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

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

  /* Container */
  .container {
    padding-left: var(--spacing-3);
    padding-right: var(--spacing-3);
  }

  /* Spacing */
  section {
    padding-top: var(--spacing-10);
    padding-bottom: var(--spacing-10);
  }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
  /* Hide non-essential elements */
  .header,
  .nav,
  .footer,
  .cta,
  .hero__scroll,
  button,
  .btn {
    display: none !important;
  }

  /* Optimize for print */
  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
  }

  /* Show URLs for links */
  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }

  /* Page breaks */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }

  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }

  /* Remove shadows and effects */
  * {
    box-shadow: none !important;
    text-shadow: none !important;
  }
}

/* ========================================
   Landscape Orientation (Mobile)
   ======================================== */
@media (max-width: 767px) and (orientation: landscape) {
  .hero {
    min-height: 80vh;
    padding: var(--spacing-12) 0;
  }

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

/* ========================================
   High Resolution / Retina Displays
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Optimize images and graphics for retina */
  img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* ========================================
   Dark Mode (Optional Future Enhancement)
   ======================================== */
@media (prefers-color-scheme: dark) {
  /* Uncomment when implementing dark mode */
  /*
  :root {
    --bg-white: #1a1a1a;
    --bg-light: #2a2a2a;
    --text-dark: #ffffff;
    --text-gray: #b0b0b0;
    --border-light: #3a3a3a;
  }
  */
}

/* ========================================
   Touch Device Optimizations
   ======================================== */
@media (hover: none) and (pointer: coarse) {
  /* Increase touch targets */
  button,
  .btn,
  a {
    min-height: 44px;
    min-width: 44px;
  }

  /* Remove hover effects on touch devices */
  .service-card:hover,
  .process-step:hover,
  .portfolio-item:hover,
  .pricing-card:hover {
    transform: none;
  }

  /* Simplify animations for better performance */
  * {
    transition-duration: 0.2s !important;
  }
}

/* ========================================
   Reduced Motion (Accessibility)
   ======================================== */
@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;
  }

  .hero__scroll {
    animation: none;
  }
}

/* ========================================
   Contrast Preferences (Accessibility)
   ======================================== */
@media (prefers-contrast: high) {
  :root {
    --border-light: #000;
    --text-gray: #000;
  }

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

/* ========================================
   Container Query Support (Future)
   ======================================== */
/* When browser support improves, add container queries here */
