/* ==========================================================================
   Responsive Styles - Mobile First Approach
   ========================================================================== */

/* Small Tablets (640px and up)
   ========================================================================== */

@media (max-width: 639px) {
  /* Typography scaling for mobile */
  h1 {
    font-size: var(--fs-4xl);
  }

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

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

  /* Mobile navigation */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 70%;
    height: 100vh;
    flex-direction: column;
    background-color: var(--color-white);
    padding: var(--space-4xl) var(--space-xl);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition-slow);
    align-items: flex-start;
    gap: var(--space-lg);
  }

  .nav-menu.active {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }

  /* Reduce section padding on mobile */
  .section {
    padding: var(--space-3xl) 0;
  }

  /* Reduce container padding */
  :root {
    --container-padding: var(--space-md);
  }

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

/* Medium devices (768px and up) - Tablets
   ========================================================================== */

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

  .nav-menu {
    gap: var(--space-2xl);
  }

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

/* Large devices (1024px and up) - Desktop
   ========================================================================== */

@media (min-width: 1024px) {
  h1 {
    font-size: var(--fs-5xl);
  }

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

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

/* Extra large devices (1280px and up)
   ========================================================================== */

@media (min-width: 1280px) {
  :root {
    --fs-5xl: 3.5rem;
    --fs-4xl: 3rem;
  }
}

/* Ultra wide screens (1536px and up)
   ========================================================================== */

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

/* High DPI / Retina Displays
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Ensure images look crisp on retina displays */
  img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Print Styles
   ========================================================================== */

@media print {
  .nav,
  .footer,
  .btn {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  a {
    text-decoration: underline;
  }

  h1, h2, h3 {
    page-break-after: avoid;
  }

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