/* BeachAtlas public theme
   Palette: deep-sea ink #10333B · lagoon #0E7C86 · foam #F3F8F7 · sand #EDE6D6 · sun #E9A13B · coral #D64933 */
:root {
  --ink: #10333B;
  --ink-soft: #3E5A61;
  --lagoon: #0E7C86;
  --lagoon-dark: #0A5A62;
  --foam: #F3F8F7;
  --card: #FFFFFF;
  --sand: #EDE6D6;
  --sun: #E9A13B;
  --coral: #C74228;
  --line: #D8E2E1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 51, 59, .07), 0 6px 18px rgba(16, 51, 59, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Public Sans', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--foam);
}
img { max-width: 100%; display: block; }
a { color: var(--lagoon-dark); }
h1, h2, h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.7rem); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.sr, .skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip:focus { position: fixed; top: 8px; left: 8px; width: auto; height: auto; clip: auto; background: #fff; padding: 8px 14px; border-radius: 8px; z-index: 99; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* ---------- Header ---------- */
.top { background: var(--ink); color: #fff; position: sticky; top: 0; z-index: 50; }
.top-in { display: flex; align-items: center; gap: 22px; min-height: 62px; }
.brand { font-family: 'Fraunces', serif; font-size: 1.35rem; color: #fff; text-decoration: none; letter-spacing: .01em; }
.mainnav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.mainnav a { color: #CFE3E1; text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.mainnav a:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.mainnav a.on { color: var(--ink); background: var(--foam); }
.mainnav a.nearlink { border: 1px solid rgba(255, 255, 255, .35); }
.top-tools { display: flex; align-items: center; gap: 10px; }
.langpick select {
  background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px; padding: 6px 10px; font: inherit; font-size: .88rem; max-width: 150px;
}
.langpick option { color: var(--ink); }
.burger { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: #fff; margin: 5px 0; border-radius: 2px; }

/* ---------- Hero / page heads ---------- */
.hero, .pagehead { background: var(--ink); color: #fff; position: relative; }
.hero-in { padding: clamp(48px, 8vw, 96px) 20px clamp(60px, 8vw, 100px); max-width: 1120px; margin: 0 auto; }
.hero h1 { max-width: 14ch; }
.hero-sub, .pagehead-sub { color: #BCD6D4; max-width: 52ch; font-size: 1.06rem; }
.pagehead .wrap { padding-top: clamp(30px, 5vw, 56px); padding-bottom: clamp(44px, 6vw, 70px); }
.pagehead-count { color: #9DBFBC; font-size: .92rem; margin: .3em 0 0; }
.wave { display: block; width: 100%; height: 42px; color: var(--foam); position: absolute; bottom: -1px; left: 0; }
.crumbs { font-size: .9rem; margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs a { color: #BCD6D4; text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs span { color: #6E9490; }

.tide-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.pill {
  text-decoration: none; color: #E7F2F1; border: 1px solid rgba(255, 255, 255, .4);
  padding: 9px 18px; border-radius: 999px; font-weight: 500; font-size: .95rem;
}
.pill:hover { background: rgba(255, 255, 255, .1); }
.pill-solid { background: var(--sun); border-color: var(--sun); color: var(--ink); font-weight: 600; }
.pill-solid:hover { background: #F2B45A; }

/* ---------- Sections ---------- */
.section { padding: clamp(28px, 5vw, 52px) 20px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.more { font-weight: 600; text-decoration: none; }
.more:hover { text-decoration: underline; }
.sandband { background: var(--sand); }
.empty { color: var(--ink-soft); font-size: 1.05rem; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.cat-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 18px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 4px;
}
.cat-tile:hover { border-color: var(--lagoon); }
.cat-name { font-family: 'Fraunces', serif; font-size: 1.15rem; font-weight: 600; }
.cat-tag { color: var(--ink-soft); font-size: .92rem; }

/* ---------- Cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none;
  color: var(--ink); box-shadow: var(--shadow); border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.card:hover { border-color: var(--lagoon); }
.card-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(160deg, #CFE7E5, #EDE6D6); display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-noimg { position: absolute; inset: 0; }
.rating-chip {
  position: absolute; left: 10px; bottom: 10px; background: rgba(16, 51, 59, .88); color: #fff;
  border-radius: 999px; padding: 4px 10px; font-size: .84rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 5px;
}
.rating-chip svg { color: var(--sun); }
.card-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 4px; }
.card-title { font-weight: 600; font-size: 1.02rem; }
.card-sum { color: var(--ink-soft); font-size: .9rem; }
.card-dist { color: var(--lagoon-dark); font-size: .88rem; font-weight: 600; }

/* ---------- Place page ---------- */
.rating-line { display: flex; align-items: center; gap: 8px; color: #CFE3E1; margin: 2px 0 8px; }
.rating-line strong { color: #fff; font-size: 1.05rem; }
.stars { position: relative; width: 92px; height: 17px; display: inline-block;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236E9490' d='M12 2l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 16.9 5.9 20.4l1.5-6.8L2.2 9l6.9-.7z'/%3E%3C/svg%3E") repeat-x; background-size: 18.4px 17px; }
.stars::after { content: ""; position: absolute; inset: 0; width: var(--r, 0%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23E9A13B' d='M12 2l2.9 6.3 6.9.7-5.2 4.6 1.5 6.8L12 16.9 5.9 20.4l1.5-6.8L2.2 9l6.9-.7z'/%3E%3C/svg%3E") repeat-x; background-size: 18.4px 17px; }

.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 340px); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.gallery-item { border: 0; padding: 0; background: none; cursor: zoom-in; border-radius: var(--radius); overflow: hidden; scroll-snap-align: start; }
.gallery-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: 100%; }

.place-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding-top: 10px; padding-bottom: 56px; }
.place-side h2 { font-size: 1.25rem; }
.near-list { display: flex; flex-direction: column; gap: 14px; }
.place-main > section { margin-bottom: 40px; }
.prose { max-width: 68ch; }
.prose-narrow { max-width: 68ch; margin: 0 auto; }
.prose p { margin: 0 0 1em; }
.prose a { text-decoration: underline; }

.map { height: 380px; border-radius: var(--radius); border: 1px solid var(--line); z-index: 0; }
.map-tall { height: min(62vh, 560px); }
.map-note { color: var(--ink-soft); margin-top: 8px; }
.place-map .btn { margin-top: 14px; }

/* ---------- Buttons & forms ---------- */
.btn { display: inline-block; border-radius: 999px; padding: 11px 22px; font: inherit; font-weight: 600;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-solid { background: var(--lagoon); color: #fff; border-color: var(--lagoon); }
.btn-solid:hover { background: var(--lagoon-dark); }
.btn-line { background: transparent; color: var(--lagoon-dark); border-color: var(--lagoon); }
.btn-line:hover { background: #E4F1F0; }
.btn-coral { background: var(--coral); color: #fff; }
.btn-coral:hover { background: #A93620; }

.report { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.report h2 { font-size: 1.25rem; }
.report p { color: var(--ink-soft); margin-top: 0; }
.report-form label { display: block; font-weight: 500; font-size: .93rem; margin-bottom: 14px; }
.report-form input, .report-form textarea {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; font: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: var(--foam); color: var(--ink);
}
.report-form input:focus, .report-form textarea:focus { border-color: var(--lagoon); outline: none; }
.frow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.flash { margin: 14px 0 0; padding: 12px 16px; border-radius: 10px; font-weight: 500; }
.flash-ok { background: #DCEFDF; color: #1D5A2A; }
.flash-warn { background: #FBE9D8; color: #8A4A12; }

/* ---------- Near me ---------- */
.nearme-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 20px; }
.chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid rgba(255, 255, 255, .4); background: transparent; color: #E7F2F1;
  border-radius: 999px; padding: 7px 15px; font: inherit; font-size: .9rem; cursor: pointer; }
.chip.on { background: var(--foam); color: var(--ink); border-color: var(--foam); font-weight: 600; }
#nearList { margin-top: 26px; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.post-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  display: flex; flex-direction: column; }
.post-card:hover { border-color: var(--lagoon); }
.post-card img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-title { font-family: 'Fraunces', serif; font-weight: 600; font-size: 1.12rem; padding: 14px 16px 0; }
.post-ex { color: var(--ink-soft); font-size: .92rem; padding: 6px 16px 0; }
.post-more { color: var(--lagoon-dark); font-weight: 600; font-size: .9rem; padding: 10px 16px 16px; }
.post-hero { border-radius: var(--radius); margin-bottom: 26px; max-height: 460px; object-fit: cover; width: 100%; }

/* ---------- Lightbox ---------- */
.lightbox { position: fixed; inset: 0; background: rgba(10, 26, 30, .92); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 4vmin; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.lightbox-close { position: absolute; top: 14px; right: 18px; background: none; border: 0;
  color: #fff; font-size: 2.2rem; cursor: pointer; line-height: 1; }

/* ---------- Footer ---------- */
.foot { background: var(--ink); color: #BCD6D4; margin-top: 40px; }
.foot-in { padding: 40px 20px 30px; display: flex; flex-wrap: wrap; gap: 26px; align-items: flex-start; }
.foot-brand { font-family: 'Fraunces', serif; font-size: 1.25rem; color: #fff; }
.foot-tag { font-size: .92rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-left: auto; }
.foot-nav a { color: #BCD6D4; text-decoration: none; font-size: .95rem; }
.foot-nav a:hover { color: #fff; text-decoration: underline; }
.foot-note { flex-basis: 100%; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 16px; font-size: .86rem; }

/* ---------- 404 ---------- */
.notfound { text-align: center; padding-top: 80px; padding-bottom: 90px; }
.notfound .btn { margin-top: 12px; }

/* ---------- Leaflet popup ---------- */
.leaflet-popup-content { font-family: 'Public Sans', system-ui, sans-serif; }
.pop { display: flex; gap: 10px; align-items: center; min-width: 190px; }
.pop img { width: 58px; height: 58px; object-fit: cover; border-radius: 8px; }
.pop a { font-weight: 600; text-decoration: none; color: var(--ink); }
.pop a:hover { text-decoration: underline; }
.pop-rate { color: var(--ink-soft); font-size: .85rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .place-cols { grid-template-columns: 1fr; gap: 10px; }
  .near-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
}
@media (max-width: 760px) {
  .burger { display: block; }
  .mainnav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--ink);
    flex-direction: column; padding: 8px 14px 16px; margin: 0; box-shadow: 0 14px 22px rgba(0, 0, 0, .25); }
  .mainnav.open { display: flex; }
  .mainnav a { padding: 12px 10px; font-size: 1.02rem; }
  .frow { grid-template-columns: 1fr; }
  .gallery { grid-auto-columns: minmax(200px, 78vw); }
}
@media (prefers-reduced-motion: no-preference) {
  .card, .post-card, .cat-tile { transition: border-color .15s, transform .15s; }
  .card:hover, .post-card:hover { transform: translateY(-2px); }
}
