﻿:root {
  color-scheme: light;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #eff4fb;
  color: #0f172a;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 28%),
              radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.10), transparent 22%),
              #eff4fb;
}
button,
input,
select {
  font: inherit;
}
.hero {
  position: relative;
  padding: 2.4rem 1.75rem 3rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: #f8fafc;
}
.hero-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
}
.hero-subcopy {
  margin-top: 1.5rem;
  max-width: 45rem;
  color: #cbd5e1;
  line-height: 1.75;
}
.hero-top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.hero-bottom-action {
  position: absolute;
  right: 1.75rem;
  bottom: 4.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-end;
}
.hero-bottom-button-group {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.hero-bottom-button-with-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}
.hero-bottom-action .button {
  width: auto;
}
.hero-bottom-note {
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
  text-align: center;
  max-width: 15rem;
  display: block;
}
.toggle-group {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 999px;
  padding: 0.75rem 1rem;
}
.toggle-label {
  font-size: 0.95rem;
  opacity: 0.95;
  white-space: nowrap;
}
.toggle {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 28px;
}
.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  inset: 0;
  background-color: rgba(255,255,255,0.22);
  border-radius: 999px;
  transition: background-color 0.2s ease;
}
.slider::before {
  position: absolute;
  content: '';
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: transform 0.2s ease;
}
.toggle input:checked + .slider {
  background-color: #22c55e;
}
.toggle input:checked + .slider::before {
  transform: translateX(20px);
}
.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  opacity: 0.85;
}
h1 {
  margin: 0;
  font-size: clamp(2.8rem, 4vw, 4.2rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}
.tagline {
  margin: 1rem 0 0;
  max-width: 42rem;
  line-height: 1.75;
  opacity: 0.92;
}
.search-box {
  display: grid;
  gap: 0.95rem;
  max-width: 64rem;
  margin-top: 2rem;
}
.search-box select,
.search-box input {
  min-height: 4rem;
}
.search-box input,
.search-box select {
  width: 100%;
  padding: 1rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255,255,255,0.95);
  color: #0f172a;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.search-box input:focus,
.search-box select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.search-box input::placeholder {
  color: #64748b;
}
.search-box select {
  appearance: none;
}
@media (min-width: 720px) {
  .search-box {
    grid-template-columns: 1.7fr 0.85fr;
  }
}
main {
  padding: 1.5rem 1.75rem 2.5rem;
}
.location-row {
  display: grid;
  gap: 0.95rem;
  align-items: center;
}
.disclaimer {
  margin-top: 1.5rem;
  padding: 1.25rem 1.3rem;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  color: #1e293b;
  border-radius: 0.95rem;
  line-height: 1.8;
}
.map-top-row {
  margin-bottom: 1rem;
}
.secondary-button {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: white;
  color: #0f172a;
  padding: 1rem 1.4rem;
  border-radius: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.secondary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}
.location-note {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}
.map-section {
  max-width: 95rem;
  margin: 0 auto 1.75rem;
  height: 470px;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
#map {
  width: 100%;
  height: 100%;
}
.ems-section {
  position: relative;
  width: 100%;
  max-width: 95rem;
  margin: 0 auto 0.75rem;
  padding: 1rem 1.25rem;
  min-height: 140px;
  max-height: 200px;
  background: rgba(185, 28, 28, 0.92);
  border: 1.5px solid rgba(139, 20, 20, 0.8);
  border-radius: 1.4rem;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ems-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr;
  margin-top: 0.85rem;
}
.ems-section:empty {
  display: none;
}
.ems-header {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  justify-content: space-between;
}
.ems-header h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2vw, 1.85rem);
  color: #b45309;
}
.ems-description {
  margin: 0;
  color: #92400e;
  line-height: 1.5;
  max-width: 34rem;
  font-size: 0.94rem;
}
.ems-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 0.85rem;
  flex: 1;
}
.ems-card,
.ems-section .card {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
.ems-section .card-header,
.ems-section .meta,
.ems-section .actions {
  background: transparent !important;
}
.ems-card .card-header h2,
.ems-section h2,
.ems-section .ems-description,
.ems-section .ems-urgent-note,
.ems-section .meta span,
.ems-section .criteria,
.ems-section .description {
  color: #ffffff !important;
}
.ems-section .meta span {
  background: rgba(255,255,255,0.1) !important;
}
.ems-card .actions {
  flex-direction: column;
  gap: 0.75rem;
}
.ems-card .phone.ems-phone {
  background: #ffffff !important;
  color: #b91c1c !important;
  border: 1px solid rgba(255, 255, 255, 0.32) !important;
  box-shadow: none !important;
}
.ems-urgent-note {
  margin: 0.75rem 0 0;
  color: #ffffff !important;
  font-weight: 700;
}
.grid {
  display: grid;
  gap: 1.3rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.card {
  background: white;
  border-radius: 1.35rem;
  padding: 1.75rem;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.05);
}
.card h2 {
  margin: 0;
  font-size: 1.45rem;
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.95rem;
  color: #475569;
}
.meta span {
  background: #eff6ff;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
}
.description,
.criteria {
  margin: 0;
  line-height: 1.75;
  color: #334155;
}
.description-container {
  max-height: 6.5rem;
  overflow: hidden;
  position: relative;
  transition: max-height 0.2s ease;
}
.description-container::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.2rem;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,1));
  pointer-events: none;
}
.description-container.expanded {
  max-height: 999px;
}
.description-container.expanded::after {
  display: none;
}
.expand-description {
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  margin-top: 0.25rem;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}
.favorite-row {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.favorite-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: white;
  color: #0f172a;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.favorite-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}
.favorite-toggle.saved {
  background: #fef3c7;
  border-color: #f59e0b;
  color: #9a3412;
}
.button,
.phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.1rem;
  text-decoration: none;
  border-radius: 0.95rem;
  font-weight: 600;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.button {
  background: #1d4ed8;
  color: white;
  box-shadow: 0 12px 24px rgba(29, 78, 216, 0.18);
}
.button:hover {
  transform: translateY(-1px);
}
.button.report-button {
  background: #ef4444;
  color: white;
  border: 1px solid rgba(190, 18, 60, 0.24);
  box-shadow: none;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
}
.button.report-button:hover {
  background: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
}
.phone {
  background: #f8fafc;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
.resource-map-marker {
  pointer-events: auto;
}
.resource-map-marker .map-marker-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}
.resource-map-marker .map-marker-pin {
  width: 0.7rem;
  height: 0.7rem;
  background: #2563eb;
  border: 2px solid #ffffff;
  border-radius: 50%;
  margin: 0.15rem auto 0;
}
footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: grid;
  grid-template-columns: 1fr 10%;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 1.75rem 1.5rem;
  background: rgba(255,255,255,0.98);
  color: #475569;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.12);
}
footer p {
  grid-column: 1;
  margin: 0;
  line-height: 1.65;
  text-align: left;
}
.footer-close {
  grid-column: 2;
  width: 100%;
  justify-self: end;
  border: none;
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 999px;
  padding: 0.75rem 0.9rem;
  font-weight: 700;
  cursor: pointer;
}
main {
  padding: 1.5rem 1.75rem 10rem;
}
@media (max-width: 640px) {
  .hero { padding-top: 1.8rem; }
  .hero-row { flex-direction: column; align-items: flex-start; }
  .hero-top-actions { justify-content: flex-start; width: 100%; }
  .hero-bottom-action { position: static; width: 100%; display: flex; justify-content: flex-end; margin-top: 1rem; }
  .hero-bottom-action .submit-resource { width: auto; }
  .summary { padding: 1.5rem; }
  .ems-section { padding: 1.5rem 1.25rem; }
}
