/*
 * Media & Stories Page Styles
 * Tekvera Initiative Theme
 */

/* ── Hero background gradient (replaces inline style) ─────────────────── */
.tv-media-hero__bg {
  background: linear-gradient(135deg, #030F09 0%, #061C13 35%, #0C3D2E 65%, #155740 100%);
}

/* Hero type-chip dot colours */
.tv-mtype-chip--all    .tv-mtype-dot { background: var(--tv-green-400); }
.tv-mtype-chip--story  .tv-mtype-dot { background: var(--tv-green-300); }
.tv-mtype-chip--update .tv-mtype-dot { background: var(--tv-amber-400); }
.tv-mtype-chip--report .tv-mtype-dot { background: var(--tv-green-400); }
.tv-mtype-chip--news   .tv-mtype-dot { background: var(--tv-green-300); }
.tv-mtype-chip--video  .tv-mtype-dot { background: var(--tv-amber-300); }

/* ── Featured story card ──────────────────────────────────────────────── */
.tv-media-featured {
  background: var(--tv-white);
  padding: 5rem 0 3rem;
}

.tv-section-label {
  margin-bottom: 1.05rem;
}

.tv-fs-card {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border-radius: 22px;
  overflow: hidden;
  background: var(--tv-green-800);
  min-height: 440px;
  box-shadow: 0 20px 60px rgba(6,28,19,.18);
}

.tv-fs-visual {
  position: relative;
  overflow: hidden;
  min-height: 380px;
}

.tv-fs-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tv-fs-img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 380px;
  background: linear-gradient(145deg, #0C3D2E, #1E7254 55%, #155740);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 2rem;
}

.tv-fs-img-placeholder p {
  font-family: var(--tv-font-serif);
  font-size: 0.875rem;
  color: rgba(255,255,255,.38);
  font-style: italic;
  text-align: center;
  max-width: 220px;
  line-height: 1.55;
}

.tv-fs-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 40%, rgba(6,28,19,.5) 100%);
}

.tv-fs-content {
  padding: 3rem 3rem 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tv-fs-cat {
  color: var(--tv-green-400);
  margin-bottom: 0.75rem;
  display: inline-block;
  background: rgba(57, 173, 130, 0.15);
  border: 1px solid rgba(57, 173, 130, 0.25);
  border-radius: 9999px;
  padding: 0.25rem 0.78rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.tv-fs-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 1.1rem;
  letter-spacing: 0.25px;
}

.tv-fs-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  flex-shrink: 0;
}

.tv-fs-title {
  font-family: var(--tv-font-serif);
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  font-weight: 400;
  color: #fff;
  line-height: 1.22;
  letter-spacing: var(--tv-tracking-tight);
  margin-bottom: 1rem;
}

.tv-fs-desc {
  font-size: 0.98rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.68;
  margin-bottom: 1.5rem;
}

.tv-fs-read-time {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,.32);
  margin-bottom: 1.75rem;
}

/* ── Hero content-type chips ──────────────────────────────────────────── */
.tv-mtype-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.tv-mtype-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9999px;
  padding: 0.38rem 0.92rem;
  font-family: var(--tv-font-sans);
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,.6);
  cursor: pointer;
  transition: all 0.18s;
}

.tv-mtype-chip:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.tv-mtype-chip.is-active {
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.32);
  color: #fff;
}

.tv-mtype-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--tv-green-400);
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .tv-mtype-chip {
    font-size: 0.84rem;
  }
}

/* ── Sticky filter bar ────────────────────────────────────────────────── */
.tv-media-filter {
  background: #fff;
  border-bottom: 1px solid var(--tv-border);
  position: sticky;
  top: var(--tv-nav-height, 68px);
  z-index: 40;
  transition: box-shadow 0.2s;
}

.tv-media-filter.is-sticky {
  box-shadow: 0 4px 16px rgba(6,28,19,.08);
}

.tv-mf-inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}

.tv-mf-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tv-text-tertiary);
  flex-shrink: 0;
}

.tv-mf-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  flex: 1;
}

.tv-mf-pill {
  font-family: var(--tv-font-sans);
  font-size: 0.86rem;
  font-weight: 500;
  padding: 0.25rem 0.85rem;
  border-radius: 9999px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--tv-text-secondary);
  cursor: pointer;
  transition: all 0.16s;
  letter-spacing: 0.25px;
}

