/* ============================================================
   VegasBet — News page CSS
   ============================================================ */

/* ── Page wrapper ─────────────────────────────────────────── */
.news-page {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 20px;
}

/* ── Two-column layout ────────────────────────────────────── */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 284px;
  gap: 28px;
  align-items: start;
}

.news-main  { min-width: 0; }
.news-sidebar { min-width: 0; }

/* ════════════════════════════════════════════════════════════
   SECTION 1 — FEATURED STORY
════════════════════════════════════════════════════════════ */

.featured-section {
  margin-bottom: 40px;
}

/*
  Outer grid — 3 rows × 2 columns:
    Row 1: label spans full width
    Row 2: photo-1 (left) | title + date + p1–2 (right)
    Row 3: p3–4 (left)    | photo-2 (right)
*/
.featured-unified {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto minmax(220px, auto) minmax(180px, auto);
  background: var(--bg-card);
  border: 1px solid rgba(124, 58, 237, 0.45);
  border-radius: 12px;
  overflow: hidden;
  padding: 24px;
  gap: 0;
}

/* ROW 1 — label, full width */
.featured-label-row {
  grid-column: 1 / -1;
  grid-row: 1;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.18);
}

.featured-label {
  display: block;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
  color: #f0eeff;
  text-transform: uppercase;
  letter-spacing: 2px;
  line-height: 1.2;
  margin-bottom: 20px;
}

/* ROW 2 — photo 1 (left) */
.featured-img-left {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
}

/* ROW 2 — text top (right): title, date, p1–2 */
.featured-text-top {
  grid-column: 2;
  grid-row: 2;
  padding: 22px 28px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ROW 3 — text bottom (left): p3–4 */
.featured-text-bottom {
  grid-column: 1;
  grid-row: 3;
  padding: 20px 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* ROW 3 — photo 2 (right) */
.featured-img-right {
  grid-column: 2;
  grid-row: 3;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Photos — constrained height, no cropping, feet at bottom */
.featured-photo {
  width: 100%;
  max-height: 460px;
  object-fit: contain;
  object-position: bottom;
  display: block;
  background: transparent;
  border-radius: 20px;
}

.featured-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
  margin: 0;
}

.featured-date {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0;
}

.featured-body-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.72;
  margin: 0;
}

/* ════════════════════════════════════════════════════════════
   SECTION 2 — LATEST NEWS
════════════════════════════════════════════════════════════ */

.latest-section {
  margin-bottom: 48px;
}

/* Section heading with left purple bar */
.section-heading {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  border-left: 3px solid var(--purple);
  padding-left: 12px;
  margin: 0 0 20px;
  line-height: 1.2;
}

/* Loading state */
.news-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 14px;
}

/* 3-column card grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* News card */
.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color var(--transition);
}
.news-card:hover {
  border-color: rgba(124, 58, 237, 0.45);
}

/* Card image area */
.news-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1e0a4a 0%, #7c3aed 100%);
  display: flex;
  align-items: flex-start;
  padding: 10px;
  overflow: hidden;
}

/* Real photo from API — covers gradient placeholder */
.news-card-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Hide sport/source overlay badge on card images */
.news-card-img .sport-badge {
  display: none;
}

