/* ==========================================================================
   John Hay Hotels — Responsive layer
   ========================================================================== */
@media (max-width: 1399.98px) {
  .nav-menu > li > a, .nav-menu > li > button { padding: .8rem .7rem; letter-spacing: .16em; }
  .h-slider { grid-auto-columns: calc((100% - 2 * 1.5rem) / 2.6); }
}

@media (max-width: 1199.98px) {
  :root { --nav-h: 76px; }
  .nav-menu, .nav-actions .btn-jh.nav-book { display: none; }
  .nav-toggle { display: block; }
  .brand img { height: 50px; }
  .topbar .tb-hide-lg { display: none !important; }

  .booking-bar { grid-template-columns: 1fr 1fr 1fr; }
  .booking-bar .bb-field:nth-child(3) { border-right: 0; }
  .booking-bar .bb-field:nth-child(-n+3) { border-bottom: 1px solid var(--jh-line); }
  .booking-bar .bb-submit { grid-column: span 1; }
  .booking-bar .bb-submit .btn-jh { width: 100%; }

  .wing-feature, .wing-feature.reverse { grid-template-columns: 1fr; }
  .wing-feature .wf-body, .wing-feature.reverse .wf-body { margin: -5rem 2rem 0; }
  .wing-feature.reverse .wf-media { order: 0; }

  .bento { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 280px; }
  .bento > :nth-child(1) { grid-column: span 2; grid-row: span 1; }
  .bento > :nth-child(2) { grid-column: span 1; }

  .offer-card { grid-template-columns: 1fr; }
  .offer-card .oc-media { min-height: 260px; }
  .amenity-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 991.98px) {
  body { font-size: 1rem; }
  .section { padding: 5rem 0; }
  .hero-content { padding-bottom: 8rem; }
  .hero-meta { display: none; }
  .booking-bar-wrap { margin-top: -5rem; }

  .intro-collage { padding: 0 0 3rem 2rem; margin-top: 3rem; }
  .intro-collage .ic-badge { right: .8rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }

  .split, .split.reverse { grid-template-columns: 1fr; min-height: 0; }
  .split .split-media { min-height: 380px; order: 0 !important; }

  .masonry { column-count: 2; }
  .gallery-preview { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 200px; }
  .gallery-preview .g-item:nth-child(n) { grid-column: span 1; grid-row: span 1; }
  .gallery-preview .g-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }

  .room-slider { aspect-ratio: 4 / 3; }
  .room-facts { grid-template-columns: repeat(2, 1fr); }
  .room-facts div:nth-child(2) { border-right: 0; }
  .room-facts div:nth-child(-n+2) { border-bottom: 1px solid var(--jh-line); }
  .booking-card { position: static; margin-top: 3rem; }

  .steps { grid-template-columns: 1fr; }
  .perk-strip { grid-template-columns: repeat(2, 1fr); }
  .perk-strip div:nth-child(2) { border-right: 0; }
  .perk-strip div:nth-child(-n+2) { border-bottom: 1px solid var(--jh-line); }

  .sub-nav { top: 60px; }
  .footer-cta { text-align: center; }
  .footer-cta .d-flex { justify-content: center !important; }
}

