/* =========================================================
   BD24H Magazine — main stylesheet
   Light-first, CSS variables for theming
   Dark mode = opt-in via [data-theme="dark"]
   Breakpoints: 480px / 768px / 1100px
   ========================================================= */

:root {
  --accent:       #dc2626;
  --accent-hover: #b91c1c;
  --accent-soft:  rgba(220, 38, 38, 0.10);
  --yellow:       #fbbf24;
  --text:         #0f172a;
  --text-muted:   #475569;
  --text-dim:     #94a3b8;
  --bg:           #ffffff;
  --surface:      #f8fafc;
  --border:       #e2e8f0;
  --border-strong:#cbd5e1;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.08);
  --shadow-md:    0 4px 12px rgba(0,0,0,.10);
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    14px;
  --maxw:         1280px;
  --topbar-h:     36px;
  --nav-h:        58px;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --text:         #f1f5f9;
  --text-muted:   #94a3b8;
  --text-dim:     #64748b;
  --bg:           #0f172a;
  --surface:      #1e293b;
  --border:       #1e293b;
  --border-strong:#334155;
  --shadow-sm:    0 1px 3px rgba(0,0,0,.3);
  --shadow-md:    0 4px 16px rgba(0,0,0,.5);
}

/* -------- Reset + base -------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
h1,h2,h3,h4,h5,h6 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; color: var(--text); }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul,ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0 0 1em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* =========================================================
   TOPBAR
   ========================================================= */
.bd24-topbar {
  background: var(--accent);
  color: #fff;
  height: var(--topbar-h);
  font-size: 12px;
  overflow: hidden;
}
.topbar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
}
.topbar-date {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  opacity: .9;
  font-size: 11px;
  flex-shrink: 0;
}