.tv-mf-pill:hover {
  background: var(--tv-green-50);
  color: var(--tv-green-700);
}

.tv-mf-pill.is-active {
  background: var(--tv-green-800);
  color: #fff;
  border-color: var(--tv-green-800);
}

@media (max-width: 768px) {
  .tv-mf-pill {
    font-size: 0.92rem;
  }
}

/* ── Stories archive grid ─────────────────────────────────────────────── */
.tv-stories-archive {
  background: var(--tv-cream);
  padding: 4rem 0 6rem;
}

.tv-sa-header {
  margin-bottom: 2.25rem;
}

.tv-sa-header h2 {
  font-family: var(--tv-font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  letter-spacing: var(--tv-tracking-tight);
  margin-top: 0.75rem;
}

.tv-media-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

/* Wide card spans two columns */
.tv-mc--wide {
  grid-column: span 2;
}

.tv-mc--wide .tv-mc-thumb { aspect-ratio: 16/9; }
.tv-mc--wide .tv-mc-excerpt { display: block; }

/* Standard card */
.tv-mc {
  background: #fff;
  border: 1px solid var(--tv-border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s, transform 0.25s;
}

.tv-mc:hover {
  box-shadow: 0 12px 40px rgba(6,28,19,.1);
  transform: translateY(-3px);
}

.tv-mc-thumb {
  position: relative;
  aspect-ratio: 3/2;
  overflow: hidden;
  flex-shrink: 0;
}

.tv-mc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s;
}

.tv-mc:hover .tv-mc-img { transform: scale(1.04); }

/* Coloured placeholder fills per type */
.tv-mc-thumb-fill {
  width: 100%; height: 100%;
}
.tv-mc-thumb-fill--story  { background: linear-gradient(135deg, #A8DFC6, #EBF7F1); }
.tv-mc-thumb-fill--update { background: linear-gradient(135deg, #FAD880, #FEF9E8); }
.tv-mc-thumb-fill--report { background: linear-gradient(135deg, #D0F0E2, #FDEFC0); }
.tv-mc-thumb-fill--news   { background: linear-gradient(135deg, #EBF7F1, #D0F0E2); }
.tv-mc-thumb-fill--video  { background: linear-gradient(135deg, #D0E0F5, #EBF7F1); }

/* Type badge on card thumbnail */
.tv-mc-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  background: rgba(6,28,19,.72);
  backdrop-filter: blur(6px);
  border-radius: 9999px;
  padding: 0.26rem 0.7rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
}

.tv-mc-badge::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--badge-dot, var(--tv-green-400));
  flex-shrink: 0;
}

/* Card body */
.tv-mc-body {
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tv-mc-cat {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tv-green-600);
  margin-bottom: 0.45rem;
}

@media (max-width: 768px) {
  .tv-mc-cat {
    font-size: 0.72rem;
  }
}

.tv-mc-title {
  font-family: var(--tv-font-serif);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.35;
}

.tv-mc-title a {
  color: var(--tv-text-primary);
  text-decoration: none;
  transition: color 0.18s;
}

.tv-mc-title a:hover { color: var(--tv-green-600); }

.tv-mc-excerpt {
  font-size: 0.92rem;
  color: var(--tv-text-secondary);
  line-height: 1.68;
  margin-bottom: 0.85rem;
  display: none;
}

.tv-mc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-top: 1px solid var(--tv-border);
  padding-top: 0.75rem;
  margin-top: auto;
}

.tv-mc-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.72rem;
  color: var(--tv-text-tertiary);
  flex-wrap: wrap;
}

.tv-mc-meta-dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--tv-border-dark);
  flex-shrink: 0;
}

.tv-mc-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tv-green-700);
  text-decoration: none;
  white-space: nowrap;
  transition: gap 0.2s, color 0.2s;
}

.tv-mc-link:hover { gap: 0.55rem; color: var(--tv-green-500); }

/* Empty state */
.tv-media-empty {
  text-align: center;
  padding: 4rem 0;
  color: var(--tv-text-tertiary);
  font-size: 0.925rem;
}

.tv-media-empty.is-hidden { display: none; }

/* ── Resources section ────────────────────────────────────────────────── */
.tv-resources-section {
  background: var(--tv-white);
}

.tv-resources-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.tv-resources-section h2 {
  font-family: var(--tv-font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  letter-spacing: var(--tv-tracking-tight);
  margin: 0.9rem 0 1rem;
}

.tv-resources-section > div > p {
  font-size: 0.925rem;
  color: var(--tv-text-secondary);
  line-height: 1.78;
  margin-bottom: 2rem;
}

/* Report download cards */
.tv-report-cards {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 14px;
}

.tv-rc-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.25rem;
  background: var(--tv-cream);
  border: 1px solid var(--tv-border);
  border-radius: 14px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tv-rc-card:hover {
  border-color: var(--tv-green-300);
  box-shadow: 0 4px 16px rgba(6,28,19,.07);
}

.tv-rc-ico {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tv-rc-ico--report { background: var(--tv-green-50); }
.tv-rc-ico--star   { background: var(--tv-amber-50); }

.tv-rc-body h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--tv-text-primary);
  margin-bottom: 0.2rem;
}

.tv-rc-body p {
  font-size: 0.85rem;
  color: var(--tv-text-tertiary);
  line-height: 1.5;
}

.tv-rc-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--tv-green-700);
  background: var(--tv-green-50);
  border: 1px solid var(--tv-green-100);
  border-radius: 6px;
  padding: 0.22rem 0.55rem;
  flex-shrink: 0;
}

