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

:root {
  --gold: #FFD700;
  --gold-dark: #E6C200;
  --bg-dark: #1a1a1a;
  --bg-card: #222;
  --bg-card-hover: #2a2a2a;
  --text: #f0f0f0;
  --text-muted: #aaa;
  --text-dark: #1a1a1a;
  --radius: 6px;
  --max-w: 1260px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-dark); }

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

h1, h2, h3, h4, h5, h6 {
  font-family: 'Oswald', 'Impact', sans-serif;
  font-weight: 700;
  line-height: 1.15;
  text-transform: uppercase;
}

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 20px; }

/* ===== HEADER ===== */
.header {
  background: #111;
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold) !important;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.logo span { color: #fff; }

.nav {
  display: flex;
  gap: 28px;
}

.nav-link {
  color: #ccc !important;
  font-size: .9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: all .2s;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold) !important;
  border-bottom-color: var(--gold);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--gold);
  border-radius: 2px;
  transition: .3s;
}

/* ===== TICKER ===== */
section.ticker {
  background: var(--gold);
  overflow: hidden;
  white-space: nowrap;
  height: 40px;
  line-height: 40px;
  position: relative;
}

section.ticker .container {
  display: flex;
  align-items: center;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

.ticker-label {
  background: #111;
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: .8rem;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  letter-spacing: 1px;
  z-index: 2;
}

.ticker-content {
  display: flex;
  animation: ticker-scroll 40s linear infinite;
  flex-shrink: 0;
}

.ticker-item {
  flex-shrink: 0;
  padding: 0 32px;
}

.ticker-item p {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-dark);
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker-item p::before {
  content: '●';
  margin-right: 10px;
  color: #1a1a1a;
}

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

/* ===== HERO / FEATURED ===== */
.hero-section { padding: 32px 0 0; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
}

.hero-card { border-radius: var(--radius); overflow: hidden; }

.hero-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.hero-card-main .hero-img {
  height: 420px;
}

.hero-img, .hero-img-small {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.hero-img-small {
  height: 100px;
}

.hero-card-body {
  background: linear-gradient(transparent, rgba(0,0,0,.9));
  padding: 24px;
  margin-top: -80px;
  position: relative;
  z-index: 2;
}

.hero-card-body h2 {
  font-size: 1.6rem;
  color: #fff;
  margin-top: 8px;
}

.hero-card-body .excerpt {
  color: #bbb;
  font-size: .9rem;
  margin-top: 8px;
}

.hero-cards-side {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero-card-side {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
}

.hero-card-body-side {
  padding: 12px 16px;
}

.hero-card-body-side h3 {
  font-size: .95rem;
  color: #fff;
  margin-top: 6px;
}

/* ===== CATEGORY TAGS ===== */
.category-tag {
  display: inline-block;
  background: var(--gold);
  color: var(--text-dark);
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 3px;
  letter-spacing: .5px;
}

/* ===== MAIN CONTENT + SIDEBAR LAYOUT ===== */
.main-wrapper {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 36px;
  padding: 0 0 40px;
}

.main-content { min-width: 0; }

/* ===== SECTION HEADINGS ===== */
.section-title {
  font-size: 1.3rem;
  color: var(--gold);
  padding-bottom: 12px;
  border-bottom: 3px solid var(--gold);
  margin-bottom: 24px;
  margin-top: 40px;
}

/* ===== ARTICLE CARDS ===== */
.article-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}

.article-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.article-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.article-card .card-img {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .9rem;
  letter-spacing: 1px;
}

.card-body { padding: 16px; }

.card-body h3 {
  font-size: 1.05rem;
  color: #fff;
  margin: 8px 0;
}

.card-body .excerpt {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-body .article-meta,
time.article-meta {
  font-size: .75rem;
  color: #777;
  display: block;
}

/* ===== TRENDING ===== */
.trending-list {
  list-style: none;
  counter-reset: trend;
}

.trending-list li {
  counter-increment: trend;
  padding: 14px 0;
  border-bottom: 1px solid #333;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.trending-list li::before {
  content: counter(trend);
  font-family: 'Oswald', sans-serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--gold);
  min-width: 28px;
}

.trending-list a {
  color: #ddd;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.trending-list a:hover { color: var(--gold); }

.trending-category {
  font-size: .75rem;
  color: #777;
}

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 28px; padding-top: 40px; }

.sidebar-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
}

.sidebar-title {
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--gold);
}

