 /*TODO: SIDEBAR, COST/AGE GROUP BUTTONS*/
 
:root {
  --purple: #5c4d7d;
  --darkpurple: #5c4d7d;
  --white: #ffffff;
  --gold: #fbb13c;
  --grey: #7A7A7A;
  --appt: #534AB7;
  --darkgrey: #333333;
  --red: #a32d2d;
  --green: #0f6e56;
  --orange: #B8650A;
  --border: #dde3ea;
  --bg: #f5f5f7;

  /* filter drawer width on desktop */
  --drawer-width: 280px;
  /* bottom sheet transition */
  --sheet-speed: 0.28s;
}

/* BODY */
body{
	font-family: 'Poppins',Helvetica,Arial,Lucida,sans-serif;
  margin: 0;
}

/* MAIN*/
main { display: flex; flex-direction: column; flex: 1; }

/* HEADER */
header{
	background:var(--white);
	color:var(--purple);
	font-family: 'Poppins',Helvetica,Arial,Lucida,sans-serif;
	padding:12px 16px;
  margin-bottom: 10px;
	display:flex;
	align-items:center;
	gap:12px;
	flex-wrap:wrap;
  justify-content: center;
  text-align: center;
  position: relative;
  /*border-bottom: 3px solid var(--gold);*/
}
	
header h1 {
  font-size: 2.0rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  margin: 0 0 4px;
  line-height: 1.15;
  display: inline-block;
  /*border-bottom: 3px solid var(--gold);*/
} 

/* header h1 span {
  display: inline-block;
  border-bottom: 3px solid var(--gold);
  padding-bottom: 2px;
} */
header h1::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50%;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  left: 50%;
  transform: translateX(-50%);
}
header p{
	color:var(--darkgrey);
	font-family: 'Raleway-Regular',Helvetica,Arial,Lucida,sans-serif;
	font-size:1rem;
	font-variant: small-caps;
	letter-spacing:0.04em;
	opacity:0.75;
	margin-top:2px}

/*.today-badge {
  background:var(--purple);
  color:var(--white);
  font-size: 1rem;
  padding: 5px 10px;
  border-radius: 5px;
  white-space: nowrap;
  font-weight: 600;
}*/

.header-text {
  flex: 1;
  text-align: center;
}

/*NAV*/
.header-nav {
  position: absolute;
  left: 16px;
}

.header-nav a {
  font-size: 0.8rem;
  color: var(--purple);
  text-decoration: none;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  transition: all 0.15s;
  white-space: nowrap;
}
.header-nav a:hover {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}



/* DIVIDER 
.divider { 
width: 1px; 
background: var(--gold); 
height: 24px; 
align-self: center; }

*/


/*DAYS*/
.day-bar {
  background:var(--white);
  border-bottom: 1px solid #dde3ea;
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: left;
  justify-content: center;
  text-align: center;
  position: relative;
}

.day-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.day-btn {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1.5px solid #c5cbd2;
  background:var(--white);
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  color: #555;
  transition: all 0.15s;
}

.day-btn:hover {
  border-color:var(--purple);
  color:var(--purple);
}

.day-btn.active {
  background:var(--darkpurple);
  border-color:var(--darkpurple);
  color:var(--white);
}

.day-btn.today-btn {
  border-color:var(--darkpurple);
  color:var(--darkpurple);
}

.day-btn.today-btn.active {
  background:var(--darkpurple);
  border-color:var(--darkpurple);
  color:var(--white);
}
.day-btn svg {
  vertical-align: middle;
  margin-bottom: 2px;
}

/*FILTERS*/
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Filters pill button */
.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--darkgrey);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.filter-pill:hover { border-color: var(--purple); color: var(--purple); }
.filter-pill[aria-expanded="true"] { border-color: var(--purple); background: var(--bg); color: var(--purple); }

/* Active filter count badge on the pill */
.filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--darkpurple);
  color: var(--white);
  /* hidden when count is 0 */
  opacity: 0;
  transition: opacity 0.15s;
}
.filter-badge.visible { opacity: 1; }

/* Open Now toggle pill */
.open-now-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--grey);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.open-now-toggle:hover { border-color: var(--green); color: var(--green); }
.open-now-toggle[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--white); }

/*SEARCH*/
.search-box { margin-left: auto; }
.search-box input {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  font-size: 0.8rem;
  font-family: inherit;
  width: 180px;
  outline: none;
  transition: border-color 0.15s;
}
.search-box input:focus { border-color: var(--purple); }


/*STATS BAR*/
.stats-bar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 5px 14px;
  font-size: 0.78rem;
  color: var(--grey);
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.stats-bar strong { color: var(--darkgrey); }


