/*
Theme Name: Báo Thể Thao
Theme URI: http://127.0.0.1:8080
Author: Báo Thể Thao
Description: Giao diện báo thể thao hiện đại, tự động cập nhật tin từ 24h và Bóng Đá Plus.
Version: 1.0.0
Requires at least: 6.4
Text Domain: bao-the-thao
*/

:root {
  --ink: #12151c;
  --muted: #5c6573;
  --paper: #f3f0e8;
  --card: #ffffff;
  --line: #e4dfd4;
  --navy: #0c1424;
  --navy-2: #162033;
  --red: #e10600;
  --red-dark: #b10500;
  --gold: #f5c518;
  --green: #1f8a4c;
  --shadow: 0 10px 30px rgba(12, 20, 36, 0.08);
  --serif: "Source Serif 4", "Times New Roman", serif;
  --sans: "Be Vietnam Pro", "Segoe UI", sans-serif;
  --display: "Oswald", "Arial Narrow", sans-serif;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(225, 6, 0, 0.08), transparent 50%),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input { font-family: inherit; }

.topbar {
  background: var(--navy);
  color: #d7deea;
  font-size: 12px;
  letter-spacing: 0.04em;
}
.topbar-inner, .wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
.topbar-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 36px;
}
.live-dot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
}
.live-dot::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(245, 197, 24, 0.7);
  animation: pulse 1.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(245, 197, 24, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 197, 24, 0); }
}
.top-links { display: flex; gap: 14px; }
.top-links a:hover { color: var(--gold); }

