.location-page {
  --location-ink: #153b3a;
  --location-muted: #5e7473;
  --location-border: #d7e6e5;
  --location-soft: #f2f8f7;
  --location-accent: #2d9a92;
  --location-accent-dark: #1e746e;
  --location-white: #fff;
  color: var(--location-ink);
}

.location-page main {
  overflow: hidden;
}

.location-container {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
}

.location-hero {
  position: relative;
  padding: 76px 0 82px;
  background:
    linear-gradient(135deg, rgba(216, 231, 232, .95), rgba(255, 255, 255, .98) 62%),
    #fff;
  border-bottom: 1px solid var(--location-border);
  isolation: isolate;
}

.location-hero__content {
  position: relative;
  z-index: 2;
  max-width: 1160px;
}

.location-hero__content > *:not(.location-breadcrumbs) {
  max-width: 830px;
}

.location-hero__orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .32;
  z-index: 0;
}

.location-hero__orb--one {
  width: 330px;
  height: 330px;
  right: 6%;
  top: -120px;
  background: #8fd2cd;
}

.location-hero__orb--two {
  width: 220px;
  height: 220px;
  right: 24%;
  bottom: -115px;
  background: #d8e7e8;
}

.location-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 38px;
  font-size: .9rem;
  color: var(--location-muted);
}

.location-breadcrumbs a {
  color: var(--location-accent-dark);
  text-decoration: none;
}

.location-breadcrumbs a:hover,
.location-breadcrumbs a:focus-visible {
  text-decoration: underline;
}

.location-eyebrow {
  margin: 0 0 12px;
  color: var(--location-accent-dark);
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.location-eyebrow--light {
  color: #c8efec;
}

.location-hero h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: .99;
  letter-spacing: -.055em;
  color: var(--location-ink);
}

.location-hero__intro {
  margin: 26px 0 0;
  max-width: 800px;
  color: #456260;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.75;
}

.location-hero__actions,
.location-help-grid__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.location-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.location-button:hover,
.location-button:focus-visible {
  transform: translateY(-1px);
}

.location-button--primary {
  background: var(--location-accent);
  color: #fff;
  box-shadow: 0 12px 28px rgba(45, 154, 146, .2);
}

.location-button--primary:hover,
.location-button--primary:focus-visible {
  background: var(--location-accent-dark);
}

.location-button--secondary {
  background: rgba(255, 255, 255, .78);
  border-color: #bdd8d6;
  color: var(--location-ink);
}

.location-button--light {
  background: #fff;
  color: var(--location-accent-dark);
}

.location-button--outline-light {
  border-color: rgba(255, 255, 255, .55);
  color: #fff;
}

.location-section {
  padding: 82px 0;
}

.location-section--soft {
  background: var(--location-soft);
  border-top: 1px solid var(--location-border);
  border-bottom: 1px solid var(--location-border);
}

.location-section--accent {
  background: linear-gradient(135deg, #174f4c, #257f79);
  color: #fff;
}

.location-section-heading {
  max-width: 780px;
  margin-bottom: 34px;
}

.location-section-heading--split {
  display: grid;
  grid-template-columns: 1fr minmax(300px, 480px);
  gap: 48px;
  max-width: none;
  align-items: end;
}

.location-section-heading h2,
.location-two-column h2,
.location-help-grid h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.location-section-heading p,
.location-two-column p,
.location-help-grid p {
  color: var(--location-muted);
  line-height: 1.75;
}

.location-section--accent p {
  color: rgba(255, 255, 255, .84);
}

.location-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.location-topic-card {
  min-height: 280px;
  padding: 26px;
  background: #fff;
  border: 1px solid var(--location-border);
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(25, 65, 63, .06);
}

.location-topic-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 28px;
  border-radius: 12px;
  background: #dff1ef;
  color: var(--location-accent-dark);
  font-weight: 900;
}

.location-topic-card h3 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.location-topic-card p {
  margin: 0 0 20px;
  color: var(--location-muted);
  line-height: 1.65;
}

.location-topic-card a,
.location-text-link {
  color: var(--location-accent-dark);
  font-weight: 800;
  text-decoration: none;
}

.location-topic-card a:hover,
.location-topic-card a:focus-visible,
.location-text-link:hover,
.location-text-link:focus-visible {
  text-decoration: underline;
}

.location-county-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.location-county-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 175px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--location-border);
  border-radius: 16px;
  color: var(--location-ink);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(25, 65, 63, .05);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.location-county-card:hover,
