/**
 * BBC24 — Premier News Network Stylesheet
 * Modern Broadcast Editorial Design System
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap');

:root {
  /* Brand Palette */
  --bbc-red: #dc2626;
  --bbc-red-hover: #b91c1c;
  --bbc-red-glow: rgba(220, 38, 38, 0.35);
  --bbc-red-light: #fef2f2;
  
  --bbc-dark: #0a0f1d;
  --bbc-dark-sub: #131b2e;
  --bbc-dark-card: #1c263c;
  --bbc-slate: #1e293b;
  
  --bbc-bg: #f8fafc;
  --bbc-surface: #ffffff;
  --bbc-surface-muted: #f1f5f9;
  
  --bbc-border: #e2e8f0;
  --bbc-border-light: #f1f5f9;
  --bbc-border-dark: #334155;
  
  --bbc-text: #0f172a;
  --bbc-text-secondary: #475569;
  --bbc-text-muted: #64748b;
  --bbc-text-light: #94a3b8;
  --bbc-text-inverse: #ffffff;
  
  --bbc-accent-gold: #f59e0b;
  --bbc-accent-blue: #2563eb;
  --bbc-accent-emerald: #10b981;
  
  /* Typography */
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 2px 4px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.1), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 30px -10px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  --shadow-red: 0 10px 20px -5px rgba(220, 38, 38, 0.3);
  
  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.15s ease-in-out;
}

/* Base Reset & Core */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  color: var(--bbc-text);
  background-color: var(--bbc-bg);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1 0 auto;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--bbc-red);
}

h1, h2, h3, h4, h5, h6, .display-font {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--bbc-text);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Reading Progress Bar */
#readingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, #dc2626, #f59e0b);
  z-index: 9999;
  transition: width 0.1s ease-out;
  box-shadow: 0 0 8px var(--bbc-red-glow);
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */

/* 1. Topmost Utility Bar */
.top-utility-bar {
  background: var(--bbc-dark);
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-utility-bar a {
  color: #cbd5e1;
}

.top-utility-bar a:hover {
  color: #ffffff;
}

.top-utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  padding-bottom: 6px;
  gap: 1rem;
}

.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #ef4444;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #ef4444;
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: -3px;
  left: -3px;
  width: 13px;
  height: 13px;
  background-color: rgba(239, 68, 68, 0.5);
  border-radius: 50%;
  animation: pulsePing 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes pulsePing {
  0% { transform: scale(0.6); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

.top-date-clock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
}

.top-social-links {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  transition: var(--transition-fast);
}

.top-social-btn:hover {
  background: var(--bbc-red);
  color: #ffffff;
  transform: translateY(-1px);
}

/* 2. Main Brand Header Bar */
.brand-header-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--bbc-border);
  padding: 14px 0;
}

.brand-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* BBC24 Brand Logo Graphic */
.bbc24-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-logo-img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.brand-logo-img:hover {
  transform: scale(1.02);
}

.brand-boxes-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.bbc-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: var(--bbc-dark);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  border-radius: 6px;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(10, 15, 29, 0.2);
}

.bbc-box-red {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  width: 44px;
  box-shadow: 0 3px 8px rgba(220, 38, 38, 0.35);
  position: relative;
}

.bbc-box-red::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fef08a;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name-text {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--bbc-dark);
  letter-spacing: -0.01em;
}

.brand-name-text span {
  color: var(--bbc-red);
}

.brand-subline {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--bbc-text-muted);
  text-transform: uppercase;
}

/* Header Search */
.header-search-wrap {
  flex: 0 1 360px;
}

.header-search-form .input-group {
  background: var(--bbc-surface-muted);
  border: 1px solid var(--bbc-border);
  border-radius: var(--radius-full);
  padding: 3px 4px 3px 14px;
  transition: var(--transition);
}

.header-search-form .input-group:focus-within {
  border-color: var(--bbc-red);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.header-search-input {
  border: none;
  background: transparent;
  font-size: 0.88rem;
  color: var(--bbc-text);
  outline: none;
  box-shadow: none !important;
}

.header-search-input::placeholder {
  color: var(--bbc-text-muted);
}

.header-search-btn {
  background: var(--bbc-red);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-full);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.header-search-btn:hover {
  background: var(--bbc-red-hover);
  color: #ffffff;
}

/* Header Direct Contact CTA */
.header-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bbc-dark);
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.84rem;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.header-contact-btn:hover {
  background: var(--bbc-red);
  box-shadow: var(--shadow-red);
  transform: translateY(-1px);
}