.masthead {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 40%),
    var(--navy-2);
  color: #fff;
  border-bottom: 4px solid var(--red);
}
.masthead-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 18px 0 16px;
}
.brand { display: flex; align-items: center; gap: 12px; justify-self: center; }
.crest {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff4d4d, var(--red) 55%, #7a0200);
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 3px rgba(255,255,255,0.25), 0 8px 18px rgba(0,0,0,0.25);
}
.crest svg { width: 30px; height: 30px; }
.brand-name {
  font-family: var(--display);
  font-size: 46px;
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
}
.brand-name span { color: var(--gold); }
.brand-tag {
  margin: 4px 0 0;
  color: #b8c2d4;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.search-form { justify-self: end; display: flex; background: #fff; border-radius: 999px; overflow: hidden; }
.search-form input {
  border: 0;
  padding: 10px 16px;
  width: 220px;
  outline: none;
  color: var(--ink);
}
.search-form button {
  border: 0;
  background: var(--red);
  color: #fff;
  padding: 0 16px;
  font-weight: 700;
  cursor: pointer;
}
.edition {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c5cedd;
}
.edition strong { display: block; color: #fff; font-size: 14px; letter-spacing: 0.04em; margin-top: 4px; }

.nav-wrap {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav-inner { display: flex; align-items: center; gap: 8px; min-height: 52px; }
.menu-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
.primary-nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.primary-nav a {
  display: block;
  padding: 14px 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.primary-nav a:hover, .primary-nav .current-menu-item a, .primary-nav .current-cat a { color: var(--red); }

.ticker {
  background: var(--ink);
  color: #fff;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  overflow: hidden;
}
.ticker-label {
  background: var(--red);
  padding: 8px 14px;
  font-family: var(--display);
  letter-spacing: 0.08em;
  font-size: 14px;
}
.ticker-track { overflow: hidden; }
.ticker-move {
  display: flex;
  gap: 32px;
  width: max-content;
  animation: marquee 40s linear infinite;
  padding-left: 24px;
}
.ticker-move a { color: #fff; font-size: 14px; white-space: nowrap; }
.ticker-move a:hover { color: var(--gold); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.page { padding: 28px 0 56px; }
.hero {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 18px;
}
.lead-card, .side-card, .story-card, .list-card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.lead-card { position: relative; min-height: 460px; overflow: hidden; color: #fff; }
.lead-card img, .story-card img, .side-card img, .thumb img { width: 100%; height: 100%; object-fit: cover; }
.lead-card .media { position: absolute; inset: 0; }
.lead-card .media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,12,20,0.05) 20%, rgba(8,12,20,0.88) 100%);
}
.lead-body { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px; z-index: 1; }
.kicker, .source-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
}
.source-pill.source-bongdaplus { background: #0b6b3a; }
.source-pill.source-24h { background: #c45100; }
.lead-body h2, .story-card h3, .side-card h3, .list-card h3 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 10px 0 8px;
}
.lead-body h2 { font-size: 40px; line-height: 1.12; }
.meta { color: var(--muted); font-size: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.lead-body .meta { color: #e7ebf2; }
.excerpt { color: #3d4553; margin: 0; }
.lead-body .excerpt { color: #e6ebf3; font-size: 16px; }

.side-stack { display: grid; gap: 12px; }
.side-card { display: grid; grid-template-columns: 112px 1fr; min-height: 104px; overflow: hidden; }
.side-card .media { height: 100%; min-height: 104px; background: #d9d3c7; }
.side-card .body, .story-card .body, .list-card .body { padding: 12px 14px 14px; }
.side-card h3 { font-size: 16px; line-height: 1.3; margin: 6px 0; }

.section { margin-top: 34px; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  border-bottom: 2px solid var(--ink);
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 4px solid var(--red);
  padding-bottom: 6px;
  margin-bottom: -2px;
}
.section-head a { color: var(--red); font-weight: 700; font-size: 13px; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.story-card { overflow: hidden; display: flex; flex-direction: column; }
.story-card .media { aspect-ratio: 16/10; background: #ddd6c8; overflow: hidden; }
.story-card h3 { font-size: 20px; line-height: 1.25; }
.story-card .excerpt {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 14px;
}
.story-card:hover h3, .side-card:hover h3, .list-card:hover h3, .lead-card:hover h2 { color: var(--red-dark); }
.lead-card:hover h2 { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

.panel { padding: 16px; }
.panel h3 {
  margin: 0 0 12px;
  font-family: var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 20px;
}
.hot-list { list-style: none; margin: 0; padding: 0; }
.hot-list li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.hot-list .num { font-family: var(--display); color: var(--red); font-size: 22px; line-height: 1; }
.hot-list a { font-weight: 700; font-size: 14px; line-height: 1.35; }
.hot-list a:hover { color: var(--red); }
.source-box { margin-top: 16px; }
.source-box p { margin: 0 0 8px; color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a {
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fff;
}
.chips a:hover, .chips a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.archive-list { display: grid; gap: 14px; }
.list-card { display: grid; grid-template-columns: 240px 1fr; overflow: hidden; }
.list-card .media { min-height: 150px; background: #ddd6c8; }

.article { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); padding: 28px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--red); }
.article h1 { font-family: var(--serif); font-size: 42px; line-height: 1.15; margin: 12px 0; }
.article-hero { margin: 18px 0; background: #efeae0; }
.article-hero img { width: 100%; max-height: 520px; object-fit: cover; }
.article .lead { font-size: 20px; line-height: 1.6; }
.credit {
  background: #f7f4ee;
  border-left: 4px solid var(--gold);
  padding: 14px 16px;
  color: #3c4452;
}
.read-source {
  display: inline-flex;
  margin-top: 8px;
  background: var(--red);
  color: #fff;
  font-weight: 800;
  padding: 12px 16px;
}
.read-source:hover { background: var(--red-dark); }
.related { margin-top: 22px; }

.empty {
  background: #fff;
  border: 1px dashed var(--line);
  padding: 40px 20px;
  text-align: center;
}
.site-footer {
  background: var(--navy);
  color: #d5dcea;
  padding: 36px 0 20px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; }
.site-footer h2, .site-footer h3 { font-family: var(--display); letter-spacing: 0.05em; text-transform: uppercase; color: #fff; margin-top: 0; }
.site-footer a:hover { color: var(--gold); }
.legal { border-top: 1px solid rgba(255,255,255,0.08); margin-top: 22px; padding-top: 14px; font-size: 12px; color: #9aa6ba; }
.pager { display: flex; gap: 8px; margin-top: 18px; }
.pager a, .pager span { background: #fff; border: 1px solid var(--line); padding: 8px 12px; font-weight: 700; }
.pager .current { background: var(--red); color: #fff; border-color: var(--red); }

@media (max-width: 980px) {
  .masthead-inner, .hero, .layout, .story-grid, .footer-grid, .list-card { grid-template-columns: 1fr; }
  .brand-name { font-size: 36px; }
  .search-form, .edition { justify-self: center; }
  .masthead-inner { justify-items: center; text-align: center; }
  .lead-body h2, .article h1 { font-size: 30px; }
  .lead-card { min-height: 380px; }
  .menu-toggle { display: block; }
  .primary-nav { display: none; width: 100%; flex-direction: column; }
  .primary-nav.open { display: flex; }
  .nav-inner { flex-wrap: wrap; padding: 8px 0; }
  .list-card .media { min-height: 200px; }
}
@media (max-width: 640px) {
  .top-links { display: none; }
  .search-form input { width: 150px; }
  .side-card { grid-template-columns: 96px 1fr; }
}
