/* ========================================
   RESPONSIVE MEDIA QUERIES
   Consolidated breakpoint adjustments
   ======================================== */

/* ============ MOBILE (up to 640px) ============ */
@media (max-width: 640px) {
  /* Typography adjustments */
  :root {
    --text-4xl: 2rem;       /* 32px down from 48px */
    --text-3xl: 1.75rem;    /* 28px down from 40px */
    --text-2xl: 1.5rem;     /* 24px down from 32px */
  }

  /* Container spacing */
  .container {
    padding: 0 var(--space-2);
  }

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

  /* Hero adjustments */
  .hero {
    min-height: 70vh;
    padding-bottom: 8vh;
  }

  .hero__title {
    font-size: var(--text-xl);
    line-height: 1.1;
    text-shadow: none;
  }

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

  /* Buttons adjusted on mobile */
  .btn--large {
    display: inline-block;
    width: auto;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
  }

  /* Cards */
  .card__content {
    padding: var(--space-3);
  }

  /* Form inputs */
  .form-input,
  .form-textarea,
  .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}


/* ============ TABLET (641px to 1024px) ============ */
@media (min-width: 641px) and (max-width: 1024px) {
  /* Grid adjustments */
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* Gallery grid */
  .gallery-grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* Services overview */
  .services-overview {
    grid-template-columns: 1fr;
  }

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


/* ============ DESKTOP (1025px and up) ============ */
@media (min-width: 1025px) {
  /* Hover effects only on desktop */
  .hover-lift {
    transition: transform var(--transition-base);
  }

  .hover-lift:hover {
    transform: translateY(-4px);
  }
}


/* ============ LARGE DESKTOP (1280px and up) ============ */
@media (min-width: 1280px) {
  /* Increase section padding for larger screens */
  .section {
    padding: var(--space-8) 0;
  }

  /* Hero enhancements */
  .hero__title {
    font-size: var(--text-4xl);
  }
}


/* ============ PRINT STYLES ============ */
@media print {
  /* Hide navigation and footer */
  .nav,
  .footer,
  .lightbox,
  .cta-section {
    display: none !important;
  }

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

  /* Show links */
  a[href]::after {
    content: " (" attr(href) ")";
  }

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

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


/* ============ ACCESSIBILITY - REDUCED MOTION ============ */
@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;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }
}


/* ============ DARK MODE (optional future enhancement) ============ */
@media (prefers-color-scheme: dark) {
  /* Uncomment to enable automatic dark mode */
  /*
  :root {
    --color-bg: #1a1a1a;
    --color-white: #2c2c2c;
    --color-text: #f0f0f0;
    --color-text-light: #b0b0b0;
    --color-border: #3a3a3a;
  }

  .hero__overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7));
  }
  */
}


/* ============ LANDSCAPE MOBILE (height < 500px) ============ */
@media (max-height: 500px) and (orientation: landscape) {
  /* Reduce hero height on landscape mobile */
  .hero {
    min-height: 100vh;
    padding: var(--space-4) 0;
    align-items: center;
    padding-bottom: 0;
  }

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

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

  .hero__scroll-indicator {
    display: none;
  }

  /* Adjust nav */
  .nav__container {
    padding: var(--space-2) var(--space-4);
  }
}


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

  /* Use higher quality images for retina (handled in HTML srcset) */
}