/* Ticker */
.topbar-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.ticker-badge {
  background: #fff;
  color: var(--accent);
  font-weight: 800;
  font-size: 10px;
  letter-spacing: .8px;
  padding: 2px 7px;
  border-radius: 3px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ticker-track {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.ticker-inner {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
  will-change: transform;
}
.ticker-inner:hover { animation-play-state: paused; }
.ticker-item {
  color: #fff;
  padding: 0 4px;
  font-size: 12px;
  opacity: .95;
  flex-shrink: 0;
}
.ticker-item:hover { opacity: 1; text-decoration: underline; }
.ticker-sep { color: rgba(255,255,255,.5); padding: 0 8px; flex-shrink: 0; }

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.topbar-socials {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.topbar-social-link {
  color: rgba(255,255,255,.8);
  display: flex;
  align-items: center;
  transition: color .15s;
}
.topbar-social-link:hover { color: #fff; }

/* =========================================================
   HEADER
   ========================================================= */
.bd24-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
}
[data-theme="dark"] .bd24-header { background: rgba(15,23,42,.96); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

/* Brand */
.bd24-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  color: #fff;
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name  { font-size: 18px; font-weight: 900; letter-spacing: -.3px; color: var(--text); }
.brand-accent { color: var(--accent); }
.brand-tagline { font-size: 10px; color: var(--text-dim); letter-spacing: 1.5px; margin-top: 2px; }

/* Primary nav — allow scroll instead of clipping text mid-word */
.bd24-primary-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.bd24-primary-nav::-webkit-scrollbar { display: none; }
.bd24-primary-nav a {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .15s, background .15s;
}
.bd24-primary-nav a:hover,
.bd24-primary-nav a.active {
  color: var(--accent);
  background: var(--accent-soft);
}
.nav-more {
  display: flex;
  align-items: center;
  gap: 3px;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.icon-btn {
  width: 36px; height: 36px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  display: grid; place-items: center;
  transition: color .15s, background .15s;
  min-width: 36px; /* touch target */
}
.icon-btn:hover { color: var(--text); background: var(--surface); }

.btn-login {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all .15s;
  white-space: nowrap;
}
.btn-login:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.menu-toggle { display: none; }

/* Search overlay */
.bd24-search-overlay {
  position: absolute;
  left: 0; right: 0;
  top: var(--nav-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  box-shadow: var(--shadow-md);
  z-index: 190;
}
.bd24-search-overlay .container {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bd24-search-overlay[hidden] { display: none; }
.close-search { margin-left: auto; }

/* =========================================================
   SEARCH FORM
   ========================================================= */
.bd24-search-form { flex: 1; }
.search-input-wrap {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
  transition: border-color .15s;
}
.search-input-wrap:focus-within { border-color: var(--accent); }
.search-icon { margin: 0 10px; color: var(--text-dim); flex-shrink: 0; }
.search-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text);
  outline: none;
  font-family: var(--font);
}
.search-input::placeholder { color: var(--text-dim); }
.search-btn {
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.search-btn:hover { background: var(--accent-hover); }

/* =========================================================
   COMMON BADGES + BUTTONS
   ========================================================= */
.cat-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
  line-height: 1.6;
}
.cat-badge-red   { background: var(--accent); color: #fff; }
.cat-badge-red:hover { background: var(--accent-hover); color: #fff; }
.cat-badge-outline {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
}
.cat-badge-outline:hover { border-color: var(--accent); color: var(--accent); }

.btn-primary-red {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  transition: background .15s;
}
.btn-primary-red:hover { background: var(--accent-hover); color: #fff; }

.btn-load-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  padding: 9px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  margin-top: 20px;
  transition: all .15s;
}
.btn-load-more:hover { border-color: var(--accent); color: var(--accent); }

/* Meta bits */
.meta-date, .meta-views {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
  font-size: 12px;
}
.meta-date svg, .meta-views svg { flex-shrink: 0; }

/* =========================================================
   SECTION HEADERS
   ========================================================= */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.section-title {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.section-title-bar {
  display: inline-block;
  width: 4px;
  height: 18px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

/* =========================================================
   HERO ROW
   ========================================================= */
.bd24-hero-row {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.hero-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

/* Big featured post */
.hero-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #1e293b;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}
.hero-main-link { position: absolute; inset: 0; display: block; }
.hero-main-img-wrap { position: absolute; inset: 0; }
.hero-main-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.hero-main:hover .hero-main-img { transform: scale(1.03); }
.hero-main-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.2) 50%, transparent 100%);
}
.hero-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #dc2626 0%, #1e293b 100%);
}
.hero-main-body {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-main-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
}
.hero-main-title a { color: #fff; }
.hero-main-title a:hover { color: rgba(255,255,255,.85); }
.hero-main-meta { display: flex; gap: 14px; }
.hero-main-meta .meta-date,
.hero-main-meta .meta-views { color: rgba(255,255,255,.75); }

/* Secondary small cards */
.hero-secondary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero-card {
  display: flex;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .15s;
  min-height: 108px;
}
.hero-card:hover { box-shadow: var(--shadow-md); }
.hero-card-thumb {
  width: 120px;
  flex-shrink: 0;
  overflow: hidden;
}
.hero-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.hero-card:hover .hero-card-thumb img { transform: scale(1.05); }
.hero-card-thumb-placeholder {
  width: 100%; height: 100%;
  background: var(--surface);
}
.hero-card-body {
  flex: 1;
  padding: 12px 12px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.hero-card-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-card-title a { color: var(--text); }
.hero-card-title a:hover { color: var(--accent); }
.hero-card-meta { display: flex; gap: 10px; margin-top: auto; }

/* =========================================================
   MAIN + SIDEBAR LAYOUT
   ========================================================= */
.bd24-main-wrap { padding: 24px 0 32px; }
.main-sidebar-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
.sidebar-col { display: flex; flex-direction: column; gap: 20px; }

/* =========================================================
   NEWS LIST
   ========================================================= */
.bd24-news-section { display: flex; flex-direction: column; }

/* Tab nav */
.tab-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.tab-btn {
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  border: 1.5px solid transparent;
  transition: all .15s;
  background: transparent;
}
.tab-btn:hover { color: var(--accent); background: var(--accent-soft); }
.tab-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* News cards */
.bd24-news-list { display: flex; flex-direction: column; gap: 1px; }
.bd24-news-card {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background .12s;
}
.bd24-news-card:last-child { border-bottom: none; }
.bd24-news-card:hover { background: var(--surface); }

.news-card-thumb {
  width: 160px;
  height: 100px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.news-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.bd24-news-card:hover .news-card-thumb img { transform: scale(1.04); }

.news-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.news-cat { margin-bottom: 2px; }
.news-card-title {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-title a { color: var(--text); }
.news-card-title a:hover { color: var(--accent); }
.news-card-excerpt {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-meta { display: flex; gap: 12px; margin-top: auto; }

/* No posts message */
.no-posts { color: var(--text-dim); font-size: 14px; padding: 20px 0; }

/* =========================================================
   WIDGETS (shared)
   ========================================================= */
.bd24-widget {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.widget-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.widget-view-all {
  font-size: 11.5px;
  color: var(--accent);
  font-weight: 600;
}
.widget-tabs {
  display: flex;
  padding: 8px 12px 0;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
}
.widget-tabs::-webkit-scrollbar { display: none; }
.widget-tab {
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 4px 4px 0 0;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all .15s;
  background: transparent;
}
.widget-tab.active,
.widget-tab:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* =========================================================
   FIXTURES WIDGET
   ========================================================= */
.fixture-tabs .widget-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.tab-label { font-size: 11px; font-weight: 700; }
.tab-date  { font-size: 10px; color: var(--text-dim); }

.fixture-panel { display: none; }
.fixture-panel.active { display: block; }

.bd24-fixture-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.bd24-fixture-row:last-child { border-bottom: none; }

.fixture-league {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 5px;
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 32px;
  text-align: center;
}
.fixture-teams {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
}
.team-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
}
.team-home { text-align: right; }
.team-away { text-align: left; }

.fixture-score-time {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.fixture-time {
  font-weight: 700;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: .5px;
}
.fixture-score {
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 1px;
}
.fixture-status {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 3px;
}
.fixture-finished { background: var(--surface); color: var(--text-dim); }
.fixture-live { background: var(--accent); color: #fff; animation: pulse-live 1.5s infinite; }

@keyframes pulse-live {
  0%,100% { opacity: 1; }
  50% { opacity: .6; }
}

.no-fixtures { padding: 16px; color: var(--text-dim); font-size: 13px; }

/* =========================================================
   STANDINGS WIDGET
   ========================================================= */
.standings-panel { display: none; overflow-x: auto; }
.standings-panel.active { display: block; }

.standings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.standings-table thead th {
  padding: 8px 10px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.col-pos    { width: 28px; text-align: center; }
.col-team   { min-width: 100px; }
.col-played, .col-gd { width: 30px; text-align: center; }
.col-pts    { width: 42px; text-align: center; }

.standings-row td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.standings-row:last-child td { border-bottom: none; }
.standings-row.standing-ucl { border-left: 3px solid #3b82f6; }
.standings-row.standing-ucl:nth-child(1) { border-left-color: #f59e0b; }

.pos-num { font-weight: 700; font-size: 12px; color: var(--text-muted); }
.col-pos { text-align: center; }
.col-played, .col-gd, .col-pts { text-align: center; }

.team-abbr-badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  margin-right: 5px;
  letter-spacing: .3px;
  vertical-align: middle;
}
.team-full-name { font-weight: 600; vertical-align: middle; }

/* =========================================================
   TRENDING SIDEBAR
   ========================================================= */
.trending-big-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  margin: 12px;
}
.trending-big-thumb {
  position: absolute; inset: 0;
}
.trending-big-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.trending-big-card:hover .trending-big-thumb img { transform: scale(1.04); }
.trending-big-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 55%);
}
.trending-big-body {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trending-big-title {
  font-size: 13.5px;
  line-height: 1.35;
  margin: 0;
}
.trending-big-title a { color: #fff; }
.trending-big-title a:hover { color: rgba(255,255,255,.85); }
.trending-big-body .meta-date { color: rgba(255,255,255,.7); }

.trending-list {
  padding: 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.trending-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.trending-item:last-child { border-bottom: none; }
.trending-rank {
  font-size: 20px;
  font-weight: 900;
  color: var(--border);
  flex-shrink: 0;
  line-height: 1;
  min-width: 20px;
}
.trending-item-thumb {
  width: 72px;
  height: 54px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.trending-item-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.trending-item:hover .trending-item-thumb img { transform: scale(1.05); }
.trending-item-body { flex: 1; min-width: 0; }
.trending-item-title {
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trending-item-title a { color: var(--text); }
.trending-item-title a:hover { color: var(--accent); }
.trending-item-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* =========================================================
   CATEGORY GRID
   ========================================================= */
.bd24-category-grid {
  padding: 28px 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.cat-grid-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--bg-img, #1e293b);
  background-image: var(--cat-bg);
  background-size: cover;
  background-position: center;
  transition: transform .2s, box-shadow .2s;
}
.cat-grid-item:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }
.cat-grid-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.85) 0%, rgba(15,23,42,.3) 60%, transparent 100%);
  transition: background .2s;
}
.cat-grid-item:hover .cat-grid-overlay {
  background: linear-gradient(to top, rgba(220,38,38,.8) 0%, rgba(15,23,42,.3) 60%, transparent 100%);
}
.cat-grid-body {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cat-grid-label {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  line-height: 1.2;
}
.cat-grid-count {
  color: rgba(255,255,255,.75);
  font-size: 11px;
  font-weight: 500;
}
.cat-grid-arrow {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 30px; height: 30px;
  background: rgba(255,255,255,.15);
  border-radius: 50%;
  display: grid; place-items: center;
  color: #fff;
  transition: background .15s, transform .15s;
}
.cat-grid-item:hover .cat-grid-arrow {
  background: #fff;
  color: var(--accent);
  transform: translateX(2px);
}

/* =========================================================
   SINGLE POST
   ========================================================= */
.bd24-single-post { max-width: 720px; }
.post-header { margin-bottom: 20px; }
.post-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.post-title { font-size: 26px; font-weight: 800; line-height: 1.3; margin-bottom: 14px; }
.post-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.post-author-meta { display: flex; align-items: center; gap: 10px; }
.author-avatar { border-radius: 50%; width: 32px; height: 32px; }
.author-info { display: flex; flex-direction: column; line-height: 1.2; }
.author-name { font-size: 13px; font-weight: 700; color: var(--text); }
.author-title { font-size: 11px; color: var(--text-dim); }
.post-time-meta { display: flex; gap: 14px; flex-wrap: wrap; }
.meta-updated { font-size: 12px; color: var(--text-dim); }

.post-featured-image { margin: 18px 0; border-radius: var(--radius); overflow: hidden; }
.post-featured-image img { width: 100%; height: auto; }
.post-featured-image figcaption { font-size: 12px; color: var(--text-dim); padding: 8px 0; text-align: center; }

.content-wrap { font-size: 15.5px; line-height: 1.75; color: var(--text); }
.content-wrap p { margin-bottom: 1.2em; }
.content-wrap h2 { font-size: 20px; margin-top: 1.8em; }
.content-wrap h3 { font-size: 17px; margin-top: 1.5em; }
.content-wrap img { border-radius: var(--radius-sm); margin: 1em 0; }
.content-wrap a { color: var(--accent); text-decoration: underline; }
.content-wrap blockquote {
  margin: 1.5em 0;
  padding: 14px 20px;
  border-left: 4px solid var(--accent);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}
.content-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 1.2em 0;
}
.content-wrap th,
.content-wrap td {
  padding: 8px 12px;
  border: 1px solid var(--border);
  text-align: left;
}
.content-wrap th { background: var(--surface); font-weight: 700; }

.post-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.post-tag {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  transition: all .15s;
}
.post-tag:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .15s;
  color: var(--text);
}
.post-nav-item:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.post-nav-next { text-align: right; }
.nav-dir { font-size: 11px; font-weight: 700; color: var(--accent); display: flex; align-items: center; gap: 4px; }
.post-nav-next .nav-dir { justify-content: flex-end; }
.nav-title { font-size: 13px; font-weight: 600; line-height: 1.3; }

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.bd24-breadcrumbs {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
}
.breadcrumb-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-size: 12.5px;
  color: var(--text-dim);
}
.breadcrumb-item { display: flex; align-items: center; gap: 4px; }
.breadcrumb-item a { color: var(--text-muted); }
.breadcrumb-item a:hover { color: var(--accent); }
.breadcrumb-item [aria-current="page"] { color: var(--text); font-weight: 600; }
.breadcrumb-sep { color: var(--border-strong); display: flex; }

/* =========================================================
   FOOTER
   ========================================================= */
.bd24-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0 0;
  margin-top: 32px;
}
[data-theme="dark"] .bd24-footer { background: #020617; }

/* Trust row (EEAT signal strip above main footer grid) */
.footer-trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 0 28px;
  margin-bottom: 28px;
  border-bottom: 1px solid #1e293b;
}
.trust-badge {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(30, 41, 59, .4);
  border: 1px solid #1e293b;
  border-radius: var(--radius-sm);
}
.trust-badge svg { flex-shrink: 0; color: var(--accent); margin-top: 2px; }
.trust-badge span { font-size: 13px; line-height: 1.5; color: #cbd5e1; }
.trust-badge strong { color: #fff; font-weight: 700; }
.trust-badge small { color: #64748b; font-size: 11px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid #1e293b;
}
.footer-brand { margin-bottom: 14px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-icon { background: var(--accent); }
.footer-about-text { font-size: 13px; line-height: 1.65; color: #94a3b8; margin: 0 0 16px; }

/* Contact info list (EEAT trust signal) */
.footer-contact { display: flex; flex-direction: column; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; }
.footer-contact li { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; line-height: 1.5; color: #94a3b8; }
.footer-contact li svg { flex-shrink: 0; color: var(--accent); margin-top: 3px; }
.footer-contact li a { color: #cbd5e1; transition: color .15s; }
.footer-contact li a:hover { color: #fff; }

.footer-socials { display: flex; gap: 10px; }
.footer-socials a {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: #1e293b;
  color: #94a3b8;
  display: grid; place-items: center;
  transition: background .15s, color .15s, transform .15s;
}
.footer-socials a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }

.footer-col h4 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; padding: 0; list-style: none; margin: 0; }
.footer-col ul li a {
  font-size: 13px;
  color: #94a3b8;
  transition: color .15s, padding-left .15s;
  display: inline-block;
}
.footer-col ul li a:hover { color: #fff; padding-left: 4px; }

/* Editorial commitment note (EEAT) */
.footer-editorial-note {
  padding: 18px 20px;
  margin: 24px 0 0;
  background: rgba(30, 41, 59, .35);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
}
.footer-editorial-note p { margin: 0; font-size: 12.5px; line-height: 1.65; color: #94a3b8; }
.footer-editorial-note strong { color: #fff; }
.footer-editorial-note a { color: var(--yellow); text-decoration: underline; text-decoration-color: rgba(251,191,36,.4); transition: color .15s; }
.footer-editorial-note a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  margin-top: 18px;
  border-top: 1px solid #1e293b;
  gap: 12px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 12px; color: #64748b; }
.footer-copy strong { color: #cbd5e1; }
.footer-copy small { display: inline-block; margin-left: 8px; padding: 2px 8px; background: #1e293b; border-radius: 4px; color: #94a3b8; font-size: 10.5px; }
.footer-bottom-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-bottom-links a { font-size: 12px; color: #64748b; transition: color .15s; }
.footer-bottom-links a:hover { color: #fff; }

/* =========================================================
   PAGINATION
   ========================================================= */
.bd24-pagination { margin-top: 24px; }
.bd24-pagination .nav-links { display: flex; gap: 6px; flex-wrap: wrap; }
.bd24-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .15s;
}
.bd24-pagination .page-numbers:hover,
.bd24-pagination .page-numbers.current {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */
.bd24-back-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 500;
  width: 40px; height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: 10px;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(220,38,38,.35);
  transition: background .15s, transform .15s;
}
.bd24-back-top:hover { background: var(--accent-hover); transform: translateY(-2px); }
.bd24-back-top[hidden] { display: none; }

/* =========================================================
   404
   ========================================================= */
.bd24-404 {
  text-align: center;
  padding: 60px 20px;
  max-width: 500px;
  margin: 0 auto;
}
.error-icon { color: var(--border); margin: 0 auto 16px; }
.error-code { font-size: 72px; font-weight: 900; color: var(--accent); line-height: 1; margin: 0 0 8px; }
.error-title { font-size: 22px; margin-bottom: 10px; }
.error-desc { color: var(--text-muted); margin-bottom: 28px; }
.error-actions { display: flex; flex-direction: column; align-items: center; gap: 14px; }

/* =========================================================
   PAGE
   ========================================================= */
.bd24-page { padding: 28px 0; max-width: 800px; }
.page-title { font-size: 28px; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid var(--border); }

/* Archive desc */
.archive-desc { color: var(--text-muted); font-size: 14px; margin: 6px 0 0; }

/* =========================================================
   BREAKPOINTS — 1100px (tablet landscape)
   ========================================================= */
@media (max-width: 1100px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .hero-main { min-height: 300px; }
  .main-sidebar-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; }
  .footer-grid .footer-col:nth-child(4) { grid-column: 1 / -1; }
  .footer-trust-row { grid-template-columns: repeat(2, 1fr); }
  .bd24-primary-nav a { font-size: 11.5px; padding: 5px 7px; }
}

/* =========================================================
   BREAKPOINTS — 768px (tablet portrait)
   ========================================================= */
@media (max-width: 768px) {
  :root { --nav-h: 54px; }

  .topbar-date { display: none; }
  .topbar-socials { display: none; }

  .menu-toggle { display: grid; }
  .bd24-primary-nav {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    z-index: 199;
  }
  .bd24-primary-nav.open { display: flex; }
  .bd24-primary-nav a { width: 100%; text-align: left; padding: 10px 12px; min-height: 44px; display: flex; align-items: center; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-secondary { display: none; }
  .hero-main { min-height: 260px; }

  .main-sidebar-grid { grid-template-columns: 1fr; }
  .sidebar-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

  .cat-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-grid .footer-col:first-child { grid-column: 1 / -1; }
  .footer-grid .footer-col:nth-child(4) { grid-column: 1 / -1; }
  .footer-trust-row { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .news-card-thumb { width: 120px; height: 80px; }
  .post-title { font-size: 20px; }
  .post-nav { grid-template-columns: 1fr; }
}

/* =========================================================
   BREAKPOINTS — 480px (mobile)
   ========================================================= */
@media (max-width: 480px) {
  .container { padding: 0 14px; }
  .brand-tagline { display: none; }
  .btn-login { display: none; }

  .hero-main { min-height: 220px; }
  .hero-main-title { font-size: 16px; }

  .bd24-news-card { flex-direction: column; gap: 10px; }
  .news-card-thumb { width: 100%; height: 160px; border-radius: var(--radius); }

  .cat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cat-grid-item { min-height: 130px; }
  .cat-grid-label { font-size: 13px; }

  .sidebar-col { grid-template-columns: 1fr; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid .footer-col { grid-column: auto !important; }
  .footer-trust-row { grid-template-columns: 1fr; gap: 10px; padding: 16px 0 20px; margin-bottom: 20px; }
  .trust-badge { padding: 10px 12px; }
  .footer-editorial-note { padding: 14px 16px; }
  .footer-editorial-note p { font-size: 12px; }
  .post-title { font-size: 18px; }
  .post-meta-row { flex-direction: column; align-items: flex-start; }
  .bd24-back-top { bottom: 16px; right: 16px; }
}

/* =========================================================
   PRINT
   ========================================================= */
@media print {
  .bd24-topbar, .bd24-header, .bd24-footer, .sidebar-col,
  .bd24-back-top, .btn-load-more, .post-nav { display: none !important; }
  .main-sidebar-grid { grid-template-columns: 1fr; }
  .post-title { font-size: 22px; }
}

/* ========================================================
   Odds embed slot (homepage)
   ======================================================== */
.bd24-odds-section {
    background: #fff;
    border-top: 1px solid var(--bd24-border, #e5e7eb);
    border-bottom: 1px solid var(--bd24-border, #e5e7eb);
    padding: 24px 0;
    margin: 0 0 24px;
}
.bd24-odds-section__title {
    margin: 0 0 14px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--bd24-text, #111827);
    border-left: 4px solid #dc2626;
    padding-left: 12px;
    line-height: 1.2;
}
.bd24-odds-section__body {
    background: #f9fafb;
    border: 1px solid var(--bd24-border, #e5e7eb);
    border-radius: 10px;
    padding: 16px;
    overflow-x: auto;
}
.bd24-odds-section__body iframe,
.bd24-odds-section__body table,
.bd24-odds-section__body .bd24-odds-embed {
    max-width: 100%;
}
.bd24-odds-section__body iframe {
    width: 100%;
    border: 0;
    display: block;
}
@media (max-width: 640px) {
    .bd24-odds-section { padding: 16px 0; }
    .bd24-odds-section__title { font-size: 1.05rem; }
    .bd24-odds-section__body { padding: 12px; }
}
