.districts-page {
  --district-green: #063f31;
  --district-green-soft: #0f5946;
  --district-gold: #d3842b;
  --district-ink: #171f1c;
  --district-muted: #606b66;
  --district-line: #e7dccb;
  --district-paper: #fffaf3;
  min-height: 100vh;
  background: linear-gradient(180deg, #fffdf9 0%, #fbf6ee 54%, #fffdf9 100%);
  color: var(--district-ink);
}

/* Districts archive polish and added lower sections. */
.districts-page .districts-hero {
  min-height: 390px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(213, 190, 158, 0.55);
  background-image:
    linear-gradient(90deg, rgba(255, 250, 244, 0.98) 0%, rgba(255, 250, 244, 0.86) 38%, rgba(255, 250, 244, 0.28) 72%),
    linear-gradient(180deg, rgba(255, 250, 244, 0) 68%, rgba(255, 250, 244, 0.96) 100%),
    var(--districts-hero);
  background-position: center;
}

.districts-page .districts-hero-copy {
  max-width: 500px;
}

.districts-page .districts-hero p {
  max-width: 452px;
  font-size: 15px;
  line-height: 1.62;
}

.districts-page .districts-benefits {
  background: #fffaf3;
}

.districts-page .districts-benefits .districts-wrap {
  gap: 12px;
  padding: 16px 0;
}

.districts-page .districts-benefits article {
  min-height: 82px;
  justify-content: center;
  padding: 12px 10px;
  border: 1px solid rgba(208, 122, 31, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.districts-page .districts-benefits svg {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.districts-section-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 18px;
  align-items: end;
  margin-bottom: 18px;
}

.districts-section-head > span {
  grid-column: 1 / -1;
  color: #c87824;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.districts-section-head h2 {
  margin: 0;
  color: #0b1d18;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 31px;
  font-weight: 400;
  line-height: 1.08;
}

.districts-section-head a {
  color: #c87824;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.districts-mood,
.districts-routes,
.districts-journal {
  padding: 12px 0 34px;
}

.districts-mood-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.districts-mood-grid a {
  min-height: 154px;
  display: grid;
  align-content: end;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(208, 122, 31, 0.2);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fff7ed);
  color: #10241e;
  text-decoration: none;
  box-shadow: 0 16px 36px rgba(45, 34, 22, 0.08);
}

.districts-mood-grid strong,
.districts-route-grid strong,
.districts-journal-grid span,
.districts-final h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

.districts-mood-grid strong {
  font-size: 24px;
  line-height: 1.06;
}

.districts-mood-grid span {
  color: #38463f;
  font-size: 13px;
  line-height: 1.48;
}

.districts-route-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.districts-route-grid article {
  overflow: hidden;
  border: 1px solid rgba(208, 122, 31, 0.18);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 34px rgba(45, 34, 22, 0.08);
}

.districts-route-grid img {
  width: 100%;
  height: 154px;
  display: block;
  object-fit: cover;
}

.districts-route-grid div {
  padding: 16px 16px 18px;
}

.districts-route-grid strong {
  display: block;
  margin-bottom: 8px;
  color: #0b1d18;
  font-size: 22px;
  line-height: 1.08;
}

.districts-route-grid p {
  margin: 0;
  color: #33413b;
  font-size: 13px;
  line-height: 1.48;
}

.districts-journal-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 14px;
}

.districts-journal-grid a {
  min-height: 190px;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 18px;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(4, 28, 22, 0.08), rgba(4, 28, 22, 0.74)),
    var(--bg) center / cover no-repeat;
  color: #fffdf9;
  text-decoration: none;
}

.districts-journal-grid span {
  max-width: 260px;
  font-size: 24px;
  line-height: 1.08;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.districts-final {
  min-height: 260px;
  display: grid;
  align-items: center;
  margin-top: 4px;
  margin-bottom: 34px;
  padding: 34px;
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(6, 63, 49, 0.96), rgba(6, 63, 49, 0.78) 48%, rgba(6, 63, 49, 0.18)),
    var(--districts-final) center / cover no-repeat;
  color: #fffdf9;
}

.districts-final > div {
  max-width: 520px;
}

.districts-final > div > span {
  display: block;
  margin-bottom: 10px;
  color: #f0b86f;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.districts-final h2 {
  margin: 0 0 10px;
  font-size: 36px;
  line-height: 1.08;
}

.districts-final p {
  margin: 0 0 20px;
  color: rgba(255, 253, 249, 0.88);
  font-size: 15px;
  line-height: 1.58;
}

.districts-final .districts-btn-secondary {
  color: #fffdf9;
  border-color: rgba(255, 253, 249, 0.48);
  background: rgba(255, 255, 255, 0.12);
}

@media (max-width: 900px) {
  .districts-mood-grid,
  .districts-route-grid,
  .districts-journal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .districts-page .districts-hero {
    width: min(100% - 28px, 390px);
    min-height: 360px;
    align-items: flex-end;
    margin: 12px auto 0;
    border: 1px solid rgba(208, 122, 31, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background-image:
      linear-gradient(180deg, rgba(255, 250, 244, 0.06) 0%, rgba(6, 38, 30, 0.14) 42%, rgba(6, 38, 30, 0.76) 100%),
      var(--districts-hero);
    background-position: center top;
  }

  .districts-page .districts-hero .districts-wrap {
    width: 100%;
    padding: 0 20px 22px;
  }

  .districts-page .districts-hero-copy {
    max-width: 100%;
    padding: 0;
  }

  .districts-page .districts-breadcrumb,
  .districts-page .districts-hero h1,
  .districts-page .districts-hero p {
    color: #fffdf9;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.26);
  }

  .districts-page .districts-hero p {
    max-width: 320px;
    font-size: 13px;
    font-weight: 750;
  }

  .districts-page .districts-benefits {
    margin-top: 0;
  }

  .districts-page .districts-benefits .districts-wrap {
    width: min(100% - 28px, 390px);
    gap: 8px;
    padding: 10px 0;
  }

  .districts-page .districts-benefits article {
    min-height: 72px;
    padding: 8px 4px;
    gap: 6px;
  }

  .districts-page .districts-benefits svg {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .districts-page .districts-benefits span {
    font-size: 8.5px;
    line-height: 1.1;
  }

  .districts-mood,
  .districts-routes,
  .districts-journal {
    padding: 4px 0 26px;
  }

  .districts-section-head {
    grid-template-columns: 1fr;
    margin-bottom: 14px;
  }

  .districts-section-head h2 {
    font-size: 25px;
  }

  .districts-mood-grid,
  .districts-route-grid,
  .districts-journal-grid {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    margin-inline: -14px;
    padding: 0 14px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
  }

  .districts-mood-grid::-webkit-scrollbar,
  .districts-route-grid::-webkit-scrollbar,
  .districts-journal-grid::-webkit-scrollbar {
    display: none;
  }

  .districts-mood-grid a,
  .districts-route-grid article,
  .districts-journal-grid a {
    flex: 0 0 min(68vw, 258px);
    min-width: min(68vw, 258px);
    scroll-snap-align: start;
  }

  .districts-mood-grid a {
    min-height: 144px;
    padding: 17px;
  }

  .districts-mood-grid strong,
  .districts-route-grid strong,
  .districts-journal-grid span {
    font-size: 21px;
  }

  .districts-route-grid img {
    height: 132px;
  }

  .districts-journal-grid a {
    min-height: 176px;
  }

  .districts-final {
    width: min(100% - 28px, 390px);
    min-height: 300px;
    margin-bottom: 22px;
    padding: 24px 20px;
    background:
      linear-gradient(180deg, rgba(6, 63, 49, 0.98), rgba(6, 63, 49, 0.78) 62%, rgba(6, 63, 49, 0.34)),
      var(--districts-final) center / cover no-repeat;
  }

  .districts-final h2 {
    font-size: 28px;
  }
}

.districts-wrap {
  width: min(100% - 64px, 1180px);
  margin: 0 auto;
}

.districts-hero {
  min-height: 430px;
  display: flex;
  align-items: center;
  background-image:
    linear-gradient(90deg, rgba(255, 253, 249, 0.99) 0%, rgba(255, 253, 249, 0.88) 29%, rgba(255, 253, 249, 0.42) 49%, rgba(255, 253, 249, 0.02) 78%),
    linear-gradient(180deg, rgba(255, 253, 249, 0) 62%, rgba(255, 253, 249, 0.95) 100%),
    var(--districts-hero);
  background-position: center 52%;
  background-size: cover;
}

.districts-hero-copy {
  max-width: 525px;
  padding: 38px 0 46px;
}

.districts-breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 28px;
  color: #5f6965;
  font-size: 12px;
  font-weight: 700;
}

.districts-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.districts-hero h1,
.districts-list-section h2,
.district-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: 0;
}

.districts-hero h1 {
  margin: 0 0 18px;
  font-size: 54px;
  line-height: 1.05;
}

.districts-hero p {
  max-width: 478px;
  margin: 0 0 30px;
  color: #22302b;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.58;
}

.districts-actions {
  display: flex;
  gap: 16px;
}

.districts-btn,
.districts-more-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.districts-btn {
  min-width: 154px;
  padding: 0 24px;
}

.districts-btn-primary,
.districts-more-btn {
  border: 1px solid var(--district-green);
  background: linear-gradient(180deg, var(--district-green-soft), var(--district-green));
  color: #fff;
  box-shadow: 0 14px 28px rgba(6, 63, 49, 0.16);
}

.districts-btn-secondary {
  border: 1px solid rgba(6, 63, 49, 0.38);
  background: rgba(255, 255, 255, 0.72);
  color: var(--district-green);
}

.districts-benefits {
  border-top: 1px solid rgba(231, 220, 203, 0.7);
  border-bottom: 1px solid rgba(231, 220, 203, 0.7);
  background: rgba(255, 255, 255, 0.72);
}

.districts-benefits .districts-wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.districts-benefits article {
  min-height: 92px;
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 14px 22px;
  border-right: 1px solid rgba(231, 220, 203, 0.9);
}

.districts-benefits article:last-child {
  border-right: 0;
}

.districts-benefits svg {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  fill: none;
  stroke: var(--district-gold);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.districts-benefits span {
  color: #22302b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.22;
}

.districts-list-section {
  padding: 34px 0 64px;
}

.districts-list-section h2 {
  margin: 0 0 20px;
  font-size: 30px;
  line-height: 1.12;
}

.districts-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.district-card {
  overflow: hidden;
  display: flex;
  min-height: 372px;
  flex-direction: column;
  border: 1px solid var(--district-line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 34px rgba(38, 28, 15, 0.08);
}

.district-card-image {
  height: 142px;
  display: block;
  background: var(--bg) center / cover no-repeat;
}

.district-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px 17px 15px;
}

.district-card h3 {
  margin: 0 0 9px;
  font-size: 22px;
  line-height: 1.08;
}

.district-card h3 a {
  color: inherit;
  text-decoration: none;
}

.district-card p {
  margin: 0 0 18px;
  color: #283530;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.46;
}

.district-card-meta {
  display: flex;
  gap: 13px;
  flex-wrap: wrap;
  margin-top: auto;
  color: #24302c;
  font-size: 11px;
  font-weight: 700;
}

.district-more {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 15px;
  color: var(--district-green);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.district-more span {
  color: var(--district-gold);
  font-size: 16px;
  line-height: 1;
}

.districts-more-btn {
  width: 244px;
  margin: 32px auto 0;
  border: 0;
  cursor: pointer;
}

@media (min-width: 641px) {
  .district-card.is-extra {
    display: flex;
  }
}

@media (max-width: 900px) {
  .districts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .districts-benefits .districts-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body.post-type-archive-district .site-header,
  body.districts-page .site-header {
    position: sticky;
    background: rgba(255, 253, 249, 0.96);
    backdrop-filter: blur(10px);
  }

  .districts-page {
    background: #fffaf4;
  }

  .districts-wrap {
    width: min(100% - 28px, 390px);
  }

  .districts-hero {
    min-height: 300px;
    align-items: flex-start;
    background-image:
      linear-gradient(90deg, rgba(255, 250, 244, 0.98) 0%, rgba(255, 250, 244, 0.92) 45%, rgba(255, 250, 244, 0.52) 78%, rgba(255, 250, 244, 0.1) 100%),
      linear-gradient(180deg, rgba(255, 250, 244, 0) 55%, rgba(255, 250, 244, 0.94) 100%),
      var(--districts-hero);
    background-position: center top;
  }

  .districts-hero-copy {
    max-width: 310px;
    padding: 12px 0 28px;
  }

  .districts-breadcrumb {
    margin-bottom: 20px;
    font-size: 11px;
  }

  .districts-hero h1 {
    margin-bottom: 13px;
    font-size: 31px;
    line-height: 1.06;
  }

  .districts-hero p {
    max-width: 286px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.52;
  }

  .districts-actions {
    gap: 8px;
  }

  .districts-btn {
    min-width: 0;
    min-height: 42px;
    padding: 0 17px;
    font-size: 12px;
  }

  .districts-benefits .districts-wrap {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }

  .districts-benefits article {
    min-height: 84px;
    flex-direction: column;
    gap: 7px;
    justify-content: center;
    padding: 10px 4px;
    border-right: 0;
  }

  .districts-benefits svg {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }

  .districts-benefits span {
    font-size: 9px;
    line-height: 1.12;
    text-align: center;
  }

  .districts-list-section {
    padding: 26px 0 44px;
  }

  .districts-list-section h2 {
    margin-bottom: 14px;
    font-size: 25px;
  }

  .districts-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .district-card {
    min-height: 0;
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(45, 34, 22, 0.08);
  }

  .district-card.is-extra {
    display: none;
  }

  .district-card-image {
    height: auto;
    min-height: 132px;
  }

  .district-card-body {
    min-height: 132px;
    padding: 12px 12px 11px;
  }

  .district-card h3 {
    margin-bottom: 6px;
    font-size: 20px;
  }

  .district-card p {
    margin-bottom: 10px;
    font-size: 10.5px;
    line-height: 1.36;
  }

  .district-card-meta {
    gap: 8px;
    font-size: 9px;
    line-height: 1.2;
  }

  .district-more {
    margin-top: 8px;
    font-size: 10px;
  }

  .districts-more-btn {
    width: 100%;
    min-height: 48px;
    margin-top: 20px;
    font-size: 14px;
  }
}

/* Final archive districts pass: keep these rules after the legacy mobile block. */
.districts-page .districts-hero {
  min-height: 390px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(213, 190, 158, 0.55);
  background-image:
    linear-gradient(90deg, rgba(255, 250, 244, 0.98) 0%, rgba(255, 250, 244, 0.86) 38%, rgba(255, 250, 244, 0.28) 72%),
    linear-gradient(180deg, rgba(255, 250, 244, 0) 68%, rgba(255, 250, 244, 0.96) 100%),
    var(--districts-hero);
  background-position: center;
}

.districts-page .districts-hero-copy {
  max-width: 500px;
}

.districts-page .districts-hero p {
  max-width: 452px;
  font-size: 15px;
  line-height: 1.62;
}

.districts-page .districts-benefits {
  background: #fffaf3;
}

.districts-page .districts-benefits .districts-wrap {
  gap: 12px;
  padding: 16px 0;
}

.districts-page .districts-benefits article {
  min-height: 82px;
  justify-content: center;
  padding: 12px 10px;
  border: 1px solid rgba(208, 122, 31, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}

.districts-page .districts-benefits svg {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

@media (max-width: 640px) {
  .districts-page .districts-hero {
    width: min(100% - 28px, 390px);
    min-height: 360px;
    align-items: flex-end;
    margin: 12px auto 0;
    border: 1px solid rgba(208, 122, 31, 0.2);
    border-radius: 8px;
    overflow: hidden;
    background-image:
      linear-gradient(180deg, rgba(255, 250, 244, 0.06) 0%, rgba(6, 38, 30, 0.14) 42%, rgba(6, 38, 30, 0.76) 100%),
      var(--districts-hero);
    background-position: center top;
  }

  .districts-page .districts-hero .districts-wrap {
    width: 100%;
    padding: 0 20px 22px;
  }

  .districts-page .districts-hero-copy {
    max-width: 100%;
    padding: 0;
  }

  .districts-page .districts-breadcrumb,
  .districts-page .districts-hero h1,
  .districts-page .districts-hero p {
    color: #fffdf9;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.26);
  }

  .districts-page .districts-hero p {
    max-width: 320px;
    font-size: 13px;
    font-weight: 750;
  }

  .districts-page .districts-benefits .districts-wrap {
    width: min(100% - 28px, 390px);
    gap: 8px;
    padding: 10px 0;
  }

  .districts-page .districts-benefits article {
    min-height: 72px;
    padding: 8px 4px;
    gap: 6px;
  }

  .districts-page .districts-benefits svg {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .districts-page .districts-benefits span {
    font-size: 8.5px;
    line-height: 1.1;
  }
}

/* v182: lower district blocks, tightened logic and mobile bounds. */
.districts-page .districts-mood,
.districts-page .districts-routes,
.districts-page .districts-journal {
  overflow: hidden;
}

.districts-page .districts-section-head {
  align-items: end;
  gap: 10px 22px;
}

.districts-page .districts-section-head p {
  max-width: 500px;
  margin: 0;
  color: #405148;
  font-size: 14px;
  line-height: 1.55;
}

.districts-page .districts-mood-grid a {
  position: relative;
  align-content: start;
  gap: 9px;
  overflow: hidden;
  border-color: rgba(208, 122, 31, 0.24);
  background:
    linear-gradient(90deg, rgba(255, 253, 249, 0.98) 0%, rgba(255, 253, 249, 0.94) 57%, rgba(255, 253, 249, 0.24) 100%),
    var(--mood-bg) right center / auto 100% no-repeat,
    #fffaf3;
  box-shadow: 0 18px 42px rgba(45, 34, 22, 0.1);
}

.districts-page .districts-mood-grid a::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: #d7822a;
  opacity: 0.75;
}

.districts-page .districts-mood-grid i {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  margin-bottom: 2px;
  border: 1px solid rgba(208, 122, 31, 0.36);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.78);
  color: #00614e;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.districts-page .districts-mood-grid em {
  color: #c87824;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1.2;
  text-transform: uppercase;
}

.districts-page .districts-mood-grid b,
.districts-page .districts-route-grid a {
  margin-top: auto;
  color: #00614e;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
  text-decoration: none;
}

.districts-page .districts-route-grid article {
  display: grid;
  min-width: 0;
}

.districts-page .districts-route-grid div {
  display: flex;
  min-height: 178px;
  flex-direction: column;
}

.districts-page .districts-route-grid p {
  margin-bottom: 14px;
}

@media (max-width: 640px) {
  .districts-page .districts-mood,
  .districts-page .districts-routes,
  .districts-page .districts-journal {
    width: min(100% - 28px, 390px);
    padding: 8px 0 24px;
  }

  .districts-page .districts-section-head {
    display: block;
    margin-bottom: 14px;
  }

  .districts-page .districts-section-head span {
    display: block;
    margin-bottom: 8px;
  }

  .districts-page .districts-section-head h2 {
    margin-bottom: 8px;
    font-size: 25px;
    line-height: 1.12;
  }

  .districts-page .districts-section-head p {
    max-width: 100%;
    font-size: 13px;
  }

  .districts-page .districts-mood-grid,
  .districts-page .districts-route-grid,
  .districts-page .districts-journal-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    overflow: visible;
    margin: 0;
    padding: 0;
    scroll-snap-type: none;
  }

  .districts-page .districts-mood-grid a,
  .districts-page .districts-route-grid article,
  .districts-page .districts-journal-grid a {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
    scroll-snap-align: none;
  }

  .districts-page .districts-mood-grid a {
    min-height: 0;
    padding: 16px 16px 18px;
    background:
      linear-gradient(90deg, rgba(255, 253, 249, 0.99) 0%, rgba(255, 253, 249, 0.96) 62%, rgba(255, 253, 249, 0.42) 100%),
      var(--mood-bg) right center / auto 100% no-repeat,
      #fffaf3;
    box-shadow: 0 10px 26px rgba(45, 34, 22, 0.07);
  }

  .districts-page .districts-mood-grid a::after {
    right: 16px;
    bottom: 16px;
    width: 28px;
  }

  .districts-page .districts-mood-grid i {
    width: 34px;
    height: 34px;
    font-size: 11px;
  }

  .districts-page .districts-mood-grid strong,
  .districts-page .districts-route-grid strong,
  .districts-page .districts-journal-grid span {
    font-size: 21px;
    line-height: 1.1;
  }

  .districts-page .districts-mood-grid span {
    font-size: 12.5px;
  }

  .districts-page .districts-route-grid img {
    height: 140px;
  }

  .districts-page .districts-route-grid div {
    min-height: 0;
    padding: 15px;
  }

  .districts-page .districts-journal-grid a {
    min-height: 126px;
    padding: 16px;
  }

  .districts-page .districts-final {
    width: min(100% - 28px, 390px);
    margin-top: 8px;
  }
}
/* v397: route cards are links in the archive template. */
.districts-page .districts-route-grid > a.districts-route-card {
  display: block;
  min-width: 0;
  margin: 0;
  color: inherit;
  font: inherit;
  line-height: inherit;
  text-decoration: none;
}

.districts-page .districts-route-grid > a.districts-route-card article {
  height: 100%;
}

.districts-page .districts-route-grid .districts-route-card-more {
  margin-top: auto;
  color: #00614e;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

@media (max-width: 640px) {
  .districts-page .districts-route-grid > a.districts-route-card {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
    scroll-snap-align: none;
  }
}

/* v398: align district archive cards without making them visually heavy. */
.districts-page .districts-list-section {
  padding-bottom: 52px;
}

.districts-page .districts-grid {
  align-items: stretch;
  gap: 22px;
  grid-auto-rows: 1fr;
}

.districts-page .district-card {
  height: 100%;
  min-height: 0;
  box-shadow: 0 14px 30px rgba(45, 34, 22, 0.075);
}

.districts-page .district-card-image {
  height: 140px;
}

.districts-page .district-card-body {
  min-height: 178px;
  padding: 15px 16px 14px;
}

.districts-page .district-card h3 {
  min-height: 48px;
  margin-bottom: 8px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 21px;
  line-height: 1.14;
}

.districts-page .district-card p {
  min-height: 56px;
  margin-bottom: 12px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: 12.5px;
  line-height: 1.48;
}

.districts-page .district-card-meta {
  gap: 11px;
  min-height: 14px;
  margin-top: auto;
  font-size: 10.5px;
}

.districts-page .district-more {
  margin-top: 13px;
}

@media (max-width: 1120px) {
  .districts-page .districts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .districts-page .districts-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .districts-page .districts-list-section {
    padding: 24px 0 38px;
  }

  .districts-page .districts-list-section .districts-wrap {
    width: min(100% - 32px, 390px);
  }

  .districts-page .districts-list-section h2 {
    margin-bottom: 14px;
    font-size: 26px;
  }

  .districts-page .districts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .districts-page .district-card {
    width: 100%;
    min-height: 0;
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(45, 34, 22, 0.075);
  }

  .districts-page .district-card-image {
    height: auto;
    min-height: 146px;
  }

  .districts-page .district-card-body {
    min-height: 146px;
    padding: 12px 12px 11px;
  }

  .districts-page .district-card h3 {
    min-height: 42px;
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.14;
  }

  .districts-page .district-card p {
    min-height: 34px;
    margin-bottom: 8px;
    -webkit-line-clamp: 2;
    font-size: 10.8px;
    line-height: 1.42;
  }

  .districts-page .district-card-meta {
    gap: 8px;
    min-height: 12px;
    font-size: 9px;
    line-height: 1.2;
  }

  .districts-page .district-more {
    margin-top: 7px;
    font-size: 10px;
  }

  .districts-page .districts-more-btn {
    width: min(100%, 268px);
    min-height: 46px;
    margin-top: 18px;
  }
}

@media (max-width: 370px) {
  .districts-page .district-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .districts-page .district-card-image,
  .districts-page .district-card-body {
    min-height: 138px;
  }
}

/* v399: keep district card meta labels on one tidy baseline. */
.districts-page .district-card-meta {
  flex-wrap: nowrap !important;
  gap: 8px !important;
  overflow: hidden;
  white-space: nowrap;
  font-size: 9.2px;
}

.districts-page .district-card-meta span {
  min-width: 0;
}

@media (max-width: 640px) {
  .districts-page .district-card-meta {
    gap: 5px !important;
    font-size: 8.2px;
  }
}

/* v400: districts archive hero image refresh. */
.districts-page .districts-hero {
  --districts-hero: url("/wp-content/uploads/2026/10/districts-hero-neighborhood-v361.jpg") !important;
  background-image:
    linear-gradient(90deg, rgba(255, 250, 244, 0.98) 0%, rgba(255, 250, 244, 0.86) 37%, rgba(255, 250, 244, 0.25) 68%, rgba(255, 250, 244, 0.02) 100%),
    linear-gradient(180deg, rgba(255, 250, 244, 0) 62%, rgba(255, 250, 244, 0.92) 100%),
    var(--districts-hero) !important;
  background-position: center 46% !important;
  background-size: cover !important;
}

@media (max-width: 640px) {
  .districts-page .districts-hero {
    background-image:
      linear-gradient(180deg, rgba(5, 31, 25, 0.08) 0%, rgba(5, 31, 25, 0.26) 44%, rgba(5, 31, 25, 0.82) 100%),
      var(--districts-hero) !important;
    background-position: center 44% !important;
  }
}


/* v402: district archive initial count and centered compact more button. */
.districts-page #districts-list .districts-more-btn {
  display: flex !important;
  width: fit-content !important;
  min-width: 220px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  margin: 28px auto 0 !important;
  justify-self: center;
}

@media (min-width: 641px) {
  .districts-page #districts-list .district-card.pp-district-hidden[hidden],
  .districts-page #districts-list .district-card.pp-district-hidden {
    display: flex !important;
  }
}

@media (max-width: 640px) {
  .districts-page #districts-list .district-card.pp-district-hidden:nth-of-type(-n + 4)[hidden],
  .districts-page #districts-list .district-card.pp-district-hidden:nth-of-type(-n + 4) {
    display: flex !important;
  }

  .districts-page #districts-list .district-card.pp-district-hidden:nth-of-type(n + 5) {
    display: none !important;
  }

  .districts-page #districts-list .districts-more-btn {
    width: min(100%, 242px) !important;
    min-width: 0;
    min-height: 42px;
    padding: 0 16px;
    margin: 18px auto 0 !important;
    font-size: 12.5px;
  }
}

/* Desktop district covers: lift the entire caption above the lower edge. */
/* All district cards are already visible above the mobile breakpoint. */
@media (min-width: 641px) {
  .districts-page #districts-list .districts-more-btn {
    display: none !important;
  }
}
.districts-page #districts-list .districts-more-btn[hidden] {
  display: none !important;
}
@media (min-width:1024px){
 html body:is(.single-district,.single-district-fallback) .ds-hero .ds-wrap>.ds-hero-copy{
  padding-bottom:100px!important;
 }
}
