/**
 * District page component styles -- enqueued only on single-district.php
 * (see inc/enqueue.php's conditional loading), covering the hero, quick
 * stats, leadership/women-leadership split sections, at-a-glance grid,
 * heritage gallery, district news grid, spotlight video, and newsletter
 * connect card. Originally four near-duplicate per-page stylesheets in
 * the static build (okuta.css/yashikira.css were byte-identical; ilesha.css
 * and gwanara.css each just @imported one of those plus ~20 lines of
 * accent overrides) -- consolidated here into one canonical stylesheet
 * with the accent overrides kept explicit at the bottom of this file.
 */
.district-page {
  --district-green: #174c37;
  --district-green-soft: #dcebe3;
  --district-gold: #ebb326;
  --district-rust: #7b2506;
  --district-ink: #142018;
  background: var(--color-bg);
}

.district-page .site-header {
  background: rgba(251, 250, 245, .94);
}

.district-hero {
  position: relative;
  min-height: calc(100svh - 76px);
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

.district-hero-image,
.district-hero-shade {
  position: absolute;
  inset: 0;
}

.district-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}

.district-hero-shade {
  z-index: -2;
  background:
    linear-gradient(to top, rgba(10, 20, 15, .88), rgba(10, 20, 15, .28) 58%, rgba(10, 20, 15, .12)),
    linear-gradient(110deg, rgba(20, 60, 44, .85), rgba(20, 60, 44, .18) 64%);
}

.district-hero-content {
  padding-block: clamp(5rem, 12vw, 8rem) clamp(3rem, 9vw, 7rem);
}

.district-kicker,
.district-label,
.project-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.district-kicker {
  margin-bottom: 1rem;
  padding: .45rem .8rem;
  color: var(--color-primary);
  background: rgba(246, 214, 117, .94);
}

.district-label {
  margin-bottom: .85rem;
  color: var(--district-rust);
}

.district-hero h1 {
  max-width: 720px;
  margin: 0 0 1rem;
  font-family: var(--font-heading);
  font-size: clamp(3.4rem, 17vw, 7.5rem);
  line-height: .92;
  letter-spacing: -.055em;
}

.district-hero p {
  max-width: 650px;
  margin: 0 0 1.55rem;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(1rem, 2.3vw, 1.28rem);
}

.district-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}

.district-ghost-button {
  color: #fff;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .36);
  backdrop-filter: blur(18px);
}

.district-quick-stats {
  padding-block: 1rem;
}

.district-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.district-stat {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: .3rem;
  padding: 1.1rem;
  border: 1px solid rgba(23, 76, 55, .12);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.district-stat strong {
  color: var(--district-green);
  font-family: var(--font-heading);
  font-size: clamp(1.9rem, 8vw, 3rem);
  line-height: 1;
}

.district-stat span {
  color: var(--color-muted);
  font-family: var(--font-heading);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.district-section {
  padding-block: var(--section);
}

.district-split {
  display: grid;
  gap: clamp(2rem, 7vw, 5rem);
  align-items: center;
}

.district-portrait {
  position: relative;
  max-width: 520px;
}

.district-portrait::before {
  content: "";
  position: absolute;
  inset: -.65rem;
  border-radius: var(--radius-lg);
  background: rgba(23, 76, 55, .08);
  transform: rotate(-2deg);
}

.district-portrait.warm::before {
  background: rgba(123, 37, 6, .1);
  transform: rotate(2deg);
}

.district-portrait img {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
}

.portrait-badge {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border: 4px solid var(--color-surface);
  border-radius: 999px;
  color: var(--district-green);
  background: var(--district-gold);
  box-shadow: var(--shadow);
}

.district-copy h2,
.heritage-copy h2,
.connect-card h2 {
  margin: 0 0 1rem;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.04em;
}

.district-copy p,
.heritage-copy p,
.connect-card p {
  margin: 0;
  color: var(--color-muted);
}

.district-copy blockquote {
  margin: 0 0 1.4rem;
  padding: .2rem 0 .2rem 1rem;
  border-left: 4px solid var(--district-gold);
  color: var(--district-ink);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-style: italic;
  line-height: 1.7;
}

.leadership-notes,
.glance-grid,
.district-project-grid,
.district-news-grid {
  display: grid;
  gap: 1rem;
}

.leadership-notes {
  margin-top: 1.5rem;
}

.leadership-notes article,
.glance-card,
.district-news-card {
  border: 1px solid rgba(194, 201, 185, .36);
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow);
}

.leadership-notes article {
  display: grid;
  gap: .5rem;
  padding: 1.1rem;
}

.leadership-notes .material-symbols-outlined,
.glance-card .material-symbols-outlined {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--district-green);
  background: var(--district-green-soft);
}

