/* The theme has no global box-sizing reset, and these styles are written
   assuming border-box — without this, width:100% + padding overflows. */
.service-areas,
.service-areas *,
.service-areas *::before,
.service-areas *::after {
  box-sizing: border-box;
}

.service-areas {
  --service-areas-cols: 1.4fr 0.9fr 1.1fr 1.2fr 0.8fr;

  width: 100%;
  margin: 0;
  padding: clamp(48px, 9vw, 72px) clamp(20px, 6vw, 120px);
  background: var(--Light-Grey, #f3f4f6);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

html.has-scroll-animations .service-areas__inner {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

html.has-scroll-animations .service-areas.is-visible .service-areas__inner {
  opacity: 1;
  transform: none;
}

.service-areas__inner {
  width: 100%;
  max-width: var(--Container-container-large, 1280px);
}

.service-areas__header {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: end;
  margin-bottom: 32px;
}

.service-areas__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--Secondary-Light-Green, #4fa550);
  font-family: 'Teachers', Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.service-areas__title {
  margin: 0;
  color: var(--Main-Green, #395935);
  font-family: 'Teachers', Inter, system-ui, sans-serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.service-areas__intro {
  max-width: 540px;
  margin: 0 0 18px;
  color: #475569;
  font-size: clamp(16px, 2vw, 17px);
  line-height: 1.55;
  text-wrap: pretty;
}

.service-areas__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.service-areas__search {
  min-width: 220px;
  padding: 11px 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: #232e26;
  font-size: 14px;
}

.service-areas__search:focus {
  outline: none;
  border-color: var(--Secondary-Light-Green, #4fa550);
  box-shadow: 0 0 0 3px rgba(79, 165, 80, 0.2);
}

.service-areas__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-areas__chip {
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: var(--Main-Green, #395935);
  font-family: 'Teachers', Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.service-areas__chip:hover {
  border-color: var(--Secondary-Light-Green, #4fa550);
}

.service-areas__chip.is-active {
  border-color: var(--Secondary-Light-Green, #4fa550);
  background: var(--Secondary-Light-Green, #4fa550);
  color: #fff;
}

.service-areas__table-wrap {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.service-areas__table {
  width: 100%;
  border-collapse: collapse;
}

.service-areas__row {
  display: grid;
  grid-template-columns: var(--service-areas-cols);
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid #e5e7eb;
}

.service-areas__row--head {
  padding: 14px 24px;
  background: var(--Light-Grey, #f3f4f6);
}

.service-areas__row--head th {
  color: #6b7280;
  font-family: 'Teachers', Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
}

.service-areas__table tbody .service-areas__row:last-child {
  border-bottom: none;
}

.service-areas__table tbody .service-areas__row.has-link {
  cursor: pointer;
}

.service-areas__table tbody .service-areas__row:hover {
  background: var(--Light-Grey, #f3f4f6);
}

.service-areas__cell {
  text-align: left;
  font-weight: 400;
  color: #475569;
  font-size: 14px;
}

.service-areas__cell--name {
  color: var(--Main-Green, #395935);
  font-family: 'Teachers', Inter, system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.service-areas__link {
  color: inherit;
  text-decoration: none;
}

.service-areas__link:hover,
.service-areas__link:focus-visible {
  text-decoration: underline;
}

.service-areas__cell--zip {
  color: #9ca3af;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* "+11" badge for cities that cover more than one ZIP. */
.service-areas__zip-more {
  margin-left: 5px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(79, 165, 80, 0.12);
  color: var(--Secondary-Light-Green, #4fa550);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
  cursor: help;
}

/* --- Row visibility ----------------------------------------------------- */

/* .service-areas__row sets display, which beats the UA stylesheet's
   [hidden] { display: none } because author rules win over UA rules
   regardless of specificity. Without this the filter cannot hide a row. */
.service-areas__table tbody .service-areas__row[hidden] {
  display: none;
}

/* Collapsed extra rows. Only ever hide here — showing is done by removing
   .is-collapsed, so each row falls back to its own display value (grid on
   desktop, block on mobile) instead of being forced to one of them. */
.service-areas__table-wrap.is-collapsed .service-areas__row--extra {
  display: none;
}

.service-areas__table-wrap.is-filtering .service-areas__more {
  display: none;
}

.service-areas__table-wrap:not(.is-collapsed) .service-areas__row--extra {
  animation: service-areas-reveal 0.32s ease both;
}

@keyframes service-areas-reveal {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.service-areas__more {
  display: flex;
  justify-content: center;
  padding: 18px 24px;
  border-top: 1px solid #e5e7eb;
  background: var(--Light-Grey, #f3f4f6);
}

.service-areas__table-wrap.is-collapsed .service-areas__more {
  border-top: none;
}

.service-areas__more-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  background: #fff;
  color: var(--Main-Green, #395935);
  font-family: 'Teachers', Inter, system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.service-areas__more-button:hover,
.service-areas__more-button:focus-visible {
  border-color: var(--Secondary-Light-Green, #4fa550);
  background: var(--Secondary-Light-Green, #4fa550);
  color: #fff;
}

.service-areas__more-icon {
  transition: transform 0.2s ease;
}

.service-areas__more-button[aria-expanded="true"] .service-areas__more-icon {
  transform: rotate(180deg);
}

@media (prefers-reduced-motion: reduce) {
  .service-areas__table-wrap:not(.is-collapsed) .service-areas__row--extra {
    animation: none;
  }
}

.service-areas__cell--eta {
  color: var(--Secondary-Light-Green, #4fa550);
  font-weight: 600;
}

.service-areas__cell--end {
  text-align: right;
}

.service-areas__empty {
  margin: 0;
  padding: 36px 24px;
  color: #6b7280;
  font-size: 15px;
  line-height: 1.6;
}

.service-areas__footnote {
  max-width: 760px;
  margin: 18px 0 0;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .service-areas__header {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

@media (max-width: 860px) {
  .service-areas__table,
  .service-areas__table tbody,
  .service-areas__row {
    display: block;
  }

  .service-areas__row--head {
    display: none;
  }

  .service-areas__row {
    padding: 16px 20px;
  }

  .service-areas__cell {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 3px 0;
    text-align: right;
  }

  .service-areas__cell::before {
    content: attr(data-label);
    color: #9ca3af;
    font-family: 'Teachers', Inter, system-ui, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-align: left;
  }

  .service-areas__cell--name {
    padding-bottom: 8px;
  }

  .service-areas__cell--name::before {
    display: none;
  }

  .service-areas__cell--name,
  .service-areas__cell--end {
    text-align: left;
  }

  .service-areas__cell--name {
    display: block;
  }
}
