/*
Theme Name: MBSN Sports Analytics
Theme URI: https://mbsn.example
Author: Aditya
Description: Custom WordPress theme for MBSN football analytics platform. Converted from static HTML with CSV-driven Ticker, Standings, Fixtures, Player/Team of the Week, custom Poll and Quiz systems, and full News Hub with League/Team/Category filtering.
Version: 2.1.0
Text Domain: mbsn
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

/* ===========================================================
   DESIGN SYSTEM — "Premier League" clean light theme
   =========================================================== */
:root {
  /* Brand — restored to the original MBSN dark navy / purple identity */
  --plum: #6c0085;
  --plum-dark: #000020;
  --plum-light: #a900c7;
  --accent-magenta: #a900c7;
  --accent-gold: #ff9100;
  --accent-green: #00e676;
  --accent-red: #ff3b5c;
  --accent-blue: #00d2ff;

  /* Surfaces */
  --bg-page: #000035;
  --bg-white: rgba(12, 12, 60, 0.65);
  --bg-subtle: rgba(255, 255, 255, 0.04);
  --border-color: rgba(108, 0, 133, 0.3);
  --border-color-strong: rgba(169, 0, 199, 0.6);

  /* Text */
  --text-heading: #ffffff;
  --text-body: #d3d4ee;
  --text-muted: #9da2c9;
  --text-on-plum: #FFFFFF;
  --text-on-plum-muted: rgba(255,255,255,0.68);

  /* Effects */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-card: 0 0 15px rgba(108, 0, 133, 0.4);
  --shadow-card-hover: 0 0 15px rgba(108, 0, 133, 0.4), 0 10px 30px rgba(0,0,0,0.5);
  --shadow-heavy: 0 10px 30px rgba(0, 0, 0, 0.5);
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --font-heading: 'Outfit', 'Arial', Helvetica, sans-serif;
  --font-body: 'Inter', sans-serif;

  --container-max: 1400px;
}

/* ===========================================================
   RESET & BASE
   =========================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-page);
  color: var(--text-body);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.55;
  width: 100%;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.01em;
}

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

ul { list-style: none; }

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  transition: var(--transition-fast);
}

input, select, textarea { font-family: inherit; }

/* ===========================================================
   LAYOUT UTILITIES
   =========================================================== */
.container {
  max-width: var(--container-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 768px) {
  .container { width: 100%; padding: 0 16px; }
}

.gradient-text,
.gradient-word {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-magenta) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.glow-btn {
  background: linear-gradient(135deg, var(--plum), var(--accent-magenta));
  color: #fff;
  padding: 11px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(169, 0, 199, 0.7);
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--plum-dark); }
::-webkit-scrollbar-thumb { background: var(--plum); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-magenta); }

/* ===========================================================
   MATCH TICKER
   =========================================================== */
.ticker-wrap {
  width: 100%;
  background: var(--plum-dark);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.ticker-title {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 130px;
  background: var(--accent-magenta);
  color: white;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.78rem;
  white-space: nowrap;
  z-index: 5;
  letter-spacing: 0.06em;
  box-sizing: border-box;
}

.ticker-scroll {
  display: flex;
  padding-left: 140px;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 10px;
  padding-top: 8px;
  padding-bottom: 8px;
  padding-right: 12px;
}
.ticker-scroll::-webkit-scrollbar { display: none; }

@media (max-width: 480px) {
  .ticker-title { width: 92px; font-size: 0.66rem; padding: 0 8px; letter-spacing: 0.02em; }
  .ticker-scroll { padding-left: 100px; }
}

.ticker-card {
  flex: 0 0 auto;
  min-width: 180px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 0.76rem;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--text-on-plum);
}
.ticker-card:hover { background: rgba(255,255,255,0.1); }

.ticker-meta {
  display: flex;
  justify-content: space-between;
  color: var(--text-on-plum-muted);
  margin-bottom: 5px;
  font-size: 0.68rem;
  font-weight: 600;
}

.ticker-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-green);
  margin-right: 4px;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.ticker-team {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.ticker-team.winner { font-weight: 700; }
.ticker-team span { display: flex; align-items: center; gap: 6px; }
.ticker-team img,
.team-badge-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Default club badge — shown whenever a club has no uploaded logo.
   Background = the club's brand color, letter = first initial. */
.club-badge-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  flex-grow: 0;
  text-transform: uppercase;
  border-radius: 50%;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  border: none;
  padding: 0;
  vertical-align: middle;
  text-align: center;
}
.club-badge-fallback.team-badge-img { width: 16px; height: 16px; font-size: 8px; }
.club-badge-fallback.club-logo-sm { width: 20px; height: 20px; font-size: 10px; }