/* 3. Main Navigation Bar (Sticky Mega Bar) */
.navbar-bbc24 {
  background: var(--bbc-dark);
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 2px solid var(--bbc-red);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  z-index: 1030;
}

.navbar-bbc24.sticky-top {
  position: -webkit-sticky !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 1040 !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.28) !important;
}

.navbar-bbc24 .nav-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: #e2e8f0;
  padding: 13px 14px;
  position: relative;
  transition: var(--transition-fast);
  text-transform: capitalize;
}

.navbar-bbc24 .nav-link:hover,
.navbar-bbc24 .nav-link:focus,
.navbar-bbc24 .nav-link.active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.navbar-bbc24 .nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--bbc-red);
  box-shadow: 0 0 10px var(--bbc-red);
}

/* Dropdown Menus */
.navbar-bbc24 .dropdown-menu {
  background: #ffffff;
  border: 1px solid var(--bbc-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 8px 0;
  min-width: 200px;
  margin-top: 0;
  animation: dropdownFade 0.2s ease;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.navbar-bbc24 .dropdown-item {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--bbc-slate);
  padding: 9px 18px;
  transition: var(--transition-fast);
}

.navbar-bbc24 .dropdown-item:hover,
.navbar-bbc24 .dropdown-item.active {
  background: var(--bbc-red-light);
  color: var(--bbc-red);
  padding-left: 22px;
}

/* 4. Breaking News Ticker Bar */
.breaking-ticker-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--bbc-border);
  padding: 6px 0;
  box-shadow: var(--shadow-xs);
}

.ticker-inner {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticker-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bbc-red);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.ticker-content {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--bbc-text);
}

.ticker-content a {
  color: var(--bbc-text);
}

.ticker-content a:hover {
  color: var(--bbc-red);
  text-decoration: underline;
}

/* ==========================================================================
   Homepage Bento Grid & Hero Section
   ========================================================================== */

.hero-bento-section {
  margin-bottom: 2.5rem;
}

/* Primary Lead Feature Story */
.lead-story-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 480px;
  background-color: var(--bbc-dark);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2.25rem;
  transition: var(--transition);
}

.lead-story-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 15, 29, 0.1) 0%, rgba(10, 15, 29, 0.6) 45%, rgba(10, 15, 29, 0.95) 100%);
  pointer-events: none;
  z-index: 1;
}

.lead-story-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.lead-story-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.lead-story-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--bbc-red);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.lead-story-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.lead-story-title a {
  color: #ffffff;
}

.lead-story-title a:hover {
  color: #fca5a5;
}

.lead-story-desc {
  font-size: 0.98rem;
  color: #e2e8f0;
  max-width: 680px;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lead-story-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
}

.lead-story-meta strong {
  color: #ffffff;
}

/* Secondary Feature Cards (Stacked Right) */
.side-story-card {
  position: relative;
  background: #ffffff;
  border: 1px solid var(--bbc-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  height: 228px;
  transition: var(--transition);
  box-shadow: var(--shadow-xs);
}

.side-story-card:hover {
  border-color: var(--bbc-red);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.side-story-media {
  width: 45%;
  position: relative;
  overflow: hidden;
  background: var(--bbc-surface-muted);
}

.side-story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.side-story-card:hover .side-story-media img {
  transform: scale(1.05);
}

.side-story-body {
  width: 55%;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.side-story-badge {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.7rem;
  color: var(--bbc-red);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.side-story-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.side-story-meta {
  font-size: 0.78rem;
  color: var(--bbc-text-muted);
}

/* Default Empty Hero State */
.hero-welcome-card {
  background:
    radial-gradient(circle at 10% 20%, rgba(220, 38, 38, 0.25) 0%, transparent 40%),
    linear-gradient(135deg, #0a0f1d 0%, #1e293b 100%);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2.5rem;
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  margin-bottom: 2.5rem;
  border-top: 3px solid var(--bbc-red);
}

.welcome-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bbc-red);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.welcome-heading {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  color: #ffffff;
  margin-bottom: 0.75rem;
}

.welcome-lead {
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 650px;
  margin-bottom: 1.5rem;
}

/* ==========================================================================
   Editorial News Cards & Grid
   ========================================================================== */

.section-header-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bbc-border);
  position: relative;
}

.section-header-wrap::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--bbc-red);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--bbc-text);
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.section-title-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bbc-red);
}

.section-view-all {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--bbc-red);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.section-view-all:hover {
  color: var(--bbc-red-hover);
  transform: translateX(2px);
}

