/* Shared responsive corrections, after the individual page styles. */
@media screen and (max-width:1100px) {
  .food-directory .food-controls {grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media screen and (max-width:980px) {
  .home-guide .huahine-hero {height:auto;min-height:530px}
  .home-guide .hero-content {padding:calc(var(--header) + 60px) 0 120px}
}

/* Credits stay in normal flow so long titles and buttons cannot collide. */
@media screen and (max-width:900px) {
  .page-hero {display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:1fr auto;align-items:stretch}
  .page-hero .page-hero-media,.page-hero .page-hero-media>figure {display:contents}
  .page-hero .page-hero-inner {grid-area:1/1;align-self:center;padding-block:60px 24px}
  .page-hero .page-hero-media figcaption {position:relative;grid-area:2/1;inset:auto;justify-self:center;width:91%;max-width:none;margin:0;padding:0 0 24px;text-align:left;font-size:12px;line-height:1.6}
  .page-hero .page-hero-media figcaption a {margin-left:8px}
  .page-hero .page-hero-copy {max-width:none}
}

@media screen and (max-width:650px) {
  .header .map-nav {display:inline-flex;align-items:center;justify-content:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;gap:0;line-height:1;box-sizing:border-box}
  .header .map-nav>span {display:none}
  .header .map-nav>svg {display:block;flex:0 0 20px;width:20px;height:20px;margin:0}
  .home-guide .huahine-hero {height:auto;min-height:590px}
  .home-guide .hero-content {padding:calc(var(--header) + 60px) 0 120px}
  .home-guide .hero-caption {bottom:22px;max-width:88%;line-height:1.5}
  .home-guide .hero-actions {max-width:none}
  .food-directory .food-controls {grid-template-columns:repeat(2,minmax(0,1fr))}
  .food-controls input,.food-controls select {min-width:0;font-size:16px}
  .stay-detail-section .stay-map-link {right:12px;left:12px;justify-content:center;font-size:14px;text-align:center}
  .stay-gallery,.food-gallery {min-width:0}
  .footer-quicklinks {grid-template-columns:repeat(2,minmax(0,1fr))}
  .footer-quick-link {min-width:0}
  .footer-quick-link svg {flex-shrink:0}
  .footer-ending {flex-wrap:wrap;gap:4px 20px}
  .footer-ending a {max-width:none}
  .footer-ending .footer-back-top {white-space:normal}
  .trip-item-fields>label,.trip-toolbar label,.stay-form-grid label {min-width:0}
  input[type=date],input[type=time] {max-width:100%;min-width:0}
  .property-lightbox {max-height:calc(100dvh - 24px);overflow-y:auto}
  .lightbox-stage {min-width:0}
  .lightbox-toolbar {position:sticky;top:0;z-index:2;background:var(--forest)}
  .map-page .map-surface {height:clamp(320px,48dvh,440px);min-height:320px}
  .map-page.list-view .map-surface {height:240px;min-height:240px}
}

@media screen and (max-width:370px) {
  .home-shortcuts>a {display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:16px 10px}
  .home-shortcuts>a:after {display:none}
  .home-shortcuts>a>span {font-size:16px}
  .home-shortcuts small {margin-top:5px}
  .home-essential-grid {grid-template-columns:1fr}
  .home-essential-grid img {height:170px}
  .home-essential-grid h3 {font-size:21px}
  .home-essential-grid p {font-size:16px}
  .food-directory .food-controls {grid-template-columns:minmax(0,1fr)}
  .directory-controls>label:not(.search-form) {flex-basis:100%;min-width:0}
  .footer-quicklinks {grid-template-columns:minmax(0,1fr)}
  .trip-item-fields {grid-template-columns:minmax(0,1fr)}
}

@media screen and (max-height:500px) and (max-width:1160px) {
  .header .mobile-menu-content {padding-top:14px}
  .mobile-menu-heading {padding-bottom:10px}
  .mobile-nav-group>summary {min-height:56px;font-size:22px;padding-block:12px}
  .lightbox-stage img {max-height:45dvh}
}
