/* Coverage template (category-news.php). Tokens, headings and buttons come from h26-shared.css */

#coverage {
  --cv-light: #eef0ef;
  --cv-card: #fff;
  --cv-ink: #111;
  --cv-muted: #5c6360;
  --cv-green-text: var(--h26-green);
  --h26-accent: var(--h26-green);

  background: var(--cv-light);
  color: var(--cv-ink);
}
#coverage [hidden] { display: none !important; }
/* The theme uppercases buttons and headings */
#coverage .cv-filters-toggle,
#coverage .cv-clear,
#coverage .cv-featured__title,
#coverage .cv-card__title {
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
}
#coverage mark { padding: 0 2px; border-radius: 2px; background: rgba(0, 91, 14, 0.18); color: inherit; }

/* Black top: intro, controls, featured story */
#coverage .cv-top { --h26-accent: var(--h26-green-text); padding: 28px var(--h26-gutter) 32px; background: var(--h26-bg); color: var(--h26-white); }
#coverage .cv-hero__title { font-size: clamp(32px, 4.5vw, 52px); }
#coverage .cv-hero__sub { margin: 10px 0 0; font-size: clamp(15px, 1.4vw, 18px); color: rgba(255, 255, 255, 0.78); }
#coverage .cv-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 22px 0 24px;
}
#coverage .cv-search { flex: 1 1 320px; }
#coverage .cv-field {
  height: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background-color: var(--h26-bg-raised);
  color: var(--h26-white);
  font-size: 15px;
  box-shadow: none;
}
#coverage .cv-field::placeholder { color: rgba(255, 255, 255, 0.55); }
#coverage select.cv-field { width: auto; min-width: 150px; max-width: 320px; padding-right: 32px; }
#coverage .cv-field option { color: var(--cv-ink); background: var(--cv-card); }
#coverage .cv-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
#coverage .cv-clear {
  padding: 10px 4px;
  border: 0;
  background: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--h26-green-text);
  text-decoration: underline;
  cursor: pointer;
}
#coverage .cv-filters-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--h26-white);
  cursor: pointer;
}
#coverage .cv-filters-toggle::after { content: '\25BE'; margin-left: auto; }
#coverage .cv-filters-toggle[aria-expanded='true']::after { content: '\25B4'; }
#coverage .cv-filters-toggle__count {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 11px;
  background: var(--h26-green);
  color: var(--h26-green-ink);
  font-size: 12px;
  text-align: center;
}

#coverage .cv-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cv-green-text);
}
#coverage .cv-read { display: inline-flex; gap: 6px; font-size: 15px; font-weight: 700; color: var(--cv-green-text); }
#coverage .cv-read:hover { text-decoration: underline; }
#coverage .cv-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0a0d0b, #12301a);
}
#coverage .cv-fallback img { width: 45%; max-width: 220px; }

/* Featured story */
#coverage .cv-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: var(--h26-bg-raised);
  --h26-accent: var(--h26-green-text);
}
#coverage .cv-featured__img { display: block; width: 100%; height: 100%; min-height: 260px; aspect-ratio: 16 / 9; object-fit: cover; }
#coverage .cv-featured__body { display: flex; flex-direction: column; padding: 28px; }
#coverage .cv-featured .cv-eyebrow { color: var(--h26-green-text); }
#coverage .cv-featured__title {
  margin: 0 0 12px;
  font-family: 'Anton', sans-serif;
  font-size: clamp(26px, 2.6vw, 38px);
  font-weight: 400;
  line-height: 1.1;
}
#coverage .cv-featured__title a { color: var(--h26-white); }
#coverage .cv-featured__title a:hover { color: var(--h26-green-text); }
#coverage .cv-featured__excerpt { margin: 0 0 20px; font-size: 17px; line-height: 1.45; color: rgba(255, 255, 255, 0.78); }
#coverage .cv-featured__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}
#coverage .cv-featured .cv-read { font-size: 17px; color: var(--h26-green-text); }

