/* =========================================================
   NEWS HUB — shared demo styles (DP-3183)
   Ported from the demo-site.html design mockup and extended
   with real-player carousel / inline / feed-overlay support.

   Per-demo overrides live in each demo's styles/main.css.
========================================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Poppins', sans-serif;
  background: #f9fafb;
  color: #0a0a0a;
  min-height: 100vh;
}

/* ---- NAVIGATION ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 65px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 64px;
  z-index: 100;
}
.nav-logo {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #e7000b;
  letter-spacing: 0.07px;
  text-decoration: none;
  cursor: pointer;
}
.nav-links { display: flex; gap: 32px; }
.nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #364153;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  letter-spacing: -0.31px;
  text-decoration: none;
  transition: color 0.15s;
}
.nav-link.active { color: #e7000b; font-weight: 500; }
.nav-link:hover { color: #e7000b; }

/* Burger toggle — hidden on desktop, revealed at mobile widths */
.nav-toggle { display: none; }
.nav-burger { display: none; }

@media (max-width: 700px) {
  .nav { padding: 0 20px; }
  .nav-burger {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; margin-left: auto; cursor: pointer;
  }
  .nav-burger span {
    display: block; width: 24px; height: 2px; background: #0a0a0a; border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  .nav-links {
    position: absolute; top: 65px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 16px rgba(0,0,0,0.08);
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .nav-toggle:checked ~ .nav-links { max-height: 320px; }
  .nav-link { padding: 14px 20px; font-size: 16px; border-top: 1px solid #f0f0f0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---- PAGE WRAPPER ---- */
.page { padding-top: 65px; min-height: 100vh; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* =========================================
   HOME (Article - Protest) layout
========================================= */
.article-page { background: #fff; }
.article-layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px;
  display: grid;
  grid-template-columns: 1fr 346px;
  gap: 64px;
}

.article-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.breadcrumb-bold {
  font-weight: 700; font-size: 14px; letter-spacing: 0.35px;
  text-transform: uppercase; color: #030213;
}
.breadcrumb-sep { font-size: 12px; color: #717182; }
.breadcrumb-light { font-size: 14px; color: #717182; }
.live-badge {
  margin-left: auto; background: #e7000b; border-radius: 999px;
  padding: 4px 12px 4px 24px; font-size: 12px; font-weight: 600;
  letter-spacing: 0.3px; text-transform: uppercase; color: #fff;
  position: relative; display: flex; align-items: center; gap: 6px;
}
.live-dot {
  width: 8px; height: 8px; background: #fff; border-radius: 50%;
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.article-h1 {
  font-weight: 700; font-size: 46px; line-height: 1.2;
  letter-spacing: -1.2px; color: #0a0a0a; margin-bottom: 20px; max-width: 900px;
}
.article-lead {
  font-size: 20px; line-height: 1.625; color: #717182;
  margin-bottom: 20px; max-width: 680px;
}
.article-meta {
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid rgba(0,0,0,0.1); padding-top: 16px; margin-bottom: 32px;
}
.article-byline { font-weight: 600; font-size: 16px; color: #0a0a0a; margin-bottom: 4px; }
.article-date { font-size: 14px; color: #717182; display: flex; gap: 6px; }
.meta-actions { display: flex; gap: 8px; }
.meta-btn {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1); background: #fff;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.meta-btn svg { width: 16px; height: 16px; }

.article-section { border-top: 1px solid rgba(0,0,0,0.1); padding-top: 32px; margin-bottom: 48px; }
.section-h2 { font-size: 16px; font-weight: 400; color: #0a0a0a; margin-bottom: 24px; }
.body-text { font-size: 18px; line-height: 1.625; color: #0a0a0a; margin-bottom: 24px; }
.body-text-sm { font-size: 16px; line-height: 1.5; color: #0a0a0a; margin-bottom: 24px; }
.caption-text { font-size: 14px; font-style: italic; color: #717182; margin-bottom: 24px; }
.pullquote { border-left: 4px solid #030213; padding-left: 24px; margin-bottom: 24px; }
.pullquote p { font-size: 20px; font-style: italic; font-weight: 500; line-height: 1.4; color: #0a0a0a; }
.related-card { border-left: 4px solid #030213; padding: 4px 0 4px 20px; margin-bottom: 24px; }
.related-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.6px;
  text-transform: uppercase; color: #717182; margin-bottom: 4px;
}
.related-title { font-size: 18px; font-weight: 700; color: #0a0a0a; margin-bottom: 4px; }
.related-link {
  font-size: 14px; font-weight: 500; color: #030213;
  display: flex; align-items: center; gap: 4px; cursor: pointer;
}

/* Watch Next carousel */
.watch-next-header {
  display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 16px;
}
.watch-next-title { font-size: 24px; font-weight: 600; color: #3b4144; }
.watch-next-sub { font-size: 16px; color: #7d868d; }
.see-all-link {
  font-size: 16px; font-weight: 700; color: #28a0f9;
  text-decoration: underline; cursor: pointer;
}

.carousel { position: relative; }
.carousel-viewport {
  overflow-x: auto; scroll-behavior: smooth;
  -ms-overflow-style: none; scrollbar-width: none;
}
.carousel-viewport::-webkit-scrollbar { display: none; }
.thumbnails-container {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - 36px) / 4);
  gap: 12px;
}
@media (max-width: 900px) {
  .thumbnails-container { grid-auto-columns: calc((100% - 12px) / 2); }
}

.carousel-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid rgba(0,0,0,0.12);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5; transition: background 0.15s, opacity 0.15s;
}
.carousel-arrow:hover { background: #f3f4f6; }
.carousel-arrow svg { width: 22px; height: 22px; stroke: #0a0a0a; }
.carousel-arrow.prev { left: -22px; }
.carousel-arrow.next { right: -22px; }
.carousel-arrow[disabled] { opacity: 0.35; cursor: default; }

/* Thumbnail card (built by player.js) */
.thumbnail-item {
  position: relative; border-radius: 8px; overflow: hidden;
  aspect-ratio: 9/16; background: #111; cursor: pointer;
}
.thumbnail-item-image-wrapper, .thumbnail-item-image { width: 100%; height: 100%; }
.thumbnail-item-image { object-fit: cover; display: block; transition: transform 0.3s ease; }
.thumbnail-item:hover .thumbnail-item-image { transform: scale(1.05); }
.thumbnail-item-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.35); }
.thumbnail-item-bottom {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, #000, transparent); padding: 10px;
}
.thumbnail-item-title {
  font-size: 12px; font-weight: 700; color: #fff; line-height: 1.5; letter-spacing: 0.3px;
}
.thumbnail-item-play-overlay {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  opacity: 0; transition: opacity 0.2s ease;
}
.thumbnail-item:hover .thumbnail-item-play-overlay { opacity: 1; }
.thumbnail-item-play-inner {
  background: rgba(0,0,0,0.6); border-radius: 20px; padding: 5px 10px;
  display: flex; align-items: center; gap: 4px;
}
.thumbnail-item-play-text { font-size: 12px; font-weight: 600; color: #fff; }
.thumbnail-item-play-icon { width: 14px; height: 14px; fill: #fff; }

/* Sidebar */
.sidebar-newsletter {
  background: rgba(236,236,240,0.3); border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px; padding: 24px; margin-bottom: 32px;
}
.sidebar-newsletter h3 { font-size: 18px; font-weight: 700; color: #0a0a0a; margin-bottom: 8px; }
.sidebar-newsletter p {
  font-size: 14px; color: #717182; line-height: 1.43; margin-bottom: 16px; max-width: 280px;
}
.newsletter-input {
  width: 100%; height: 36px; border: none; border-radius: 8px; background: #fff;
  padding: 0 12px; font-size: 14px; color: #717182; margin-bottom: 8px;
  font-family: 'Poppins', sans-serif;
}
.newsletter-btn {
  width: 100%; height: 36px; border-radius: 8px; border: none; background: #030213;
  color: #fff; font-size: 14px; font-weight: 600; font-family: 'Poppins', sans-serif; cursor: pointer;
}
.newsletter-fine { font-size: 10px; color: #717182; text-align: center; margin-top: 8px; display: block; }
.trending-card {
  background: #fff; border: 1px solid rgba(0,0,0,0.1); border-radius: 10px;
  padding: 24px; box-shadow: 0 1px 1.5px rgba(0,0,0,0.1); margin-bottom: 32px;
}
.trending-header { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.trending-header h3 { font-size: 20px; font-weight: 700; color: #0a0a0a; }
.trending-item {
  display: flex; gap: 16px; padding: 12px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05); align-items: flex-start;
}
.trending-item:last-child { border-bottom: none; }
.trending-num {
  font-size: 30px; font-weight: 700; color: rgba(113,113,130,0.4); line-height: 1; min-width: 24px;
}
.trending-title { font-size: 14px; font-weight: 500; color: #0a0a0a; line-height: 1.43; }
.ad-placeholder {
  background: #ececf0; border: 1px solid rgba(0,0,0,0.1); border-radius: 10px;
  height: 250px; display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #717182;
}

/* =========================================
   SPORTS / GAMING article card layout
========================================= */
.sports-page, .gaming-page { background: #f9fafb; }
.sports-layout { max-width: 900px; margin: 0 auto; padding: 48px 32px; }
.article-card {
  background: #fff; border-radius: 10px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
  overflow: hidden; margin-bottom: 32px;
}
.article-card-hero { width: 100%; height: 384px; object-fit: cover; display: block; }
.article-card-body { padding: 32px; }
.category-tag-red, .category-tag-blue {
  display: inline-block; font-family: 'Inter', sans-serif; font-size: 14px; font-weight: 500;
  letter-spacing: -0.15px; border-radius: 999px; padding: 4px 12px; margin-bottom: 16px;
}
.category-tag-red { background: #ffe2e2; color: #e7000b; }
.category-tag-blue { background: #dbeafe; color: #155dfc; }
.article-card-h1 {
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 36px;
  line-height: 1.11; letter-spacing: 0.37px; color: #101828; margin-bottom: 16px;
}
.article-card-meta {
  display: flex; gap: 24px; align-items: center;
  border-bottom: 1px solid #e5e7eb; padding-bottom: 24px; margin-bottom: 24px;
}
.card-meta-item {
  display: flex; gap: 8px; align-items: center; font-family: 'Inter', sans-serif;
  font-size: 16px; color: #4a5565; letter-spacing: -0.31px;
}
.card-meta-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.article-card-lead {
  font-family: 'Inter', sans-serif; font-size: 20px; line-height: 1.4;
  color: #364153; letter-spacing: -0.45px; margin-bottom: 32px;
}
.article-card-h2 {
  font-family: 'Inter', sans-serif; font-weight: 700; font-size: 24px;
  line-height: 1.33; color: #101828; margin-bottom: 16px;
}
.article-card-p {
  font-family: 'Inter', sans-serif; font-size: 16px; line-height: 1.5;
  color: #364153; letter-spacing: -0.31px; margin-bottom: 24px;
}
.article-card-img { width: 100%; border-radius: 10px; margin: 24px 0; display: block; }

/* =========================================
   INLINE PLAYER SLOTS (real EX.CO player)
   The .inline-player-slot is the mount point; player.js
   injects the player div into it. The player renders its
   own chrome (top/bottom bars, Open feed) — no extra wrapper.
========================================= */
.inline-player-slot { margin: 32px 0; }

/* Vertical slot — portrait feed player, centered */
.inline-player-slot.vertical {
  position: relative; width: 100%; max-width: 360px; margin: 32px auto;
  aspect-ratio: 9/16; background: #111; border-radius: 8px; overflow: hidden;
}
/* Horizontal slot — landscape player, full width */
.inline-player-slot.horizontal {
  position: relative; width: 100%; aspect-ratio: 16/9; background: #111;
  border-radius: 8px; overflow: hidden;
}
.inline-player-slot > div { width: 100%; height: 100%; }
.inline-player-slot .slot-fallback {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: #888; font-size: 14px; text-align: center; padding: 16px;
}

/* =========================================
   FULLSCREEN FEED OVERLAY (carousel + feed page)
========================================= */
.player-container {
  display: flex; position: fixed; justify-content: center; align-items: center;
  background-color: rgba(50, 50, 50, 0.92);
  backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
  width: 100%; height: 100%; top: 0; left: 0; z-index: 1000;
}
.player-container.player-container-hidden { z-index: -1; opacity: 0; pointer-events: none; }

.player-close-button {
  position: absolute; top: 20px; right: 20px; width: 48px; height: 48px;
  background-color: transparent; border: none; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 1001;
  transition: all 0.2s ease;
}
.player-close-button:hover { background-color: rgba(255,255,255,0.2); transform: scale(1.1); }
.player-close-button:active { transform: scale(0.95); }
.player-close-button svg { width: 24px; height: 24px; stroke: currentColor; stroke-width: 2; }

/* =========================================
   FEED PAGE (page 4) — feed on load
========================================= */
.feed-page { background: #000; }
/* Feed fills the viewport below the (consistent) nav, opening immediately. */
.feed-page .player-container { top: 65px; height: calc(100% - 65px); }
.feed-loading {
  position: fixed; inset: 0; top: 65px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 16px;
  color: #cfcfcf; font-size: 16px; background: #000; z-index: 1;
}
.feed-spinner {
  width: 38px; height: 38px; border: 3px solid rgba(255,255,255,0.2);
  border-top-color: #e7000b; border-radius: 50%; animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .article-layout { grid-template-columns: 1fr; gap: 32px; }
  .sidebar { display: none; }
  .article-h1 { font-size: 30px; }
}