.location-county-card:focus-visible {
  transform: translateY(-3px);
  border-color: #9acac6;
  box-shadow: 0 14px 32px rgba(25, 65, 63, .1);
}

.location-county-card__state {
  color: var(--location-muted);
  font-size: .82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.location-county-card strong {
  margin-top: 12px;
  font-size: 1.4rem;
}

.location-county-card > span:last-child {
  margin-top: auto;
  color: var(--location-accent-dark);
  font-weight: 800;
}

.location-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 54px;
  align-items: start;
}

.location-callout {
  padding: 28px;
  background: #f7fbfb;
  border: 1px solid var(--location-border);
  border-radius: 18px;
}

.location-callout__label {
  margin: 0 0 18px !important;
  color: var(--location-accent-dark) !important;
  font-weight: 800;
}

.location-callout ol {
  margin: 0 0 22px;
  padding-left: 22px;
}

.location-callout li {
  margin-bottom: 12px;
  color: #425e5c;
  line-height: 1.55;
}

.location-help-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 44px;
  align-items: center;
}

.location-help-grid__actions {
  justify-content: flex-end;
  margin-top: 0;
}

@media (max-width: 900px) {
  .location-topic-grid,
  .location-county-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .location-section-heading--split,
  .location-two-column,
  .location-help-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  .location-help-grid__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .location-container {
    width: min(100% - 28px, 1160px);
  }

  .location-hero {
    padding: 54px 0 62px;
  }

  .location-breadcrumbs {
    margin-bottom: 28px;
  }

  .location-section {
    padding: 58px 0;
  }

  .location-topic-grid,
  .location-county-grid {
    grid-template-columns: 1fr;
  }

  .location-topic-card {
    min-height: 0;
  }

  .location-hero__actions,
  .location-help-grid__actions {
    flex-direction: column;
  }

  .location-button {
    width: 100%;
  }
}

/* ============================================================
   Michigan county directory
   ============================================================ */

.location-hero--compact {
  min-height: auto;
  padding-bottom: 64px;
}

.location-county-list {
  display: grid;
  gap: 12px;
}

.location-county-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--location-border);
  border-radius: 16px;
  color: var(--location-ink);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(25, 65, 63, .04);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.location-county-row:hover,
.location-county-row:focus-visible {
  transform: translateY(-1px);
  border-color: #9bc9c5;
  box-shadow: 0 12px 30px rgba(25, 65, 63, .08);
}

.location-county-row__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #dff1ef;
  color: var(--location-accent-dark);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
}

.location-county-row__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.location-county-row__main strong {
  font-size: 1.08rem;
  line-height: 1.25;
}

.location-county-row__main > span {
  color: var(--location-muted);
  font-size: .92rem;
}

.location-county-row__arrow {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--location-accent-dark);
}

.location-empty-state {
  padding: 32px;
  background: #fff;
  border: 1px solid var(--location-border);
  border-radius: 18px;
}

.location-empty-state h3 {
  margin-top: 0;
}

@media (max-width: 640px) {
  .location-county-row {
    grid-template-columns: 48px 1fr auto;
    gap: 13px;
    padding: 15px;
  }

  .location-county-row__count {
    width: 44px;
    height: 44px;
  }
}

/* ============================================================
   County resource listings
   ============================================================ */

.location-resource-list {
  display: grid;
  gap: 18px;
  margin-top: 30px;
}

.location-resource-card {
  padding: 26px;
  background: #fff;
  border: 1px solid var(--location-border);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(25, 65, 63, .05);
}

.location-resource-card__top {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  align-items: flex-start;
}

.location-resource-card__title {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--location-ink);
}

.location-resource-card__type {
  margin: 6px 0 0;
  color: var(--location-muted);
  font-size: .92rem;
}

.location-resource-card__verified {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #edf8f6;
  color: var(--location-accent-dark);
  font-size: .78rem;
  font-weight: 800;
  white-space: nowrap;
}

.location-resource-card__description {
  margin: 18px 0 0;
  color: #425e5c;
  line-height: 1.65;
}

.location-resource-card__categories {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.location-resource-card__category {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f2f7f7;
  border: 1px solid var(--location-border);
  color: #365553;
  font-size: .82rem;
  font-weight: 700;
}

.location-resource-card__details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 24px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--location-border);
}

.location-resource-card__detail {
  min-width: 0;
}

