/* 
 * RESPONSIVE STYLES 
 */

/* Extra Large (1240px and below) */
@media (max-width: 1240px) {
  h1 { font-size: 4rem; }
  h2 { font-size: 2.5rem; }
}

/* Large (1024px and below) */
@media (max-width: 1024px) {
  :root {
    --space-24: 4rem;
    --space-32: 6rem;
  }
  
  h1 { font-size: 3.5rem; }
  
  .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-cols-3 { grid-template-columns: repeat(2, 1fr); }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
  }

  /* Navigation Mobile */
  .nav-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background: var(--bg-surface);
    flex-direction: column;
    justify-content: center;
    padding: var(--space-8);
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 90;
    border-left: 1px solid var(--border-glass);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-link {
    font-size: var(--text-lg);
    width: 100%;
    text-align: center;
  }
  
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 80;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
  }
  
  .nav-overlay.active {
    opacity: 1;
    pointer-events: all;
  }
  
  .navbar .btn {
    display: none;
  }
}

/* Medium / Tablet (768px and below) */
@media (max-width: 768px) {
  :root {
    --space-24: 3rem;
    --space-32: 4rem;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  
  p { font-size: 1rem; }

  /* Ensure all page headers clear the fixed navbar on mobile */
  header.section, .h-screen {
    padding-top: 120px !important;
  }

  /* Reduce huge gaps on mobile by letting tall sections hug their content */
  .h-screen {
    height: auto !important;
    min-height: auto !important;
    padding-bottom: var(--space-16);
  }

  .grid-cols-2 { grid-template-columns: 1fr; }
  .grid-cols-3 { grid-template-columns: 1fr; }
  .grid-cols-4 { grid-template-columns: 1fr; }

  /* Disable scroll snapping on mobile to prevent trapping in tall sections */
  html {
    scroll-snap-type: none;
  }
  
  .section, .footer {
    scroll-snap-align: none;
    scroll-snap-stop: normal;
  }

  /* Mobile ordering utilities */
  .order-1-mobile { order: 1 !important; }
  .order-2-mobile { order: 2 !important; }

  /* Utilities */
  .flex-col-md {
    flex-direction: column;
  }
  
  .text-center-md {
    text-align: center;
  }
  
  /* Sections */
  .marquee-item {
    font-size: var(--text-lg);
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }
}

/* Small / Mobile (480px and below) */
@media (max-width: 480px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .container {
    padding: 0 var(--space-4);
  }
  
  .section {
    padding: var(--space-12) 0;
  }
  
  .btn {
    width: 100%;
    margin-right: 0 !important;
    margin-bottom: var(--space-4);
    justify-content: center;
  }
  
  .btn:last-child {
    margin-bottom: 0;
  }

  /* Force flex containers with buttons to stack vertically on small screens */
  .flex:has(.btn) {
    flex-direction: column;
    width: 100%;
    gap: var(--space-4) !important;
  }
  
  .glass-card {
    padding: var(--space-6);
  }
  
  .whatsapp-btn {
    bottom: var(--space-4);
    right: var(--space-4);
    width: 50px;
    height: 50px;
    font-size: 24px;
  }
}