/* ===========================================================
   HEADER
   =========================================================== */
header {
  width: 100%;
  min-height: 72px;
  background: rgba(0, 0, 53, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  min-height: 72px;
  gap: 16px;
  max-width: var(--container-max);
  padding: 0 24px;
}
@media (max-width: 768px) { .header-container { padding: 0 16px; } }

.logo-link {
  display: flex;
  align-items: center;
  height: 48px;
  flex: 0 0 auto;
  overflow: hidden;
}
.logo-link .custom-logo-link,
.logo-link a { display: flex; align-items: center; height: 100%; }
.logo-img, .custom-logo {
  height: 100%;
  width: auto;
  max-width: 180px;
  max-height: 48px;
  object-fit: contain;
  display: block;
}

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--text-on-plum-muted);
  position: relative;
  padding: 8px 0;
}
.nav-links a:hover,
.nav-links a.active { color: var(--text-on-plum); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--plum), var(--accent-magenta));
  transition: var(--transition-normal);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.btn-search {
  color: var(--text-on-plum-muted);
  font-size: 1.05rem;
  padding: 8px;
}
.btn-search:hover { color: var(--text-on-plum); }

.btn-signin {
  border: 1px solid rgba(255,255,255,0.35);
  color: var(--text-on-plum);
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.88rem;
  background: transparent;
}
.btn-signin:hover { background: rgba(255,255,255,0.12); }

.menu-toggle {
  display: none;
  font-size: 1.4rem;
  color: var(--text-on-plum);
  width: 40px;
  height: 40px;
}

/* Amar Mohunbagan dropdown submenu */
.nav-item-has-children { position: relative; display: inline-flex; align-items: center; }
.nav-item-has-children > a { display: inline-flex; align-items: center; gap: 5px; }
.nav-caret { transition: transform 0.2s ease; opacity: 0.8; }
.nav-item-has-children:hover .nav-caret,
.nav-item-has-children.open .nav-caret { transform: rotate(180deg); }

.nav-submenu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  min-width: 190px;
  background: rgba(5, 5, 40, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-heavy);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 200;
}
.nav-item-has-children:hover .nav-submenu,
.nav-item-has-children.open .nav-submenu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-submenu a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  white-space: nowrap;
  color: var(--text-body);
}
.nav-submenu a:hover { background: rgba(255,255,255,0.06); color: var(--text-heading); }

/* ===========================================================
   SEARCH BAR
   =========================================================== */
.mbsn-search-bar {
  background: var(--plum-dark);
  padding: 14px 0;
}
.mbsn-search-bar input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 0.95rem;
}
.mbsn-search-bar input::placeholder { color: rgba(255,255,255,0.5); }

/* ===========================================================
   MOBILE NAV OVERLAY (full-width deep purple)
   =========================================================== */
.mobile-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,30,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  z-index: 190;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

.mobile-nav-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--plum-dark);
  display: flex;
  flex-direction: column;
  padding: 90px 28px 40px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  z-index: 195;
  overflow-y: auto;
}
.mobile-nav-panel.active { transform: translateX(0); }

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav-links a {
  color: var(--text-on-plum-muted);
  font-size: 1.15rem;
  font-weight: 600;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav-links a.active { color: var(--text-on-plum); }
.mobile-nav-links a.mobile-sub-link {
  font-size: 0.92rem;
  font-weight: 500;
  padding-left: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
  opacity: 0.8;
  border-bottom: none;
}

/* ===========================================================
   MAIN HERO & GRID SECTION
   =========================================================== */
.hero-section { padding: 24px 0 0; }

.grid-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  align-items: start;
}

.main-content-area {
  display: grid;
  grid-template-columns: 300px 1fr;
  grid-template-rows: auto auto;
  gap: 20px;
  grid-column: 1;
  align-items: start;
}

.left-sidebar-panel {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-self: start;
}

