/*
 * Never Bored CMS: the few styles built pages need beyond css/site.css.
 * Written by the CMS build to /assets/nbcms.css and linked after site.css.
 * At cutover these rules can move into css/site.css and this file can go.
 */

/* The main card grids (homepage, All guides, categories): smaller cards, four
   across on desktop, three on tablets, two on phones. Cards keep their own
   height (a tall reel card next to a shorter guide card), instead of the short
   ones being stretched with empty space. The curated strips are unchanged. */
.card-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3, 0.75rem);
  align-items: start;
}

@media (min-width: 640px) {
  .card-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5, 1.5rem);
  }
}

@media (min-width: 1000px) {
  .card-grid--compact {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Reel cards: the whole vertical reel frame fills the card, uncropped. */
.card--portrait .card-media img {
  aspect-ratio: auto;
  width: 100%;
  height: auto;
}

/* Article pages built by the CMS: pieces the hand-written guides never needed. */
.article-figure--wide { max-width: none; }
.article-figure--wide img { aspect-ratio: auto; }
.faq { margin: var(--space-5, 1.5rem) 0; }
.faq-item { border: 1px solid var(--color-border, #ecdfd0); border-radius: var(--radius-md, 14px); background: var(--color-surface, #fff); padding: 0 var(--space-4, 1rem); margin-bottom: var(--space-2, .5rem); }
.faq-item summary { cursor: pointer; font-weight: 700; padding: var(--space-3, .75rem) 0; }
.faq-item p { margin: 0 0 var(--space-3, .75rem); }
.article-tags { font-size: .9rem; color: var(--color-ink-soft, #4b5563); margin: var(--space-5, 1.5rem) 0; }
.article-tags a { text-decoration: underline; }
.related { margin: var(--space-6, 2rem) 0; }
.related h2 { margin-bottom: var(--space-4, 1rem); }
.ad-slot--live { min-height: 280px; border: 0; background: transparent; }
.disclosure { font-size: .9rem; color: var(--color-ink-soft, #4b5563); margin: var(--space-3, .75rem) 0 0; }
.filter-status { text-align: center; color: var(--color-ink-soft, #4b5563); font-size: .9rem; min-height: 1.4em; margin: var(--space-4, 1rem) 0 0; }
.filter-status:empty { margin: 0; min-height: 0; }
.filter-more[hidden] { display: none; }

/* Map teaser on the homepage: a still picture inside a link */
.map-teaser { display: block; position: relative; border-radius: var(--radius-lg, 18px); overflow: hidden; border: 1px solid var(--color-border, #ecdfd0); background: var(--color-surface, #fff); text-decoration: none; color: inherit; box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,.06)); }
.map-teaser:hover .map-teaser-cta .btn, .map-teaser:focus-visible .map-teaser-cta .btn { transform: translateY(-1px); }
.map-teaser-tiles { display: block; position: relative; width: 100%; aspect-ratio: 3 / 2; overflow: hidden; background: #e8ebe4; pointer-events: none; }
.map-teaser-tiles img { position: absolute; display: block; object-fit: cover; }
.map-teaser-pin { position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--color-accent, #e8603c); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.map-teaser-cta { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(to top, rgba(0,0,0,.28), rgba(0,0,0,0) 55%); }
.map-teaser-attribution { position: absolute; right: 0; bottom: 0; display: block; white-space: nowrap; font-size: .65rem; line-height: 1.3; padding: .15rem .4rem; background: rgba(255,255,255,.8); color: #333; }
.map-teaser-attribution a { color: inherit; display: inline; }
@media (max-width: 640px) { .map-teaser-tiles { aspect-ratio: 4 / 3; } }

/* The map page */
.map-filters { margin-bottom: var(--space-4, 1rem); }
.map-filters .filter-bar { margin-bottom: var(--space-3, .75rem); }
.filter-btn--tag { font-weight: 500; }
.map-filter-note { margin: 0 0 var(--space-4, 1rem); color: var(--color-ink-soft, #4b5563); font-size: .9rem; }
.link-btn { font: inherit; background: none; border: 0; padding: 0; margin-left: .5rem; color: var(--color-accent, #e8603c); text-decoration: underline; cursor: pointer; }
.map-frame { border-radius: var(--radius-lg, 18px); overflow: hidden; border: 1px solid var(--color-border, #ecdfd0); margin-bottom: var(--space-6, 2rem); background: #e8ebe4; }
.map-canvas { height: min(70vh, 640px); min-height: 360px; }
.map-canvas .leaflet-popup-content { margin: .6rem .8rem; font: inherit; }
.map-popup-img { display: block; width: 200px; height: auto; max-height: 150px; object-fit: cover; border-radius: 8px; margin-bottom: .4rem; }
.map-popup-title { display: block; font-size: 1rem; line-height: 1.3; }
.map-popup-place { display: block; color: #4b5563; font-size: .85rem; margin-top: .25rem; }
.map-unavailable { padding: var(--space-6, 2rem); text-align: center; color: var(--color-ink-soft, #4b5563); margin: 0; }
.map-results-heading { font-size: 1.25rem; margin-bottom: var(--space-4, 1rem); }

/* Guide search above the card grids (assets/nbcms.js shows it) */
.card-search { margin: 0 0 var(--space-4, 1rem); max-width: 560px; }
.card-search[hidden] { display: none; }
.card-search-label { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.card-search-field { position: relative; }
.card-search-icon { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--color-ink-soft, #4b5563); pointer-events: none; }
.card-search input { width: 100%; font: inherit; font-size: 1rem; color: var(--color-ink, #1f2937); background: var(--color-surface, #fff); border: 1px solid var(--color-border, #ecdfd0); border-radius: 999px; padding: .7rem 1rem .7rem 2.75rem; box-shadow: var(--shadow-card, 0 1px 2px rgba(31,41,55,.06)); transition: border-color .15s ease, box-shadow .15s ease; -webkit-appearance: none; appearance: none; }
.card-search input::placeholder { color: #a9a29b; }
.card-search input:focus { outline: none; border-color: var(--color-coral, #ff6b4a); box-shadow: 0 0 0 3px rgba(255, 107, 74, .18); }
.card-search input::-webkit-search-cancel-button { cursor: pointer; }
.card-search-status { margin: var(--space-2, .5rem) 0 0 1rem; font-size: .9rem; color: var(--color-ink-soft, #4b5563); min-height: 1.3em; }
.card-search-status:empty { margin: 0; min-height: 0; }

/* Text formatting from the CMS editor (Sanitizer::rich). Fixed lists only:
   every colour passes WCAG AA on the page background. */
@font-face { font-family: "NB Handwritten"; src: url("vendor/fonts/caveat.woff") format("woff"); font-weight: 400 700; font-display: swap; }
.article-body u { text-decoration-thickness: .08em; text-underline-offset: .15em; }
.article-body blockquote { margin: var(--space-5, 1.5rem) 0; padding: var(--space-2, .5rem) 0 var(--space-2, .5rem) var(--space-4, 1rem); border-left: 4px solid var(--color-coral, #ff6b4a); color: var(--color-ink, #1f2937); font-size: 1.08rem; font-style: italic; }
.article-body blockquote p { margin: 0 0 var(--space-2, .5rem); }
.article-body blockquote p:last-child { margin-bottom: 0; }
.article-body li > ul, .article-body li > ol { margin-top: var(--space-2, .5rem); }
.ta-center { text-align: center; }
.ta-right { text-align: right; }
.tx-coral { color: #c4401f; } .tx-teal { color: #0a5f5e; } .tx-plum { color: #7a3fb0; } .tx-pink { color: #b8295f; }
.tx-gold { color: #8a5a00; } .tx-blue { color: #1d4ed8; } .tx-green { color: #2f6b1f; } .tx-grey { color: #4b5563; }
.hl-yellow, .hl-coral, .hl-teal, .hl-pink, .hl-green { padding: 0 .12em; border-radius: .2em; box-decoration-break: clone; -webkit-box-decoration-break: clone; color: var(--color-ink, #1f2937); }
.hl-yellow { background: #fff0a8; } .hl-coral { background: #ffdccf; } .hl-teal { background: #cdeeed; } .hl-pink { background: #fbd9e6; } .hl-green { background: #dcefd2; }
.ff-serif { font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif; }
.ff-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Courier New", monospace; font-size: .94em; }
.ff-hand { font-family: "NB Handwritten", "Segoe Print", "Bradley Hand", cursive; font-size: 1.3em; line-height: 1.25; }
.fs-sm { font-size: .875em; } .fs-lg { font-size: 1.25em; } .fs-xl { font-size: 1.55em; line-height: 1.3; }

/* Picture beside text: side by side from tablet width, stacked (text first) on phones. */
.split { display: grid; gap: var(--space-4, 1rem); margin: var(--space-5, 1.5rem) 0 var(--space-6, 2rem); align-items: start; }
.split-text > :first-child { margin-top: 0; }
.split-text > :last-child { margin-bottom: 0; }
.split-media { margin: 0; }
.split-media img { width: 100%; height: auto; border-radius: var(--radius-md, 14px); border: 1px solid var(--color-border, #ecdfd0); display: block; }
.split-media figcaption { font-size: .85rem; color: var(--color-ink-soft, #4b5563); margin-top: var(--space-2, .5rem); text-align: center; }
@media (min-width: 720px) {
  .split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--space-5, 1.5rem); align-items: center; }
  .split--sm { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
  .split--lg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--left { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .split--left.split--sm { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
  .split--left.split--lg { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split--left .split-media { order: -1; }
}

/* Picture sizes picked in the editor: the whole picture, uncropped, centred. */
.article-figure--sm, .article-figure--md, .article-figure--lg, .article-figure--full { margin-left: auto; margin-right: auto; }
.article-figure--sm { max-width: 320px; }
.article-figure--md { max-width: 480px; }
.article-figure--lg { max-width: 720px; }
.article-figure--full { max-width: none; }
.article-figure--sm img, .article-figure--md img, .article-figure--lg img, .article-figure--full img { aspect-ratio: auto; object-fit: contain; }

/* Key facts: hours of operation as a list, across the whole panel. */
.facts-list .facts-hours-row { grid-column: 1 / -1; }
.facts-hours, .article-body .facts-hours { list-style: none; margin: .15rem 0 0; padding: 0; display: grid; gap: .3rem; max-width: 26rem; }
.article-body .facts-hours li { margin: 0; }
.facts-hours li { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .3rem; border-bottom: 1px dashed var(--color-border, #ecdfd0); font-size: .98rem; }
.facts-hours li:last-child { border-bottom: 0; padding-bottom: 0; }
.facts-day { font-weight: 600; }
.facts-time { text-align: right; color: var(--color-ink, #1f2937); white-space: nowrap; }
.facts-time--whole { white-space: normal; }
.facts-time--whole { text-align: left; }

/* Themed map pins (assets/nbcms-map.js): Coffee, Christmas, Halloween. */
.nb-pin { background: none; border: 0; }
.nb-pin-shape { position: absolute; left: 2px; top: 2px; width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #fff; border: 2.5px solid #6d4c41; box-shadow: 0 2px 5px rgba(0,0,0,.35); box-sizing: border-box; }
.nb-pin-symbol { position: absolute; left: 7px; top: 6px; width: 20px; height: 20px; display: block; line-height: 0; }
.nb-pin--christmas .nb-pin-shape { border-color: #2f7d32; }
.nb-pin--halloween .nb-pin-shape { border-color: #e2760b; }
