/* ==========================================================================
   RESPONSIVE.CSS — Mobile-First Media Query Breakpoints
   Plaza Hotel

   Breakpoints:
   - max-width: 1200px  (large desktops / tablets landscape)
   - max-width: 991px   (tablets / hamburger nav)
   - max-width: 767px   (mobile landscape / small tablets)
   - max-width: 480px   (small phones)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. ≤ 1200px — Large Tablets / Small Desktops
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  /* Container padding */
  .container,
  .container-lg {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  /* Reduce grid columns */
  .grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Room detail sidebar narrower */
  .room-detail-layout {
    grid-template-columns: 1fr 300px;
    gap: 2rem;
  }

  /* Footer grid adjust */
  .footer-grid {
    grid-template-columns: 1.25fr 1fr 1fr 1fr;
    gap: 2rem;
  }

  /* Admin sidebar */
  .admin-sidebar {
    width: 220px;
  }

  .admin-main {
    margin-left: 220px;
  }

  /* Gallery grid */
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
  }

  /* Hero booking bar */
  .hero-booking-card {
    gap: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   2. ≤ 991px — Tablets (hamburger nav kicks in)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  /* Navigation — show hamburger, hide desktop menu */
  .nav-menu {
    display: none;
  }

  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  /* 3-col grids → 2-col */
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

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

  /* Asymmetric grids → equal columns */
  .grid-2-1,
  .grid-1-2 {
    grid-template-columns: 1fr;
  }

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

  /* Layout with sidebar → single column */
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  /* Room detail stacks */
  .room-detail-layout {
    grid-template-columns: 1fr;
  }

  .room-detail-sidebar {
    position: static;
  }

  /* Split sections stack */
  .split-section {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .split-section--reverse .split-content {
    order: unset;
  }

  .split-section--reverse .split-image {
    order: unset;
  }

  /* Footer grid → 2 cols */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  /* Admin sidebar → off-canvas on mobile */
  .admin-sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    bottom: 0;
    width: 260px;
    z-index: var(--z-fixed);
    transition: left var(--transition-slow);
    overflow-y: auto;
  }

  .admin-sidebar.is-open {
    left: 0;
    box-shadow: var(--shadow-xl);
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-topbar {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Stat cards → 2-col */
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Hero stats bar */
  .hero-stats-inner {
    flex-wrap: wrap;
  }

  .hero-stat-item {
    flex: 1 1 50%;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
    padding: 1rem;
  }

  .hero-stat-item:nth-child(odd) {
    border-right: 1px solid rgba(255, 255, 255, 0.10);
  }

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

  /* Amenities grid */
  .amenities-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Room highlights */
  .room-highlights {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   3. ≤ 767px — Mobile (most grids become single column)
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  /* Typography scale down */
  :root {
    --fs-base: 0.9375rem;
  }

  /* Containers tighten */
  .container,
  .container-sm,
  .container-lg {
    padding-right: 1.25rem;
    padding-left: 1.25rem;
  }

  /* Section padding reduces */
  .section {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .section-lg {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  /* All grids → single column */
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

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

  /* Hero text smaller */
  .hero-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-subtitle {
    font-size: var(--fs-sm);
  }

  .hero-content {
    gap: 1.125rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

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

  /* Hero stats bar → hide or simplify */
  .hero-stats-bar {
    display: none;
  }

  /* Hero scroll hint — push up */
  .hero-scroll-hint {
    bottom: 1.25rem;
  }

  /* Hero booking bar stacks */
  .hero-booking-card {
    flex-direction: column;
  }

  .hero-booking-field {
    min-width: 100%;
  }

  /* Inner hero shorter */
  .hero-inner {
    height: 35vh;
    min-height: 220px;
  }

  .hero-inner .hero-title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }

  /* Section titles */
  .section-title {
    font-size: clamp(1.5rem, 5vw, 2rem);
  }

  /* Footer stacks to 1 column */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 2rem;
  }

  .footer-brand {
    grid-column: 1;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.75rem;
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .footer-bottom-links {
    justify-content: center;
  }

  /* Room gallery thumbs — fewer visible */
  .room-gallery-thumbs {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Room meta single row scroll */
  .room-meta {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Room highlights single col */
  .room-highlights {
    grid-template-columns: 1fr;
  }

  /* Amenities grid — 2 cols on mobile */
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Gallery grid → 2 col */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
  }

  .gallery-item--wide,
  .gallery-item--large,
  .gallery-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* Stat cards → 2-col */
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Pagination compact */
  .pagination-btn {
    min-width: 2.25rem;
    height: 2.25rem;
    font-size: var(--fs-xs);
  }

  /* Breadcrumb truncate */
  .breadcrumb {
    font-size: var(--fs-xs);
  }

  /* Floating WhatsApp — avoid overlapping mobile nav */
  .floating-whatsapp {
    bottom: 80px;
  }

  /* Admin panels stack */
  .admin-wrapper {
    flex-direction: column;
  }

  .stat-cards {
    grid-template-columns: 1fr 1fr;
  }

  /* Table responsive always */
  .data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* --------------------------------------------------------------------------
   4. ≤ 480px — Small Phones
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
  /* Containers very tight */
  .container,
  .container-sm,
  .container-lg {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  /* Form rows stack */
  .form-row,
  .form-row-3 {
    grid-template-columns: 1fr;
  }

  /* Room detail layout — single column (already done at 991, ensures sidebar not sticky) */
  .room-detail-layout {
    grid-template-columns: 1fr;
  }

  .room-booking-card {
    box-shadow: none;
    border-radius: 0;
    margin: 0 -1rem;
  }

  /* Room gallery thumbs — 3 cols */
  .room-gallery-thumbs {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Gallery single column */
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .gallery-item {
    aspect-ratio: 4 / 3;
  }

  /* Gallery item wide/tall reset */
  .gallery-item--wide,
  .gallery-item--large,
  .gallery-item--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  /* Gallery filter scroll */
  .gallery-filter {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    scrollbar-width: none;
    gap: 0.375rem;
  }

  .gallery-filter::-webkit-scrollbar {
    display: none;
  }

  .gallery-filter-btn {
    flex-shrink: 0;
  }

  /* Pagination compact — show fewer numbers */
  .pagination {
    gap: 0.25rem;
  }

  .pagination-btn {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.25rem;
    font-size: var(--fs-xs);
  }

  .pagination-prev,
  .pagination-next {
    padding: 0 0.625rem;
  }

  /* Hero actions full width */
  .hero-actions .btn {
    min-width: 0;
    width: 100%;
  }

  /* Booking form tight */
  .booking-form-body {
    padding: 1.5rem 1.25rem;
  }

  .booking-form-footer {
    padding: 1rem 1.25rem 1.25rem;
  }

  .booking-form-hero .booking-form-body {
    padding: 1.5rem 1.25rem;
  }

  /* Footer links columns compact */
  .footer-social {
    justify-content: center;
  }

  /* Stat cards → 1 col */
  .stat-cards {
    grid-template-columns: 1fr;
  }

  /* Amenities 2-col */
  .amenities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Buttons full width on very small screens where sensible */
  .btn-book-now {
    min-width: 0;
    width: 100%;
  }

  /* Card body tighter */
  .card-body {
    padding: 1.125rem;
  }

  /* Section title small */
  .section-title {
    font-size: clamp(1.375rem, 6vw, 1.75rem);
  }

  /* Nav container */
  .nav-container {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  /* Lightbox nav arrows smaller */
  .lightbox-nav-btn {
    width: 40px;
    height: 40px;
    font-size: var(--fs-base);
  }

  /* Admin form */
  .admin-form {
    max-width: 100%;
  }

  /* Admin topbar */
  .admin-topbar {
    flex-wrap: wrap;
    gap: 0.75rem;
  }
}

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

  .hero-bg {
    animation: none;
  }

  .hero-content {
    animation: none;
  }

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

/* --------------------------------------------------------------------------
   6. Print Styles
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .hamburger,
  .mobile-nav,
  .hero-scroll-hint,
  .gallery-filter,
  .lightbox,
  .admin-sidebar,
  .admin-topbar,
  .btn-book-now,
  .floating-whatsapp {
    display: none !important;
  }

  .main-content {
    padding-top: 0;
  }

  .hero {
    min-height: auto;
    height: auto;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }

  a {
    text-decoration: underline;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }
}
