/* Port & Palate · screen-size fixes (v1, 2026-11-18)
   Layout only: no copy, tracking, ad-code or link changes.
   Loaded right after site.css on every page (one line in templates/layout.php).
     phone    < 768px    one column, centred
     tablet   768–1023   the phone layout in a centred ~720px column
     desktop  >= 1024    two columns where they help, images contained
*/

/* ---------- all widths ---------- */

/* Header scrolls away with the page (no sticky header). It only pins
   while the phone menu is open, so the menu lines up under it. */
.site-header { position: relative; }
.site-header:has(.nav.is-open) { position: sticky; top: 0; }
/* While the phone menu is open, drop the header's frosted-glass effect. That effect boxed
   the full-screen menu inside the 72px header, so only one link showed (a bug on the live site). */
.site-header:has(.nav.is-open) { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--paper); }
html { scroll-padding-top: 16px; }
.prose h2 { scroll-margin-top: 16px; }

/* Logo and header buttons share the row and never overlap */
.site-header__inner { gap: 16px; }
.logo { min-width: 0; }
.logo__word { white-space: nowrap; }
.header-actions { flex: none; }

/* Buttons: icon + label centred together as one unit */
.btn { justify-content: center; text-align: center; }
.btn > .icon, .btn > svg { flex: none; }

/* Long words, web addresses and emails wrap instead of spilling */
p, li, dd, dt, td, th, figcaption, blockquote, summary, label, .card__title, .venue__name { overflow-wrap: break-word; }
.prose a, .sources a, .site-footer a, .venue__foot a { overflow-wrap: anywhere; }

/* Category labels above headlines wrap onto two lines instead of running off the edge */
.eyebrow { flex-wrap: wrap; max-width: 100%; row-gap: .3em; }
.eyebrow a, .eyebrow span { min-width: 0; overflow-wrap: anywhere; }

/* Label + value rows: label wraps, value stays on one line */
.grid > *, .featured-grid > *, .layout > *, .calc__res > *, .venue__facts > *, .glance > *, .areas__list > *, .traveler-list li > *, .day__list li > * { min-width: 0; }
.glance dt, .venue__facts dt, .calc__res dt, .calc__field { min-width: 0; overflow-wrap: break-word; }
.calc__res dd { white-space: nowrap; }

/* Photos keep their subject in frame at every size */
.card__media img, .card__media .art { object-position: 50% 45%; }
.article-hero img { object-position: 50% 50%; }

/* ---------- phone + tablet (< 1024px) ---------- */
/* The closed slide-out menu (used up to 1080px) no longer sits off to the right.
   That made every page sideways-scrollable on phones and tablets. */
@media (max-width: 1080px) {
  .nav { transform: none; opacity: 0; transition: opacity .2s var(--ease), visibility .2s; }
  .nav.is-open { opacity: 1; }
}

@media (max-width: 1023px) {

  /* Bigger tap targets */
  .icon-btn { width: 44px; height: 44px; }
  .chip { min-height: 40px; }
  .share a, .share button { padding: 9px 14px; }
  .pager a { min-width: 44px; height: 44px; }

  /* One column */
  .grid--2, .grid--3, .grid--4, .featured-grid, .hero__inner, .page-hero__inner, .newsletter, .promise,
  .areas__list, .layout, .site-footer__top { grid-template-columns: minmax(0, 1fr); }
  .dest-grid, .dest-grid--hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }  /* destination tiles stay two-up, as on phones before */
  .card--row { flex-direction: column; }
  .card--row .card__media { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .traveler-list li, .day__list li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .layout__side { order: 2; }
  .side-sticky { position: static; }

  /* Hero: photo on top, words underneath (as on phones before) */
  .hero--photo { display: flex; flex-direction: column; align-items: stretch; min-height: 0; background: var(--paper); }
  .hero--photo::before { display: none; }
  .hero--photo .hero__photo { display: block; position: relative; width: 100%; aspect-ratio: 16 / 9; }
  .hero--photo .hero__photo img { object-position: 40% 70%; }
  .hero--photo .hero__inner { padding-block: 24px 8px; }
  .hero--photo .hero__copy { max-width: none; }
  .hero__art { max-width: 460px; width: 100%; margin: 8px auto 0; aspect-ratio: 1 / .78; }
  .page-hero__art { display: none; }
  .page-hero__art--photo { display: block; aspect-ratio: 16 / 9; transform: none; box-shadow: var(--shadow); margin-top: 4px; max-width: 100%; }
  .page-hero__art--photo img { object-position: center; }

  /* Centred headings and calls to action; long-form reading text stays left-aligned */
  .hero__copy, .page-hero__copy, .band__head, .block__head, .newsletter, .notfound, .empty { text-align: center; }
  .hero__lede, .page-hero__lede, .band__sub { margin-inline: auto; }
  .hero__actions, .hero .chip-row, .page-hero .chip-row, .page-hero .crumbs ol, .block__head, .band__head, .newsletter__form, .footer-signup { justify-content: center; }
  .hero__search { margin-inline: auto; }
  .block__head, .band__head { flex-direction: column; align-items: center; }
  .footer-signup__consent, .newsletter__consent { text-align: left; }

  /* Small print a little larger */
  .card__type, .card__meta, .crumbs ol, .byline, .disclosure, .sources__meta, .venue__foot, .site-footer__bottom { font-size: max(.9rem, 15px); }
  .eyebrow, .kicker, .site-footer h2 { font-size: max(.8rem, 13px); }

  /* Trim tall empty gaps between sections */
  .block { padding-top: 32px; }
  .band { padding: 36px 0; margin-top: 32px; }
  .band--sea { padding-top: 64px; }
  .newsletter { margin: 32px 0; }
  .site-footer { margin-top: 40px; padding-top: 40px; }
  .faq, .hub-about { margin-top: 32px; }
}

