:root {
  --blue: #1e5fa8;
  --blue-deep: #15497f;
  --title: #123a63;
  --blue-soft: #eaf1fa;
  --intro-bg: #eef4fc;
  --bg: #ffffff;
  --bg-alt: #f6f9fd;
  --surface: #ffffff;
  --text: #1c2733;
  --muted: #6a7888;
  --border: #dde6f0;
  --shadow: 0 1px 3px rgba(20, 50, 90, 0.08), 0 8px 24px rgba(20, 50, 90, 0.06);
  --header-bg: rgba(255, 255, 255, 0.86);
  --radius: 12px;
  --serif: Georgia, "Times New Roman", serif;
  --display: "Playfair Display", Georgia, serif;
  --wordmark: "New Rocker", "Playfair Display", cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--serif);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 26px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 26px; }
.is-hidden { display: none !important; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(140%) blur(10px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 14px; min-height: 64px; padding-top: 8px; padding-bottom: 8px; }
.brand {
  font-family: var(--serif); font-weight: 700; font-size: 15px; line-height: 1;
  color: var(--blue); white-space: nowrap;
}
.brand:hover { color: var(--blue-deep); }
.header-actions { display: flex; align-items: center; gap: 18px; }
.nav-link { font-family: var(--serif); font-size: 15px; font-weight: 700; }

/* Buttons — pill style */
.btn {
  font-family: var(--serif); font-size: 15px; line-height: 1;
  padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn:hover { border-color: var(--blue); color: var(--blue); }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); color: #fff; }
.btn.icon { padding: 8px; border-radius: 50%; width: 38px; height: 38px; justify-content: center; }
.btn.small { padding: 7px 13px; font-size: 14px; }

/* Intro */
.intro {
  margin: 30px auto 4px; padding: 0 26px; text-align: center;
  font-size: 27px; line-height: 1.6; font-weight: 700; color: var(--blue);
  max-width: 700px;
}
@media (min-width: 800px) { .intro { max-width: none; white-space: nowrap; } }


.view { padding-top: 26px; padding-bottom: 72px; }

/* Controls */
.controls { margin-bottom: 20px; }
.controls-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.search, .select {
  font-family: var(--serif); font-size: 15px; padding: 10px 14px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.search { flex: 1 1 320px; }
.search:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }

.viewtoggle { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin-left: auto; }
.viewtoggle-btn { font-family: var(--serif); font-size: 15px; padding: 9px 20px; border: 0; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.viewtoggle-btn:hover { color: var(--blue); }
.viewtoggle-btn.is-active { background: var(--blue); color: #fff; }

.tag-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  font-family: var(--serif); font-size: 14px; cursor: pointer;
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); transition: all .12s ease;
}
.chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip.is-excluded { background: #c0392b; border-color: #c0392b; color: #fff; text-decoration: line-through; }
.chip.is-excluded:hover { background: #a93226; border-color: #a93226; color: #fff; }

/* Price-per-night range filter — sits under the tag chips */
.price-filter { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.price-label { font-family: var(--serif); font-size: 14px; color: var(--muted); font-style: italic; }
.price-inputs {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.price-inputs:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.price-input {
  width: 62px; font-family: var(--serif); font-size: 15px; color: var(--text);
  border: 0; background: transparent; padding: 2px 4px; text-align: center;
}
.price-input::placeholder { color: var(--muted); }
.price-input:focus { outline: none; }
/* drawn dash keeps the range separator perfectly centered between the fields */
.price-dash { width: 12px; height: 0; border-top: 1.5px solid var(--muted); flex: none; }
.price-clear {
  font-family: var(--serif); font-size: 14px; cursor: pointer;
  padding: 6px 15px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); transition: all .12s ease;
}
.price-clear:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

.result-count { color: var(--muted); font-size: 14px; margin: 16px 2px 0; font-style: italic; }
.supported-states { color: var(--muted); font-size: 14px; margin: 4px 2px 0; font-style: italic; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 24px; cursor: pointer; display: flex; flex-direction: column;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: 0 10px 30px rgba(30, 95, 168, 0.16); }
.card h3 { font-family: var(--display); font-weight: 600; margin: 0 0 4px; font-size: 21px; color: var(--title); line-height: 1.2; }
.card .tradition { color: var(--blue); font-size: 14px; margin: 0 0 2px; }
.card .place { color: var(--muted); font-size: 14px; margin: 0 0 12px; }
.card .about { color: var(--text); font-size: 15px; margin: 0 0 16px; }
.card .tagrow { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; }
.minitag { font-size: 12.5px; color: var(--blue); background: var(--blue-soft); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }

.card-price { margin: 0 0 12px; font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--blue-deep); }
.card-price-unit { font-family: var(--serif); font-size: 13px; font-weight: 600; color: var(--muted); }
.card-updated { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); font-style: italic; }

/* Cost callout (central in the detail entry) */
.cost-callout {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px;
  background: var(--intro-bg); border: 1px solid var(--blue); border-radius: 12px;
  padding: 16px 20px; margin: 4px 0 8px;
}
.cost-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--blue-deep); width: 100%; }
.cost-amount { font-family: var(--display); font-weight: 700; font-size: 30px; color: var(--blue-deep); line-height: 1.1; }
.cost-note { font-size: 15px; color: var(--text); }

