/* ==========================================================================
   Responsive Design & Media Queries
   ========================================================================== */

/* 1280px (Large Desktops) */
@media (max-width: 1280px) {
  .container {
    max-width: 1024px;
  }
}

/* 1024px (Laptops & iPads Landscape) */
@media (max-width: 1024px) {
  :root {
    --spacing-4xl: 4rem;
  }
  
  .container {
    max-width: 768px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
  
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* 768px (Tablets Portrait & Mobile Navigation) */
@media (max-width: 768px) {
  :root {
    --spacing-4xl: 3rem;
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }

  /* Navigation */
  .mobile-menu-btn {
    display: block;
    z-index: 101;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-xl);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease-in-out;
    z-index: 100;
  }
  
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.5rem;
  }

  .header-actions .btn {
    display: none; /* Hide primary header button on mobile to save space */
  }

  /* Grids */
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: var(--spacing-md);
    text-align: center;
  }

  /* Hero adjustments for mobile */
  .hero-content {
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
    flex-direction: column;
    width: 100%;
  }
  
  .hero-buttons .btn {
    width: 100%;
  }
}

/* 414px (Mobile Devices) */
@media (max-width: 414px) {
  h1 {
    font-size: 2.25rem;
  }
  h2 {
    font-size: 1.75rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  /* Mobile CTA Bar */
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 90;
  }
  
  .mobile-cta-bar a {
    flex: 1;
    text-align: center;
    padding: var(--spacing-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-right: 1px solid var(--border-color);
  }
  .mobile-cta-bar a:last-child {
    border-right: none;
    background-color: var(--primary-color);
    color: var(--text-light);
  }
  
  /* Adjust body padding so footer content isn't hidden behind the fixed bar */
  body {
    padding-bottom: 60px; 
  }
  
  /* Move WhatsApp float up so it doesn't overlap mobile bar */
  .whatsapp-float {
    bottom: 80px;
    padding: 10px;
  }
  .whatsapp-float span {
    display: none; /* Icon only on very small screens */
  }
}

/* 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;
  }
}
