/* =========================================================
   NEWS / BERITA GAME — Light "Sky Blue" Theme
   Ganti dari tema gelap glassmorphism ke tema TERANG (putih +
   gradient biru langit + awan) sesuai referensi desain kompetitor.
   Nama class (.news-*) sengaja DIPERTAHANKAN supaya blade file
   yang sudah pakai class ini tidak perlu diubah strukturnya.
   ========================================================= */

.news-scope {
  --news-bg-deep: #eaf6ff;
  --news-bg-deep-2: #dbeeff;
  --news-glass-bg: #ffffff;
  --news-glass-bg-strong: #ffffff;
  --news-glass-border: #e2e8f0;
  --news-accent-cyan: #0EA5E9;
  --news-accent-purple: #2563EB;
  --news-text-main: #1e293b;
  --news-text-dim: #64748b;
  color-scheme: light;
  background: var(--news-bg-deep);
  color: var(--news-text-main);
  position: relative;
  isolation: isolate;
  overflow-x: clip;
}

/* ---------- Background gradien biru langit + "awan" ---------- */
.news-scope::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(38vw 38vw at 8% 6%, rgba(255, 255, 255, 0.9), transparent 60%),
    radial-gradient(30vw 30vw at 85% 18%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(45vw 45vw at 50% 100%, rgba(255, 255, 255, 0.6), transparent 60%),
    linear-gradient(180deg, var(--news-bg-deep-2) 0%, var(--news-bg-deep) 45%, #f4fbff 100%);
}

.news-scope a { color: inherit; text-decoration: none; }

/* ---------- Kartu Putih (dulu "glass") ---------- */
.news-glass {
  background: var(--news-glass-bg);
  border: 1px solid var(--news-glass-border);
  border-radius: 20px;
  box-shadow: 0 8px 24px -12px rgba(14, 165, 233, 0.18);
}

.news-glass-strong {
  background: var(--news-glass-bg-strong);
  border: 1px solid var(--news-glass-border);
  border-radius: 20px;
  box-shadow: 0 12px 30px -14px rgba(37, 99, 235, 0.22);
}

/* ---------- Badge Kategori / Trending ---------- */
.news-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--news-accent-cyan), var(--news-accent-purple));
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.news-badge-glow {
  animation: news-pulse-glow 2.4s ease-in-out infinite;
}

@keyframes news-pulse-glow {
  0%, 100% { box-shadow: 0 4px 14px rgba(14, 165, 233, 0.30); }
  50% { box-shadow: 0 4px 20px rgba(37, 99, 235, 0.55); }
}

.news-badge-outline {
  background: #eef6ff;
  border: 1px solid #dbeafe;
  color: var(--news-accent-purple);
  box-shadow: none;
}

/* ---------- Category Quick-Filter Tabs ---------- */
.news-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.news-tabs::-webkit-scrollbar { display: none; }

.news-tab {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--news-text-dim);
  background: #fff;
  border: 1px solid var(--news-glass-border);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.news-tab:hover {
  color: var(--news-accent-purple);
  border-color: rgba(14, 165, 233, 0.4);
}

.news-tab.is-active {
  color: #fff;
  background: linear-gradient(90deg, var(--news-accent-cyan), var(--news-accent-purple));
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}

/* ---------- Hero / Trending Carousel ---------- */
.news-hero-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 6px;
}
.news-hero-track::-webkit-scrollbar { display: none; }

.news-hero-card {
  position: relative;
  scroll-snap-align: start;
  flex: 0 0 100%;
  min-height: 320px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
  box-shadow: 0 14px 34px -16px rgba(37, 99, 235, 0.35);
}

@media (min-width: 768px) {
  .news-hero-card { flex: 0 0 calc(60% - 10px); min-height: 380px; }
}

.news-hero-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 0.6s ease;
}
.news-hero-card:hover img { transform: scale(1.06); }

.news-hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.05) 0%, rgba(15, 23, 42, 0.85) 85%);
}

.news-hero-content { padding: 24px; position: relative; z-index: 1; }

/* ---------- Responsive Card Grid ---------- */
.news-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.news-card:hover {
  transform: translateY(-6px);
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 18px 40px -14px rgba(14, 165, 233, 0.30);
}

.news-card .news-card-thumb {
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.news-card .news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.news-card:hover .news-card-thumb img { transform: scale(1.08); }

.news-card-title {
  font-weight: 700;
  line-height: 1.4;
  color: #0f172a;
  transition: color 0.2s ease;
}

.news-card:hover .news-card-title { color: var(--news-accent-cyan); }

/* ---------- Ad Slot ---------- */
.news-ad-slot {
  border-radius: 18px;
  border: 1px dashed #bfdbfe;
  background: #f0f9ff;
  padding: 12px;
  text-align: center;
}

.news-ad-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.news-ad-sticky {
  position: sticky;
  top: 88px;
}

/* ---------- Sidebar Widgets ---------- */
.news-widget-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0f172a;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.news-widget-title::before {
  content: "";
  width: 4px;
  height: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--news-accent-cyan), var(--news-accent-purple));
}

