:root {
  --bg: #f5f7fa;
  --panel: #ffffff;
  --border: #e2e8f0;
  --muted: #64748b;
  --text: #1e293b;
  --brand1: #0ea5b7;
  --brand2: #0891a3;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background: #f5f7fa;
  color: #1e293b;
  overflow-x: hidden;
}

.wrap {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
}

.loc-hero {
  padding: clamp(2.25rem, 6vw, 3.75rem) 0 clamp(1.5rem, 4vw, 2.5rem);
  background: linear-gradient(135deg, #e6f4f7, #f8fbfd);
  text-align: center;
}

.kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
}

.loc-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 7vw, 2.55rem);
  line-height: 1.15;
  font-weight: 800;
  color: #0f172a;
}

.loc-hero .sub {
  max-width: 760px;
  margin: 0 auto 1.25rem;
  color: #475569;
}

.loc-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 110px;
  gap: 10px;
  align-items: center;
  margin: 12px 0 14px;
}

.loc-search input,
.loc-search select {
  width: 100%;
  min-height: 48px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  outline: none;
}

.loc-search input::placeholder {
  color: #94a3b8;
}

.loc-search button {
  min-height: 48px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.loc-search button:hover {
  border-color: #0ea5b7;
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
}

.btn-primary {
  background: #0ea5b7;
  color: white;
  border: none;
  transition: 0.25s ease;
}

.btn-primary:hover {
  background: #0891a3;
}

.btn-secondary {
  background: white;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.loc-shell {
  margin: 18px 0 36px;
  display: grid;
  grid-template-columns: minmax(320px, 390px) minmax(0, 1fr);
  gap: 14px;
  align-items: stretch;
}

.loc-list,
.loc-map {
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border: none;
  overflow: hidden;
  min-width: 0;
}

.loc-map {
  position: relative;
}

.list-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.list-head h2 {
  margin: 0;
  font-size: 16px;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 0;
}

.list-scroll {
  height: clamp(360px, 65vh, 560px);
  overflow: auto;
  padding: 10px;
}

.list-item {
  position: relative;
  background: linear-gradient(180deg, #ffffff, #f8fbfe);
  border-radius: 16px;
  border: 1px solid #dbe5ee;
  padding: 14px 14px 12px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
}

.list-item:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 183, 0.55);
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(14, 116, 144, 0.12);
}

.list-item:focus-visible {
  outline: 3px solid rgba(14, 165, 183, 0.35);
  outline-offset: 2px;
}

.list-item.active {
  border-color: #0ea5b7;
  background: linear-gradient(180deg, #ecfeff, #f0fbff);
  box-shadow: 0 10px 24px rgba(14, 116, 144, 0.18);
}

.list-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.list-item-name::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  box-shadow: 0 0 0 4px rgba(14, 165, 183, 0.16);
  flex: 0 0 10px;
}

.list-item-region {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.25);
  color: #0f4f64;
  background: #f0f9ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.01em;
  padding: 4px 10px;
}

.list-item-region.is-rural {
  border-color: rgba(14, 165, 183, 0.42);
  background: #ecfeff;
}

/* Service sub-links under city names on Locations page */
.loc-sub-services {
  display: block;
  margin-top: 2px;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted);
}
.loc-sub-services a {
  color: var(--brand1);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.loc-sub-services a:hover {
  color: var(--brand2);
  text-decoration: underline;
}

.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.badge {
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #ffffff;
}

.badge.region {
  border-color: rgba(14, 165, 183, 0.35);
}

.badge.rural {
  border-color: rgba(14, 165, 183, 0.5);
}

.item-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

.item-meta a {
  color: #0c4a6e;
  text-decoration: none;
}

.item-meta a:hover {
  text-decoration: underline;
}

.map {
  width: 100%;
  min-height: 320px;
  height: clamp(320px, 62vh, 560px);
  border-radius: 20px;
  overflow: hidden;
}

#map {
  width: 100%;
  height: 100%;
}

.map-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  text-align: center;
  color: #334155;
  background: linear-gradient(180deg, #f8fdff, #eef7fc);
}

.map-foot {
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1100px) {
  .loc-shell {
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  }
}

@media (max-width: 980px) {
  .loc-shell {
    grid-template-columns: 1fr;
  }

  .loc-map {
    order: 1;
  }

  .loc-list {
    order: 2;
  }

  .map {
    min-height: 300px;
    height: clamp(300px, 54vh, 460px);
  }

  .list-scroll {
    height: clamp(300px, 48vh, 420px);
  }

  .loc-search {
    grid-template-columns: 1fr 1fr;
  }

  .loc-search button {
    grid-column: 1 / -1;
  }
}

@media (max-width: 760px) {
  .wrap {
    width: min(1200px, calc(100% - 1.25rem));
  }

  .loc-hero {
    text-align: left;
  }

  .loc-search {
    grid-template-columns: 1fr;
  }

  .loc-search button {
    grid-column: auto;
  }

  .cta-row {
    flex-direction: column;
  }

  .cta-row .btn-primary,
  .cta-row .btn-secondary {
    width: 100%;
  }
}

.mobile-call-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: linear-gradient(135deg, var(--brand1), var(--brand2));
  color: #ffffff;
  text-align: center;
  padding: 16px 18px;
  font-weight: 900;
  font-size: 16px;
  text-decoration: none;
  z-index: 9999;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.2);
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
}

@media (max-width: 767px) {
  body {
    padding-bottom: 78px;
  }
}

@media (min-width: 768px) {
  .mobile-call-btn {
    display: none;
  }

  body {
    padding-bottom: 0;
  }
}
