/* News Detail Modern Styles */

.news-detail-hero {
  position: relative;
  display: block;
  width: 100%;
  min-height: 46vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.news-detail-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.35) 35%, rgba(0,0,0,0.25) 60%, rgba(0,0,0,0.15) 100%);
}

.news-detail-hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 46vh;
  padding-top: 3rem;
  padding-bottom: 3.5rem;
}

.news-detail-crumbs {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.crumb-link {
  color: #e6f1e6;
  text-decoration: none;
  font-weight: 500;
}
.crumb-link:hover { text-decoration: underline; }

.dot-sep {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  display: inline-block;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(184, 207, 167, 0.25);
  color: #fff;
  font-size: 0.85rem;
}

.date { color: rgba(255,255,255,0.9); font-size: 0.95rem; }

.news-detail-title {
  color: #fff;
  font-family: 'Times New Roman', Times, serif;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.2;
  font-size: clamp(2rem, 4vw, 3.25rem);
  text-shadow: 0 2px 18px rgba(0,0,0,0.25);
  padding: 0.5rem 0.75rem;
}

.reader-toolbar-wrap {
  position: sticky;
  top: 64px;
  z-index: 5;
  background: linear-gradient(180deg, rgba(250,250,249,0.9) 0%, rgba(250,250,249,0.6) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(107, 142, 91, 0.12);
  padding-left: 16px;
  padding-right: 16px;
}

body.dark-mode .reader-toolbar-wrap {
  background: linear-gradient(180deg, rgba(10,14,26,0.9) 0%, rgba(10,14,26,0.6) 100%);
  border-bottom-color: rgba(99,102,241,0.18);
}

.reader-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.divider {
  width: 1px;
  height: 28px;
  background: rgba(107, 142, 91, 0.25);
}
body.dark-mode .divider { background: rgba(99,102,241,0.35); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 600;
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease; 
}

.btn-pill {
  min-width: 40px;
  height: 40px;
  padding: 0 0.9rem;
  color: #fff;
  border-radius: 999px;
  background: linear-gradient(135deg, #6b8e5b 0%, #5a7a4a 100%);
  box-shadow: 0 6px 16px rgba(107,142,91,0.28);
}
.btn-pill:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(107,142,91,0.32); }
.btn-pill:active { transform: translateY(0); }

.btn-ghost {
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  color: #5a7a4a;
  background: rgba(90,122,74,0.08);
}
.btn-ghost:hover { background: rgba(90,122,74,0.15); }
body.dark-mode .btn-ghost { color: #a5b4fc; background: rgba(99,102,241,0.08); }
body.dark-mode .btn-ghost:hover { background: rgba(99,102,241,0.14); }

.muted { color: #6b8e5b; opacity: 0.85; }
body.dark-mode .muted { color: #a5b4fc; }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 130px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #2c3e4e 0%, #456783 100%);
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #2c3e4e;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.range::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 2px solid #2c3e4e;
}

.range-value { font-weight: 700; color: #2c3e50; min-width: 48px; text-align: right; }
body.dark-mode .range-value { color: #e0e0e0; }

.select {
  min-width: 220px;
  max-width: min(50vw, 420px);
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(107, 142, 91, 0.25);
  background: #fff;
  color: #2d3e2d;
}
body.dark-mode .select { background: #1f2937; color: #e5e7eb; border-color: rgba(99,102,241,0.25); }

.voice-settings {
  position: relative;
}
.voice-settings > summary {
  list-style: none;
}
.voice-settings[open] { /* no-op placeholder to avoid empty ruleset warning */ opacity: 1; }
.voice-settings > select {
  margin-left: 0.5rem;
}

.news-detail { padding: 2rem 0 4rem; }

.news-detail-content {
  max-width: 840px;
  margin: 0 auto;
  color: #2c3e50;
  font-size: 1.06rem;
  line-height: 1.8;
}
.news-detail-content h2, .news-detail-content h3, .news-detail-content h4 { color: #2c3e2d; }
.news-detail-content p + p { margin-top: 1rem; }
.news-detail-content img { max-width: 100%; height: auto; border-radius: 12px; }

/* Spoken word highlight */
.highlight {
  background-color: #ffeb3b;
  padding: 0 .15em;
  border-radius: 4px;
  animation: fadeHighlight 1s ease-in-out;
}

@keyframes fadeHighlight {
  0% { background-color: #ffeb3b; }
  100% { background-color: transparent; }
}

/* Utilities */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .reader-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-group { justify-content: center; flex-wrap: wrap; }
  .range { width: 110px; }
}