.news-panel {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-panel {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.horizontal-carousel-section {
  grid-column: 1 / 3;
  grid-row: 2;
  margin-top: 4px;
}

@media (max-width: 1200px) {
  .grid-layout { grid-template-columns: 1fr 300px; }
}

@media (max-width: 1024px) {
  .grid-layout { grid-template-columns: 1fr; }
  .main-content-area { grid-template-columns: 1fr; }
  .left-sidebar-panel { grid-column: 1; grid-row: 1; }
  .news-panel { grid-column: 1; grid-row: 2; }
  .sidebar-panel { grid-column: 1; grid-row: 3; }
  .horizontal-carousel-section { grid-column: 1; grid-row: 4; }
}

/* ===========================================================
   TEAM CRESTS & BADGES (letter-badge fallbacks, colors intact)
   =========================================================== */
.team-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: white;
  text-transform: uppercase;
  flex-shrink: 0;
}
.badge-ars { background: #ef0107; }
.badge-che { background: #034694; }
.badge-mun { background: #da291c; }
.badge-mci { background: #6cabdd; }
.badge-liv { background: #c8102e; }
.badge-rma { background: #fbe116; color: #1e1e1e; }
.badge-bar { background: #004d98; border: 1.5px solid #a50044; }
.badge-bay { background: #dc052d; }
.badge-int { background: #001c3e; border: 1px solid #009ad6; }
.badge-juv { background: #1e1e1e; border: 1px solid #ffffff; }
.badge-psg { background: #004170; border: 1.5px solid #da291c; }
.badge-mbsg { background: #7c0623; border: 1.5px solid #008f50; }
.badge-mcfc { background: #8cd2f4; color: #001c3e; }
.badge-fcg { background: #ff6f00; }
.badge-ofc { background: #4a148c; border: 1px solid #ffcc00; }
.badge-kbfc { background: #ffd600; color: #001c3e; }
.badge-avl { background: #95bfe5; border: 1.5px solid #670e36; color: #1e1e1e; }
.badge-gir { background: #e30613; border: 1px solid #ffffff; }
.badge-atm { background: #cb3524; border: 1.5px solid #002d72; }
.badge-ath { background: #ef0107; border: 1px solid #ffffff; }
.badge-default { background: var(--plum); }

/* ===========================================================
   FLAT CARD SYSTEM (replaces glassmorphism)
   =========================================================== */
.glass-card {
  background: var(--bg-white);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-heavy);
  overflow: hidden;
  transition: var(--transition-normal);
}
.glass-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-color-strong);
}

.sidebar-widget { padding: 18px; }

/* ===========================================================
   RESPONSIVE IMAGE WRAPPERS — the critical fix
   16:9 (or noted ratio) aspect-ratio boxes with object-fit: cover
   so images never distort, crop badly, or break layout on mobile.
   =========================================================== */
.hero-media,
.card-media,
.rmc-image,
.tb-image {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-subtle);
}
.hero-media img,
.card-media img,
.rmc-image img,
.tb-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===========================================================
   HERO CARD
   =========================================================== */
.hero-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: radial-gradient(circle at top right, rgba(108, 0, 133, 0.6) 0%, var(--plum-dark) 70%);
}

.hero-media {
  aspect-ratio: 16 / 9;
}
.hero-media-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(20,18,26,0.92) 0%, rgba(20,18,26,0.15) 55%, transparent 80%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  padding: 22px 24px 24px;
}

.tag-live {
  background: var(--accent-magenta);
  color: white;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.hero-title {
  font-size: 1.7rem;
  line-height: 1.25;
  margin-bottom: 10px;
  font-weight: 800;
  color: var(--text-heading);
}

/* When the hero title sits over the image (mobile stacked media above content
   it may also appear directly below media as plain text) keep good contrast */
.hero-card .hero-title { color: var(--text-heading); }

.hero-desc {
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 18px;
  font-size: 0.95rem;
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}

.author-info { display: flex; align-items: center; gap: 10px; }
.author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--plum);
  flex-shrink: 0;
}
.author-details { display: flex; flex-direction: column; }
.author-name { font-size: 0.82rem; font-weight: 600; color: var(--text-heading); }
.publish-time { font-size: 0.74rem; color: var(--text-muted); }

.hero-actions-row { display: flex; gap: 10px; align-items: center; }
.btn-icon {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
}
.btn-icon:hover { background: var(--border-color); }

/* ===========================================================
   WIDGET TITLE BAR / STANDINGS TABLE
   =========================================================== */
.widget-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}
.widget-title {
  font-size: 1.02rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-heading);
}
.widget-link {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--plum);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.widget-link:hover { text-decoration: underline; }

.league-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.league-table th {
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 6px 6px;
  font-weight: 700;
  border-bottom: 1px solid var(--border-color);
}
.league-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-body);
  vertical-align: middle;
}
.league-table tbody tr:last-child td { border-bottom: none; }
.league-table tbody tr:hover { background: var(--bg-subtle); }
.center-align { text-align: center; }

.team-cell { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.club-logo-sm { width: 20px; height: 20px; object-fit: contain; flex-shrink: 0; }
.club-abbr-text { font-weight: 600; color: var(--text-heading); }

.form-dots { display: flex; gap: 3px; justify-content: center; }
.form-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
}
.form-dot.win { background: var(--accent-green); }
.form-dot.draw { background: #8e8ebb; }
.form-dot.loss { background: #ff3d00; }
.form-dot.empty { background: transparent; border: 1.5px solid rgba(255,255,255,0.18); }

/* ===========================================================
   FIXTURE CENTER
   =========================================================== */
.sidebar-match-list { display: flex; flex-direction: column; gap: 10px; }
.sidebar-match-card {
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  transition: var(--transition-fast);
}
.sidebar-match-card:hover { border-color: var(--border-color-strong); }
.sidebar-match-card.active { border-color: var(--plum); }
.sidebar-match-card[data-status="live"] { display: none !important; }

.match-info-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.ticker-live { color: var(--accent-red); font-weight: 700; display: inline-flex; align-items: center; }
.match-teams-row { display: flex; flex-direction: column; gap: 6px; }
.match-team-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.84rem; }
.match-team-item span { display: flex; align-items: center; gap: 8px; color: var(--text-body); }
.match-team-item img { width: 18px; height: 18px; object-fit: contain; }
.match-team-item .score-val { font-family: var(--font-heading); font-weight: 700; color: var(--text-heading); }

.fixture-center-cta {
  display: block;
  text-align: center;
  padding: 10px;
  margin-top: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--plum);
}
.fixture-center-cta:hover { background: var(--border-color); }

/* Custom select (league / filter dropdowns) */
.custom-select-wrapper { position: relative; font-size: 0.82rem; }
.custom-select-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-white);
  color: var(--text-body);
  font-weight: 600;
}
.custom-select-trigger:hover { border-color: var(--border-color-strong); }
.chevron-icon { transition: transform 0.2s ease; opacity: 0.7; }
.custom-select-wrapper.open .chevron-icon { transform: rotate(180deg); }
.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 140px;
  background: rgba(5, 5, 40, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-heavy);
  padding: 6px;
  display: none;
  z-index: 30;
}
.custom-select-wrapper.open .custom-select-options { display: block; }
.custom-option {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-body);
  cursor: pointer;
}
.custom-option:hover { background: var(--bg-subtle); }
.custom-option.selected { background: var(--plum); color: #fff; }

/* ===========================================================
   VOTE POLL WIDGET
   =========================================================== */
.poll-options { display: flex; flex-direction: column; gap: 8px; }
.poll-option-btn {
  position: relative;
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
}
.poll-option-btn:hover { border-color: var(--border-color-strong); }
.poll-btn-bg {
  position: absolute;
  inset: 0;
  background: rgba(108,0,133,0.1);
  width: 0%;
  transition: width 0.6s ease;
}
.poll-btn-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-body);
}
.poll-percent { font-size: 0.76rem; font-weight: 700; color: var(--plum); }

.poll-result-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: var(--bg-subtle);
}
.poll-result-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: linear-gradient(90deg, rgba(108,0,133,0.55), rgba(169,0,199,0.55));
  width: 0%;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 0;
}
.poll-result-label, .poll-result-pct {
  position: relative;
  z-index: 1;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-heading);
  white-space: nowrap;
}
.poll-result-pct { color: var(--accent-magenta); font-weight: 700; flex-shrink: 0; }
.notice { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 0.82rem; }
.notice-success { background: rgba(0,230,118,0.1); color: var(--accent-green); border: 1px solid rgba(0,230,118,0.3); }

/* ===========================================================
   WIN PROBABILITY WIDGET
   =========================================================== */
.win-prob-rows { display: flex; flex-direction: column; gap: 10px; }
.win-prob-row {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
}
.win-prob-cursor-glow { display: none; }
.win-prob-bar-bg {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  background: rgba(108,0,133,0.12);
  width: 0%;
  transition: width 1s ease;
}
.win-prob-row-content {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.win-prob-team-name { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; font-weight: 600; color: var(--text-heading); }
.win-prob-percent { font-size: 0.85rem; font-weight: 700; color: var(--plum); }

/* ===========================================================
   QUIZ OF THE DAY WIDGET
   =========================================================== */
.quiz-question-counter {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--plum);
  background: rgba(108,0,133,0.08);
  padding: 3px 9px;
  border-radius: 20px;
}
.quiz-question-text { font-size: 0.92rem; font-weight: 600; color: var(--text-heading); line-height: 1.4; margin-bottom: 14px; }
.quiz-options { display: flex; flex-direction: column; gap: 8px; }
.quiz-option-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  text-align: left;
  color: var(--text-body);
}
.quiz-option-btn:hover { border-color: var(--border-color-strong); }
.quiz-option-letter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-white);
  border: 1px solid var(--border-color);
}
.quiz-option-label { font-size: 0.84rem; }
.quiz-option-btn.selected { border-color: var(--plum); background: rgba(108,0,133,0.06); }
.quiz-option-btn.selected .quiz-option-letter { background: var(--plum); color: #fff; border-color: var(--plum); }
.quiz-option-btn.correct { border-color: var(--accent-green); background: rgba(0,230,118,0.08); }
.quiz-option-btn.correct .quiz-option-letter { background: var(--accent-green); color: #fff; border-color: var(--accent-green); }
.quiz-option-btn.incorrect { border-color: var(--accent-red); background: rgba(255,59,92,0.06); }
.quiz-option-btn.incorrect .quiz-option-letter { background: var(--accent-red); color: #fff; border-color: var(--accent-red); }
.quiz-option-btn:disabled { cursor: default; }
.quiz-submit-btn {
  width: 100%;
  margin-top: 14px;
  padding: 11px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: var(--plum);
  opacity: 0.4;
}
.quiz-submit-btn:not(:disabled) { opacity: 1; }
.quiz-submit-btn:not(:disabled):hover { background: var(--plum-light); }
.quiz-submit-btn:disabled { cursor: not-allowed; }
.quiz-question-status { margin-top: 10px; font-size: 0.8rem; font-weight: 600; color: var(--accent-green); text-align: center; min-height: 1em; }
.quiz-question-status.error { color: var(--accent-red); }

/* ===========================================================
   PLAYER / TEAM OF THE WEEK
   =========================================================== */
.potw-widget { padding: 20px; }
.potw-league-tag {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--plum);
  background: rgba(108,0,133,0.08);
  border: 1px solid rgba(108,0,133,0.2);
  border-radius: 20px;
  padding: 3px 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.potw-photo-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 4px auto 14px;
}
.potw-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-size: cover;
  background-position: center top;
  border: 3px solid var(--plum);
  aspect-ratio: 1 / 1;
}
.potw-jersey-badge {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--plum);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(20,18,26,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.82rem;
  color: #fff;
}
.potw-name-block { text-align: center; margin-bottom: 18px; }
.potw-name { font-family: var(--font-heading); font-size: 1.12rem; font-weight: 800; color: var(--text-heading); }
.potw-meta { font-size: 0.78rem; color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 4px; }
.potw-meta .team-badge { width: 16px; height: 16px; font-size: 0.55rem; }
.potw-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.potw-stat-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  text-align: center;
}
.potw-stat-box:hover { border-color: var(--plum); }
.potw-stat-value { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 800; color: var(--plum); line-height: 1.2; }
.potw-stat-label { font-size: 0.63rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 2px; }
.potw-footer-btn { width: 100%; margin-top: 16px; text-align: center; padding: 9px; font-size: 0.82rem; }