.news-popular-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-bottom: 1px solid var(--news-glass-border);
}
.news-popular-item:last-child { border-bottom: none; }

.news-popular-rank {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 22px;
  background: linear-gradient(180deg, var(--news-accent-cyan), var(--news-accent-purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  min-width: 26px;
}

/* ---------- Article Detail (show.blade.php) ---------- */
.news-article-content {
  color: #334155;
  line-height: 1.85;
  font-size: 16px;
}
.news-article-content h2 { font-size: 22px; font-weight: 800; color: #0f172a; margin: 32px 0 14px; scroll-margin-top: 100px; }
.news-article-content h3 { font-size: 19px; font-weight: 700; color: #0f172a; margin: 26px 0 12px; scroll-margin-top: 100px; }
.news-article-content h4 { font-size: 16px; font-weight: 700; color: #1e293b; margin: 20px 0 10px; scroll-margin-top: 100px; }
.news-article-content p { margin-bottom: 16px; }
.news-article-content a { color: var(--news-accent-purple); text-decoration: underline; text-underline-offset: 2px; font-weight: 600; }
.news-article-content strong a, .news-article-content li strong { color: var(--news-accent-purple); }
.news-article-content img { border-radius: 16px; margin: 20px 0; max-width: 100%; height: auto; }
.news-article-content ul, .news-article-content ol { margin: 0 0 16px 22px; }
.news-article-content li { margin-bottom: 6px; }
.news-article-content p em,
.news-article-content p i {
  color: #94a3b8;
  font-size: 13px;
}
  border-left: 3px solid var(--news-accent-cyan);
  background: #f0f9ff;
  padding: 14px 18px;
  border-radius: 0 12px 12px 0;
  margin: 20px 0;
  font-style: italic;
  color: #334155;
}
.news-article-content table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
.news-article-content th, .news-article-content td { border: 1px solid var(--news-glass-border); padding: 10px 12px; text-align: left; }
.news-article-content th { background: #f0f9ff; color: #0f172a; }

/* Caption "Sumber: ..." di bawah gambar/video (italic, abu-abu kecil) */
.news-source-caption {
  font-size: 11px;
  font-style: italic;
  color: #94a3b8;
  margin-top: -4px;
  margin-bottom: 28px;
}

/* Embed video (YouTube dll dari CKEditor MediaEmbed) — full width responsive 16:9 */
.news-article-content .media-embed,
.news-article-content figure.media {
  margin: 20px 0;
  border-radius: 16px;
  overflow: hidden;
}
.news-article-content .media-embed iframe,
.news-article-content figure.media iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  border-radius: 16px;
  border: 0;
}

/* ---------- Floating Table of Contents ---------- */
.news-toc-link {
  display: block;
  padding: 7px 0;
  font-size: 13px;
  color: var(--news-text-dim);
  border-left: 2px solid transparent;
  padding-left: 12px;
  transition: all 0.2s ease;
}
.news-toc-link:hover, .news-toc-link.is-active {
  color: var(--news-accent-cyan);
  border-left-color: var(--news-accent-cyan);
}

/* ---------- Sticky CTA Topup ---------- */
.news-cta-topup {
  border-radius: 22px;
  padding: 28px;
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(14, 165, 233, 0.14), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, rgba(37, 99, 235, 0.14), transparent 60%),
    var(--news-glass-bg-strong);
  border: 1px solid rgba(14, 165, 233, 0.25);
  position: relative;
  overflow: hidden;
}

.news-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(90deg, var(--news-accent-cyan), var(--news-accent-purple));
  box-shadow: 0 8px 24px -8px rgba(14, 165, 233, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.news-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -8px rgba(37, 99, 235, 0.5); }

/* ---------- Bagikan Artikel (Share buttons) ---------- */
.news-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1;
  padding: 10px 0;
  border-radius: 12px;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid var(--news-glass-border);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.news-share-btn:hover { transform: translateY(-2px); }
.news-share-btn.is-whatsapp { background: #e9fbef; color: #16a34a; border-color: #bbf7d0; }
.news-share-btn.is-facebook { background: #eaf1ff; color: #2563eb; border-color: #bfdbfe; }
.news-share-btn.is-x { background: #f1f5f9; color: #0f172a; border-color: #e2e8f0; }
.news-share-btn.is-copy { background: #f0f9ff; color: #0284c7; border-color: #bae6fd; }

/* ---------- Misc ---------- */
.news-divider { border-color: var(--news-glass-border); }
.news-input {
  background: #fff;
  border: 1px solid var(--news-glass-border);
  border-radius: 14px;
  color: #0f172a;
  padding: 10px 16px;
  font-size: 14px;
}
.news-input::placeholder { color: var(--news-text-dim); }
.news-input:focus { outline: none; border-color: rgba(14, 165, 233, 0.5); box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15); }

/* ============================================================
   THEME INTEGRATION V9 — NEWS
   The news page previously hard-coded a light palette, so dark mode
   changed the text via global rules while the background stayed light.
   ============================================================ */
body[data-surface="terang"] .news-scope{
  --news-bg-deep:#EAF6FF;
  --news-bg-deep-2:#DBEEFF;
  --news-glass-bg:#FFFFFF;
  --news-glass-bg-strong:#FFFFFF;
  --news-glass-border:#E2E8F0;
  --news-accent-cyan:var(--gold);
  --news-accent-purple:var(--gold-2);
  --news-text-main:#1E293B;
  --news-text-dim:#64748B;
  color-scheme:light;
}
body[data-surface="gelap"] .news-scope{
  --news-bg-deep:#0B1220;
  --news-bg-deep-2:#111827;
  --news-glass-bg:#111827;
  --news-glass-bg-strong:#162033;
  --news-glass-border:#334155;
  --news-accent-cyan:var(--gold);
  --news-accent-purple:var(--gold-2);
  --news-text-main:#F8FAFC;
  --news-text-dim:#CBD5E1;
  color-scheme:dark;
  background:var(--news-bg-deep)!important;
  color:var(--news-text-main)!important;
}
body[data-surface="gelap"] .news-scope::before{
  background:
    radial-gradient(38vw 38vw at 8% 6%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(30vw 30vw at 85% 18%, rgba(14,165,233,.08), transparent 60%),
    linear-gradient(180deg,#111827 0%,#0B1220 55%,#0F172A 100%);
}
body[data-surface="gelap"] .news-scope .news-glass,
body[data-surface="gelap"] .news-scope .news-glass-strong{
  background:var(--news-glass-bg)!important;
  border-color:var(--news-glass-border)!important;
  color:var(--news-text-main)!important;
}
body[data-surface="gelap"] .news-scope .news-tab{
  background:#1E293B!important;
  color:#CBD5E1!important;
  border-color:#334155!important;
}
body[data-surface="gelap"] .news-scope .news-tab.is-active{
  background:linear-gradient(90deg,var(--gold),var(--gold-2))!important;
  color:#fff!important;
  border-color:transparent!important;
}
body[data-surface="gelap"] .news-scope .news-input{
  background:#1E293B!important;
  color:#F8FAFC!important;
  border-color:#334155!important;
}
body[data-surface="gelap"] .news-scope .news-input::placeholder{color:#94A3B8!important;}
body[data-surface="gelap"] .news-scope .news-card-title,
body[data-surface="gelap"] .news-scope .news-widget-title,
body[data-surface="gelap"] .news-scope .news-article-content h2,
body[data-surface="gelap"] .news-scope .news-article-content h3,
body[data-surface="gelap"] .news-scope .news-article-content h4{
  color:#F8FAFC!important;
}
body[data-surface="gelap"] .news-scope .news-article-content,
body[data-surface="gelap"] .news-scope .news-article-content p,
body[data-surface="gelap"] .news-scope .news-article-content li{
  color:#CBD5E1!important;
}
body[data-surface="gelap"] .news-scope .news-article-content th{
  background:#1E293B!important;
  color:#F8FAFC!important;
}
body[data-surface="gelap"] .news-scope .news-article-content td{
  border-color:#334155!important;
}
body[data-surface="gelap"] .news-scope .news-ad-slot{
  background:#111827!important;
  border-color:#334155!important;
}
body[data-surface="gelap"] .news-scope .news-ad-label{color:#94A3B8!important;}
body[data-surface="gelap"] .news-scope .news-cta-topup{
  background:#162033!important;
  border-color:#334155!important;
}
body[data-surface="gelap"] .news-scope .news-share-btn.is-whatsapp{background:#123323!important;color:#6EE7B7!important;border-color:#24543A!important;}
body[data-surface="gelap"] .news-scope .news-share-btn.is-facebook{background:#172B4D!important;color:#93C5FD!important;border-color:#315A8F!important;}
body[data-surface="gelap"] .news-scope .news-share-btn.is-x{background:#1E293B!important;color:#F8FAFC!important;border-color:#334155!important;}
body[data-surface="gelap"] .news-scope .news-share-btn.is-copy{background:#102B3A!important;color:#67E8F9!important;border-color:#1F536A!important;}
