:root {
  --deep-teal: #0B4F5C;
  --primary-teal: #0E7C8C;
  --teal-green: #2E9B7A;
  --sage-green: #6FBF8B;
  --mint-bright: #A3E9BF; /* higher-contrast green for text on dark-teal backgrounds */
  --coral: #F2805E;
  --coral-dark: #DD6947;
  --mint: #EAF6EE;
  --charcoal: #1F2D2B;
  --white: #FFFFFF;
  --shadow: 0 4px 16px rgba(11, 79, 92, 0.12);
  --shadow-lg: 0 8px 30px rgba(11, 79, 92, 0.18);
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--mint);
  color: var(--charcoal);
  scroll-behavior: smooth;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  box-shadow: 0 2px 10px rgba(11,79,92,0.06);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo-link img { height: 38px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--deep-teal);
}
.nav-links a.cta {
  background: var(--coral);
  color: var(--white);
  padding: 10px 20px;
  border-radius: 999px;
  transition: background .15s ease;
}
.nav-links a.cta:hover { background: var(--coral-dark); }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color: var(--deep-teal); cursor: pointer; }

/* ---------- Hero ---------- */
/* The photo is the point here - the overlay only darkens a band at the
   very bottom, behind the headline, so most of the image stays visible.
   The search form used to live inside this section; it's now its own
   floating .search-band directly below so it no longer covers the photo. */
.hero {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  background: #0B4F5C;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11,79,92,0.88) 0%, rgba(11,79,92,0.5) 38%, rgba(11,79,92,0.05) 72%);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: var(--white);
  max-width: 640px;
  padding: 40px 0 56px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--mint-bright);
  margin: 0 0 14px;
}
.hero-content h1 {
  font-size: 2.6rem;
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 800;
  text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}
.hero-content h1 span { color: var(--mint-bright); }
.hero-content p {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0;
  max-width: 480px;
  text-shadow: 0 1px 8px rgba(0,0,0,0.2);
}

/* ---------- Search band (floats up over the hero's bottom edge) ---------- */
.search-band {
  position: relative;
  z-index: 3;
  margin-top: -34px;
  padding-bottom: 44px;
}
.search-band .search-box { max-width: 920px; margin: 0 auto; }
.search-band .suggested-areas { max-width: 920px; margin: 16px auto 0; justify-content: center; }