.tow-widget { margin-top: 24px; }
.tow-club-badge {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 2.4rem;
  color: #fff;
  border: 3px solid var(--plum);
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.tow-trophy-badge { font-size: 1.05rem; background: var(--plum); }

/* ===========================================================
   READ MORE (article list) — rmc-card
   =========================================================== */
.read-more-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.read-more-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; color: var(--text-heading); }
.read-more-view-all { font-size: 0.82rem; font-weight: 600; color: var(--plum); display: flex; align-items: center; gap: 4px; }
.read-more-view-all:hover { text-decoration: underline; }

.read-more-list { display: flex; flex-direction: column; }
.rmc-card {
  display: flex;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.rmc-card:last-child { border-bottom: none; }
.rmc-card:hover { background: var(--bg-subtle); padding-left: 8px; padding-right: 8px; margin-left: -8px; margin-right: -8px; }

.rmc-image {
  flex: 0 0 220px;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
}
.rmc-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: var(--accent-magenta);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rmc-badge.badge-interview { background: var(--accent-blue); }
.rmc-badge.badge-excl      { background: #C7540A; }
.rmc-badge.badge-profile   { background: var(--accent-green); }
.rmc-badge.badge-tactics   { background: var(--plum); }

.rmc-content { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 8px; min-width: 0; }
.rmc-title { font-family: var(--font-heading); font-size: 1.06rem; font-weight: 700; line-height: 1.35; color: var(--text-heading); }
.rmc-card:hover .rmc-title { color: var(--plum); }
.rmc-excerpt {
  font-size: 0.82rem; color: var(--text-muted); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rmc-meta { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; }
.rmc-author { font-weight: 600; color: var(--plum); }
.rmc-dot { color: var(--border-color-strong); }
.rmc-date { color: var(--text-muted); }

/* Narrow-viewport reset: without this, .rmc-image keeps the desktop
   flex-basis (220px) and flex-shrink:0 from the rule above forever,
   because flex-basis always wins over width for a flex item's main-
   axis size. mobile.css's own 110px override then has no effect at
   all — the image stays locked at 220px and can't shrink to fit a
   phone-width card, which is what was causing the image to overflow
   the card sideways. Resetting flex to none here lets any later
   width override (this generic fallback, or mobile.css's dedicated
   one) actually apply. */
@media (max-width: 600px) {
  .rmc-card { flex-direction: column; gap: 12px; }
  .rmc-image { flex: none; width: 100%; aspect-ratio: 16 / 9; }
}

@media (max-width: 900px) {
  .read-more-section .read-more-side-panel { display: none; }
}

/* ===========================================================
   TACTICAL BREAKDOWN — tb-card grid
   =========================================================== */
.tactical-section { padding: 8px 0 12px; }
.tactical-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.tactical-heading-group { display: flex; flex-direction: column; gap: 6px; }
.tactical-title { font-family: var(--font-heading); font-size: 1.3rem; font-weight: 800; color: var(--text-heading); display: flex; align-items: center; gap: 8px; }
.tactical-subtitle { font-size: 0.85rem; color: var(--text-muted); }
.tactical-view-all { font-size: 0.82rem; font-weight: 600; color: var(--plum); display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.tactical-view-all:hover { text-decoration: underline; }

.tactical-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.tb-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-card);
}
.tb-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--border-color-strong); }