/* 
.controls {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
} */

/* horizontal row inside controls 
.controls-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}*/

/* second row with Cost and Age filters 
.filter-row {
  padding-top: 4px;
  border-top: 1px solid var(--border);
}*/

/* small label before each filter group 
.filter-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--grey);
  white-space: nowrap;
}*/

/* container for Cost or Trgt Group buttons */
.filter-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

/* MAP AND SIDEbAR */
.map-and-sidebar {
  display: flex;
  flex: 1;
  min-height: 0;
  align-items: stretch;
  position: relative;
}

.map-column {
  position: relative;
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
}

#map {
  flex: 1;
  min-height: 40rem;
}

/*FILTER DRAWER*/
.filter-drawer {
  width: 0;
  overflow: hidden;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width var(--sheet-speed) ease;
}
.filter-drawer.open {
  width: var(--drawer-width);
  overflow-y: auto;
}

.filter-drawer-inner {
  width: var(--drawer-width);
  padding: 16px 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-hint {
  font-size: 0.7rem;
  color: var(--grey);
  font-style: italic;
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  line-height: 1.5;
}

.filter-section { display: flex; flex-direction: column; gap: 6px; }

.filter-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
}

/* Category pills inside drawer */
.cat-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.cat-btn {
  padding: 3px 8px;
  border-radius: 12px;
  border: 1.5px solid #c5cbd2;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  opacity: 0.5;
  font-family: inherit;
}
.cat-btn.active { opacity: 1; }

/* Other filter buttons inside drawer */
.filter-btns {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.filter-btn {
  padding: 3px 9px;
  border-radius: 5px;
  border: 1.5px solid var(--border);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--white);
  color: var(--grey);
  transition: all 0.15s;
  font-family: inherit;
}
.filter-btn:hover { border-color: var(--purple); color: var(--purple); }
.filter-btn.active { background: var(--bg); opacity: 1; }

/* Show All / Clear All inside drawer */
.filter-actions {
  display: flex;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-action-btn {
  padding: 4px 12px;
  border-radius: 5px;
  border: 1.5px solid;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}

.filter-action-btn.show-all { border-color: var(--grey); color: var(--grey); background: var(--white); }
.filter-action-btn.show-all:hover { border-color: var(--darkpurple); color: var(--darkpurple); }

.filter-action-btn.clear-all { border-color: var(--grey); color: var(--grey); background: var(--white); }
.filter-action-btn.clear-all:hover { border-color: var(--red); color: var(--red); }


/*CLUSTERs */
.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
  background-clip: padding-box;
  border-radius: 50%;
}

/* Outer ring (the semi-transparent halo) #fbb13c = rgb(251 177 60)*/
.marker-cluster-small  { background-color: rgba(251, 177, 60, 0.45); }
.marker-cluster-medium { background-color: rgba(251, 177, 60, 0.55); }
.marker-cluster-large  { background-color: rgba(251, 177, 60, 0.65); }

/* Inner filled circle with the count number */
.marker-cluster-small  div,
.marker-cluster-medium div,
.marker-cluster-large  div {
  background-color: var(--darkpurple);
  color:var(--white);
  font-family: 'Poppins', Arial, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  margin-left: 5px;
  margin-top: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Slightly larger for medium and large clusters */
.marker-cluster-medium div { width: 34px; height: 34px; margin-left: 3px; margin-top: 3px; }
.marker-cluster-large  div { width: 38px; height: 38px; margin-left: 1px; margin-top: 1px; }

/*SIDEBAR*/
.sidebar {
  width: 320px;
  flex-shrink: 0;
  background: var(--white);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-header {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.sidebar-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--darkpurple);
  display: block;
  margin-bottom: 2px;
}

.sidebar-subtitle {
  font-size: 0.72rem;
  color: var(--grey);
}

/* Scrollable card list */
.sidebar-list {
  overflow-y: auto;
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-empty {
  font-size: 0.8rem;
  color: var(--grey);
  text-align: center;
  padding: 20px 0;
}

.sidebar-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  color: var(--grey);
  font-size: 0.82rem;
  text-align: center;
}

/* Individual service card in the sidebar */
.sidebar-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.sidebar-card-header {
  padding: 1px 10px;
  background: var(--bg);
  /* border-left colour is set inline from category colour */
}

.sidebar-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--darkgrey);
  margin-bottom: 2px;
}