.location-resource-card__detail-label {
  display: block;
  margin-bottom: 3px;
  color: var(--location-muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.location-resource-card__detail a,
.location-resource-card__detail span {
  color: var(--location-ink);
  overflow-wrap: anywhere;
}

.location-resource-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.location-resource-card__actions .location-button {
  min-height: 42px;
  padding: 10px 16px;
  font-size: .9rem;
}

.location-resource-card__services {
  margin-top: 18px;
  padding: 16px 18px;
  background: #f8fbfb;
  border-radius: 14px;
}

.location-resource-card__services strong {
  display: block;
  margin-bottom: 6px;
  color: var(--location-ink);
}

.location-resource-card__services p {
  margin: 0;
  color: #425e5c;
  line-height: 1.6;
}

@media (max-width: 700px) {
  .location-resource-card__top {
    flex-direction: column;
  }

  .location-resource-card__details {
    grid-template-columns: 1fr;
  }

  .location-resource-card__verified {
    white-space: normal;
  }
}


/* ============================================================
   Michigan county directory: search + 5-column layout
   ============================================================ */

.location-county-search {
  margin: 0 0 28px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--location-border);
  border-radius: 18px;
}

.location-county-search__label {
  display: block;
  margin-bottom: 9px;
  color: var(--location-ink);
  font-weight: 800;
}

.location-county-search__control {
  position: relative;
}

.location-county-search__icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--location-muted);
  font-size: 1.25rem;
  pointer-events: none;
}

.location-county-search__input {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px 12px 48px;
  border: 1px solid var(--location-border);
  border-radius: 14px;
  background: #fff;
  color: var(--location-ink);
  font: inherit;
  font-size: 1rem;
}

.location-county-search__input:focus {
  outline: 3px solid rgba(45, 154, 146, .16);
  border-color: #2d9a92;
}

.location-county-search__status {
  margin: 9px 0 0;
  color: var(--location-muted);
  font-size: .9rem;
}

.location-county-grid--directory {
  display: block;
  column-count: 5;
  column-gap: 12px;
}

.location-county-directory-card {

    display: grid;
  width: 100%;
  margin: 0 0 12px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--location-border);
  border-radius: 14px;
  color: var(--location-ink);
  text-decoration: none;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.location-county-directory-card:hover,
.location-county-directory-card:focus-visible {
  transform: translateY(-1px);
  border-color: #9bc9c5;
  box-shadow: 0 8px 22px rgba(25, 65, 63, .08);
}

.location-county-directory-card[hidden] {
  display: none !important;
}

.location-county-directory-card__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #dff1ef;
  color: var(--location-accent-dark);
  font-size: .86rem;
  font-weight: 900;
  line-height: 1;
}

.location-county-directory-card__content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 3px;
}

.location-county-directory-card__content strong {
  overflow: hidden;
  font-size: .95rem;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.location-county-directory-card__content > span {
  color: var(--location-muted);
  font-size: .78rem;
}

.location-county-directory-card__arrow {
  color: var(--location-accent-dark);
  font-weight: 800;
}

.location-county-no-results {
  margin-top: 20px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--location-border);
  border-radius: 18px;
  text-align: center;
}

.location-county-no-results h3 {
  margin-top: 0;
}

@media (max-width: 1180px) {
  .location-county-grid--directory {
    column-count: 4;
  }
}

@media (max-width: 920px) {
  .location-county-grid--directory {
    column-count: 3;
  }
}

@media (max-width: 680px) {
  .location-county-grid--directory {
    column-count: 2;
  }
}

@media (max-width: 430px) {
  .location-county-grid--directory {
    column-count: 1;
  }
}


/* ============================================================
   Main state directory
   ============================================================ */

.location-state-list {
  display: grid;
  gap: 12px;
}

.location-state-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--location-border);
  border-radius: 16px;
  color: var(--location-ink);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(25, 65, 63, .04);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.location-state-row:hover,
.location-state-row:focus-visible {
  transform: translateY(-1px);
  border-color: #9bc9c5;
  box-shadow: 0 12px 30px rgba(25, 65, 63, .08);
}

.location-state-row__abbr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #dff1ef;
  color: var(--location-accent-dark);
  font-size: .92rem;
  font-weight: 900;
  letter-spacing: .05em;
}

.location-state-row__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.location-state-row__main strong {
  font-size: 1.08rem;
  line-height: 1.25;
}

.location-state-row__main > span {
  color: var(--location-muted);
  font-size: .92rem;
}

.location-state-row__arrow {
  color: var(--location-accent-dark);
  font-size: 1.35rem;
  font-weight: 800;
}

@media (max-width: 640px) {
  .location-state-row {
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 13px;
    padding: 15px;
  }

  .location-state-row__abbr {
    width: 46px;
    height: 46px;
  }
}
