/* ============================================================
   ROYAL HERITAGE RESORT — Responsive
   ============================================================
   Mobile-first breakpoints: 360px, 768px, 1024px, 1440px
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   MOBILE (≤ 768px)
   ════════════════════════════════════════════════════════════ */

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

  /* Nav */
  .main-nav,
  .header-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* Hero stack vertically on mobile */
  .hero {
    min-height: auto;
    height: auto;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 90px;
    padding-bottom: 24px;
    overflow: hidden;
  }

  .hero-content {
    padding: var(--space-4);
    margin-bottom: var(--space-2);
  }

  .hero-title {
    font-size: clamp(2rem, 7vw, 2.6rem);
    line-height: 1.1;
    margin-bottom: var(--space-4);
  }

  .hero-subtitle {
    font-size: var(--fs-small);
    margin-bottom: var(--space-6);
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    width: 100%;
    max-width: 320px;
    margin: 0 auto var(--space-6);
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-scroll {
    display: none;
  }

  /* Booking widget stacks vertically and centers on mobile without overflow */
  .booking-widget {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    flex-direction: column;
    padding: var(--space-5);
    gap: var(--space-4);
    width: 100%;
    max-width: calc(100% - var(--space-8));
    margin: var(--space-6) auto 0;
    z-index: 10;
  }

  /* Prevent keyframe layout breakage on mobile */
  .hero-enter .booking-widget {
    transform: translateY(20px);
    animation: mobileWidgetFadeUp 0.8s var(--ease-out) 1.2s forwards;
  }

  .booking-widget .form-group {
    min-width: unset;
    width: 100%;
  }

  .booking-widget .btn {
    width: 100%;
  }

  /* Grids collapse */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .grid-auto {
    grid-template-columns: 1fr;
  }

  /* Split stacks */
  .split {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }

  .split.reverse {
    direction: ltr;
  }

  .split-image img {
    aspect-ratio: 16 / 10;
  }

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

  .footer-bottom {
    flex-direction: column;
    gap: var(--space-4);
    text-align: center;
  }

  .footer-legal {
    justify-content: center;
  }

  /* Section padding reduced */
  .section-padding {
    padding: var(--space-12) 0;
  }

  .section-padding-lg {
    padding: var(--space-16) 0;
  }

  /* Form row stacks */
  .form-row {
    flex-direction: column;
    gap: var(--space-4);
  }

  /* Testimonials */
  .testimonial-card {
    padding: var(--space-6);
  }

  /* CTA section */
  .cta-section {
    padding: var(--space-16) 0;
  }

  /* Toast */
  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
    bottom: var(--space-4);
  }

  .toast {
    min-width: unset;
    width: 100%;
  }
}


/* ════════════════════════════════════════════════════════════
   SMALL MOBILE (≤ 400px)
   ════════════════════════════════════════════════════════════ */

@media (max-width: 400px) {
  .hero-title {
    font-size: 2.2rem;
  }
}


/* ════════════════════════════════════════════════════════════
   TABLET (769px — 1024px)
   ════════════════════════════════════════════════════════════ */

@media (min-width: 769px) and (max-width: 1024px) {
  /* Nav: show some links, hide others if too many */
  .main-nav {
    gap: var(--space-1);
  }

  .nav-link {
    font-size: var(--fs-xs);
    padding: var(--space-2);
  }

  /* Grid adjustments */
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

  /* Booking widget */
  .booking-widget {
    flex-wrap: wrap;
    gap: var(--space-4);
  }

  .booking-widget .form-group {
    flex: 1 1 calc(50% - var(--space-4));
    min-width: 160px;
  }
}


/* ════════════════════════════════════════════════════════════
   DESKTOP (1025px — 1440px)
   ════════════════════════════════════════════════════════════ */

@media (min-width: 1025px) and (max-width: 1440px) {
  .container {
    max-width: 1100px;
  }
}


/* ════════════════════════════════════════════════════════════
   LARGE DESKTOP (1441px+)
   ════════════════════════════════════════════════════════════ */

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

  .hero-content {
    max-width: 900px;
  }
}


/* ════════════════════════════════════════════════════════════
   LANDSCAPE PHONE
   ════════════════════════════════════════════════════════════ */

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: var(--space-20) 0 var(--space-16);
  }

  .hero-scroll {
    display: none;
  }
}


/* ════════════════════════════════════════════════════════════
   HOVER-CAPABLE DEVICES ONLY
   ════════════════════════════════════════════════════════════ */

@media (hover: none) {
  .card:hover {
    transform: none;
    box-shadow: var(--shadow-sm);
  }

  .feature-card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }

  .split-image::after {
    display: none;
  }
}