.tb-image { aspect-ratio: 16 / 9; position: relative; }
.tb-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--accent-magenta);
  color: white;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tb-badge.badge-formation { background: var(--accent-blue); }
.tb-badge.badge-press     { background: #C7540A; }
.tb-badge.badge-setpiece  { background: var(--accent-green); }

.tb-content { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tb-title { font-family: var(--font-heading); font-size: 0.98rem; font-weight: 700; line-height: 1.35; color: var(--text-heading); }
.tb-card:hover .tb-title { color: var(--plum); }
.tb-excerpt {
  font-size: 0.78rem; color: var(--text-muted); line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tb-stats-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 2px; }
.tb-stat-chip {
  font-size: 0.68rem; font-weight: 700; color: var(--plum);
  background: rgba(108,0,133,0.08); border: 1px solid rgba(108,0,133,0.2);
  border-radius: 6px; padding: 3px 8px;
}
.tb-meta { display: flex; align-items: center; gap: 6px; font-size: 0.72rem; color: var(--text-muted); margin-top: auto; padding-top: 8px; }
.tb-meta .tb-author { font-weight: 600; color: var(--plum); }
.tb-meta .tb-dot { color: var(--border-color-strong); }

@media (max-width: 1024px) {
  .tactical-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .tactical-grid { grid-template-columns: 1fr; }
}

/* ===========================================================
   HORIZONTAL CAROUSELS (news / videos)
   Desktop: JS-driven arrow carousel (see main.js)
   Mobile (<=768px): native swipe via overflow-x + scroll-snap
   =========================================================== */
.horizontal-carousel-section { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.carousel-header { display: flex; justify-content: space-between; align-items: center; }
.carousel-section-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-heading);
  display: flex;
  align-items: center;
  gap: 8px;
}
.title-dot { font-size: 0.8rem; display: inline-block; color: var(--accent-magenta); }
.horizontal-arrows { display: flex; gap: 8px; }
.carousel-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.carousel-arrow:hover:not(:disabled) { background: var(--plum); border-color: var(--plum); color: #fff; }
.carousel-arrow:disabled { opacity: 0.3; cursor: not-allowed; }

.horizontal-carousel-viewport { overflow: hidden; width: 100%; padding: 4px 0 10px; }
.horizontal-carousel-track { display: flex; gap: 16px; touch-action: pan-y; transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94); }

.horizontal-article-card {
  flex: 0 0 calc((100% - 32px) / 3);
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-white);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: var(--transition-normal);
}
.horizontal-article-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: var(--border-color-strong); }