/* Concise definition list for the non-About fields */
.inline-facts { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: 8px 18px; margin: 20px 0 4px; }
.inline-facts dt { font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); padding-top: 2px; }
.inline-facts dd { margin: 0; font-size: 16px; }
.empty { text-align: center; color: var(--muted); font-style: italic; padding: 64px 20px; }

/* Map */
.map { height: 620px; width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--bg-alt); }
.leaflet-popup-content { margin: 12px 14px; font-family: var(--serif); }
.map-popup h4 { font-family: var(--display); margin: 0 0 2px; font-size: 16px; color: var(--title); }
.map-popup p { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.map-popup a { color: var(--blue); font-size: 14px; }

/* Detail */
.detail-back { background: none; border: 0; color: var(--blue); font-family: var(--serif); font-size: 15px; cursor: pointer; padding: 6px 0; margin-bottom: 6px; }
.detail-back:hover { color: var(--blue-deep); }
.detail-head { border-bottom: 1px solid var(--border); padding-bottom: 20px; margin-bottom: 24px; }
.detail-head h1 { font-family: var(--display); font-weight: 700; margin: 0 0 6px; color: var(--title); font-size: 38px; line-height: 1.1; }
#about .detail-head h1 {
  font-family: var(--serif); font-size: 27px; line-height: 1.6; font-weight: 700;
  color: var(--blue); text-align: center; max-width: 700px; margin: 4px auto 0;
}
#about .detail-head { border-bottom: none; padding-bottom: 0; margin-bottom: 30px; }
#about .detail-main h2 { color: var(--text); font-family: var(--serif); font-weight: 700; font-size: 17px; margin: 24px 0 6px; }
.detail-head .tradition { color: var(--blue); font-size: 17px; margin: 0 0 2px; }
.detail-head .place { color: var(--muted); margin: 0; font-size: 15px; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 34px; align-items: start; }
.detail-main h2 { font-family: var(--display); font-weight: 600; color: var(--blue); font-size: 20px; margin: 28px 0 8px; }
.detail-main p { margin: 0 0 12px; font-size: 17px; }

.facts-price { text-align: center; padding: 4px 0 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.facts-price-amount { display: block; font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.1; color: var(--blue-deep); }
.facts-price-unit { display: block; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.facts-price-src { display: inline-block; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.facts-price-src:hover { color: var(--blue); }
.facts { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; position: sticky; top: 84px; }
.facts dl { margin: 0; display: grid; gap: 14px; }
.facts .fact-label { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); }
.facts .fact-value { margin: 3px 0 0; font-size: 15px; }
.facts a { color: var(--blue); word-break: break-word; }
.badge { display: inline-block; font-size: 13px; padding: 2px 11px; border-radius: 999px; text-transform: capitalize; }
.badge.yes { background: #e3f3ea; color: #1c6b43; }
.badge.no { background: #fbe6e6; color: #9b2c2c; }
.badge.partial { background: #fbf1d9; color: #8a5a12; }
.badge.unknown { background: var(--blue-soft); color: var(--muted); }
.badge.diet { background: #e3f3ea; color: #1c6b43; }

.detail-tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 6px 0 4px; }
.taglabel { font-size: 13px; color: #fff; border-radius: 999px; padding: 4px 12px; }

.sources { font-size: 15px; padding-left: 20px; }
.sources li { margin-bottom: 4px; }

.site-footer { margin-top: auto; padding: 28px 0; }
.site-footer p { color: var(--muted); font-size: 14px; margin: 0; text-align: center; }

@media (max-width: 820px) {
  .detail-grid { grid-template-columns: 1fr; }
  .facts { position: static; }
  .viewtoggle { margin-left: 0; }
  .detail-head h1 { font-size: 30px; }
  /* vertical space is scarce on phones — let the header scroll away
     instead of pinning it to the top */
  .site-header { position: static; }
}