/* News Article Card (Grid Items) */
.news-card {
  background: #ffffff;
  border: 1px solid var(--bbc-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.news-card:hover {
  transform: translateY(-3px);
  border-color: rgba(220, 38, 38, 0.4);
  box-shadow: 0 10px 24px -4px rgba(15, 23, 42, 0.12);
}

.news-thumb-link {
  display: block;
  position: relative;
  padding-top: 58%;
  overflow: hidden;
  background: var(--bbc-surface-muted);
}

.news-thumb-link .thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-thumb-link .thumb {
  transform: scale(1.06);
}

.news-card-body {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.news-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.news-card-title a {
  color: var(--bbc-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-title a:hover {
  color: var(--bbc-red);
}

.news-card-desc {
  font-size: 0.88rem;
  color: var(--bbc-text-secondary);
  line-height: 1.5;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.news-meta {
  font-size: 0.78rem;
  color: var(--bbc-text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}

.news-meta-author {
  font-weight: 600;
  color: var(--bbc-slate);
}

/* Fallback Text Card (No Image) */
.news-textcard {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(145deg, #0a0f1d 0%, #1e293b 100%);
  color: #ffffff;
  padding: 1.5rem;
  min-height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--bbc-red);
}

.news-textcard-bg {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  pointer-events: none;
  color: #ffffff;
}

.news-textcard-body {
  position: relative;
  z-index: 1;
}

.news-textcard-kicker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #ef4444;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.badge-pulse {
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
}

.news-textcard-title {
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.news-textcard-desc {
  color: #cbd5e1;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.news-textcard-meta {
  font-size: 0.75rem;
  color: #94a3b8;
  margin-bottom: 0.75rem;
}

.news-textcard-cta {
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fca5a5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   Sidebar Widgets (Trending, Follow, Tip-off)
   ========================================================================== */

.sidebar-box {
  background: #ffffff;
  border: 1px solid var(--bbc-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-xs);
}

.sidebar-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--bbc-border);
}

.sidebar-box-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--bbc-text);
  margin: 0;
}

/* Trending Items (Numbered Ranking) */
.trending-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--bbc-border-light);
  transition: var(--transition-fast);
}

.trending-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.trending-num {
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.3rem;
  line-height: 1;
  color: #cbd5e1;
  min-width: 24px;
  text-align: center;
  transition: var(--transition-fast);
}

.trending-item:hover .trending-num {
  color: var(--bbc-red);
}

.trending-thumb {
  width: 64px;
  height: 52px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bbc-surface-muted);
}

.trending-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trending-info {
  flex: 1;
  min-width: 0;
}

.trending-info a {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--bbc-text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.trending-info a:hover {
  color: var(--bbc-red);
}

.trending-views {
  font-size: 0.72rem;
  color: var(--bbc-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

/* Follow BBC24 Card */
.follow-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.follow-social-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  transition: var(--transition-fast);
}

.follow-social-card:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.follow-social-card--yt { background: #ff0000; }
.follow-social-card--fb { background: #1877f2; }
.follow-social-card--ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.follow-social-card--x  { background: #000000; }

/* Tip-off / Reporter Card */
.tipoff-card {
  background: linear-gradient(135deg, var(--bbc-dark) 0%, #1e293b 100%);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  color: #ffffff;
  border-left: 4px solid var(--bbc-red);
}

.tipoff-card h4 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.tipoff-card p {
  font-size: 0.85rem;
  color: #cbd5e1;
  margin-bottom: 12px;
}

.tipoff-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bbc-red);
  color: #ffffff !important;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.tipoff-btn:hover {
  background: var(--bbc-red-hover);
  transform: translateY(-1px);
}

/* ==========================================================================
   Article Detail Page (`news.php`)
   ========================================================================== */

.main-news-card {
  background: #ffffff !important;
  border: 1px solid var(--bbc-border);
  border-radius: 16px;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
}

.article-hero-wrap {
  margin-bottom: 2rem;
}

.article-headline {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(1.8rem, 3.8vw, 2.75rem);
  line-height: 1.18;
  color: var(--bbc-text);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.article-lead-summary {
  font-size: 1.18rem;
  color: var(--bbc-text-secondary);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.article-byline-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--bbc-border);
  border-bottom: 1px solid var(--bbc-border);
  margin-bottom: 1.5rem;
}

.article-author-byline {
  display: flex;
  align-items: center;
  gap: 12px;
}

.author-avatar-sm {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bbc-border);
}

.author-meta-block {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.author-meta-name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--bbc-text);
}

.author-meta-name a {
  color: var(--bbc-text);
}

.author-meta-name a:hover {
  color: var(--bbc-red);
}

.author-meta-date {
  font-size: 0.78rem;
  color: var(--bbc-text-muted);
}

.article-read-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--bbc-text-muted);
}

.read-metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--bbc-surface-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

/* Hero Media inside Article */
.article-hero-media {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 2rem;
  background: var(--bbc-dark);
}

.article-hero-media img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
  display: block;
}

