/* ===== Asturias Coast Guide ===== */
:root {
  --navy: #0b3d4f;
  --navy-deep: #072b38;
  --ocean: #12738c;
  --teal: #1fa39e;
  --aqua: #8fd4d8;
  --sand: #f6f1e7;
  --sand-deep: #ece3d2;
  --ink: #16303a;
  --muted: #5b727b;
  --white: #ffffff;
  --amber: #f5a623;
  --coral: #ef6f5c;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(7, 43, 56, .10);
  --shadow-sm: 0 4px 14px rgba(7, 43, 56, .08);
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--sand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 800; line-height: 1.15; color: var(--navy-deep); }
a { color: var(--ocean); }

/* ===== HERO ===== */
.hero {
  position: relative;
  background:
    radial-gradient(1200px 500px at 80% -10%, rgba(31,163,158,.45), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(18,115,140,.55), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, #0e5669 100%);
  color: #fff;
  padding: 110px 24px 96px;
  text-align: center;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto 0 0 0; height: 90px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 90' preserveAspectRatio='none'%3E%3Cpath d='M0,60 C200,90 400,20 600,45 C800,70 1000,90 1200,50 L1200,90 L0,90 Z' fill='%23f6f1e7'/%3E%3C/svg%3E") center/cover no-repeat;
}
.hero-inner { position: relative; z-index: 2; max-width: 880px; margin: 0 auto; }
.hero-kicker {
  text-transform: uppercase; letter-spacing: .22em; font-size: .78rem; font-weight: 600;
  color: var(--aqua); margin-bottom: 18px;
}
.hero h1 {
  color: #fff; font-size: clamp(2.4rem, 6vw, 4.1rem); letter-spacing: -.02em;
}
.hero h1 span {
  background: linear-gradient(90deg, #bff0ea, #f4d8a8);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-sub { margin: 22px auto 30px; max-width: 640px; font-size: 1.08rem; color: #d7ecf0; }
.hero-sub strong { color: #fff; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px; font-weight: 600;
  text-decoration: none; font-size: .98rem; transition: transform .15s ease, box-shadow .15s ease, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-light { background: var(--amber); color: var(--navy-deep); box-shadow: 0 8px 22px rgba(245,166,35,.35); }
.btn-outline { border: 2px solid rgba(255,255,255,.55); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.12); }
.hero-badges { margin-top: 34px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.badge {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
  padding: 7px 15px; border-radius: 999px; font-size: .82rem; color: #e8f6f8;
  backdrop-filter: blur(4px);
}

/* ===== FILTER BAR ===== */
.filterbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(11,61,79,.10);
  box-shadow: var(--shadow-sm);
}
.filterbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 12px 20px;
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter {
  border: 1.5px solid var(--navy); background: transparent; color: var(--navy);
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem; cursor: pointer;
  font-family: var(--font-body); transition: all .15s ease;
}
.filter .count { opacity: .6; font-weight: 500; font-size: .8rem; margin-left: 3px; }
.filter:hover { background: rgba(18,115,140,.08); }
.filter.active { background: var(--navy); color: #fff; }
.region-select {
  padding: 9px 14px; border-radius: 999px; border: 1.5px solid rgba(11,61,79,.25);
  font-family: var(--font-body); font-size: .9rem; color: var(--navy); background: #fff; cursor: pointer;
}
.search-wrap { flex: 1; min-width: 220px; max-width: 360px; }
#search {
  width: 100%; padding: 10px 18px; border-radius: 999px;
  border: 1.5px solid rgba(11,61,79,.2); font-size: .92rem; font-family: var(--font-body);
  background: var(--sand); outline: none;
}
#search:focus { border-color: var(--teal); background: #fff; }

/* ===== SECTIONS ===== */
main { max-width: 1180px; margin: 0 auto; padding: 48px 20px 20px; }
.region-head { margin: 42px 0 8px; scroll-margin-top: 90px; }
.region-head:first-child { margin-top: 0; }
.region-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); display: flex; align-items: center; gap: 12px; }
.region-head h2::before {
  content: ""; width: 14px; height: 34px; border-radius: 6px;
  background: linear-gradient(180deg, var(--teal), var(--ocean));
}
.region-head p { color: var(--muted); margin: 6px 0 0 26px; font-size: .98rem; }

/* ===== CARDS ===== */
.spot-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 22px; margin: 26px 0 10px;
}
.card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid rgba(11,61,79,.06);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(7,43,56,.15); }
/* ===== Media (photo + live webcam) ===== */
.media { position: relative; }
.media-views {
  position: relative; aspect-ratio: 16 / 9; background: #0b3d4f; overflow: hidden;
}
/* Taller frame when the Windguru forecast table is open (it is a full grid) */
.media-views:has(.media-wg:not([hidden])) { aspect-ratio: auto; height: clamp(460px, 66vh, 700px); }
.media-photo {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform .4s ease;
}
.card:hover .media-photo { transform: scale(1.03); }
.media-cam { position: absolute; inset: 0; width: 100%; height: 100%; background: #072b38; }
/* Windguru forecast panel: taller than the video frame so the table is readable */
.media-wg {
  position: absolute; inset: 0; background: #fff; display: flex; flex-direction: column;
}
.media-wg iframe { width: 100%; flex: 1; min-height: 0; border: 0; background: #fff; }
.wg-attrib {
  display: block; text-align: center; font-size: .74rem; font-weight: 700; text-decoration: none;
  background: var(--navy-deep); color: #cfeef2; padding: 7px 8px;
}
.wg-attrib:hover { background: var(--navy); color: #fff; }
.media-cam::before {
  content: "📡 Connecting live stream…";
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center;
  color: #bfe0e6; font-size: .8rem; letter-spacing: .03em;
  background:
    radial-gradient(circle at 50% 45%, rgba(31,163,158,.25), transparent 60%), #072b38;
}
.media-cam.ready::before { display: none; }
.media-cam iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; z-index: 2;
  background: transparent;
}
.cam-offline {
  position: absolute; inset: 0; z-index: 6; display: none; place-items: center; text-align: center;
  color: #d7ecf0; font-size: .85rem; padding: 20px; background: #0b3d4f;
}
.cam-offline a { color: var(--aqua); }

/* bottom bar over the live player: nearest-cam note + guaranteed-working source-site link */
.cam-bar {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 5;
  display: flex; flex-direction: column; gap: 6px;
}
.cam-note {
  font-size: .72rem; line-height: 1.35; text-align: center;
  background: rgba(7,43,56,.85); color: #eaf6f8; padding: 6px 10px; border-radius: 8px;
  backdrop-filter: blur(3px);
}
.cam-note strong { color: #ffd88a; }
.cam-source-link {
  display: block; text-align: center; text-decoration: none; font-size: .74rem;
  background: rgba(245,166,35,.95); color: #072b38; font-weight: 700;
  padding: 8px 10px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,.3);
}
.cam-source-link span { text-decoration: underline; }
.media-cam.offline iframe { display: none; }
.media-cam.offline .cam-offline { display: grid; }
.media-flag {
  position: absolute; left: 12px; bottom: 12px; z-index: 2;
  background: rgba(7,43,56,.72); color: #fff; font-size: .72rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; backdrop-filter: blur(4px);
  letter-spacing: .02em;
}
.media-tabs {
  position: absolute; right: 10px; bottom: 10px; z-index: 3; display: flex; gap: 6px;
}
.media-tab {
  border: none; cursor: pointer; font-family: var(--font-body);
  background: rgba(255,255,255,.9); color: var(--navy-deep); font-size: .76rem; font-weight: 700;
  padding: 7px 12px; border-radius: 999px; backdrop-filter: blur(4px);
  box-shadow: 0 3px 10px rgba(7,43,56,.25); transition: background .15s, color .15s;
}
.media-tab:hover { background: #fff; }
.media-tab.active { background: var(--navy-deep); color: #fff; }
.live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--coral); margin-left: 5px; vertical-align: middle;
  animation: pulse 1.4s ease-in-out infinite;
}
.media-tab.active .live-dot { background: #5ee0c0; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

.card-head {
  padding: 20px 22px 14px;
  background: linear-gradient(135deg, #f4f9f9 0%, #eef6f2 100%);
  border-bottom: 1px solid rgba(11,61,79,.06);
}
.card-head .town {
  font-size: .74rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--teal); font-weight: 700; margin-bottom: 5px;
}
.card-head h3 { font-size: 1.28rem; color: var(--navy-deep); }
.tags { display: flex; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.tag {
  font-size: .74rem; font-weight: 700; padding: 4px 11px; border-radius: 999px; letter-spacing: .02em;
}
.tag-surf { background: #e6f2f8; color: #0c5f88; }
.tag-sup { background: #e3f6f2; color: #0d7d72; }
.tag-level { background: var(--sand-deep); color: #6b5a33; }
.tag-wave { background: #fdece9; color: #b4452f; }
.tag-gem { background: #efe8fb; color: #6a3fb5; font-weight: 800; }

/* Google rating chip (summary only — real quotes shown below) */
.grating {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 13px;
  background: #fff; border: 1.5px solid #e9d9a8;
  padding: 7px 12px; border-radius: 11px; cursor: default;
}
.g-stars { font-size: .92rem; letter-spacing: 1px; line-height: 1; }
.star-on { color: #f7b731; }
.star-off { color: #d8d2c4; }
.g-score { font-weight: 800; font-size: .95rem; color: var(--ink); }
.g-count { font-size: .74rem; color: var(--muted); }

/* Real visitor reviews */
.reviews { margin-top: 18px; }
.reviews-h {
  font-family: var(--font-head); font-size: .98rem; color: var(--ink);
  margin: 0 0 10px; display: flex; flex-direction: column; gap: 2px;
}
.reviews-note { font-family: var(--font-body); font-size: .68rem; font-weight: 500; color: var(--muted); }
.reviews-note a { color: var(--ocean); text-decoration: none; font-weight: 600; }
.reviews-note a:hover { text-decoration: underline; }
.rv-list { display: grid; gap: 10px; }
.rv {
  margin: 0; background: #f7f4ec; border: 1px solid #ece4d2;
  border-left: 3px solid var(--amber); border-radius: 10px;
  padding: 11px 13px;
}
.rv-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.rv-stars { color: #f7b731; font-size: .82rem; letter-spacing: 1px; white-space: nowrap; }
.rv-stars-off { color: #d8d2c4; }
.rv-src {
  font-size: .64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--ocean); background: #e6f0ef; padding: 2px 7px; border-radius: 20px; white-space: nowrap;
}
.rv-src-nostar { color: var(--muted); background: #eeeae0; }
.rv-text { margin: 0; font-size: .85rem; line-height: 1.5; color: #2f4a54; font-style: italic; }
.rv-who { margin-top: 6px; font-size: .72rem; color: var(--muted); font-style: normal; font-weight: 600; }

/* live data strip */
.live {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: rgba(11,61,79,.08);
}
.live-cell {
  background: linear-gradient(160deg, var(--navy), #0e5669);
  color: #fff; padding: 13px 16px; position: relative;
}
.live-cell.water { background: linear-gradient(160deg, #0d6e86, #1fa39e); }
.live-cell .label { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; opacity: .82; font-weight: 600; }
.live-cell .value { font-size: 1.55rem; font-weight: 700; font-family: var(--font-head); margin-top: 2px; }
.live-cell .sub { font-size: .74rem; opacity: .85; }
.live-cell .ico { position: absolute; right: 12px; top: 10px; font-size: 1.25rem; opacity: .85; }
.live-cell.loading .value { color: rgba(255,255,255,.55); font-size: 1.05rem; }

.card-body { padding: 18px 22px 20px; flex: 1; display: flex; flex-direction: column; }
.card-body p.desc { font-size: .92rem; color: #33505b; }
.card-body p.best {
  margin-top: 12px; font-size: .86rem; color: var(--muted);
  border-left: 3px solid var(--amber); padding-left: 12px;
}
.card-body p.best strong { color: var(--ink); }
.card-links { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.card-links a {
  flex: 1; text-align: center; text-decoration: none; font-weight: 600; font-size: .87rem;
  padding: 10px 12px; border-radius: 11px; transition: filter .15s ease, transform .15s ease;
  min-width: 130px;
}
.card-links a:hover { filter: brightness(1.06); transform: translateY(-1px); }
.link-maps { background: #e8f3ea; color: #1c6b34; }
.link-cam { background: #fdece9; color: #c1472f; }

.no-results {
  text-align: center; padding: 60px 20px; color: var(--muted); font-size: 1.05rem;
  background: #fff; border-radius: var(--radius); margin-top: 30px;
}

/* ===== GUIDE ===== */
.guide { background: linear-gradient(180deg, #fff, #eef4f3); margin-top: 70px; padding: 70px 20px; }
.guide-inner { max-width: 1080px; margin: 0 auto; }
.guide h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); text-align: center; }
.guide-lead { text-align: center; color: var(--muted); max-width: 640px; margin: 14px auto 44px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.guide-card {
  background: #fff; border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--teal);
}
.guide-card h3 { font-size: 1.12rem; margin-bottom: 14px; }
.guide-card p, .guide-card li { font-size: .9rem; color: #3a555f; }
.tick-list { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.tick-list li { padding-left: 22px; position: relative; }
.tick-list li::before { content: "✔"; position: absolute; left: 0; color: var(--teal); font-weight: 700; }
.temp-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.temp-table th, .temp-table td { padding: 8px 6px; text-align: left; border-bottom: 1px solid rgba(11,61,79,.09); }
.temp-table th { color: var(--ocean); font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; }
.guide-links { margin-top: 44px; text-align: center; }
.guide-links h3 { font-size: 1.15rem; margin-bottom: 16px; }
.link-chips { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.link-chips a {
  background: #fff; border: 1.5px solid rgba(18,115,140,.3); color: var(--ocean);
  text-decoration: none; padding: 9px 18px; border-radius: 999px; font-size: .86rem; font-weight: 600;
  transition: background .15s;
}
.link-chips a:hover { background: var(--ocean); color: #fff; }

/* ===== FOOTER ===== */
.footer {
  background: var(--navy-deep); color: #b7d4db; text-align: center;
  padding: 38px 20px; font-size: .86rem;
}
.footer a { color: var(--aqua); }
.footer-note { margin-top: 8px; opacity: .7; font-size: .78rem; }

@media (max-width: 600px) {
  .spot-grid { grid-template-columns: 1fr; }
  .hero { padding: 80px 20px 70px; }
  .filterbar-inner { flex-direction: column; align-items: stretch; }
  .search-wrap { max-width: none; }
}
