:root {
  color-scheme: light;
  --bg: #f6f1e7;
  --bg-deep: #efe6d7;
  --surface: #ffffff;
  --ink: #1d1b16;
  --muted: #6b645a;
  --accent: #b22222;
  --accent-strong: #8f1a1a;
  --shadow: 0 18px 40px rgba(29, 27, 22, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Work Sans", "Trebuchet MS", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fff7ea 0%, var(--bg) 40%, #f2e8d9 100%);
  line-height: 1.6;
}

a {
  color: var(--accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(720px, 92vw);
  margin: 0 auto;
}

.site-hero {
  padding: 64px 0 48px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(246, 241, 231, 0.95));
  position: relative;
  overflow: hidden;
}

.site-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='1200' height='600' viewBox='0 0 1200 600' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M50 500C200 350 400 380 600 420C800 460 1000 530 1150 420' stroke='%23d8cbb8' stroke-width='2' stroke-linecap='round' stroke-dasharray='5 12'/%3E%3C/svg%3E") center/cover no-repeat;
  opacity: 0.5;
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 1;
}

.site-footer {
  text-align: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}

h1, h2 {
  font-family: "Fraunces", "Times New Roman", serif;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(20px, 4vw, 46px);
  line-height: 1.15;
}

h2 {
  font-size: clamp(26px, 3vw, 32px);
  line-height: 1.2;
}

.intro {
  font-size: 16px;
  color: var(--ink);
  max-width: 720px;
}

.hero-panel {
  margin-top: 32px;
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  position: relative;
  z-index: 1;
}

.hero-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  display: flex; 
  justify-content: space-between; 
  align-items: center; 
  width: 100%;
  flex-wrap: wrap; 
  row-gap: 12px;
}

.hero-card-title {
  font-weight: 600;
  margin: 0 0 8px;
}

.hero-card-text {
  color: var(--muted);
  margin: 0 0 16px;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.hero-cta:hover {
  background: var(--accent-strong);
  text-decoration: none;
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.section-header p {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
}

.map-section {
  padding: 48px 0 40px;
}

.map-shell {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
}


.leaflet-map {
  width: 100%;
  height: clamp(340px, 62vh, 560px);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

/* Leaflet UI tweaks to match site tone */
.leaflet-container {
  font-family: inherit;
}

.leaflet-control-attribution {
  font-size: 11px;
}

/* Custom marker rendered via L.divIcon */
.leaflet-pin {
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: var(--accent);
  transform: rotate(-45deg);
  box-shadow: 0 8px 16px rgba(178, 34, 34, 0.35);
  border: none;
  position: relative;
}

.leaflet-pin::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  top: 6px;
  left: 6px;
}

.leaflet-pin--highlight::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: rgba(178, 34, 34, 0.2);
  animation: pulse 1.8s ease-out infinite;
}

.pin {
  position: absolute;
  transform: translate(-50%, -100%);
  pointer-events: auto;
  width: 22px;
  height: 22px;
  border-radius: 50% 50% 50% 0;
  background: var(--accent);
  transform: translate(-50%, -100%) rotate(-45deg);
  box-shadow: 0 8px 16px rgba(178, 34, 34, 0.35);
  border: none;
  cursor: pointer;
}

.pin::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  top: 6px;
  left: 6px;
}

.pin--highlight::before {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: rgba(178, 34, 34, 0.2);
  animation: pulse 1.8s ease-out infinite;
}

.pin:focus-visible {
  outline: 3px solid #2d6a4f;
  outline-offset: 4px;
}

.map-legend {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  font-size: 14px;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
}

.legend-dot--highlight {
  box-shadow: 0 0 0 6px rgba(178, 34, 34, 0.15);
}

.list-section {
  padding: 24px 0 80px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.search-bar input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid #d8cbb8;
  padding: 12px 18px;
  font-size: 15px;
  font-family: inherit;
}

.results-count {
  font-size: 14px;
  color: var(--muted);
}

.cards-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card h3 {
  margin: 0;
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.card button {
  align-self: flex-start;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #d7c7b2;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
}

.card button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.panel {
  position: fixed;
  inset: 0;
  display: none;
  /* Leaflet controls can reach z-index 1000; keep the panel above. */
  z-index: 2000;
}

.panel.is-open {
  display: block;
}

.panel-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 15, 0.55);
}

.panel-content {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  background: var(--surface);
  box-shadow: none;
  display: flex;
  flex-direction: column;
  animation: slideIn 0.35s ease-out;
}

.panel-close {
  align-self: flex-end;
  margin: 16px;
  border: none;
  background: var(--bg-deep);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 600;
}

.panel-body {
  padding: 0 24px 32px;
  overflow-y: auto;
}

.panel-body h3 {
  margin-top: 0;
  font-size: 22px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(178, 34, 34, 0.1);
  color: var(--accent-strong);
  margin-bottom: 12px;
}

.gallery {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.gallery figure {
  margin: 0;
  background: #fdfbf8;
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid #efe3d3;
}

.gallery img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}

.gallery figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}

@keyframes pulse {
  0% {
    transform: scale(0.3);
    opacity: 0.8;
  }
  70% {
    transform: scale(1.4);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

@keyframes slideIn {
  from {
    transform: translateX(20px);
    opacity: 0.6;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@media (max-width: 720px) {
  .site-hero {
    padding-top: 40px;
  }

  .map-shell {
    padding: 12px;
  }

  .leaflet-map {
    height: 360px;
  }

  .panel-content {
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