/* Article Content Typography & Formatting */
.article-content {
  font-size: 1.1rem;
  line-height: 1.85;
  color: #1e293b;
  margin-bottom: 2.5rem;
}

.article-content p {
  margin-bottom: 1.4rem;
}

.article-content h2 {
  font-size: 1.65rem;
  font-weight: 800;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--bbc-text);
}

.article-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 1.6rem;
  margin-bottom: 0.8rem;
  color: var(--bbc-text);
}

.article-content blockquote {
  border-left: 4px solid var(--bbc-red);
  padding: 1rem 1.5rem;
  margin: 1.8rem 0;
  background: var(--bbc-surface-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  font-size: 1.18rem;
  color: var(--bbc-slate);
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.article-content .ratio,
.article-content .article-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 1.8rem 0;
  box-shadow: var(--shadow-md);
}

/* Author Spotlight Box (Bottom of Article) */
.article-author-spotlight {
  background: #f8fafc;
  border: 1px solid var(--bbc-border);
  border-radius: 14px;
  padding: 1.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-xs);
}

.spotlight-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bbc-border);
  flex-shrink: 0;
}

.spotlight-name {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--bbc-text);
  margin-bottom: 4px;
}

.spotlight-role {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--bbc-red);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.spotlight-bio {
  font-size: 0.92rem;
  color: var(--bbc-text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

/* Share Icons */
.share-icons {
  margin: 0.75rem 0;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #ffffff !important;
  transition: var(--transition-fast);
  border: none;
  cursor: pointer;
}

.share-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.share-wa { background: #25d366; }
.share-fb { background: #1877f2; }
.share-x  { background: #000000; }
.share-in { background: #0a66c2; }
.share-tg { background: #229ed9; }
.share-copy { background: #475569; }

/* Breadcrumbs */
.breadcrumb-bbc24 {
  background: transparent;
  padding: 0;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.breadcrumb-bbc24 .breadcrumb-item a {
  color: var(--bbc-text-muted);
}

.breadcrumb-bbc24 .breadcrumb-item a:hover {
  color: var(--bbc-red);
}

.breadcrumb-bbc24 .breadcrumb-item.active {
  color: var(--bbc-text);
  font-weight: 600;
}

.breadcrumb-bbc24 .breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  font-size: 1rem;
  line-height: 1;
  color: var(--bbc-text-muted);
  vertical-align: middle;
}

/* Cat Badge */
.cat-badge {
  display: inline-flex;
  align-items: center;
  background: var(--bbc-red-light);
  color: var(--bbc-red);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.cat-badge:hover {
  background: var(--bbc-red);
  color: #ffffff;
}

/* ==========================================================================
   Contact Page (`contact.php`)
   ========================================================================== */

.contact-hero-banner {
  background: linear-gradient(135deg, var(--bbc-dark) 0%, #1e293b 100%);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  color: #ffffff;
  margin-bottom: 2.5rem;
  border-top: 4px solid var(--bbc-red);
}

.contact-card-info {
  background: #ffffff;
  border: 1px solid var(--bbc-border);
  border-radius: 16px;
  padding: 2.25rem;
  height: 100%;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}

.contact-card-form {
  background: #ffffff;
  border: 1px solid var(--bbc-border);
  border-radius: 16px;
  padding: 2.25rem;
  box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08);
}

.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 1.5rem;
}

.contact-info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bbc-red-light);
  color: var(--bbc-red);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-bbc-primary {
  background: var(--bbc-red);
  color: #ffffff;
  font-family: var(--font-heading);
  font-weight: 700;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: none;
  transition: var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-bbc-primary:hover {
  background: var(--bbc-red-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-red);
}

/* ==========================================================================
   Pagination System
   ========================================================================== */

.pagination-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.pagination-step {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pagination-step-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--bbc-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--bbc-slate);
}

.pagination-step-btn:hover {
  border-color: var(--bbc-red);
  color: var(--bbc-red);
}

.pagination-step-btn.is-disabled {
  opacity: 0.4;
  pointer-events: none;
}

.pagination-status {
  font-size: 0.82rem;
  color: var(--bbc-text-muted);
}

.pagination-bbc24 {
  display: flex;
  list-style: none;
  padding: 0;
  gap: 4px;
}

.pagination-bbc24 .page-item .page-link {
  border: 1px solid var(--bbc-border);
  background: #ffffff;
  color: var(--bbc-slate);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.pagination-bbc24 .page-item.active .page-link {
  background: var(--bbc-red);
  border-color: var(--bbc-red);
  color: #ffffff;
}

.pagination-bbc24 .page-item .page-link:hover {
  background: var(--bbc-red-light);
  color: var(--bbc-red);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #090e1a;
  color: #cbd5e1;
  padding-top: 3.75rem;
  padding-bottom: 2rem;
  border-top: 3px solid var(--bbc-red);
  margin-top: 4rem;
}

.footer-logo-badge {
  background: #ffffff !important;
  padding: 8px 16px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.footer-logo-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.site-footer .footer-logo-img {
  max-height: 40px;
  width: auto;
  display: block;
}

.site-footer .footer-slogan {
  color: #ffffff !important;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.site-footer .footer-desc {
  color: #cbd5e1 !important;
  font-size: 0.92rem;
  line-height: 1.65;
}

.footer-heading {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  color: #ffffff !important;
  margin-bottom: 1.25rem;
  position: relative;
  padding-bottom: 8px;
  letter-spacing: 0.01em;
}

.footer-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 32px;
  height: 3px;
  background: var(--bbc-red);
  border-radius: 2px;
}

.site-footer a {
  color: #cbd5e1;
  transition: var(--transition-fast);
}

.site-footer a:hover {
  color: #ffffff;
}

.footer-contact-item {
  color: #e2e8f0 !important;
  font-size: 0.92rem;
  display: flex;
  align-items: flex-start;
}

.footer-contact-item a {
  color: #f1f5f9 !important;
  font-weight: 500;
  text-decoration: none;
}

.footer-contact-item a:hover {
  color: #fca5a5 !important;
  text-decoration: underline;
}

.footer-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-nav-list li {
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.footer-nav-list a {
  color: #cbd5e1 !important;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: all 0.2s ease;
}

.footer-nav-list a::before {
  content: '›';
  margin-right: 6px;
  color: var(--bbc-red);
  font-size: 1.15rem;
  font-weight: bold;
  line-height: 1;
}

.footer-nav-list a:hover {
  color: #ffffff !important;
  transform: translateX(4px);
  padding-left: 2px;
}

.tipoff-card {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.18) 0%, rgba(30, 41, 59, 0.7) 100%);
  border: 1px solid rgba(220, 38, 38, 0.35);
  border-radius: 12px;
}

.tipoff-card h6 {
  color: #ffffff;
  font-weight: 700;
}

.tipoff-card p {
  color: #e2e8f0 !important;
  font-size: 0.85rem;
}

.tipoff-btn {
  display: inline-block;
  background: var(--bbc-red);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 6px;
  transition: background 0.2s;
}

.tipoff-btn:hover {
  background: var(--bbc-red-hover);
  color: #ffffff !important;
}

.footer-bottom-bar {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 1.5rem;
  margin-top: 2.5rem;
  font-size: 0.88rem;
  color: #cbd5e1 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom-bar span {
  color: #cbd5e1;
}

/* Mobile Offcanvas */
.offcanvas-bbc24 {
  background: var(--bbc-dark);
  color: #ffffff;
  width: 320px;
}

.offcanvas-bbc24 .offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem;
}

.offcanvas-bbc24 .nav-link-mobile {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: #e2e8f0;
  padding: 12px 16px;
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.offcanvas-bbc24 .nav-link-mobile:hover,
.offcanvas-bbc24 .nav-link-mobile.active {
  color: #ffffff;
  background: rgba(220, 38, 38, 0.15);
  border-left: 3px solid var(--bbc-red);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .navbar-bbc24 {
    padding: 8px 0 !important;
  }
  .navbar-bbc24 .navbar-brand {
    font-family: var(--font-heading) !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: 0.05em;
  }
  .lead-story-card {
    height: 380px;
    padding: 1.5rem;
  }
  .side-story-card {
    height: auto;
    flex-direction: column;
  }
  .side-story-media {
    width: 100%;
    padding-top: 55%;
  }
  .side-story-media img {
    position: absolute;
    inset: 0;
  }
  .side-story-body {
    width: 100%;
  }
}
