/* ===========================
   RESPONSIVE DESIGN
   Mobile-First Approach
   Vista Arenal Adventure Park
   =========================== */

/* ===========================
   SMALL DEVICES (TABLETS)
   576px and up
   =========================== */

@media (min-width: 576px) {

  /* Container adjustments */
  .container {
    max-width: var(--container-sm);
  }

  /* Hero section improvements */
  .hero-stats {
    gap: var(--space-2xl);
  }

  .hero-cta {
    gap: var(--space-lg);
  }

  /* Adventure cards - 2 columns */
  .adventures-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Contact info - 2 columns */
  .contact-info {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Footer adjustments */
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }

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

/* ===========================
   MEDIUM DEVICES (TABLETS)
   768px and up
   =========================== */

@media (min-width: 768px) {

  /* Container and spacing */
  .container {
    max-width: var(--container-md);
    padding: 0 var(--space-lg);
  }

  /* Typography scaling */
  :root {
    --h1-mobile: clamp(2.5rem, 6vw, 4rem);
    --h2-mobile: clamp(2rem, 5vw, 3rem);
    --h3-mobile: clamp(1.5rem, 4vw, 2rem);
    --body-mobile: clamp(1.125rem, 3vw, 1.25rem);
  }


  /* Hero section */
  .hero-content {
    padding: var(--space-2xl) var(--space-lg);
  }

  .hero-stats {
    justify-content: center;
    gap: var(--space-xl);
  }

  .stat-item {
    min-width: 100px;
  }

  /* About section - side by side */
  .about-content {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
  }

  /* Adventure cards - remain 2 columns but larger */
  .activity-card img {
    height: 300px;
  }

  .activity-content {
    padding: var(--space-md);
  }

  .activity-content h3 {
    font-size: 1.25rem;
  }

  /* Contact section */
  .contact-content {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }

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

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

  .footer-links {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2xl);
  }

  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }

  /* Gallery - 3 columns */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
  }

  /* WhatsApp float positioning */
  .whatsapp-float {
    bottom: var(--space-2xl);
    right: var(--space-xl);
  }

  .whatsapp-float-btn {
    width: 70px;
    height: 70px;
  }
}

/* ===========================
   LARGE DEVICES (DESKTOPS)
   1024px and up
   =========================== */

@media (min-width: 1024px) {

  /* Container scaling */
  .container {
    max-width: var(--container-lg);
  }

  /* Enhanced typography */
  :root {
    --h1-mobile: clamp(3rem, 7vw, 5rem);
    --h2-mobile: clamp(2.25rem, 6vw, 3.5rem);
    --h3-mobile: clamp(1.75rem, 4vw, 2.25rem);
    --body-mobile: 1.125rem;
  }

  /* Section padding increase */
  .adventures-section,
  .about-section,
  .gallery-section,
  .testimonials-section,
  .contact-section {
    padding: var(--space-5xl) 0;
  }

  /* Header enhancements */
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    position: static;
    width: auto;
    height: auto;
    background-color: transparent;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    transform: translateX(0);
    gap: var(--space-xl);
  }

  .nav-list {
    display: flex;
    gap: var(--space-xl);
    margin: 0;
  }

  .nav-list li {
    margin: 0;
  }

  .nav-list a {
    font-size: 1.125rem;
    font-weight: 500;
  }

  .nav-cta {
    margin: 0;
    margin-left: var(--space-lg);
  }

  .nav-container {
    padding: 0 var(--space-xl);
  }

  .nav-brand img {
    height: 60px;
  }

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

  .nav-list a {
    font-size: 1.125rem;
  }

  /* Hero section desktop optimization */
  .hero-content {
    padding: var(--space-3xl) var(--space-xl);
    max-width: 900px;
  }

  .hero-stats {
    gap: var(--space-4xl);
  }

  .stat-item {
    min-width: 120px;
  }

  .hero-cta {
    gap: var(--space-xl);
  }

  .hero-cta .btn {
    padding: var(--space-md) var(--space-xl);
    font-size: 1.125rem;
  }

  /* Adventure cards - 3 columns */
  .adventures-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2xl);
  }

  .activity-card img {
    height: 280px;
  }

  .activity-content {
    padding: var(--space-xl);
  }

  /* About section enhancement */
  .about-content {
    gap: var(--space-4xl);
  }

  .about-image {
    order: 2;
  }

  .about-text {
    order: 1;
  }

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

  /* Contact section desktop layout */
  .contact-content {
    grid-template-columns: 2fr 1fr;
    gap: var(--space-4xl);
    max-width: 1000px;
    text-align: left;
  }

  .contact-info {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .contact-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  /* Footer desktop layout */
  .footer-content {
    grid-template-columns: 2fr 2fr 1fr;
  }

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

  /* Enhanced hover effects for desktop */
  .nav-list a {
    position: relative;
    transition: all var(--transition-fast);
  }

  .nav-list a:hover {
    transform: translateY(-2px);
  }

  .activity-card:hover {
    transform: translateY(-12px);
  }

  .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }
}