.card-media { aspect-ratio: 16 / 9; }
.card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent-magenta);
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  z-index: 2;
  letter-spacing: 0.04em;
}
.card-content { padding: 14px; flex: 1; display: flex; align-items: center; }
.card-title { font-size: 0.88rem; font-weight: 700; color: var(--text-heading); line-height: 1.4; font-family: var(--font-heading); }

/* --- YouTube video cards (portrait) --- */
.yt-video-card { flex: 0 0 170px; width: 170px; }
.yt-video-card .card-media { aspect-ratio: 9 / 16; }
.yt-play-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(20,18,26,0.55);
  border: 2px solid rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}
.yt-video-card:hover .yt-play-icon { background: #FF0000; border-color: #fff; transform: translate(-50%, -50%) scale(1.08); }
.yt-play-icon svg { margin-left: 3px; }
.yt-duration-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(20,18,26,0.75);
  color: #fff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.66rem;
  font-weight: 700;
  z-index: 2;
}
.card-badge.badge-yt { background: #FF0000; display: flex; align-items: center; gap: 4px; }

/* --- Featured Videos promo banner --- */
.yt-featured-section {
  position: relative;
  background: linear-gradient(115deg, #e0117f 0%, #b3179f 45%, #6c17d6 100%);
  border-radius: var(--radius-lg);
  padding: 32px 8px 28px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(108, 0, 133, 0.35);
}
.yt-featured-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
  opacity: 0.5;
}
.yt-featured-section .carousel-header,
.yt-featured-section .horizontal-carousel-viewport { position: relative; z-index: 2; }
.yt-featured-section .carousel-header { justify-content: center; margin-bottom: 20px; }
.yt-featured-section .carousel-section-title {
  font-size: 1.7rem;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.yt-featured-section .horizontal-carousel-viewport { position: relative; padding: 4px 46px 10px; }
.yt-arrow {
  position: absolute;
  top: 0; bottom: 0;
  margin: auto 0;
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.85);
  z-index: 6;
}
.yt-arrow:hover:not(:disabled) { background: rgba(255,255,255,0.18); color: #fff; }
.yt-arrow-prev { left: 0; }
.yt-arrow-next { right: 0; }
.yt-featured-section .card-title { color: var(--text-heading); text-shadow: 0 2px 6px rgba(0,0,0,0.5); }
.yt-featured-section .yt-video-card { background: rgba(12,12,60,0.5); }
.yt-featured-section .yt-play-icon { background: var(--accent-magenta); border: none; box-shadow: 0 0 16px rgba(169, 0, 199, 0.7); }
.yt-featured-section .yt-video-card:hover .yt-play-icon { background: #ff0056; box-shadow: 0 0 24px rgba(255, 0, 86, 0.8); }

.yt-social-row { position: relative; z-index: 2; display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.yt-social-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.18);
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.yt-social-chip:hover { background: rgba(255,255,255,0.3); transform: translateY(-2px); }

/* --- READ MORE SECTION WRAPPER --- */
.read-more-section {
  grid-column: 1 / -1;
  padding: 24px 0 8px;
  border-top: 1px solid var(--border-color);
}
.read-more-container { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.read-more-side-panel { position: static; }
.panel-placeholder {
  border: 1px dashed var(--border-color-strong);
  border-radius: var(--radius-md);
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
}
.panel-placeholder-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  writing-mode: vertical-rl;
}

/* News hub grid reuses .horizontal-article-card as a plain grid item */
.news-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.news-hub-grid .horizontal-article-card { flex: none; width: auto; }

@media (max-width: 1200px) {
  .read-more-container { grid-template-columns: 240px 1fr; }
}
@media (max-width: 1024px) {
  .news-hub-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .read-more-container { grid-template-columns: 1fr; }
  .read-more-section .read-more-side-panel { display: none; }
}
@media (max-width: 600px) {
  .news-hub-grid { grid-template-columns: 1fr; }
}

/* ===========================================================
   MOBILE SWIPE CAROUSELS (<=768px)
   Overrides the JS transform-carousel with native momentum
   scrolling + scroll-snap so nothing relies on fixed widths.
   =========================================================== */
@media (max-width: 768px) {
  .horizontal-arrows { display: none; }
  .horizontal-carousel-viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 14px;
  }
  .horizontal-carousel-track {
    transform: none !important;
    width: max-content;
    touch-action: pan-x;
  }
  .horizontal-article-card {
    flex: 0 0 78vw;
    max-width: 320px;
    scroll-snap-align: start;
  }
  .yt-video-card { flex: 0 0 140px; width: 140px; }
  .news-hub-grid .horizontal-article-card { flex: none; max-width: none; scroll-snap-align: unset; }
  .yt-featured-section .carousel-section-title { font-size: 1.3rem; }
}

/* ===========================================================
   FOOTER
   =========================================================== */
footer {
  background: #00001a;
  border-top: 1px solid rgba(108, 0, 133, 0.2);
  padding: 40px 0 20px;
  margin-top: 32px;
  color: var(--text-on-plum-muted);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 28px;
  margin-bottom: 28px;
}
.footer-logo-col p { color: var(--text-on-plum-muted); font-size: 0.85rem; margin-top: 16px; }
.footer-col-title { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 18px; color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 12px; }
.footer-links a { font-size: 0.85rem; color: var(--text-on-plum-muted); }
.footer-links a:hover { color: #fff; }
.footer-newsletter p { color: var(--text-on-plum-muted); font-size: 0.85rem; margin-bottom: 14px; }
.newsletter-form { display: flex; gap: 8px; }
.newsletter-input {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: #fff;
  outline: none;
  font-size: 0.85rem;
  flex-grow: 1;
  min-width: 0;
}
.newsletter-input::placeholder { color: rgba(255,255,255,0.5); }
.newsletter-input:focus { border-color: var(--accent-gold); }
.newsletter-btn { background: var(--accent-magenta); color: #fff; border-radius: var(--radius-sm); padding: 10px 16px; font-weight: 600; flex-shrink: 0; }
.newsletter-btn:hover { background: #a5006a; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.8rem;
}

/* ===========================================================
   MODALS (sign-in / video lightbox)
   =========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 30, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 16px;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal-content {
  background: var(--plum-dark);
  border: 1px solid var(--border-color-strong);
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius-lg);
  box-shadow: 0 0 40px rgba(108,0,133,0.5);
  padding: 32px;
  position: relative;
  transform: translateY(16px);
  transition: transform var(--transition-normal);
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.btn-close-modal { position: absolute; top: 16px; right: 16px; font-size: 1.25rem; color: var(--text-muted); }
.btn-close-modal:hover { color: var(--text-heading); }
.modal-logo { height: 32px; margin-bottom: 24px; }
.modal-title { font-size: 1.4rem; margin-bottom: 8px; }
.modal-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 22px; }

.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 0.8rem; font-weight: 600; color: var(--text-body); }
.form-input {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text-heading);
  outline: none;
  font-family: inherit;
}
.form-input:focus { border-color: var(--plum); }
.form-options { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 22px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; color: var(--text-muted); cursor: pointer; }
.forgot-link { color: var(--plum); }
.forgot-link:hover { text-decoration: underline; }
.btn-modal-submit { width: 100%; padding: 12px; border-radius: var(--radius-sm); font-weight: 700; font-size: 0.95rem; background: var(--plum); color: #fff; border: none; }
.btn-modal-submit:hover { background: var(--plum-light); }
.modal-footer { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 22px; }
.signup-link { color: var(--plum); font-weight: 600; }

.video-modal { display: none; position: fixed; inset: 0; background: rgba(20,18,26,0.9); z-index: 999; align-items: center; justify-content: center; padding: 16px; }
.video-modal.active { display: flex; }
.video-modal-inner { width: min(900px, 92vw); aspect-ratio: 16/9; position: relative; background: #000; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-heavy); }
.video-modal-inner iframe { width: 100%; height: 100%; border: 0; }
.video-modal-close { position: absolute; top: -40px; right: 0; background: none; border: none; color: #fff; font-size: 2rem; cursor: pointer; line-height: 1; }

/* ===========================================================
   MISC (search results notice, stat chips, generic page bits)
   =========================================================== */
.stat-chip {
  display: inline-block;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 2px 8px;
  font-size: 0.75rem;
  margin-left: 8px;
  color: var(--text-body);
}

/* ===========================================================
   TABLET LAYOUT (1024px)
   =========================================================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ===========================================================
   MOBILE LAYOUT (768px) — mirrors mobile.css section logic
   =========================================================== */
@media (max-width: 768px) {
  .menu-toggle { display: flex; align-items: center; justify-content: center; }
  .nav-links, .btn-signin { display: none; }
  header { min-height: 60px; }
  .header-container { min-height: 60px; }
  .hero-title { font-size: 1.4rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 0.72rem; }
  .modal-content {
    position: fixed;
    left: 0; right: 0; bottom: 0; top: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    border-radius: 20px 20px 0 0;
    max-height: 88vh;
    overflow-y: auto;
  }
  .modal-overlay.active .modal-content { animation: sheetUp 0.28s ease; }
  @keyframes sheetUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero-content { padding: 18px; }
}
