/* Custom Stylesheet for IndonesiaPos.co.id */

:root {
  --brand-red: #dc2626;
  --brand-red-dark: #b91c1c;
  --brand-navy: #0f172a;
  --brand-navy-light: #1e293b;
  --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Newsreader', 'Merriweather', Georgia, serif;
}

body {
  font-family: var(--font-heading);
  color: #1f2937;
  background-color: #f8fafc;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.scrollbar-none {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-none::-webkit-scrollbar {
  display: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Viva-Style Brand Red */
.text-brand-red { color: var(--brand-red) !important; }
.bg-brand-red { background-color: var(--brand-red) !important; }
.border-brand-red { border-color: var(--brand-red) !important; }

.bg-brand-navy { background-color: var(--brand-navy) !important; }
.text-brand-navy { color: var(--brand-navy) !important; }

/* Sticky Main Navigation */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 1020;
  box-shadow: 0 10px 25px -10px rgba(15, 23, 42, 0.28);
}

.nav-link-viva {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.625rem 0.78rem !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.nav-link-viva:hover,
.nav-link-viva.active {
  color: #fef08a !important;
  border-bottom: 3px solid #fef08a;
  background: rgba(255, 255, 255, 0.12);
}

/* Breaking Ticker */
.breaking-box {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}
.ticker-badge {
  background: var(--brand-red);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  white-space: nowrap;
}
.ticker-slide {
  overflow: hidden;
  white-space: nowrap;
}

/* Viva Headline Hero */
.hero-headline-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}
.hero-headline-card:hover {
  transform: translateY(-2px);
}
.hero-headline-card img {
  width: 100%;
  height: 440px;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.hero-headline-card:hover img {
  transform: scale(1.03);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0) 25%, rgba(15, 23, 42, 0.95) 90%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.75rem;
}

/* Sub-headline Grid */
.sub-headline-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  height: 210px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}
.sub-headline-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.sub-headline-card:hover img {
  transform: scale(1.05);
}
.sub-headline-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(15, 23, 42, 0.92) 90%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.85rem;
}

/* Viva Top 5 Numbers Badge */
.rank-badge {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1;
  color: #cbd5e1;
  min-width: 32px;
  text-align: center;
  font-style: italic;
  font-family: 'Arial Black', sans-serif;
  transition: color 0.2s ease;
}
.popular-item:hover .rank-badge {
  color: var(--brand-red);
}
.popular-item:nth-child(1) .rank-badge { color: var(--brand-red); }
.popular-item:nth-child(2) .rank-badge { color: #f97316; }
.popular-item:nth-child(3) .rank-badge { color: #eab308; }

/* Article Card News Feed */
.news-feed-card {
  background: #ffffff;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid #f1f5f9;
  transition: all 0.2s ease;
}
.news-feed-card:hover {
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transform: translateY(-1px);
}
.news-feed-thumb {
  width: 180px;
  height: 120px;
  border-radius: 0.4rem;
  object-fit: cover;
  flex-shrink: 0;
}

@media (max-width: 576px) {
  .news-feed-thumb {
    width: 110px;
    height: 85px;
  }
  .hero-headline-card img {
    height: 280px;
  }
}

/* Single Article Styling */
.article-title {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
}
@media (max-width: 768px) {
  .article-title {
    font-size: 1.65rem;
  }
}
.article-body {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.85;
  color: #334155;
}
.article-body p {
  margin-bottom: 1.5rem;
}
.article-body blockquote {
  border-left: 4px solid var(--brand-red);
  padding-left: 1.25rem;
  font-style: italic;
  color: #475569;
  margin: 1.5rem 0;
}

/* Share Buttons */
.btn-share {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #ffffff !important;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn-share:hover {
  transform: scale(1.1);
  opacity: 0.9;
}
.btn-share-wa { background-color: #25d366; }
.btn-share-fb { background-color: #1877f2; }
.btn-share-x { background-color: #000000; }
.btn-share-tg { background-color: #229ed9; }
.btn-share-copy { background-color: #64748b; }

/* Pulse animation for Breaking News */
@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
  animation: pulse-red 1.6s infinite;
  margin-right: 6px;
}

/* Category Badge Viva-Style */
.cat-badge {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 0.25rem;
  letter-spacing: 0.05em;
  color: #ffffff;
  display: inline-block;
}

/* Reading Progress Bar */
#readingProgressBar {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: var(--brand-red);
  width: 0%;
  z-index: 9999;
  transition: width 0.1s;
}