.tv-rc-badge--new {
  background: var(--tv-amber-50);
  border-color: var(--tv-amber-200);
  color: var(--tv-amber-600);
}

/* Press kit card */
.tv-press-kit-card {
  background: var(--tv-green-800);
  border-radius: 20px;
  padding: 2rem;
}

.tv-pk-header {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  margin-bottom: 1.75rem;
}

.tv-pk-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tv-pk-header h3 {
  font-family: var(--tv-font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.4rem;
}

.tv-pk-header p {
  font-size: 0.88rem;
  color: rgba(255,255,255,.48);
  line-height: 1.6;
}

.tv-pk-assets {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: 10px;
  overflow: hidden;
}

.tv-pk-asset {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.82rem 1rem;
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid rgba(255,255,255,.06);
  font-size: 0.84rem;
  color: rgba(255,255,255,.62);
}

.tv-pk-asset:last-child { border-bottom: none; }

.tv-pk-asset-ico {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tv-pk-asset-label { flex: 1; }

.tv-pk-asset-size {
  font-size: 0.68rem;
  color: rgba(255,255,255,.28);
  white-space: nowrap;
}

/* ── Press kit footer helpers ──────────────────────────────────────────── */
.tv-pk-cta-row {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.tv-pk-footer-note {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 1rem;
  line-height: 1.35;
  letter-spacing: 0.25px;
}

/* ── Media mentions (cream background, white cards) ───────────────────── */
.tv-mentions-sec {
  background: var(--tv-cream);
  border-top: 1px solid var(--tv-border);
}

.tv-mentions-hd {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2.5rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.tv-mentions-hd h2 {
  font-family: var(--tv-font-serif);
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  font-weight: 400;
  letter-spacing: var(--tv-tracking-tight);
  margin-top: 0.75rem;
}

.tv-mentions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.1rem;
}

.tv-mention-card {
  background: #fff;
  border: 1px solid var(--tv-border);
  border-radius: 16px;
  padding: 1.65rem;
  transition: border-color 0.22s, box-shadow 0.22s;
  display: flex;
  flex-direction: column;
}

.tv-mention-card:hover {
  border-color: var(--tv-green-200);
  box-shadow: 0 4px 20px rgba(6, 28, 19, 0.09), 0 2px 8px rgba(6, 28, 19, 0.05);
}

.tv-mention-outlet {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tv-text-tertiary);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tv-mention-outlet::before {
  content: '';
  display: block;
  width: 10px;
  height: 1.5px;
  background: currentColor;
  flex-shrink: 0;
}

.tv-mention-title {
  font-family: var(--tv-font-serif);
  font-size: 1rem;
  font-weight: 500;
  color: var(--tv-text-primary);
  margin-bottom: 0.55rem;
  line-height: 1.35;
}

@media (max-width: 768px) {
  .tv-mention-title {
    font-size: 1.12rem;
    line-height: 1.2;
  }
}

.tv-mention-date {
  font-size: 0.8rem;
  color: var(--tv-text-muted, #9BB0A8);
}

@media (max-width: 768px) {
  .tv-mention-date {
    font-size: 0.85rem;
    color: var(--tv-text-muted, #9BB0A8);
  }
}

.tv-mention-link {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--tv-green-700);
  margin-top: 0.85rem;
  text-decoration: none;
  transition: gap 0.2s, color 0.2s;
  align-self: flex-start;
}

.tv-mention-link:hover { gap: 0.55rem; color: var(--tv-green-500); }

.tv-mentions-footer {
  font-size: 0.92rem;
  color: var(--tv-text-tertiary);
  margin-top: 2rem;
  text-align: center;
}

.tv-mentions-footer a {
  color: var(--tv-green-600);
  font-weight: 600;
  margin-left: 0.35rem;
  text-decoration: none;
  transition: color 0.18s;
}

.tv-mentions-footer a:hover { color: var(--tv-green-500); }

/* ── Newsletter helpers (reuse .tv-nl-sec from projects.css) ───────────── */
.tv-nl-heading { margin: 0.85rem 0 0.65rem; }

.tv-nl-body {
  font-size: 0.9rem;
  color: var(--tv-text-secondary);
  max-width: 440px;
  line-height: 1.72;
}

.tv-nl-note {
  font-size: 0.72rem;
  color: var(--tv-text-tertiary);
  margin-top: 0.75rem;
}

.tv-eyebrow--amber { color: var(--tv-amber-600); }
.tv-eyebrow--amber::before { background: var(--tv-amber-600); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .tv-fs-card          { grid-template-columns: 1fr; }
  .tv-fs-visual        { min-height: 280px; }
  .tv-fs-overlay       { background: linear-gradient(0deg, rgba(6,28,19,.7) 0%, transparent 60%); }
  .tv-media-grid       { grid-template-columns: 1fr 1fr; }
  .tv-mc--wide         { grid-column: span 2; }
  .tv-resources-grid   { grid-template-columns: 1fr; gap: 3rem; }
  .tv-mentions-grid    { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .tv-media-grid       { grid-template-columns: 1fr; }
  .tv-mc--wide         { grid-column: span 1; }
  .tv-mentions-grid    { grid-template-columns: 1fr; }
  .tv-mf-inner         { flex-wrap: wrap; gap: 0.75rem; }
  /* Tighter section padding on mobile */
  .tv-media-featured   { padding: 3.5rem 0 2rem; }
  .tv-stories-archive  { padding: 3rem 0 4rem; }
  .tv-resources-section,
  .tv-mentions-sec     { padding: 4rem 0; }
  /* Featured story card: reduce inner padding once stacked */
  .tv-fs-content       { padding: 2rem 1.5rem; }
}

@media (max-width: 768px) {
  .tv-mc-title {
    font-family: var(--tv-font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.25;
  }
}

@media (max-width: 768px) {
  .tv-mc-excerpt {
    font-size: 1rem;
    color: var(--tv-text-secondary);
    line-height: 1.55;
    margin-bottom: 0.85rem;
    display: none;
  }
}

@media (max-width: 768px) {
  .tv-mc-meta {
    font-size: 0.85rem;
    color: var(--tv-text-tertiary);
  }
}

@media (max-width: 768px) {
  .tv-report-cards {
    margin-top: 20px;
  }
}

@media (max-width: 768px) {
  .tv-rc-body h4 {
    font-size: 1rem;
    letter-spacing: 0.15px;
  }
  .tv-rc-body p {
    font-size: 0.95rem;
    line-height: 1.25;
    margin-top: 5px;
  }
}

@media (max-width: 768px) {
  .tv-pk-header p {
    font-size: 0.95rem;
    color: rgba(255,255,255,.48);
    line-height: 1.5;
  }
}

@media (max-width: 768px) {
  .tv-pk-asset {
    font-size: 0.92rem;
  }
}

@media (max-width: 768px) {
  .tv-pk-footer-note {
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.47);
    margin-top: 1rem;
    line-height: 1.25;
  }
}

@media (max-width: 768px) {
  .tv-mentions-footer {
    font-size: 0.98rem;
    color: var(--tv-text-tertiary);
    margin-top: 2rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .tv-mc-body          { padding: 1rem 1.25rem; }
  .tv-fs-content       { padding: 1.75rem 1.25rem; }
  .tv-mention-card     { padding: 1.25rem; }
  .tv-rc-card          { grid-template-columns: 40px 1fr; gap: 0.85rem; padding: 1rem 1.1rem; }
  .tv-rc-badge         { grid-column: 2; justify-self: start; }
  .tv-press-kit-card   { padding: 1.5rem; }
}
