/* ═══════════════════════════════════════════════════════════
   TVC FIXES v1.0 — Apply these at the END of style.css
   Paste everything below into style.css via WP Admin >
   Appearance > Theme File Editor > style.css (at the bottom)
═══════════════════════════════════════════════════════════ */

/* ─── 1. FALLBACK FOR POSTS WITHOUT FEATURED IMAGES ─── */

/* Mini-card empty image */
.mini-card__img-wrap:not(:has(img)) {
  background: linear-gradient(135deg, var(--clr-border-light) 0%, var(--clr-bg-3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}
.mini-card__img-wrap:not(:has(img))::after {
  content: '📰';
  font-size: 2.5rem;
  opacity: 0.3;
}

/* Article card empty image (hero & latest-news sections) */
.article-card__img-wrap:not(:has(img)) {
  background: linear-gradient(135deg, var(--clr-border-light) 0%, var(--clr-bg-3) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}
.article-card__img-wrap:not(:has(img))::after {
  content: '📰';
  font-size: 3rem;
  opacity: 0.25;
}

/* Trending number placeholder — hide if no image */
.trend-item:not(:has(img)) {
  opacity: 0.5;
  pointer-events: none;
}

/* ─── 2. CATEGORY PAGE STYLING ─── */

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.85rem;
  color: var(--clr-subtle);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--clr-red);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--t-fast);
}
.breadcrumb a:hover {
  color: var(--clr-red-dark);
  text-decoration: underline;
}
.breadcrumb .sep {
  color: var(--clr-border);
  font-size: 0.8rem;
}
.breadcrumb .current {
  color: var(--clr-ink);
  font-weight: 600;
}

/* Category description class */
.page-header__desc {
  max-width: 600px;
  line-height: 1.65;
  margin-top: 0.5rem;
  color: var(--clr-subtle);
  font-size: 0.9rem;
}

/* Page header polish */
.page-header {
  background: var(--clr-bg-2);
  border-bottom: 1px solid var(--clr-border);
  padding: var(--sp-10) 0;
  margin-bottom: var(--sp-10);
  position: relative;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: var(--clr-red);
  border-radius: 2px;
}

/* ─── 3. PAGINATION ─── */
.pagination-bar {
  margin-top: var(--sp-10);
  display: flex;
  justify-content: center;
  gap: var(--sp-2);
}
.pagination-bar a,
.pagination-bar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--sp-3);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--clr-body);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--t-fast);
}
.pagination-bar a:hover {
  background: var(--clr-red);
  color: #fff;
  border-color: var(--clr-red);
}
.pagination-bar .current {
  background: var(--clr-red);
  color: #fff;
  border-color: var(--clr-red);
}

/* ─── 4. SECTION LINKS IMPROVEMENT ─── */
.section-link {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--clr-red);
  text-decoration: none;
  transition: gap var(--t-fast);
}
.section-link:hover {
  gap: var(--sp-2);
  text-decoration: underline;
}
.section-link:empty {
  display: none;
}

/* ─── 5. NEWSLETTER PLACEHOLDER STATE ─── */
.newsletter-form input:disabled,
.newsletter-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ─── 6. ACCESSIBILITY ─── */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none !important; }
  html { scroll-behavior: auto !important; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ─── 7. HERO RESPONSIVE IMPROVEMENT ─── */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
  }
  .hero-lead {
    min-height: 320px !important;
  }
  .hero-lead .article-card__img-wrap {
    min-height: 320px;
  }
  .hero-secondary {
    grid-template-columns: 1fr !important;
  }
}

/* ─── 8. CATEGORY STRIP — BETTER EMPTY STATE ─── */
.category-strip__tabpanel[hidden] {
  display: none;
}
.category-strip__tabpanel:not([hidden]) .strip-grid {
  margin-top: var(--sp-6);
}

/* ─── 9. CATEGORY BADGE ENHANCEMENTS ─── */
.cat-badge {
  display: inline-block;
  padding: 0.2em 0.7em;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--clr-red);
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background var(--t-fast);
}
.cat-badge:hover {
  background: var(--clr-red-dark);
}

/* ─── 10. CATEGORY COLOUR BADGES ─── */
.cat-badge[href*="technology"]  { background: var(--clr-tech); }
.cat-badge[href*="finance"]     { background: var(--clr-finance); }
.cat-badge[href*="world"]       { background: var(--clr-world); }
.cat-badge[href*="science"]     { background: var(--clr-science); }
.cat-badge[href*="sports"]      { background: var(--clr-sports); }
.cat-badge[href*="politics"]    { background: var(--clr-politics); }
.cat-badge[href*="health"]      { background: var(--clr-health); }
.cat-badge[href*="entertainment"] { background: var(--clr-entertainment); }

/* ─── 11. IMAGE MAX-WIDTH FIX TO PREVENT OVERFLOW ─── */
.article-content img,
.entry-content img,
.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

/* ─── 12. FOCUS VISIBLE FOR KEYBOARD NAV ─── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--clr-red);
  outline-offset: 2px;
}

/* ─── 13. TICKER KEYBOARD PAUSE ─── */
.ticker-wrap:hover .ticker-track,
.ticker-wrap:focus-within .ticker-track {
  animation-play-state: paused;
}

/* ─── 14. FOOTER IMPROVEMENT ─── */
.site-footer {
  background: var(--clr-ink-2);
  color: rgba(255,255,255,0.8);
  padding: var(--sp-12) 0 var(--sp-8);
  margin-top: var(--sp-16);
}
.site-footer a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color var(--t-fast);
}
.site-footer a:hover {
  color: #fff;
}

/* ─── 15. SCROLLBAR STYLING (WEBKIT) ─── */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--clr-bg-3);
}
::-webkit-scrollbar-thumb {
  background: var(--clr-border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--clr-subtle);
}