.leadership-notes strong,
.glance-card strong,
.initiative-list strong {
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.leadership-notes p {
  margin: 0;
  font-size: .94rem;
}

.women-section,
.project-section,
.news-section {
  background: var(--color-bg-soft);
}

.initiative-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.initiative-list article {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(123, 37, 6, .1);
}

.initiative-list .material-symbols-outlined {
  flex: 0 0 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--district-rust);
  background: var(--color-purple-soft);
}

.initiative-list p {
  margin-top: .15rem;
  font-size: .94rem;
}

.overview-section .section-heading h2 {
  max-width: 880px;
  margin-inline: auto;
}

.glance-card {
  padding: 1.25rem;
  transition: transform .2s ease, box-shadow .2s ease;
}

.glance-card:hover,
.district-news-card:hover,
.district-project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.glance-card strong {
  display: block;
  margin: 1rem 0 .35rem;
}

.glance-card p,
.district-news-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: .95rem;
}

.project-section .section-row {
  align-items: stretch;
}

.project-section .section-row .btn {
  width: fit-content;
}

.district-project-card {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-surface);
  border: 1px solid rgba(23, 76, 55, .12);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.district-project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.district-project-card > div {
  padding: 1.25rem;
}

.project-status {
  margin-bottom: .8rem;
  padding: .35rem .65rem;
  color: #fff;
  background: var(--district-green);
}

.project-status.secondary {
  background: var(--color-primary);
}

.project-status.tertiary {
  background: var(--district-rust);
}

.district-project-card h3,
.district-news-card h3 {
  margin: 0 0 .55rem;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  line-height: 1.22;
}

.district-project-card p {
  margin: 0 0 1.15rem;
  color: var(--color-muted);
  font-size: .95rem;
}

.progress.secondary span {
  background: var(--color-primary);
}

.progress.tertiary span {
  background: var(--district-rust);
}

.heritage-layout {
  display: grid;
  gap: clamp(2rem, 7vw, 5rem);
}

.heritage-links {
  display: grid;
  gap: .75rem;
  margin-top: 1.5rem;
}

.heritage-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 54px;
  padding: .85rem 1rem;
  border: 1px solid rgba(194, 201, 185, .5);
  border-radius: 16px;
  color: var(--color-primary);
  background: var(--color-surface);
  font-family: var(--font-heading);
  font-weight: 800;
}

.heritage-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  min-height: 460px;
}

.heritage-tile {
  position: relative;
  min-height: 180px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.heritage-tile.tall {
  grid-row: span 2;
}

.heritage-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.heritage-tile figcaption {
  position: absolute;
  inset: auto 0 0;
  padding: 2.5rem 1rem 1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, .68), transparent);
  font-family: var(--font-heading);
  font-weight: 800;
}

.district-news-grid {
  margin-bottom: 2rem;
}

.district-news-card {
  padding: 1.2rem;
}

.district-news-card span {
  display: inline-block;
  margin-bottom: .8rem;
  color: var(--district-rust);
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.district-news-card a {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--district-green);
  font-family: var(--font-heading);
  font-weight: 800;
}