/* Phone: footer link lists stay two-up (short links); one column under 360px */
@media (max-width: 359px) {
  .site-footer__cols { grid-template-columns: minmax(0, 1fr); }
  .logo { gap: 7px; }
  .logo__mark { width: 34px; height: 34px; }
  .logo__word { font-size: 1.12rem; }
  .site-header__inner { gap: 8px; }
  .header-actions { gap: 0; margin-left: auto; }
}

/* Tablet: the phone layout in a centred ~720px column */
@media (min-width: 768px) and (max-width: 1023px) {
  .wrap { max-width: calc(720px + 2 * var(--gutter)); }
  .hero--photo .hero__photo { max-width: 720px; margin: 24px auto 0; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
  .site-footer__cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Hub and destination photos become a shorter banner so they don't push the content down */
  .page-hero__art--photo { aspect-ratio: 21 / 9; }
  .hero--photo .hero__photo { aspect-ratio: 2 / 1; }
  /* Article cards one per row: wider photo so each card isn't a screen tall */
  .card__media, .card--row .card__media, .card--feature .card__media { aspect-ratio: 2 / 1; }
}

/* Desktop: images stay inside the layout as a contained column */
@media (min-width: 1024px) {
  .article-hero .art, .article-hero img { max-height: 520px; }
}

/* ---------- added after visual review ---------- */

/* Breadcrumb: the current page keeps its "/" and shortens with "…" instead of leaving a lone "/" */
.crumbs li:last-child { display: flex; flex: 0 1 auto; min-width: 0; }
.crumbs li:last-child::before { flex: none; }
.crumbs [aria-current] { min-width: 0; }

@media (max-width: 1023px) {
  /* Comparison tables scroll sideways inside their box: row labels stay pinned on the left,
     and a soft shadow on the right edge shows there are more columns */
  .table-scroll { background:
      linear-gradient(to right, var(--white) 30%, rgba(255,255,255,0)) left center / 40px 100% no-repeat local,
      linear-gradient(to left, var(--white) 30%, rgba(255,255,255,0)) right center / 40px 100% no-repeat local,
      linear-gradient(to left, rgba(21,35,63,.16), rgba(21,35,63,0)) right center / 14px 100% no-repeat scroll,
      var(--white); }
  .compare tbody th, .compare thead th:first-child { position: sticky; left: 0; z-index: 1; }
  .compare thead th:first-child { background: var(--ink); }
  .compare tbody th { box-shadow: 1px 0 0 var(--line); }

  /* Form fields at 16px so iPhones don't zoom the page when one is tapped */
  input, select, textarea { font-size: max(16px, 1em); }

  /* Calculator labels and the "sample values" flag a little larger */
  .calc__res dt, .calc__field, .venue__facts dt, .glance dt { font-size: max(.9rem, 15px); }
  .block-card__flag { font-size: max(.8rem, 13px); line-height: 1.3; }
  .footer-signup__consent, .newsletter__consent { font-size: max(.85rem, 14px); }
}