/* ===========================
   EXTRA LARGE DEVICES
   1440px and up
   =========================== */

@media (min-width: 1440px) {

  /* Maximum container width */
  .container {
    max-width: var(--container-xl);
  }

  /* Enhanced spacing for large screens */
  .nav-container {
    padding: 0 var(--space-2xl);
  }

  .hero-content {
    max-width: 1000px;
    padding: var(--space-4xl) var(--space-2xl);
  }

  /* Section padding for large screens */
  .adventures-section,
  .about-section,
  .gallery-section,
  .testimonials-section,
  .contact-section {
    padding: 6rem 0;
  }

  /* Adventure grid with better spacing */
  .adventures-grid {
    gap: var(--space-3xl);
  }

  /* Gallery can show 5 columns on very large screens */
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  /* Enhanced footer for large screens */
  .footer-content {
    grid-template-columns: 3fr 3fr 2fr;
    gap: var(--space-4xl);
  }

  /* Larger WhatsApp button for large screens */
  .whatsapp-float-btn {
    width: 80px;
    height: 80px;
  }

  .whatsapp-icon-float {
    font-size: 2rem;
  }
}

/* ===========================
   ULTRA WIDE SCREENS
   1920px and up
   =========================== */

@media (min-width: 1920px) {
  .container {
    max-width: var(--container-2xl);
  }

  /* Limit hero content width on ultra-wide */
  .hero-content {
    max-width: 1200px;
  }

  /* Adventure cards - 4 columns for ultra-wide */
  .adventures-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Gallery - 6 columns for ultra-wide */
  .gallery-grid {
    grid-template-columns: repeat(6, 1fr);
  }
}

/* ===========================
   LANDSCAPE PHONE OPTIMIZATIONS
   =========================== */

@media (max-height: 500px) and (orientation: landscape) {

  /* Reduce hero content for landscape phones */
  .hero {
    min-height: 100vh;
  }

  .hero-content {
    padding: var(--space-lg) var(--space-md);
    margin-top: 50px;
  }

  .hero-stats {
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
  }

  .hero-scroll-indicator {
    display: none;
  }

  /* Adjust section padding */
  .adventures-section,
  .about-section,
  .gallery-section,
  .testimonials-section,
  .contact-section {
    padding: var(--space-2xl) 0;
  }
}

/* ===========================
   HIGH DPI DISPLAYS
   =========================== */

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

  /* Ensure crisp rendering on high-DPI displays */
  .nav-brand img,
  .footer-brand img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ===========================
   PRINT STYLES
   =========================== */

@media print {

  /* Hide non-essential elements for printing */
  .nav-toggle,
  .whatsapp-float,
  .hero-scroll-indicator,
  .social-links {
    display: none !important;
  }

  /* Ensure readability in print */
  body {
    color: #000;
    background: #fff;
  }

  .hero {
    min-height: auto;
    page-break-inside: avoid;
  }

  .hero-content {
    color: #000;
  }

  /* Adjust spacing for print */
  .adventures-section,
  .about-section,
  .gallery-section,
  .testimonials-section,
  .contact-section {
    padding: 2rem 0;
  }
}

/* ===========================
   REDUCED MOTION
   =========================== */

@media (prefers-reduced-motion: reduce) {

  /* Respect user's motion preferences */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-scroll-indicator {
    animation: none;
  }

  .whatsapp-float-btn {
    animation: none;
  }
}

/* ===========================
   HIGH CONTRAST MODE
   =========================== */

@media (prefers-contrast: high) {

  /* Enhanced contrast for accessibility */
  :root {
    --primary-green: #006400;
    --accent-blue: #000080;
    --volcano-gray: #000000;
    --earth-brown: #2F1B14;
  }

  .btn {
    border-width: 3px;
  }

  .nav-list a::after {
    height: 3px;
  }
}