.sidebar-card-cat {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-card-body {
  padding: 6px 10px 8px;
}

.sidebar-card-desc {
  font-size: 0.78rem;
  color: #444;
  line-height: 1.4;
  margin-bottom: 5px;
}

.sidebar-card-info {
  font-size: 0.75rem;
  color: #555;
  line-height: 1.7;
}
.sidebar-card-info span {
  font-weight: 600;
  color: var(--darkgrey);
}
.sidebar-card-info a {
  color: var(--darkpurple);
  word-break: break-all;
}

/* Scope badge (UK / Scotland / City-wide) */
.scope-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  background: var(--bg);
  color: var(--grey);
  border: 1px solid var(--border);
  margin-left: 4px;
  text-transform: none;
  letter-spacing: 0;
}





/* FILLTER PANEL - OLD
.filter-panel {
  border-top: 1px solid var(--border);
}
.filter-panel-summary {
  padding: 5px 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--grey);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.filter-panel-summary::-webkit-details-marker { display: none; }
.filter-panel-summary:hover { color: var(--purple); }
*/

/* POPUPS */
.leaflet-popup-content-wrapper {
  border-radius: 10px;
  padding: 0; /* remove default padding */
  overflow: hidden; /* clips coloured header to the rounded corners */
  border: none;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* inner content area */
.leaflet-popup-content {
  margin: 0; /* remove Leaflet default margin */
  min-width: 220px;
  max-width: 320px;
}

/* coloured header bar at top of each popup */
.popup-header {
  padding: 10px 14px 8px;
  color:var(--white);
  font-weight: 700;
  font-size: 0.9rem;
}

/* white body area below coloured header */
.popup-body {
  padding: 8px 14px 12px;
  background:var(--white);
}

/* small cat label */
.popup-cat {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
  opacity: 0.85;
}

/* service desc */
.popup-desc {
  font-size: 0.8rem;
  color: #333;
  margin-bottom: 8px;
  line-height: 1.4;
}

/* address / phone / web lines */
.popup-info {
  font-size: 0.78rem;
  color: #444;
  line-height: 1.7;
}

.popup-info span {
  font-weight: 600;
  color: #1a2e4a;
}

/* ppening hours section */
.popup-hours {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid #eee;
}

.popup-hours-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: #555;
  margin-bottom: 3px;
}

/* each Mon/Tue/Wed...row in the hours table */
.day-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.73rem;
  padding: 1px 0;
}

/* highlighted green row for today */
.day-row.today-row {
  font-weight: 700;
  color: #1d7874;
  background: #e0f4f2;
  margin: 0 -4px; /* bleed slightly past padding */
  padding: 2px 4px;
  border-radius: 3px;
}

/* greyed out rows for days when service is closed */
.day-row.closed {
  color: #bbb;
}

/* hour ststes*/
.day-row.hours-unknown span:last-child {
  color:var(--orange);
  font-style: italic;
}

.day-row.hours-appt span:last-child {
  color:var(--appt);
  font-style: italic;
}
/* dont grey these rows out like .closed does */
.day-row.hours-unknown,
.day-row.hours-appt {
  color: inherit;
}

.hours-note-appt {
  font-size: 0.73rem;
  color:var(--appt);
  font-style: italic;
  padding: 2px 0;
}

.hours-note-unknown {
  font-size: 0.73rem;
  color:var(--orange);
  font-style: italic;
  padding: 2px 0;
}

/* "Open today" / "Closed today" badges */
.open-chip {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 6px;
  vertical-align: middle;
}

.open-chip.open {
  background: #e0f4f2;
  color:var(--green);
}

.open-chip.closed {
  background: #fce8e8;
  color: var(--red);
}

.open-chip.unknown {
  background: #FEF3E2;
  color:var(--orange);
}
.open-chip.appt {
  background: #EEEDFE;
  color:var(--appt);
}

/* style default Leaflet close (X) button white so visible against the coloured popup header */
.leaflet-popup-close-button {
  color:var(--white) !important;
  font-size: 1rem !important;
  padding: 6px 8px !important;
}


/* LEGEND */
.legend {
  position: absolute;
  bottom: 28px;
  right: 10px;
  z-index: 1000;
  background:var(--white);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.72rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  min-width: 140px;
}

.legend-title {
  font-weight: 700;
  margin-top: 6px;
  margin-bottom: 6px;
  color:var(--darkgrey);
  font-size: 0.75rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color:var(--darkgrey);
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.2);
}

.legend-toggle {
  background: none;
  border: none;
  font-family: 'Raleway-Regular', Helvetica, Arial, Lucida, sans-serif;
  /* text-transform: uppercase; */
  letter-spacing: 0.01em;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--darkgrey);
  cursor: pointer;
  padding: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  /* font-family: inherit; */
}

.legend-toggle:hover { color: var(--darkpurple); }

