/* Town pages (/st-ives/ and so on), built by scripts/build-town-pages.mjs. Same navy and gold as the app's plan page. */
:root { --navy: #0b2e3b; --navy2: #123b4b; --gold: #F2B134; --text: #e8eef4; --muted: #c7d8e1; --line: rgba(242,177,52,.45); }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body { margin: 0; color: var(--text); background: var(--navy); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: var(--gold); text-underline-offset: 3px; }
h1, h2, h3, h4 { color: #fff; line-height: 1.2; }
.tp-wrap { width: min(1080px, 100%); margin: 0 auto; padding: 0 20px; }

.tp-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: #061b23; }
.tp-logo { font-size: 20px; font-weight: 800; letter-spacing: .03em; color: #fff; text-decoration: none; }
.tp-beta { display: inline-block; margin-left: 4px; padding: 2px 7px; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; color: var(--navy); background: var(--gold); border-radius: 999px; }
.tp-top nav { display: flex; align-items: center; gap: 12px; }
.tp-top nav .tp-sep { color: rgba(255,255,255,.4); font-weight: 400; }
.tp-top nav a[aria-current="page"] { color: var(--gold); }
.tp-top nav a { color: #fff; font-weight: 600; text-decoration: none; }
.tp-top nav a:hover { color: var(--gold); }

.tp-hero { padding: 24px 0 48px; background: linear-gradient(rgba(11,46,59,.80), rgba(11,46,59,.92)), var(--hero, none) center / cover no-repeat; }
.tp-crumbs { margin: 0 0 24px; font-size: 14px; color: var(--muted); }
.tp-crumbs a { color: var(--muted); }
.tp-herogrid { max-width: 760px; } /* text only: the videos are further down the page */
.tp-kicker { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.tp-hero h1 { margin: 0 0 12px; font-size: clamp(44px, 8vw, 76px); letter-spacing: .01em; }
.tp-tagline { margin: 0 0 28px; font-size: clamp(18px, 2.4vw, 22px); color: #fff; }
.tp-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.tp-btn { display: inline-flex; align-items: center; padding: 10px 18px; font: inherit; font-size: 15px; font-weight: 700; color: #fff; text-decoration: none; background: rgba(255,255,255,.08); border: 1px solid var(--gold); border-radius: 999px; cursor: pointer; }
.tp-btn:hover { background: rgba(255,255,255,.18); }
.tp-gold, .tp-aff { color: var(--navy); background: var(--gold); border-color: var(--gold); }
.tp-gold:hover, .tp-aff:hover { background: #f7c35c; }
.tp-ghost { font-weight: 600; }
.tp-aff sup { margin-left: 1px; font-size: .75em; }

.tp-tabs { position: sticky; top: 0; z-index: 5; background: #061b23; border-top: 1px solid rgba(242,177,52,.25); box-shadow: 0 6px 12px -6px rgba(0,0,0,.35); }
.tp-tabs .tp-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding-top: 10px; padding-bottom: 10px; }
/* Phones: the pills wrap onto two rows and stay stuck to the top as on a computer, made compact so the bar stays short; sections
   reached from a pill land just below the bar. */
@media (max-width: 640px) {
  .tp-tabs .tp-wrap { gap: 5px; padding-top: 7px; padding-bottom: 7px; }
  .tp-tabs a { padding: 4px 10px; font-size: 13px; }
  html { scroll-padding-top: 130px; }
}
.tp-tabs a { flex: none; padding: 7px 14px; font-size: 14px; color: #fff; text-decoration: none; border: 1px solid var(--gold); border-radius: 999px; }
.tp-tabs a:hover { background: rgba(255,255,255,.14); }

.tp-sec { margin: 64px 0 0; }
.tp-sec > h2 { margin: 0 0 14px; padding-bottom: 10px; font-size: 26px; border-bottom: 1px solid var(--line); }
.tp-intro { margin: 0 0 20px; color: var(--muted); }
.tp-glance { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; margin-top: 48px; }
.tp-big { margin: 0 0 20px; font-size: clamp(26px, 3.6vw, 36px); }
.tp-glance p { color: var(--muted); font-size: 17px; line-height: 1.7; }
.tp-notes { padding: 24px; background: var(--navy2); border: 1px solid rgba(242,177,52,.35); border-top: 4px solid var(--gold); border-radius: 16px; }
.tp-nhead { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.tp-nhead img { flex: none; width: 56px; height: 56px; border: 2px solid var(--gold); border-radius: 50%; object-fit: cover; }
.tp-nhead .tp-kicker { margin: 0 0 2px; }
.tp-nhead h3 { margin: 0; font-size: 22px; }
.tp-notes ul { margin: 0 0 20px; padding: 0; list-style: none; }
.tp-notes li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.tp-notes li:last-child { border-bottom: 0; }
.tp-nic { flex: none; display: grid; place-items: center; width: 34px; height: 34px; font-size: 17px; background: rgba(242,177,52,.14); border-radius: 10px; }
.tp-notes li b { display: block; margin-bottom: 2px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); }
.tp-notes li span:not(.tp-nic) { display: block; font-size: 15px; line-height: 1.55; color: var(--text); }
.tp-notes p { margin: 0; }
.tp-link { padding: 0; font: inherit; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; background: none; border: 0; cursor: pointer; }

.tp-vids { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tp-vid { display: flex; flex-direction: column; gap: 8px; padding: 0; font: inherit; font-size: 15px; font-weight: 600; text-align: left; color: #fff; background: none; border: 0; cursor: pointer; }
.tp-vthumb { position: relative; display: block; overflow: hidden; border-radius: 10px; background: #000; }
.tp-vthumb img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
/* Shorts: upright tiles cropped to the vertical picture in the middle of YouTube's 4:3 thumbnail */
.tp-shorts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.tp-vshort { font-size: 14px; }
.tp-vshort .tp-vthumb img { aspect-ratio: 9 / 16; }
.tp-vshort > span:last-child { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-vshort .tp-play { width: 44px; height: 44px; font-size: 16px; }
@media (max-width: 900px) { .tp-shorts { grid-template-columns: repeat(3, 1fr); } }
.tp-play { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 54px; height: 54px; padding-left: 4px; font-size: 20px; color: #fff; background: #dc2626; border-radius: 50%; transform: translate(-50%, -50%); }
.tp-vid:hover .tp-play { background: #ef4444; }

.tp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tp-card { display: flex; flex-direction: column; overflow: hidden; color: var(--navy); background: #fff; border-radius: 14px; }
.tp-card img, .tp-noimg { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #dfe8ec; }
.tp-cbody { display: flex; flex: 1; flex-direction: column; padding: 14px 16px 16px; }
.tp-cbody small { color: #5b7280; }
.tp-cbody h4 { margin: 2px 0 8px; font-size: 18px; color: var(--navy); }
.tp-award { margin: 0 0 4px; font-size: 14px; font-weight: 700; color: #8a5a00; }
.tp-award::before { content: "★ "; color: #F2B134; }
.tp-tick { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: #15803d; }
.tp-tick span { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 4px; font-size: 11px; color: #fff; background: #16a34a; border-radius: 50%; }
.tp-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; }
.tp-card .tp-btn { padding: 8px 14px; font-size: 14px; color: #fff; background: #1d6f8a; border-color: #1d6f8a; } /* sea blue: lighter than the navy, chosen by JV 30 Nov 2026 */
.tp-card .tp-btn:not(.tp-aff):hover { background: #175b72; border-color: #175b72; }
.tp-card .tp-aff { color: var(--navy); background: var(--gold); border-color: var(--gold); }
.tp-card .tp-aff:hover { background: #e3a21f; border-color: #e3a21f; } /* slightly darker gold on hover, to match the sea blue button */
.tp-more { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.tp-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

.tp-list { margin: 0; padding-left: 20px; }
.tp-list li { margin: 8px 0; }
.tp-list small, .tp-near small { color: var(--muted); }
.tp-cols { columns: 2; column-gap: 32px; }
.tp-cols li { break-inside: avoid; }
.tp-mapcta { padding: 28px; background: var(--navy2); border-radius: 16px; }
.tp-mapcta h2 { margin: 0 0 8px; border: 0; padding: 0; }
.tp-mapcta p:last-child { margin: 0; }
.tp-faq { padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.tp-faq summary { font-size: 17px; font-weight: 600; color: #fff; cursor: pointer; }
.tp-faq p { margin: 10px 0 0; color: var(--muted); }
.tp-foot { margin-top: 72px; padding: 28px 0 40px; font-size: 14px; color: var(--muted); border-top: 1px solid rgba(255,255,255,.14); }

.tp-modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom)); background: rgba(0,0,0,.8); }
.tp-modal[hidden] { display: none; }
.tp-mbox { position: relative; width: min(900px, 100%); padding: 46px 12px 12px; background: var(--navy); border-radius: 12px; }
.tp-short .tp-mbox { width: min(380px, 100%); }
.tp-frame { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: #000; }
.tp-short .tp-frame { aspect-ratio: 9 / 16; max-height: calc(100dvh - 120px); margin: 0 auto; }
.tp-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tp-close { position: absolute; top: 8px; right: 8px; width: 32px; height: 32px; font-size: 20px; line-height: 1; color: #111; background: #fff; border: 0; border-radius: 50%; cursor: pointer; }

@media (max-width: 860px) {
  .tp-glance { grid-template-columns: 1fr; gap: 28px; }
  .tp-cards, .tp-vids { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tp-wrap { padding: 0 16px; }
  .tp-top { padding: 12px 16px; }
  .tp-hero { padding-bottom: 36px; }
  .tp-cards { grid-template-columns: 1fr; }
  .tp-vids { gap: 12px; font-size: 14px; }
  .tp-sec { margin-top: 52px; }
  .tp-cols { columns: 1; }
  .tp-notes { padding: 20px; }
  .tp-btn { padding: 9px 15px; font-size: 14px; }
}
.tp-bicnote { display: flex; gap: 8px; margin-top: 22px !important; padding: 12px 14px; font-size: 14px !important; line-height: 1.5 !important; background: rgba(255,255,255,.06); border-left: 3px solid var(--gold); border-radius: 6px; }
.tp-bicnote { gap: 10px; }
.tp-bicnote .tp-bicic { flex: none; color: var(--gold); font-weight: 700; }

/* Close by: places from neighbouring towns, labelled with the town and distance */
.tp-sub { margin: 32px 0 14px; font-size: 18px; }
.tp-where { margin: 0 0 6px; font-size: 14px; font-weight: 600; color: #4a6470; }   /* same size as the tick line */
.tp-where a { color: #1d6f8a; text-underline-offset: 3px; }
.tp-where a:hover { color: var(--navy); }

/* Locations hub (/locations/): town tiles with photo and tagline, grouped by area */
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.hub-tile { display: flex; flex-direction: column; overflow: hidden; color: var(--navy); text-decoration: none; background: #fff; border-radius: 14px; transition: transform .15s; }
.hub-tile:hover, .hub-tile:focus-visible { transform: translateY(-2px); }
.hub-tile:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.hub-tile img, .hub-noimg { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; background: #dfe8ec; }
.hub-txt { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px 14px; }
.hub-txt b { font-size: 17px; }
.hub-txt small { font-size: 14px; line-height: 1.4; color: #3d5866; }
.hub-count { margin-left: 8px; font-size: 15px; font-weight: 400; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .hub-tile { transition: none; } }

/* A town with nothing of its own in a section: a short note before the places close by */
.tp-none { margin: 0 0 4px; max-width: 70ch; color: var(--muted); }

/* The hero photo again, clear this time, after the first intro paragraph */
.tp-introimg { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin: 18px 0 20px; border-radius: 14px; }

/* Save heart on each card: the same "My trip" as the map */
.tp-card { position: relative; }
.tp-heart { position: absolute; top: 10px; right: 10px; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  font-size: 20px; line-height: 1; color: #fff; background: rgba(11,46,59,.72); border: 2px solid rgba(255,255,255,.85); border-radius: 50%; cursor: pointer; }
.tp-heart:hover { background: rgba(11,46,59,.9); }
.tp-heart[aria-pressed="true"] { color: #e0245e; background: #fff; border-color: #fff; }
.tp-heart:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.tp-mytrip b { margin-left: 6px; }

/* Directions (Google Maps, opens in a new tab): under each card's buttons, after each beach and walk */
.tp-dir { margin: 8px 0 0; font-size: 14px; }
.tp-dir a { color: #1d6f8a; font-weight: 600; text-underline-offset: 3px; }
.tp-dir a:hover { color: var(--navy); }
.tp-dirlink { margin-left: 6px; font-size: 14px; }
.tp-dir span { color: #8aa2ad; }

/* Play symbol on video thumbnails (JV's choice, 30 Nov 2026): a see-through navy circle with a white edge, red on hover; smaller on phones */
.tp-play { width: 42px; height: 42px; padding-left: 3px; font-size: 14px; background: rgba(11,46,59,.55); border: 1.5px solid rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); transition: background .15s; }
.tp-vid:hover .tp-play, .tp-vid:focus-visible .tp-play { background: #dc2626; border-color: #dc2626; }
.tp-vshort .tp-play { width: 34px; height: 34px; font-size: 12px; }
@media (max-width: 640px) { .tp-play { width: 34px; height: 34px; font-size: 12px; } .tp-vshort .tp-play { width: 28px; height: 28px; font-size: 10px; } }

/* Anything marked hidden stays hidden, even when a button style sets its own display (the My trip button until something is saved) */
[hidden] { display: none !important; }
