/* Custom Editorial Stylesheet - AVANCRONICA ZILEI */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@700;800&family=Inter:wght@300;400;500;600;700;800&family=Merriweather:ital,wght@0,300;0,400;0,700;0,900;1,300;1,400;1,700&family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;0,6..72,700;1,6..72,400&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

:root {
  --font-editorial: 'Newsreader', 'Merriweather', Georgia, serif;
  --font-ui: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-masthead: 'Cinzel', serif;
  --color-primary: #991b1b;
  --color-primary-hover: #7f1d1d;
  --color-accent: #d97706;
}

body {
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-editorial {
  font-family: var(--font-editorial);
}

.font-masthead {
  font-family: var(--font-masthead);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}
.dark ::-webkit-scrollbar-track {
  background: #0f172a;
}
.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #dc2626, #b91c1c);
  z-index: 100;
  width: 0%;
  transition: width 0.1s ease-out;
}

/* Editorial Dropcap */
.dropcap::first-letter {
  font-family: var(--font-editorial);
  float: left;
  font-size: 3.8rem;
  line-height: 0.8;
  padding-top: 4px;
  padding-right: 12px;
  padding-bottom: 2px;
  color: #991b1b;
  font-weight: 700;
}
.dark .dropcap::first-letter {
  color: #f87171;
}

/* Newspaper Grid Borders */
.border-editorial-r {
  border-right: 1px solid #e2e8f0;
}
.dark .border-editorial-r {
  border-right: 1px solid #334155;
}
.border-editorial-b {
  border-bottom: 1px solid #e2e8f0;
}
.dark .border-editorial-b {
  border-bottom: 1px solid #334155;
}

/* Pull Quote Styling */
.pull-quote {
  position: relative;
  font-family: var(--font-editorial);
  font-style: italic;
  border-left: 4px solid #dc2626;
  padding: 1.25rem 1.75rem;
  margin: 2rem 0;
  background: #f8fafc;
  border-radius: 0 0.5rem 0.5rem 0;
}
.dark .pull-quote {
  background: #1e293b;
  border-left-color: #ef4444;
}

/* Ticker marquee animation */
@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

.ticker-wrap {
  overflow: hidden;
  white-space: nowrap;
}
.ticker-move {
  display: inline-block;
  white-space: nowrap;
  animation: ticker 40s linear infinite;
}
.ticker-move:hover {
  animation-play-state: paused;
}

/* Text Size Controller Classes for Reader */
.font-size-sm .article-body {
  font-size: 1rem;
  line-height: 1.75;
}
.font-size-md .article-body {
  font-size: 1.15rem;
  line-height: 1.85;
}
.font-size-lg .article-body {
  font-size: 1.3rem;
  line-height: 1.95;
}
.font-size-xl .article-body {
  font-size: 1.45rem;
  line-height: 2.05;
}

/* Font Family Reader Classes */
.font-serif-mode .article-body {
  font-family: var(--font-editorial) !important;
}
.font-sans-mode .article-body {
  font-family: var(--font-ui) !important;
}

/* Rich Article HTML content styling */
.article-body p {
  margin-bottom: 1.4rem;
}
.article-body h2 {
  font-family: var(--font-editorial);
  font-weight: 700;
  font-size: 1.65rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #0f172a;
}
.dark .article-body h2 {
  color: #f1f5f9;
}
.article-body h3 {
  font-weight: 600;
  font-size: 1.3rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}
.article-body ul {
  list-style-type: disc;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.article-body ol {
  list-style-type: decimal;
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.article-body li {
  margin-bottom: 0.5rem;
}
.article-body .lead {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.75;
  color: #334155;
  margin-bottom: 1.75rem;
}
.dark .article-body .lead {
  color: #cbd5e1;
}

/* Interview Q&A Highlight Box */
.interview-qa {
  border-left: 3px solid #b91c1c;
  padding-left: 1.25rem;
  margin: 1.75rem 0;
  background: rgba(185, 28, 28, 0.03);
  padding: 1rem 1.25rem;
  border-radius: 0.25rem;
}
.dark .interview-qa {
  background: rgba(239, 68, 68, 0.05);
  border-left-color: #ef4444;
}

/* Smooth transitions */
.transition-theme {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

/* Pulse animation for Breaking News */
@keyframes pulse-red {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
}
.animate-pulse-red {
  animation: pulse-red 1.5s infinite;
}

/* Print view optimization for Press & Broadsheet */
@media print {
  header, nav, footer, #reading-progress, .no-print, #tts-player-bar, .comments-section, aside, #search-modal, #toast-container, .theme-toggle-btn {
    display: none !important;
  }
  body {
    background: #ffffff !important;
    color: #111827 !important;
    font-size: 11pt;
    line-height: 1.6;
    padding: 0.5in !important;
  }
  .article-main-content {
    width: 100% !important;
    max-width: 100% !important;
  }
  .article-body {
    font-family: 'Newsreader', 'Merriweather', Georgia, serif !important;
    font-size: 11pt !important;
    line-height: 1.6 !important;
  }
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  h1, h2, h3 {
    page-break-after: avoid;
  }
  a {
    color: #111827 !important;
    text-decoration: none !important;
  }
}
