:root {
  --navy: #071a2d;
  --navy-soft: #0c2a45;
  --blue: #29a9df;
  --blue-light: #8bdcf6;
  --page: #f3f7f9;
  --white: #ffffff;
  --text: #142b3a;
  --muted: #607786;
  --border: #d7e1e7;
  --shadow: 0 12px 34px rgba(7, 26, 45, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  background: var(--page);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.45;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header {
  position: relative;
  z-index: 1000;
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.18);
}

.header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--white);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-drop {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 12%;
  color: var(--navy);
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
  transform: rotate(45deg);
  box-shadow: 0 8px 22px rgba(41, 169, 223, 0.28);
}

.brand-drop::first-letter {
  transform: rotate(-45deg);
}

.brand-drop {
  font-size: 0;
}

.brand-drop::after {
  content: "F";
  font-size: 16px;
  font-weight: 900;
  transform: rotate(-45deg);
}

.header-link {
  color: var(--blue-light);
  text-decoration: none;
  font-weight: 700;
}

.hero {
  color: var(--white);
  background:
    radial-gradient(circle at 15% 0%, rgba(41, 169, 223, 0.27), transparent 33rem),
    linear-gradient(140deg, var(--navy), var(--navy-soft));
}

.hero-inner {
  min-height: 310px;
  padding: 62px 0 86px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 48px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy {
  max-width: 760px;
  margin: 24px 0 0;
  color: #d9edf7;
  font-size: clamp(1rem, 2vw, 1.2rem);
}

.hero-actions {
  min-width: 180px;
  display: grid;
  gap: 10px;
}

.button {
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-weight: 800;
}

.button-primary {
  color: #04131d;
  background: linear-gradient(135deg, var(--blue-light), var(--blue));
}

.button-secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.search-panel {
  position: relative;
  z-index: 900;
  margin-top: -38px;
  padding: 18px;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.search-panel label {
  display: grid;
  gap: 7px;
  color: #3f5868;
  font-size: 0.82rem;
  font-weight: 800;
}

.search-panel input,
.search-panel select {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--text);
  border: 1px solid #bbcbd4;
  border-radius: 8px;
  background: var(--white);
}

.search-panel input:focus,
.search-panel select:focus {
  border-color: var(--blue);
  outline: 3px solid rgba(41, 169, 223, 0.16);
}

.map-layout {
  width: min(1440px, calc(100% - 32px));
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  gap: 20px;
}

.map-column,
.results-column {
  min-height: 660px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.map-column {
  position: relative;
}

#map {
  width: 100%;
  height: 660px;
  background: #dfeaf0;
}

.map-message {
  position: absolute;
  z-index: 700;
  top: 18px;
  left: 50%;
  width: min(520px, calc(100% - 36px));
  padding: 12px 15px;
  border: 1px solid #d1dde4;
  border-radius: 9px;
  color: #355163;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(7, 26, 45, 0.13);
  transform: translateX(-50%);
}

.results-column {
  display: flex;
  flex-direction: column;
}

.results-heading {
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
}

.results-heading h2 {
  margin: 0;
  font-size: 1.35rem;
}

.count-badge {
  min-width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--navy);
  background: #dcf2fb;
  font-weight: 900;
}

.status-message {
  margin: 18px;
  padding: 14px;
  border: 1px solid #cbdce5;
  border-radius: 9px;
  color: #3a596a;
  background: #f2f9fc;
}

.results-list {
  overflow-y: auto;
}

.result-card {
  width: 100%;
  padding: 20px 22px;
  display: block;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--white);
  text-align: left;
}

.result-card:hover,
.result-card:focus {
  background: #f5fbfd;
  outline: none;
}

.result-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.result-card h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1.05rem;
}

.result-card p {
  margin: 6px 0 0;
  color: var(--muted);
}

.result-distance {
  flex: 0 0 auto;
  color: #177fa9;
  font-size: 0.82rem;
  font-weight: 900;
}

.result-tags {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 4px 8px;
  border-radius: 999px;
  color: #365466;
  background: #edf3f6;
  font-size: 0.72rem;
  font-weight: 800;
}

.water-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 3px solid var(--white);
  border-radius: 50% 50% 50% 12%;
  color: var(--white);
  background: #188ec0;
  box-shadow: 0 4px 12px rgba(7, 26, 45, 0.35);
  transform: rotate(45deg);
}

.water-marker span {
  font-size: 13px;
  font-weight: 900;
  transform: rotate(-45deg);
}

.water-marker.type-private-fill-station {
  background: #6c56b5;
}

.water-marker.type-hydrant-meter-program {
  background: #d36b35;
}

.water-marker.type-approved-hydrant-fill-location {
  background: #d34b4b;
}

.water-marker.type-water-delivery-company {
  background: #367d55;
}

.water-marker.type-temporary-project-source {
  background: #7a6d54;
}

.user-marker {
  width: 18px;
  height: 18px;
  border: 4px solid var(--white);
  border-radius: 50%;
  background: #0a77ff;
  box-shadow: 0 0 0 2px #0a77ff, 0 4px 12px rgba(7, 26, 45, 0.35);
}

.popup-card {
  min-width: 260px;
  max-width: 320px;
}

.popup-card h3 {
  margin: 0 0 6px;
  color: var(--navy);
}

.popup-card p {
  margin: 5px 0;
}

.popup-label {
  color: #526a78;
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.popup-actions {
  margin-top: 13px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.popup-actions a {
  padding: 7px 10px;
  border-radius: 7px;
  color: var(--white);
  background: var(--navy);
  text-decoration: none;
  font-weight: 800;
}

.popup-actions a.secondary {
  color: var(--navy);
  background: #dff3fb;
}

.trust-section {
  padding: 72px 0;
}

.trust-section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.3rem);
  letter-spacing: -0.04em;
}

.trust-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.trust-grid article {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--white);
}

.trust-grid h3 {
  margin: 0 0 9px;
}

.trust-grid p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  color: #b9d0dd;
  background: var(--navy);
}

.footer-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 0.86rem;
}

@media (max-width: 1050px) {
  .search-panel {
    grid-template-columns: 1fr 1fr;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .results-column {
    min-height: auto;
  }

  .results-list {
    max-height: 520px;
  }
}

@media (max-width: 700px) {
  .header-link {
    display: none;
  }

  .hero-inner {
    padding: 44px 0 72px;
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions {
    grid-template-columns: 1fr 1fr;
  }

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

  .map-layout {
    width: 100%;
    gap: 0;
  }

  .map-column,
  .results-column {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  #map,
  .map-column {
    height: 480px;
    min-height: 480px;
  }

  .trust-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    padding: 22px 0;
    align-items: flex-start;
    flex-direction: column;
  }
}