/* rotate chevron when open */
.legend-toggle svg {
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.legend-toggle.open svg {
  transform: rotate(180deg);
}


/*BOTTOMFILTER SHEET*/
.sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--sheet-speed) ease;
}
.sheet-backdrop.visible { 
  opacity: 1; 
  pointer-events: auto;
}

/* FOOTER */
footer{
	padding: 4em 0.6em;
	padding-top: 0.6em;
	background:var(--darkpurple);
	color:var(--white);
	font-family: 'Poppins', Helvetica, Arial, Lucida, sans-serif;
	font-size: 0.6rem;
}

.footer-inner {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  padding: 24px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  justify-content: center;
}

.footer-col {
  /* flex: 1;*/
  min-width: 180px; 
  flex: unset;
  width: 220px;
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
}

.footer-col p { margin: 0 0 8px; }

.footer-heading {
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Raleway-Regular', Helvetica, Arial, Lucida, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--white);
  margin: 0 0 8px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}
.footer-links li { margin-bottom: 4px; }
.footer-links a,
.footer-col a {
  color: var(--gold);
  text-decoration: none;
}
.footer-links a:hover,
.footer-col a:hover { text-decoration: underline; }

.footer-copy {
  padding: 10px 20px;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.45);
  text-align: center;
  letter-spacing: 0.04em;
}

/*MOBILE REMOTE SERVICE SHEET*/
.detail-sheet {
  position: fixed;
  padding: 8px;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 80vh;
  background: var(--white);
  border-radius: 16px 16px 0 0;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  z-index: 1300; /* above filter sheet */
  transform: translateY(100%);
  transition: transform var(--sheet-speed) ease;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.detail-sheet.open {
  transform: translateY(0);
}

.detail-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 12px auto 0;
  flex-shrink: 0;
}

.detail-sheet-content {
  padding: 12px 16px px;
  flex: 1;
}

.sheet-backdrop.detail-backdrop {
  z-index: 1250; /* between filter sheet (1200) and detail sheet (1300) */
}

.sheet-service-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--darkgrey);
  margin-bottom: 2px;
}
.sheet-service-sub {
  font-size: 0.8rem;
  color: var(--grey);
  margin-bottom: 4px;
}
.sheet-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  margin: 12px 0 4px;
}
.sheet-body-text {
  font-size: 0.82rem;
  color: #444;
  line-height: 1.5;
  margin: 0;
}
.sheet-body-text a { color: var(--darkpurple); word-break: break-all; }
.sheet-hours { font-size: 0.78rem; }
.sheet-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: #555;
}


/*----------------------------------------------------------------------------------------------------------*/
/* OTHER PAGES LAYOUT */
.page-main {
  background: var(--bg);
  min-height: 60vh;
  padding: 32px 16px 48px;
}
 
.page-container {
  max-width: 960px;
  margin: 0 auto;
}
 
.page-container--narrow {
  max-width: 680px;
}
 
/* HERO */
.page-hero {
  margin-bottom: 28px;
}
 
.page-hero h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--darkpurple);
  margin: 0 0 6px;
  position: relative;
  display: inline-block;
}
 
/* .page-hero h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 25%;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
} */
 
.page-lead {
  font-size: 1rem;
  color: var(--grey);
  line-height: 1.6;
  margin: 12px 0 0;
  max-width: 600px;
}
 
.page-meta {
  font-size: 0.8rem;
  color: var(--grey);
  margin: 8px 0 0;
  font-style: italic;
}
 
/* CARD GRID */
.page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
 
.page-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
 
.page-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--darkpurple);
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-family: 'Raleway-Regular', Helvetica, Arial, Lucida, sans-serif;
}

.emergency-card h3 {
  color: var(--red);
}

.page-card p {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.6;
  margin: 0;
}
 
.page-card a {
  color: var(--darkpurple);
}
.page-card a:hover {
  color: var(--purple);
}
 
.page-btn {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 5px;
  border: 1.5px solid var(--darkpurple);
  color: var(--darkpurple);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s;
  align-self: flex-start;
}
.page-btn:hover {
  background: var(--darkpurple);
  color: var(--white) !important;
  border-color: var(--darkpurple);
}

/* DISCLAIMER BAR */
.page-disclaimer {
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 4px solid var(--gold);
  border-radius: 6px;
  padding: 12px 16px;
  font-size: 0.8rem;
  color: var(--grey);
  line-height: 1.5;
}
.page-disclaimer p { margin: 0; }
 
/* privacy policy */
.pr {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 32px;
}
 
