/* Responsive Overrides for Wildernest PHP Version */

/* Mobile First Approach - Base styles for mobile (320px+) */

/* Extra Small Devices (320px - 479px) */
@media (max-width: 479px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Typography adjustments for very small screens */
  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  h2 {
    font-size: 1.75rem;
    line-height: 1.3;
  }

  h3 {
    font-size: 1.5rem;
    line-height: 1.4;
  }

  /* Button adjustments */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
  }

  /* Card spacing */
  .card {
    margin-bottom: 1rem;
  }

  /* Section padding */
  .section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* Small Devices (480px - 767px) */
@media (min-width: 480px) and (max-width: 767px) {
  .container {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  /* Grid adjustments */
  .grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Navigation adjustments */
  .mobile-nav {
    width: 85%;
  }
}

/* Medium Devices - Tablets (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  /* Header adjustments */
  .header-desktop {
    display: none;
  }

  .header-mobile {
    display: flex;
  }

  /* Grid layouts for tablets */
  .tablet-grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .tablet-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Image gallery adjustments */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Form layouts */
  .form-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Large Devices - Small Desktops (1024px - 1279px) */
@media (min-width: 1024px) and (max-width: 1279px) {
  /* Navigation shows desktop version */
  .header-mobile {
    display: none;
  }

  .header-desktop {
    display: flex;
  }

  /* Container max-width */
  .container {
    max-width: 1024px;
  }

  /* Grid layouts */
  .desktop-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .desktop-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Extra Large Devices - Large Desktops (1280px - 1535px) */
@media (min-width: 1280px) and (max-width: 1535px) {
  .container {
    max-width: 1280px;
  }

  /* Larger spacing for bigger screens */
  .section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }
}

/* 2XL Devices - Very Large Desktops (1536px+) */
@media (min-width: 1536px) {
  .container {
    max-width: 1536px;
  }

  /* Maximum spacing */
  .section {
    padding-top: 8rem;
    padding-bottom: 8rem;
  }

  /* Typography scaling for large screens */
  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 3rem;
  }
}

/* Landscape Orientation Adjustments */
@media (orientation: landscape) and (max-height: 600px) {
  /* Reduce vertical padding in landscape mode */
  .section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  /* Hero section adjustments */
  .hero-section {
    min-height: 100vh;
  }

  /* Mobile menu adjustments */
  .mobile-sidebar {
    width: 60%;
  }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  /* Sharper images for retina displays */
  .hero-bg {
    background-image: url('../images/Home/hero@2x.webp');
  }
}

/* Print Styles */
@media print {
  /* Hide navigation and interactive elements */
  .header,
  .footer,
  .mobile-menu,
  .btn,
  .fixed,
  .sticky {
    display: none !important;
  }

  /* Adjust colors for print */
  * {
    color: #000 !important;
    background: #fff !important;
  }

  /* Page breaks */
  .section {
    page-break-inside: avoid;
  }

  h1,
  h2,
  h3 {
    page-break-after: avoid;
  }
}

/* Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  /* Disable animations for users who prefer reduced motion */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1a1a1a;
    --text-primary: #ffffff;
    --bg-secondary: #2d2d2d;
    --text-secondary: #e5e5e5;
  }
}

/* Focus Styles for Accessibility */
@media (any-hover: none) {
  /* Touch device specific styles */
  .hover\:scale-105:hover {
    transform: none;
  }

  /* Larger touch targets */
  .btn,
  .nav-link,
  .card {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Container Queries (Future-proofing) */
@container (min-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@container (min-width: 1024px) {
  .card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Specific Component Responsive Overrides */

/* Gallery Component */
@media (max-width: 767px) {
  .gallery-item {
    grid-column: span 1;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .gallery-item {
    grid-column: span 1;
  }

  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Room Details Component */
@media (max-width: 1023px) {
  .room-sidebar {
    position: static;
    margin-top: 2rem;
  }
}

/* Booking Form Component */
@media (max-width: 767px) {
  .booking-form .form-row {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .booking-form .form-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Activities Grid */
@media (max-width: 767px) {
  .activities-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .activities-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .activities-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Footer Responsive */
@media (max-width: 767px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Utility Classes for Responsive Design */
.mobile-only {
  display: block;
}

.tablet-only,
.desktop-only {
  display: none;
}

@media (min-width: 768px) {
  .mobile-only {
    display: none;
  }

  .tablet-only {
    display: block;
  }
}

@media (min-width: 1024px) {
  .tablet-only {
    display: none;
  }

  .desktop-only {
    display: block;
  }
}