/* Source label in card footer */
.news-card-source {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Card body */
.news-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.news-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-excerpt {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.news-card-date {
  font-size: 11px;
  color: var(--text-secondary);
}

.news-read-more {
  font-size: 12px;
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}
.news-read-more:hover {
  color: var(--purple-light);
}

/* ── Sport badge pill ─────────────────────────────────────── */
.sport-badge {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.page-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
}
.page-btn:hover {
  border-color: var(--purple);
  color: var(--text-primary);
}
.page-btn.active {
  background: var(--purple);
  border-color: var(--purple);
  color: #fff;
}

/* ════════════════════════════════════════════════════════════
   SECTION 3 — RIGHT SIDEBAR
════════════════════════════════════════════════════════════ */

.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.sidebar-card:last-child {
  margin-bottom: 0;
}

.sidebar-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  border-left: 3px solid var(--purple);
  padding-left: 10px;
  margin-bottom: 16px;
  line-height: 1.2;
}

/* ── Trending topics ──────────────────────────────────────── */
.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-pill {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 999px;
  text-decoration: none;
  transition: background var(--transition);
}
.topic-pill:hover {
  background: var(--accent);
}

/* ── Top matches today ────────────────────────────────────── */
.match-list {
  display: flex;
  flex-direction: column;
}

.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.match-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.match-row:first-child {
  padding-top: 0;
}

.match-teams {
  font-size: 13px;
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.match-odds {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.odds-btn {
  display: inline-block;
  background: var(--purple);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  text-decoration: none;
  transition: background var(--transition);
}
.odds-btn:hover {
  background: var(--purple-light);
}

/* Live indicator dot */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: live-pulse 1.5s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}

/* ════════════════════════════════════════════════════════════
   ARTICLE PAGE (news_article.html) — preserved styles
════════════════════════════════════════════════════════════ */

.news-sport-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.news-sport-tag--football { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.news-sport-tag--nba      { background: rgba(245, 158, 11, 0.15);  color: #f59e0b; }
.news-sport-tag--tennis   { background: rgba(168, 85, 247, 0.2);   color: #a855f7; }
.news-sport-tag--mma      { background: rgba(239, 68, 68, 0.15);   color: #ef4444; }
.news-sport-tag--esports  { background: rgba(168, 85, 247, 0.15);  color: #c084fc; }
.news-sport-tag--nhl      { background: rgba(96, 165, 250, 0.15);  color: #60a5fa; }

.news-article-back {
  margin-bottom: 16px;
}

.news-back-link {
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}
.news-back-link:hover {
  color: var(--accent);
}

.news-article-breadcrumb {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.news-article-breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}
.news-article-breadcrumb a:hover {
  text-decoration: underline;
}
.news-breadcrumb-sep {
  color: var(--text-muted);
}

.news-article-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 36px 40px;
  margin-bottom: 48px;
}

.news-article-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 12px 0 20px;
}

.news-article-meta {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.news-author {
  display: flex;
  align-items: center;
  gap: 10px;
}
.news-author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  flex-shrink: 0;
}
.news-author-name {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
}
.news-author-role {
  font-size: 11px;
  color: var(--text-secondary);
}

.news-article-body {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.8;
}
.news-article-body p {
  margin: 0 0 18px;
}
.news-article-body p:last-child {
  margin: 0;
}

/* ════════════════════════════════════════════════════════════
   NEWS ARTICLE DETAIL PAGE  (news_article_detail.html)
════════════════════════════════════════════════════════════ */

/* Hero — default: dark gradient fallback */
.nad-hero {
  height: 420px;
  position: relative;
  background: linear-gradient(135deg, #1a0533 0%, #0d0d0d 100%);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

/* Hero with real image: overlay + image via CSS variable set in <style> */
.nad-hero--photo {
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(13, 13, 13, 1) 100%),
    var(--nad-hero-img);
  background-size: cover;
  background-position: center top;
}

.nad-hero-inner {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px 44px;
}

.nad-hero-title {
  font-size: 30px;
  font-weight: 800;
  color: #f0eeff;
  line-height: 1.25;
  margin: 0 0 10px;
}

.nad-hero-source {
  font-size: 13px;
  color: #8884aa;
  margin: 0;
  letter-spacing: 0.3px;
}

/* Content area */
.nad-content {
  background: #0d0d0d;
  padding-bottom: 64px;
}

.nad-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 40px 24px 0;
}

.nad-lead {
  font-size: 18px;
  color: var(--text-primary);
  line-height: 1.8;
  margin: 0 0 32px;
}

.nad-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 32px;
}

/* CTA card */
.nad-cta-card {
  background: var(--bg-card);
  border: 1px solid rgba(124, 58, 237, 0.4);
  border-radius: 14px;
  padding: 32px 28px;
  text-align: center;
  margin-bottom: 32px;
}

.nad-cta-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  color: #a855f7;
}

.nad-cta-heading {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px;
  line-height: 1.3;
}

.nad-cta-sub {
  font-size: 14px;
  color: #8884aa;
  line-height: 1.65;
  margin: 0 0 24px;
}

.nad-cta-btn {
  display: inline-block;
  background: #7c3aed;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 32px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.18s ease;
}
.nad-cta-btn:hover {
  background: #a855f7;
  color: #fff;
}

/* Back link */
.nad-back-link {
  display: block;
  font-size: 13px;
  color: #8884aa;
  text-decoration: none;
  margin-top: 32px;
  transition: color 0.18s ease;
}
.nad-back-link:hover {
  color: #a855f7;
}

/* Responsive */
@media (max-width: 760px) {
  .nad-hero { height: 300px; }
  .nad-hero-title { font-size: 22px; }
  .nad-cta-heading { font-size: 17px; }
}

/* ════════════════════════════════════════════════════════════
   SCROLL ANIMATIONS
════════════════════════════════════════════════════════════ */

.news-animate {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.news-animate.visible {
  opacity: 1;
  transform: translateY(0);
}
.news-animate.delay-1 { transition-delay: 0.1s; }
.news-animate.delay-2 { transition-delay: 0.2s; }
.news-animate.delay-3 { transition-delay: 0.3s; }
.news-animate.delay-4 { transition-delay: 0.4s; }

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */

/* Collapse sidebar below main on narrower screens */
@media (max-width: 1024px) {
  .news-layout {
    grid-template-columns: 1fr;
  }
  .news-sidebar {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .sidebar-card {
    margin-bottom: 0;
  }
}

/* Featured card: collapse to single column on mobile */
@media (max-width: 760px) {
  .featured-unified {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto auto;
  }
  .featured-label-row { grid-column: 1; grid-row: 1; }
  .featured-img-left  { grid-column: 1; grid-row: 2; min-height: 200px; }
  .featured-text-top  { grid-column: 1; grid-row: 3; padding: 20px 20px 16px; }
  .featured-text-bottom { grid-column: 1; grid-row: 4; padding: 0 20px 20px; border-top: none; }
  .featured-img-right { grid-column: 1; grid-row: 5; min-height: 200px; border-top: 1px solid rgba(255,255,255,0.05); }
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .news-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
  .news-article-wrap {
    padding: 20px 16px;
  }
  .news-article-title {
    font-size: 20px;
  }
}