/* Latest Coverage / results */
#coverage .cv-latest { padding: 32px var(--h26-gutter) 64px; }
#coverage .cv-latest .h26-heading { color: var(--cv-ink); }
#coverage .cv-latest .h26-section-head { margin-bottom: 8px; }
#coverage .cv-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--cv-muted); }
#coverage .cv-sort label { margin: 0; font-size: 14px; color: inherit; }
#coverage .cv-sort .cv-field { min-width: 0; border-color: #d5d9d7; background-color: var(--cv-card); color: var(--cv-ink); }
#coverage .cv-count { min-height: 1em; margin: 0 0 14px; font-size: 14px; color: var(--cv-muted); }
#coverage .cv-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
#coverage .cv-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: var(--cv-card);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}
#coverage .cv-card__img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
#coverage .cv-card__body { display: flex; flex: 1; flex-direction: column; padding: 14px 16px 16px; }
#coverage .cv-card__title {
  margin: 0 0 4px;
  font-family: 'Anton', sans-serif;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
#coverage .cv-card__title a { color: var(--cv-ink); }
#coverage .cv-card__title a:hover { color: var(--cv-green-text); }
#coverage .cv-card__date { font-size: 13px; color: var(--cv-muted); }
#coverage .cv-card__excerpt { margin: 8px 0 12px; font-size: 14px; line-height: 1.45; color: #3b403e; }
#coverage .cv-card .cv-read { align-self: flex-end; margin-top: auto; }

#coverage .cv-status { padding: 48px 0; text-align: center; color: var(--cv-muted); }
#coverage .cv-status p { margin: 0 0 16px; font-size: 17px; }
#coverage .cv-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  vertical-align: -4px;
  border: 3px solid rgba(0, 0, 0, 0.12);
  border-top-color: var(--h26-green);
  border-radius: 50%;
  animation: cv-spin 0.8s linear infinite;
}
@keyframes cv-spin { to { transform: rotate(360deg); } }
#coverage .cv-more { margin-top: 24px; text-align: center; }
#coverage .cv-btn-outline { min-width: 260px; border: 1px solid #b9bfbc; background: var(--cv-card); color: var(--cv-ink); }
#coverage .cv-btn-outline:hover { border-color: var(--cv-green-text); color: var(--cv-green-text); }

/* Responsive */
@media (max-width: 1024px) {
  #coverage .cv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  #coverage .cv-search { flex-basis: 100%; }
  #coverage .cv-filters-toggle { display: flex; flex: 1; }
  #coverage .cv-filters { flex-basis: 100%; flex-direction: column; align-items: stretch; }
  #coverage .cv-filters:not(.is-open) { display: none; }
  #coverage select.cv-field { width: 100%; max-width: none; }
  #coverage .cv-featured { grid-template-columns: 1fr; }
  #coverage .cv-featured__img { min-height: 0; }
  #coverage .cv-featured__body { padding: 18px; }
  #coverage .cv-featured__excerpt { font-size: 15px; }
  #coverage .cv-grid { grid-template-columns: 1fr; gap: 12px; }
  /* Compact listing: thumbnail beside the text */
  #coverage .cv-card { display: grid; grid-template-columns: 112px minmax(0, 1fr); }
  #coverage .cv-fallback.cv-card__img img { width: 70%; }
  #coverage .cv-card__media { align-self: start; padding: 12px 0 12px 12px; }
  #coverage .cv-card__img { width: 100px; height: 100px; aspect-ratio: auto; border-radius: 6px; }
  #coverage .cv-card__body { padding: 10px 12px; }
  #coverage .cv-card__title { font-size: 17px; }
  #coverage .cv-card__excerpt { margin: 4px 0 6px; font-size: 13px; }
  #coverage .cv-card .cv-read { font-size: 14px; }
  #coverage .cv-btn-outline { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  #coverage .cv-spinner { animation-duration: 2.4s; }
}