.spotlight-video {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  border-radius: var(--radius);
  color: #fff;
  background: #000;
  box-shadow: var(--shadow-hover);
}

.spotlight-video img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  opacity: .82;
}

.spotlight-video > div {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, .58), rgba(0, 0, 0, .05));
}

.spotlight-video strong {
  position: absolute;
  left: 1.2rem;
  bottom: 1rem;
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 5vw, 2rem);
}

.district-connect {
  padding-block: clamp(3rem, 6vw, 5rem);
}

.connect-card {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.3rem, 5vw, 3rem);
  border-radius: var(--radius-lg);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(20, 60, 44, .96), rgba(25, 32, 86, .95)),
    var(--district-green);
  box-shadow: var(--shadow-hover);
}

.connect-card .district-label {
  color: var(--district-gold);
}

.connect-card h2,
.connect-card p {
  color: #fff;
}

.connect-card p {
  opacity: .76;
}

.district-subscribe-form {
  display: grid;
  gap: .75rem;
}

.district-subscribe-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 16px;
  padding: 0 1rem;
  color: #fff;
  background: rgba(255, 255, 255, .1);
}

.district-subscribe-form input::placeholder {
  color: rgba(255, 255, 255, .6);
}

.district-subscribe-form .form-message {
  margin: 0;
  color: var(--district-gold);
}

.search-match {
  box-shadow: inset 0 0 0 4px rgba(235, 179, 38, .75);
}

@media (min-width: 640px) {
  .district-stat-grid,
  .glance-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .leadership-notes,
  .district-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .district-subscribe-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .district-subscribe-form .form-message {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .district-hero {
    min-height: 760px;
    align-items: center;
  }

  .district-section {
    padding-block: clamp(5rem, 8vw, 7.5rem);
  }

  .district-split,
  .heritage-layout,
  .connect-card {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  }

  .district-split.reverse {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  }

  .district-project-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .district-news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spotlight-video {
    min-height: 460px;
  }
}

@media (min-width: 1024px) {
  .district-quick-stats {
    padding-block: 1.4rem;
  }

  .district-project-card img {
    height: 240px;
  }
}

/* =========================================================================
   PER-DISTRICT ACCENT OVERRIDES
   The base .district-page rules above use Okuta/Yashikira's green/rust
   palette; Ilesha and Gwanara swap in a different accent pairing plus a
   matching hero-shade and connect-card gradient. Applied via the
   `{slug}-page` body class added by barutem_district_body_class() in
   single-district.php.
   ========================================================================= */

.ilesha-page {
  --district-green: #7b2506;
  --district-green-soft: #f3dfd7;
  --district-gold: #ebb326;
  --district-rust: #143c2c;
  --district-ink: #151936;
}

.ilesha-page .district-hero-shade {
  background:
    linear-gradient(to top, rgba(32, 14, 8, .9), rgba(32, 14, 8, .32) 58%, rgba(32, 14, 8, .12)),
    linear-gradient(110deg, rgba(123, 37, 6, .82), rgba(235, 179, 38, .22) 64%);
}

.ilesha-page .connect-card {
  background:
    linear-gradient(135deg, rgba(123, 37, 6, .96), rgba(20, 60, 44, .94)),
    var(--district-green);
}

.gwanara-page {
  --district-green: #00629d;
  --district-green-soft: #dcebe3;
  --district-gold: #ebb326;
  --district-rust: #174c37;
  --district-ink: #151936;
}

.gwanara-page .district-hero-shade {
  background:
    linear-gradient(to top, rgba(10, 18, 38, .9), rgba(10, 18, 38, .28) 58%, rgba(10, 18, 38, .1)),
    linear-gradient(110deg, rgba(25, 32, 86, .84), rgba(0, 98, 157, .22) 64%);
}

.gwanara-page .connect-card {
  background:
    linear-gradient(135deg, rgba(25, 32, 86, .96), rgba(23, 76, 55, .94)),
    var(--district-green);
}
