/* KWCS Impact Story archive — hero band, filter bar, card grid. */

.story-archive-hero {
  position: relative;
  overflow: hidden;
  padding: 84px 24px 72px;
  text-align: center;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
}

.story-archive-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

.story-archive-eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy-deep);
  margin-bottom: 12px;
}

.story-archive-title {
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.05;
  font-weight: 900;
  color: var(--navy-deep);
  margin-bottom: 18px;
}

.story-archive-intro {
  font-size: 18px;
  line-height: 1.65;
  color: var(--navy-deep);
  opacity: 0.85;
}

/* A category archive suppresses the chips (there is only ever one), so it
   needs its own way back to the full set. */
.story-archive-back {
  margin-top: 20px;
}

.story-archive-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: var(--navy-deep);
  text-decoration: none;
  border-bottom: 2px solid rgba(20, 55, 107, 0.35);
  padding-bottom: 2px;
}

.story-archive-back a:hover { border-bottom-color: var(--navy-deep); }

.story-archive-body {
  max-width: 1160px;
  margin: 0 auto;
  padding: 56px 24px 96px;
}

/* --- Filter bar --------------------------------------------------------- */

.story-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 40px;
}

.story-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.story-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 2px solid var(--border);
  border-radius: 100px;
  padding: 10px 18px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.story-chip:hover { border-color: var(--navy); }

.story-chip.is-active {
  background: var(--navy);
  border-color: var(--navy);
  color: white;
}

.story-chip-count {
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 100px;
  background: var(--gold-tint);
  color: var(--navy-deep);
}

.story-chip.is-active .story-chip-count {
  background: rgba(255, 255, 255, 0.22);
  color: white;
}

.story-search-wrap {
  position: relative;
  flex: 1 1 240px;
  max-width: 320px;
}

.story-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.story-search {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 100px;
  padding: 12px 18px 12px 44px;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  color: var(--text);
  background: white;
}

.story-search:focus {
  outline: none;
  border-color: var(--navy);
}

/* --- Card grid ---------------------------------------------------------- */

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.story-card.is-hidden { display: none; }

.story-card {
  background: white;
  border: 2px solid var(--gold-pale);
  border-radius: 24px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.story-card--blue { border-color: rgba(30, 75, 143, 0.18); }

.story-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -26px rgba(20, 55, 107, 0.55);
}

.story-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.story-card-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--gold-tint);
  overflow: hidden;
}

.story-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Family photos are portraits and the slot is 16:9, so most of the frame is
     cropped away. 28% lands on the face for a standing subject without
     clipping the top of the head the way `top` does on a tight portrait. */
  object-position: center 28%;
  display: block;
}

/* Stand-in for a story with no featured image. The accent decides the
   gradient so a long grid alternates rather than running as one flat block. */
.story-card-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  text-align: center;
}

.story-card-glyph--gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
}

.story-card-glyph--blue {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
}

.story-card-glyph span {
  font-family: 'Nunito', sans-serif;
  font-size: 62px;
  font-weight: 900;
  line-height: 1;
  color: white;
  opacity: 0.9;
}

/* Media segments carry their source instead of an initial — the first letter
   of a news headline says nothing about the story. */
.story-card-glyph--source .story-card-source {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.3;
  opacity: 0.95;
  text-wrap: balance;
}

.story-card-glyph--gold span { color: var(--navy-deep); }

.story-card-play {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--navy);
  box-shadow: 0 4px 12px rgba(20, 55, 107, 0.28);
}

.story-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
}

.story-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.story-card-tag {
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-deep);
}

.story-card-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.story-card-title {
  font-size: 21px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--navy-deep);
  margin-bottom: 8px;
}

.story-card-desc {
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 16px;
}

.story-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: auto;
  font-size: 15px;
  font-weight: 800;
  color: var(--navy);
}

.story-card:hover .story-card-cta { color: var(--gold-deep); }

.story-empty,
.story-no-results {
  text-align: center;
  font-size: 17px;
  color: var(--muted);
  padding: 48px 0;
}

.story-no-results[hidden] { display: none; }

@media (max-width: 768px) {
  .story-archive-hero { padding: 60px 20px 52px; }
  .story-archive-body { padding: 40px 20px 72px; }
  .story-filter-bar { gap: 14px; }
  .story-search-wrap { max-width: none; }
  .story-grid { grid-template-columns: 1fr; gap: 22px; }
}