.pr h3 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--darkpurple);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: 'Raleway-Regular', Helvetica, Arial, Lucida, sans-serif;
  margin: 24px 0 8px;
}
.pr h3:first-child { margin-top: 0; }
 
.pr p {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.7;
  margin: 0 0 10px;
}
 
.pr ul {
  margin: 0 0 10px;
  padding-left: 20px;
}
 
.pr li {
  font-size: 0.85rem;
  color: #444;
  line-height: 1.7;
  margin-bottom: 4px;
}
 
.pr a {
  color: var(--darkpurple);
}
.pr a:hover {
  color: var(--purple);
}
 
.pr strong {
  color: var(--darkgrey);
  font-weight: 700;
}

/* CONTACT FORM LAYOUT */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
}
 
.contact-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
 
/* FORM */
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
 
.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
 
.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--darkgrey);
}
 
.form-group input,
.form-group select,
.form-group textarea {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  font-size: 0.85rem;
  font-family: inherit;
  color: var(--darkgrey);
  background: var(--white);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}
 
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--purple);
}
 
.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}
 
.form-hint {
  font-size: 0.72rem;
  color: var(--grey);
  font-style: italic;
}
 
.form-privacy-note {
  font-size: 0.72rem;
  color: var(--grey);
  line-height: 1.5;
  margin: 0;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
}
.form-privacy-note a {
  color: var(--darkpurple);
}
 
.form-submit {
  padding: 10px 24px;
  border-radius: 6px;
  border: none;
  background: var(--darkpurple);
  color: var(--white);
  font-size: 0.88rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
  align-self: flex-start;
}
.form-submit:hover {
  background: var(--purple);
}
 
/* SUCCESS STATE */
.form-success {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 40px 24px;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.form-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e0f4f2;
  color: var(--green);
  font-size: 1.4rem;
  /* font-weight: 700; */
  display: flex;
  align-items: center;
  justify-content: center;
}
.form-success h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--darkgrey);
  margin: 0;
}
.form-success p {
  font-size: 0.85rem;
  color: var(--grey);
  margin: 0;
}


/*----------------------------------------------------------------------------------------------------*/


/* only render sheet on mobile */
@media (min-width: 769px) {
  .detail-sheet { display: none; }
}

/*RESPONSIVE*/
@media (max-width: 768px) {

  header {
    justify-content: center;
    text-align: center;
    padding-bottom: 10px;
  }

  .header-nav {
    position: static;
    width: 100%;
    text-align: center;
    margin-top: 8px;
  }

  header h1::after {
    left: 50%;
    transform: translateX(-50%);
  }


  /* stack sidebar below map */
  .map-and-sidebar { flex-direction: column; }

  /* hide the desktop drawer, use bottom sheet instead */
  .filter-drawer {
    width: 0 !important;
    border-right: none;
  }

  /* search box takes full width on its own row */
  .search-box { margin-left: 0; width: 100%; }
  .search-box input { width: 100%; box-sizing: border-box; }

  #map { min-height: 60vh; }
  .sidebar { 
    width: 100%;
    max-height: 40vh;
    border-left: none;
    border-top: 1px solid var(--border);
    /* max-height: 35vh;  */
  }

  /* legend collapsed by default on mobile */
  .legend-content { display: none; }
  .legend { 
    min-width: unset; 
    padding: 6px 10px;
    /* gold border indicates interactivity on mobile */
    border: 1px solid var(--gold); 
  }

  .legend-toggle {
    font-size: 0.8rem;
    color: var(--purple);
  }

  /* BOTTOM SHEET */
     /*The filter-drawer is repurposed as a bottom sheet on mobile.
     It slides up from the bottom when .open is added by JS. */
  .filter-drawer {
    position: fixed !important;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100% !important;
    max-height: 80vh;
    overflow-y: auto;
    border-right: none;
    border-top: 1px solid var(--border);
    border-radius: 16px 16px 0 0;
    z-index: 1200;
    transform: translateY(100%);
    transition: transform var(--sheet-speed) ease;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.12);
  }
  .filter-drawer.open {
    transform: translateY(0);
    width: 100% !important;
  }

  /* drag handle at top of sheet */
  .filter-drawer-inner::before {
    content: "";
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border);
    margin: 0 auto 12px;
  }

  .filter-drawer-inner {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px 32px;
  }

  /* show backdrop on mobile */
  .sheet-backdrop { display: block; }

  /* cat pills wrap in columns on mobile */
  .cat-btns { gap: 5px; }
  .cat-btn { font-size: 0.75rem; padding: 4px 10px; }
}

/*© 2026 Shannon Martin. All rights reserved. Created as part of a prototype services-mapping application.*/