/* Rankings list */
.rankings-list { list-style: none; }
.rankings-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #333;
  font-size: .9rem;
}
.rankings-list li:last-child { border: none; }
.rankings-list .rank {
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  color: var(--gold);
  min-width: 20px;
}
.rankings-list .name { color: #ddd; font-weight: 600; flex: 1; }
.rankings-list .discipline, .rankings-list .event { color: #888; font-size: .8rem; }

/* Upcoming races */
.races-list { list-style: none; }
.races-list li {
  padding: 10px 0;
  border-bottom: 1px solid #333;
}
.races-list li:last-child { border: none; }
.races-list .race-name { color: #ddd; font-weight: 600; font-size: .9rem; display: block; }
.races-list .race-date { color: #888; font-size: .8rem; margin-top: 2px; display: block; }

/* Social link */
.social-link {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ccc !important;
  font-weight: 500;
}
.social-link .followers { color: #888; font-size: .85rem; }

/* Sidebar athlete links */
.sidebar-links { list-style: none; }
.sidebar-links li { padding: 6px 0; }
.sidebar-links a { color: #ccc; font-size: .9rem; font-weight: 500; }
.sidebar-links a:hover { color: var(--gold); }

/* ===== NEWSLETTER ===== */
.newsletter {
  background: linear-gradient(135deg, #111, #1a1a1a);
  border: 2px solid var(--gold);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  margin: 40px auto;
  max-width: var(--max-w);
}

.newsletter h2 {
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 8px;
}

.newsletter p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: .95rem;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid #444;
  border-radius: var(--radius);
  background: #222;
  color: #fff;
  font-size: .95rem;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--gold);
}

.newsletter-form button,
.btn-primary {
  background: var(--gold);
  color: var(--text-dark);
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: .9rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}

.newsletter-form button:hover,
.btn-primary:hover { background: var(--gold-dark); }

/* ===== FOOTER ===== */
.footer {
  background: #111;
  border-top: 3px solid var(--gold);
  padding: 48px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 32px;
}

.footer-logo {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--gold);
  text-transform: uppercase;
}

.footer-tagline {
  color: #888;
  font-size: .85rem;
  margin-top: 8px;
  line-height: 1.5;
}

.footer-col-title {
  font-size: .85rem;
  color: var(--gold);
  margin-bottom: 14px;
  letter-spacing: 1px;
}

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: #999; font-size: .85rem; }
.footer-links a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom .copyright { color: #666; font-size: .8rem; }

.social-footer { display: flex; gap: 16px; }
.social-footer-link { color: #888 !important; font-size: .85rem; font-weight: 600; }
.social-footer-link:hover { color: var(--gold) !important; }

/* ===== ARTICLE PAGE ===== */
.article-page { padding: 32px 0 60px; }

.article-header { margin-bottom: 28px; }

.article-header .category-tag {
  margin-bottom: 14px;
}

.article-header h1 {
  font-size: 2.2rem;
  color: #fff;
  margin-bottom: 12px;
  text-transform: none;
}

.article-meta {
  color: #888;
  font-size: .85rem;
}

.article-meta span { margin-right: 16px; }

.article-hero-img,
.placeholder-img.article-hero-img {
  width: 100%;
  height: 400px;
  border-radius: var(--radius);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 2px;
}

.article-body {
  max-width: 740px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #ddd;
}

.article-body p { margin-bottom: 18px; }

.article-body h2 {
  font-size: 1.3rem;
  color: var(--gold);
  margin: 28px 0 14px;
  text-transform: none;
}

.related-articles {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 2px solid #333;
}

/* ===== LISTING PAGES ===== */
.page-header {
  padding: 40px 0 28px;
  border-bottom: 3px solid var(--gold);
  margin-bottom: 32px;
}

.page-header h1 {
  font-size: 2rem;
  color: var(--gold);
}

.page-header p {
  color: var(--text-muted);
  margin-top: 8px;
}

.listing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-bottom: 40px;
}

/* ===== ATHLETE PAGE ===== */
.athlete-header {
  display: flex;
  gap: 32px;
  align-items: center;
  padding: 40px 0;
}

.athlete-photo,
.placeholder-img.athlete-photo {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 4px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  flex-shrink: 0;
}

.athlete-info h1 {
  font-size: 2rem;
  color: #fff;
  text-transform: none;
}

.athlete-info .event {
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 4px;
}

.athlete-info .nationality {
  color: #aaa;
  margin-top: 4px;
}

.athlete-stats {
  display: flex;
  gap: 32px;
  margin-top: 20px;
}

.stat-box {
  background: var(--bg-card);
  padding: 16px 24px;
  border-radius: var(--radius);
  text-align: center;
}

.stat-box .val {
  font-family: 'Oswald', sans-serif;
  font-size: 1.4rem;
  color: var(--gold);
}

.stat-box .label {
  font-size: .75rem;
  color: #888;
  text-transform: uppercase;
  margin-top: 4px;
}

.athlete-bio {
  max-width: 740px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #ddd;
  padding-bottom: 40px;
}

.athlete-bio p { margin-bottom: 16px; }

/* ===== RACE CALENDAR ===== */
.race-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 40px;
}

.race-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--gold);
  color: var(--text-dark);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .85rem;
}

.race-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #333;
  font-size: .9rem;
}

.race-table tr:hover td { background: #252525; }

/* ===== RANKINGS PAGE ===== */
.rankings-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 32px;
}

.rankings-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--gold);
  color: var(--text-dark);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .85rem;
}

.rankings-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #333;
  font-size: .9rem;
}

.rankings-table tr:hover td { background: #252525; }

/* ===== PLACEHOLDER IMAGES ===== */
.placeholder-img {
  background: linear-gradient(135deg, #2a2a2a, #333);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-family: 'Oswald', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  font-size: .9rem;
  letter-spacing: 1px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .main-wrapper { grid-template-columns: 1fr; }
  .sidebar { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: flex; }

  .nav {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #111;
    border-top: 1px solid #333;
    padding: 20px;
    z-index: 999;
    flex-direction: column;
    gap: 0;
  }

  .nav.open { display: flex; }

  .nav-link {
    display: block;
    padding: 12px 0;
    font-size: 1rem;
    border-bottom: 1px solid #222;
  }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-card-main .hero-img { height: 300px; }

  .article-grid { grid-template-columns: 1fr; }
  .listing-grid { grid-template-columns: 1fr; }

  .hero-card-body h2 { font-size: 1.4rem; }
  .article-header h1 { font-size: 1.6rem; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  .newsletter { padding: 24px 16px; margin: 40px 20px; }
  .newsletter-form { flex-direction: column; }

  .athlete-header { flex-direction: column; text-align: center; }
  .athlete-stats { flex-wrap: wrap; justify-content: center; }
}