@media (max-width: 767.98px) {
  /* Prevent iOS auto-zoom on input focus — minimum 16px font */
  input, select, textarea { font-size: 16px; }
  .booking-bar input, .booking-bar select { font-size: 18px; }
  .form-jh .form-control, .form-jh .form-select { font-size: 16px; }
  .stepper input { font-size: 18px; }
  :root { --nav-h: 68px; }
  html { scroll-padding-top: 80px; }
  .topbar { display: none; }
  .main-nav { padding: .7rem 0; }
  .brand img, .site-header.scrolled .brand img { height: 44px; }

  .hero { min-height: 92svh; align-items: flex-end; }
  .hero-content { padding-top: 7rem; padding-bottom: 7.5rem; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.4rem); }
  .hero p.hero-sub { font-size: 1.05rem; }
  .hero .hero-actions { flex-direction: column; align-items: stretch; }

  .booking-bar-wrap { margin-top: -4.5rem; }
  .booking-bar { grid-template-columns: 1fr 1fr; }
  .booking-bar .bb-field { padding: 1rem 1.1rem; border-bottom: 1px solid var(--jh-line); }
  .booking-bar .bb-field:nth-child(odd) { border-right: 1px solid var(--jh-line); }
  .booking-bar .bb-field:nth-child(even) { border-right: 0; }
  .booking-bar .bb-field:nth-child(5) { grid-column: span 2; border-right: 0; }
  .booking-bar .bb-submit { grid-column: span 2; }
  .booking-bar input, .booking-bar select { font-size: 1.15rem; }

  .h-slider { grid-auto-columns: 78%; gap: 1rem; }
  .wing-feature .wf-body, .wing-feature.reverse .wf-body { margin: -3rem 1rem 0; padding: 2rem 1.5rem; }

  .bento { grid-template-columns: 1fr; grid-auto-rows: 300px; }
  .bento > :nth-child(n) { grid-column: span 1; }
  .feature-tile p { max-height: none; opacity: 1; }

  .masonry { column-count: 1; }
  .gallery-filters { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: .5rem; margin-left: -12px; margin-right: -12px; padding-left: 12px; scrollbar-width: none; }
  .gallery-filters button { flex-shrink: 0; }
  .gallery-preview { grid-auto-rows: 150px; gap: .6rem; }

  .room-tile .rt-body { transform: none; }
  .room-tile .rt-cta { opacity: 1; }

  .ticket { grid-template-columns: 1fr; }
  .ticket .t-main { border-right: 0; border-bottom: 2px dashed rgba(255,255,255,.22); padding: 2rem 1.6rem; }
  .ticket .t-stub { width: 100%; flex-direction: row; gap: 1rem; }
  .ticket .t-stub img { margin: 0; }
  .ticket::before, .ticket::after { display: none; }
  .ticket .t-prices { gap: 1.8rem; }

  .amenity-grid { grid-template-columns: 1fr; }
  .room-header { padding-top: calc(var(--nav-h) + 2.5rem); }
  .room-nav span { font-size: 1.3rem; }

  .lb-prev, .lb-next { top: auto; bottom: 1.5rem; transform: none; }
  .lb-prev { left: calc(50% - 70px); }
  .lb-next { right: calc(50% - 70px); }

  .page-hero { min-height: 68vh; }
  .page-hero.short { min-height: 50vh; }

  .perk-strip { grid-template-columns: 1fr; }
  .perk-strip div { border-right: 0 !important; border-bottom: 1px solid var(--jh-line); }
  .perk-strip div:last-child { border-bottom: 0; }

  .footer-links { columns: 2; }
  .footer-bottom { text-align: center; }
  .footer-bottom .fb-links { justify-content: center; }

  /* Deliberate mobile booking bar */
  .mobile-book { display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1025; background: var(--jh-forest); box-shadow: 0 -10px 30px -10px rgba(0,0,0,.4); transform: translateY(100%); transition: transform .45s var(--ease); padding-bottom: env(safe-area-inset-bottom); }
  .mobile-book.show { transform: none; }
  .mobile-book a { display: flex; align-items: center; justify-content: center; gap: .5rem; padding: 1rem; font-family: var(--font-accent); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: #fff; }
  .mobile-book a.mb-primary { background: var(--jh-gold); color: var(--jh-forest); }
  body.has-mobile-book .float-wa { bottom: 4.6rem; }
  body.has-mobile-book .to-top { bottom: 8.6rem; }
  body.has-mobile-book .site-footer { padding-bottom: 3.5rem; }
  .daytour-toast { left: .8rem; bottom: 4.6rem; grid-template-columns: 96px 1fr; }
  .float-wa { width: 52px; height: 52px; right: 1rem; font-size: 1.4rem; }
  .to-top { right: 1.1rem; }
}

@media (max-width: 575.98px) {
  .section-head { margin-bottom: 2.2rem; }
  .btn-jh { padding: .95rem 1.5rem; letter-spacing: .2em; }
  .intro-collage { padding: 0 0 2.5rem 1.2rem; }
  .intro-collage .ic-small { width: 52%; border-width: 6px; }
  .intro-collage .ic-badge { padding: 1rem 1.1rem; top: 1.2rem; }
  .ic-badge strong { font-size: 2.1rem; }
  .room-facts { grid-template-columns: 1fr 1fr; }
  .room-facts div { padding: 1.1rem 1rem; }
  .room-facts strong { font-size: 1.1rem; }
  .contact-card a, .contact-card span { font-size: 1.15rem; }
  .offer-card .oc-body { padding: 2rem 1.5rem; }
  .form-panel { padding: 1.8rem 1.3rem; }
  .summary-box dl { grid-template-columns: 1fr; }
  .summary-box dd { text-align: left; margin-bottom: .4rem; }
}

@media (hover: none) {
  .feature-tile p { max-height: none; opacity: 1; }
}
@media (min-width: 992px) {
  .cta-band.parallax .cta-bg { background-attachment: scroll; }
}

/* Keep large gutters from overflowing narrow containers */
@media (max-width: 991.98px) {
  .row.g-5, .row.g-xl-5 { --bs-gutter-x: 1.5rem; }
}
html { overflow-x: clip; }
