/* =========================================================
   mobile.css - site-wide mobile responsiveness layer
   Loaded AFTER theme.css on every page. Mobile-only rules.
   ========================================================= */

/* ---- global safety nets (all widths) ---- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img, video, svg, canvas { max-width: 100%; }
img, video { height: auto; }
iframe { max-width: 100%; }
table { max-width: 100%; }

@media (max-width: 991.98px) {
  html, body { overflow-x: clip; }
  /* grid children may never force the grid wider than the screen */
  .dn-menu__grid { grid-template-columns: minmax(0, 1fr); }
  .dn-menu__grid > * { min-width: 0; }
  .dn-dish h4, .dn-dish p { overflow-wrap: anywhere; }
}

@media (max-width: 767.98px) {
  /* comfortable gutters */
  .container, .container-fluid { padding-left: 16px; padding-right: 16px; }
  .container > .row { max-width: 100%; }

  /* readable, wrap-safe type */
  h1, h2, h3, h4, h5, h6, p, li, a { overflow-wrap: break-word; }
  h1 { font-size: clamp(30px, 8.5vw, 40px); line-height: 1.15; }
  h2 { font-size: clamp(26px, 7vw, 34px); line-height: 1.2; }
  h3 { font-size: clamp(21px, 5.8vw, 26px); }

  /* tighter vertical rhythm for big desktop section paddings */
  .rts__section, section { scroll-margin-top: 72px; }
  .rts__section.section__padding,
  .section__padding { padding-top: 56px; padding-bottom: 56px; }

  /* touch-friendly controls; 16px inputs stop iOS auto-zoom on focus */
  input, select, textarea,
  .form-control, .form-select { font-size: 16px !important; }
  input:not([type="checkbox"]):not([type="radio"]), select, .form-select { min-height: 46px; }
  button, .theme-btn, .btn, [role="button"] { min-height: 44px; }

  /* horizontal chip / tab rows scroll instead of overflowing */
  .rm-chips, .at-chips, .dn-mtabs, .of-strip, .am-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .rm-chips::-webkit-scrollbar, .at-chips::-webkit-scrollbar,
  .dn-mtabs::-webkit-scrollbar, .of-strip::-webkit-scrollbar,
  .am-chips::-webkit-scrollbar { display: none; }
  .rm-chip, .at-chip, .dn-mtab { flex: 0 0 auto; white-space: nowrap; }

  /* gallery highlights: 4-col strip -> 2x2 */
  .gl-hl__box { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 6px; }
  .gl-hl__it { padding: 16px 14px; gap: 12px; border-right: 0; border-bottom: 1px solid rgba(96,66,30,.08); min-width: 0; }
  .gl-hl__it:nth-child(odd) { border-right: 1px solid rgba(96,66,30,.08); }
  .gl-hl__it:nth-last-child(-n+2) { border-bottom: 0; }
  .gl-hl__t { min-width: 0; }

  /* home "image card" overlay stays inside the viewport */
  .about__area.is__home__main .image__card { left: 0; right: 0; max-width: 100%; }
  .about__area.is__home__main .image__card .content { max-width: 100%; }

  /* room detail pages: bootstrap gutters must not exceed container */
  .rts__section > .container > .row,
  .container > .row { margin-left: 0; margin-right: 0; --bs-gutter-x: 16px; }

  /* maps / embeds */
  .uc-map, .um-loc__map { min-height: 280px; }

  /* tables scroll rather than squash the page */
  .table-responsive, table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* booking widgets / date pickers fit the screen */
  .flatpickr-calendar { max-width: calc(100vw - 24px); }
  .modal-dialog { margin: 12px; max-width: calc(100vw - 24px); }

  /* footer columns stack with breathing room */
  footer .row > [class*="col-"] { margin-bottom: 20px; }
}

@media (max-width: 575.98px) {
  /* full-width primary actions */
  .theme-btn, .un-show__btn, .um-loc__btn, .un-exp__btn, .at-btn, .sa-btn { max-width: 100%; }
  .gl-hl__ico { width: 40px; height: 40px; flex: 0 0 40px; }
  .gl-hl__t small { font-size: 11px; }
}

@media (max-width: 380px) {
  .container, .container-fluid { padding-left: 12px; padding-right: 12px; }
  .gl-hl__box { grid-template-columns: minmax(0, 1fr); }
  .gl-hl__it, .gl-hl__it:nth-child(odd) { border-right: 0; border-bottom: 1px solid rgba(96,66,30,.08); }
  .gl-hl__it:last-child { border-bottom: 0; }
}

/* landscape phones: don't let hero sections eat the whole screen */
@media (max-height: 480px) and (orientation: landscape) {
  .un-hero, .home-hero, [class*="hero"] { min-height: 0; }
}

/* ---- fix: home page wider than the phone (made phones zoom out / shift content left) ---- */
@media (max-width: 991.98px) {
  /* About "image card": icon + text row must shrink inside the card instead of spilling out of it */
  .about__area .image__card, .about__wrapper .image .image__card {
    box-sizing: border-box; max-width: 100%; padding: 18px 20px 18px 18px; gap: 14px;
  }
  .about__area .image__card .icon, .about__wrapper .image .image__card .icon { flex: 0 0 auto; min-width: 0; }
  .about__area .image__card .content, .about__wrapper .image .image__card .content { min-width: 0; flex: 1 1 0; }
  .about__area .image__card .content p, .about__wrapper .image .image__card .content p { overflow-wrap: anywhere; margin-bottom: 0; }
  /* showcase slides slide in from 28px to the side: never let that widen the page */
  .un-show { overflow-x: clip; }
}
