/* ── Reset & Base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal:       #0d7a8e;
  --teal-dark:  #095f6e;
  --teal-light: #e6f4f7;
  --accent:     #f4801a;
  --text:       #1a202c;
  --text-muted: #6b7280;
  --border:     #e5e7eb;
  --white:      #ffffff;
  --bg:         #f8fafc;
  --card-shadow: 0 2px 8px rgba(0,0,0,.08);
  --card-hover:  0 6px 20px rgba(0,0,0,.14);
  --radius:     10px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

/* ── Header / Nav ─────────────────────────────────────── */
.site-header {
  background: var(--teal);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0,0,0,.25);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg { width: 22px; height: 22px; fill: var(--teal); }

.logo-sub {
  font-size: .75rem;
  font-weight: 400;
  opacity: .85;
  display: block;
  line-height: 1;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-count {
  background: rgba(255,255,255,.2);
  border-radius: 999px;
  padding: .2rem .75rem;
  font-size: .8rem;
  font-weight: 600;
}

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 3.5rem 1.25rem 3rem;
}

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: .5rem;
  letter-spacing: -.5px;
}

.hero p {
  font-size: 1.05rem;
  opacity: .9;
  max-width: 520px;
  margin: 0 auto 1.75rem;
}

/* ── Search Bar ───────────────────────────────────────── */
.search-wrap {
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

.search-wrap input {
  width: 100%;
  padding: .85rem 1rem .85rem 3rem;
  border-radius: var(--radius);
  border: none;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

.search-wrap input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

/* ── Filter Bar ───────────────────────────────────────── */
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: .85rem 1.25rem;
  position: sticky;
  top: 64px;
  z-index: 90;
}

.filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  flex-shrink: 0;
}

.filter-chips {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.chip {
  padding: .3rem .85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all .15s ease;
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-light);
}

.chip.active {
  border-color: var(--teal);
  background: var(--teal);
  color: var(--white);
}

.filter-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Neighborhood Filter ──────────────────────────────── */
.location-select {
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-muted);
  outline: none;
  cursor: pointer;
  transition: border-color .15s;
  font-family: inherit;
}

.location-select:focus,
.location-select:hover { border-color: var(--teal); color: var(--teal); }

/* ── Results Bar ──────────────────────────────────────── */
.results-bar {
  max-width: 1200px;
  margin: 1.5rem auto .5rem;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.results-count {
  font-size: .9rem;
  color: var(--text-muted);
}

.results-count strong { color: var(--text); }

.sort-select {
  padding: .3rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  font-size: .82rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  outline: none;
  cursor: pointer;
}

/* ── Clinic Grid ──────────────────────────────────────── */
.clinic-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* ── Clinic Card ──────────────────────────────────────── */
.clinic-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
  overflow: hidden;
}

.clinic-card:hover {
  box-shadow: var(--card-hover);
  transform: translateY(-2px);
}

.card-header {
  background: var(--teal-light);
  padding: 1.1rem 1.25rem .9rem;
  border-bottom: 1px solid var(--border);
}

.card-neighborhood {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: .3rem;
}

.card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.card-rating {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .45rem;
}

.stars {
  display: flex;
  gap: 2px;
}

.star {
  width: 14px;
  height: 14px;
  fill: #f59e0b;
}

.star.half { fill: url(#halfStar); }
.star.empty { fill: #d1d5db; }

.rating-num {
  font-size: .82rem;
  font-weight: 700;
  color: var(--text);
}

.rating-count {
  font-size: .78rem;
  color: var(--text-muted);
}

.card-body {
  padding: 1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .55rem;
}

.card-info-row {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  font-size: .85rem;
  color: var(--text-muted);
}

.card-info-row svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
  stroke: var(--teal);
}

.card-info-row a {
  color: var(--teal);
  font-weight: 500;
}
.card-info-row a:hover { text-decoration: underline; }

.card-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .2rem;
}

.specialty-tag {
  font-size: .72rem;
  font-weight: 600;
  padding: .18rem .6rem;
  border-radius: 999px;
  background: var(--teal-light);
  color: var(--teal-dark);
  border: 1px solid rgba(13,122,142,.2);
}

.card-footer {
  padding: .85rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: .75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem 1rem;
  border-radius: 7px;
  font-size: .84rem;
  font-weight: 600;
  border: none;
  transition: all .15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  flex: 1;
  justify-content: center;
}

.btn-primary:hover { background: var(--teal-dark); }

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-light);
}

.btn svg { width: 14px; height: 14px; }

/* ── Empty State ──────────────────────────────────────── */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-muted);
}

.empty-state svg {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  stroke: #d1d5db;
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: .5rem;
}

/* ── Footer ───────────────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 2rem 1.25rem;
  font-size: .85rem;
}

.site-footer a { color: rgba(255,255,255,.9); }
.site-footer a:hover { text-decoration: underline; }
.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}

/* ── Detail Page ──────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--teal);
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 1.25rem;
  transition: gap .15s;
}
.back-link:hover { gap: .6rem; }
.back-link svg { width: 16px; height: 16px; }

.detail-page {
  max-width: 960px;
  margin: 2rem auto;
  padding: 0 1.25rem 4rem;
}

.detail-hero {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.detail-hero-left { flex: 1; min-width: 240px; }

.detail-neighborhood {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: .3rem;
}

.detail-name {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: .6rem;
}

.detail-rating {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1rem;
}

.detail-rating .rating-num { font-size: 1.1rem; }

.detail-specialties {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.detail-hero-right {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex-shrink: 0;
}

.detail-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .65rem 1.25rem;
  border-radius: 8px;
  font-size: .9rem;
  font-weight: 600;
  border: none;
  transition: all .15s;
  min-width: 180px;
  justify-content: center;
}

.btn-call {
  background: var(--teal);
  color: var(--white);
}
.btn-call:hover { background: var(--teal-dark); }

.btn-directions {
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-directions:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }

.btn-website {
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-website:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }

.detail-contact-btn svg { width: 16px; height: 16px; }

/* ── Detail Sections ──────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 720px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-section {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.detail-section h2 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: .6rem;
  border-bottom: 2px solid var(--teal-light);
  color: var(--text);
}

.detail-description {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Hours Table */
.hours-table { width: 100%; font-size: .88rem; }
.hours-table tr { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid var(--border); }
.hours-table tr:last-child { border-bottom: none; }
.hours-day { font-weight: 600; color: var(--text); }
.hours-time { color: var(--text-muted); }
.hours-closed { color: #ef4444; }
.hours-today .hours-day,
.hours-today .hours-time { color: var(--teal); font-weight: 700; }

/* Map */
.map-embed {
  width: 100%;
  height: 240px;
  border-radius: 8px;
  border: none;
  display: block;
}

/* Reviews */
.reviews-list { display: flex; flex-direction: column; gap: 1rem; }

.review-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.1rem;
}

.review-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .5rem;
}

.review-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}

.review-author { font-weight: 700; font-size: .9rem; }
.review-text { font-size: .88rem; color: var(--text-muted); line-height: 1.65; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
  .hero { padding: 2.5rem 1rem 2rem; }
  .filter-inner { gap: .5rem; }
  .clinic-grid { grid-template-columns: 1fr; }
  .detail-hero { flex-direction: column; }
  .detail-hero-right { width: 100%; flex-direction: row; flex-wrap: wrap; }
  .detail-contact-btn { flex: 1; min-width: 140px; }
  .card-footer { flex-direction: column; }
}

@media (max-width: 480px) {
  .logo-sub { display: none; }
}