/* ---------- Search box ---------- */
.search-box {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.search-box input[type="text"] {
  flex: 1 1 220px;
  border: 1px solid #DCE9E6;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  color: var(--charcoal);
}
.search-box select {
  flex: 1 1 180px;
  border: 1px solid #DCE9E6;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 1rem;
  background: var(--white);
  color: var(--charcoal);
}
.search-box button {
  flex: 0 0 auto;
  background: var(--coral);
  color: var(--white);
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.search-box button:hover { background: var(--coral-dark); }

/* ---------- Suggested nearby areas (home) ---------- */
.suggested-areas {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.suggested-label {
  color: #4b6460;
  font-size: 0.85rem;
  font-weight: 600;
}
.area-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.area-chip {
  background: var(--mint);
  border: 1px solid #CFE8DA;
  color: var(--deep-teal);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.area-chip:hover { background: #DCF2E4; border-color: var(--teal-green); }

/* ---------- Waiting room (home) ---------- */
.waiting-room { background: var(--white); padding: 56px 0; }
.waiting-room .intro { max-width: 640px; margin: 0 auto 36px; text-align: center; }
.waiting-room .intro h2 { color: var(--deep-teal); font-size: 1.6rem; margin: 0 0 10px; }
.waiting-room .intro p { color: #4b6460; font-size: 1.02rem; line-height: 1.6; margin: 0; }
.fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.fact-card {
  background: var(--mint);
  border-radius: var(--radius);
  padding: 22px;
  border-left: 4px solid var(--teal-green);
}
.fact-card h3 { margin: 0 0 8px; color: var(--deep-teal); font-size: 1.02rem; }
.fact-card p { margin: 0; color: #4b6460; font-size: 0.92rem; line-height: 1.55; }

/* ---------- Category pills (home) ---------- */
.categories-section { padding: 56px 0; }
.categories-section h2 {
  text-align: center;
  color: var(--deep-teal);
  font-size: 1.7rem;
  margin-bottom: 8px;
}
.categories-section .sub {
  text-align: center;
  color: #4b6460;
  margin-bottom: 32px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.category-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
  overflow: hidden;
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.category-card .thumb { width: 100%; aspect-ratio: 1 / 1; overflow: hidden; }
.category-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.category-card .body { padding: 20px 18px 26px; }
.category-card .emoji { font-size: 2.2rem; margin-bottom: 10px; }
.category-card h3 { margin: 0 0 6px; color: var(--deep-teal); font-size: 1.15rem; }
.category-card p { margin: 0; color: #5a7571; font-size: 0.92rem; }

/* ---------- Search results page ---------- */
.results-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 24px;
  padding: 28px 0 60px;
  align-items: start;
}
.filters-panel {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 90px;
}
.filters-panel h3 { margin-top: 0; color: var(--deep-teal); }
.filter-group { margin-bottom: 20px; }
.filter-group label { display: block; font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--deep-teal); }
.filter-group select, .filter-group input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #DCE9E6;
  font-size: 0.95rem;
}
.filter-apply {
  width: 100%;
  background: var(--primary-teal);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-weight: 700;
  cursor: pointer;
}
.filter-apply:hover { background: var(--deep-teal); }

.results-main { min-width: 0; }
/* Sticky: stays anchored in view while the list below it scrolls, the
   same way the filters panel does, and stops at the end of the list. */
.map-wrap {
  position: sticky;
  top: 90px;
  z-index: 5;
  margin-bottom: 20px;
}
#map { height: 320px; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }

/* ---------- Map detail overlay (search results) ---------- */
/* Shown in place over the same map instance when a listing or pin is
   selected - no navigation, no re-fetch, no new map/tile init. */
.map-detail-card {
  display: none;
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 500;
  width: 320px;
  max-width: calc(100% - 32px);
  max-height: calc(100% - 32px);
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 20px 20px 18px;
}
.map-detail-card.open { display: block; }
.map-detail-card .card-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: #5a7571;
  cursor: pointer;
}
.map-detail-card .listing-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.map-detail-card h3 { margin: 0 20px 6px 0; color: var(--deep-teal); font-size: 1.1rem; }
.map-detail-card .meta { font-size: 0.88rem; color: #5a7571; margin: 0 0 8px; }
.map-detail-card .rating { display: block; font-size: 0.9rem; color: var(--deep-teal); font-weight: 700; margin-bottom: 4px; }
.map-detail-card .card-actions { display: flex; gap: 8px; margin-top: 14px; }
.map-detail-card .card-actions a {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}
.map-detail-card .btn-website { background: var(--coral); color: var(--white); }
.map-detail-card .btn-website:hover { background: var(--coral-dark); }
.map-detail-card .btn-view { background: transparent; color: var(--deep-teal); border: 1.5px solid var(--deep-teal); }
.referral-note { font-size: 0.75rem; color: #8a9793; margin: 8px 0 0; text-align: center; }

.listing-card { cursor: pointer; }
.listing-card.active { border: 2px solid var(--primary-teal); box-shadow: var(--shadow-lg); }
.listing-card.featured.active { border-color: var(--coral); }

.results-count { color: #4b6460; margin: 0 0 16px; font-size: 0.95rem; }

.listing-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
  transition: box-shadow .15s ease;
}
.listing-card:hover { box-shadow: var(--shadow-lg); }
.listing-card.featured { border: 2px solid var(--coral); }
.listing-thumb {
  flex: 0 0 90px;
  height: 90px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--teal-green), var(--primary-teal));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.6rem;
  font-weight: 700;
  overflow: hidden;
}
.listing-thumb img { width: 100%; height: 100%; object-fit: cover; }
.listing-body { flex: 1; min-width: 0; }
.listing-body h3 { margin: 0 0 4px; font-size: 1.1rem; color: var(--deep-teal); }
.listing-meta { font-size: 0.88rem; color: #5a7571; margin: 0 0 6px; }
.listing-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.tag {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--teal-green);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.tag.sponsored {
  background: var(--coral);
  color: var(--white);
}
.listing-rating { font-size: 0.9rem; color: var(--deep-teal); font-weight: 700; }
.listing-distance { font-size: 0.85rem; color: #5a7571; white-space: nowrap; }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #5a7571;
}

/* ---------- Business detail page ---------- */
.business-hero {
  background: var(--deep-teal);
  color: var(--white);
  padding: 40px 0;
}
.business-hero .tags { margin-bottom: 10px; }
.business-hero h1 { margin: 0 0 8px; font-size: 2rem; }
.business-hero .meta { opacity: 0.9; }

.business-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 28px;
  padding: 32px 0 60px;
}
.business-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}
.business-section h2 { margin-top: 0; color: var(--deep-teal); font-size: 1.2rem; }
.disclaimer {
  font-size: 0.85rem;
  color: #78716c;
  background: #FFF7ED;
  border-left: 3px solid var(--coral);
  padding: 10px 14px;
  border-radius: 6px;
}
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 8px 0; border-bottom: 1px solid #EEF5F3; font-size: 0.95rem; }
.contact-list li:last-child { border-bottom: none; }
.btn-primary {
  display: inline-block;
  background: var(--coral);
  color: var(--white);
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-align: center;
  width: 100%;
}
.btn-primary:hover { background: var(--coral-dark); }
.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--deep-teal);
  border: 1.5px solid var(--deep-teal);
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  text-align: center;
  width: 100%;
  margin-top: 10px;
  cursor: pointer;
}

.claim-form { display: flex; flex-direction: column; gap: 10px; }
.claim-form input, .claim-form select, .claim-form textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #DCE9E6;
  font-size: 0.92rem;
  font-family: inherit;
}
.claim-form textarea { min-height: 80px; resize: vertical; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--deep-teal);
  color: rgba(255,255,255,0.8);
  padding: 32px 0;
  margin-top: 40px;
  font-size: 0.88rem;
  text-align: center;
}
.site-footer a { color: var(--mint-bright); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .results-layout, .business-layout { grid-template-columns: 1fr; }
  .filters-panel { position: static; }
  .hero-content h1 { font-size: 2rem; }
}

@media (max-width: 640px) {
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 20px;
    box-shadow: var(--shadow);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero { min-height: 380px; }
  .hero-content h1 { font-size: 1.7rem; }
  .hero-overlay { background: linear-gradient(0deg, rgba(11,79,92,0.92) 0%, rgba(11,79,92,0.6) 55%, rgba(11,79,92,0.1) 85%); }
  .search-band { margin-top: -28px; }
  .search-box { flex-direction: column; }
  /* Keep the card as a row (name/address stays right next to the thumb)
     instead of stacking a full-width banner above the text - that banner
     was pushing all the useful info below the fold on phones. */
  .listing-card { padding: 14px; gap: 12px; }
  .listing-thumb { flex: 0 0 64px; width: 64px; height: 64px; font-size: 1.1rem; }

  /* Overlay card becomes a bottom sheet on small screens so it doesn't
     cover the whole (shorter) map. */
  .map-detail-card {
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    max-width: 100%;
    max-height: 65%;
    border-radius: 14px 14px 0 0;
  }
}
