/* ========================================
   NEWS VIEW (single article) - Dark Forest
   Matches news-page.css theme & tokens
   ======================================== */

/* ===== PAGE WRAPPER ===== */
.news-view-page {
  color: var(--color-text-primary);
  padding-bottom: var(--space-3xl);
}

.news-view-page .wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.news-view-page .page-top {
  padding-top: 140px;
}

/* ===== FRAME (glass container for the whole article) ===== */
.news-view-page .frame {
  background: var(--color-bg-glass);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

/* Subtle accent bar at the very top of the frame */
.news-view-page .frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-hero);
  z-index: 2;
}

/* ===== HERO IMAGE ===== */
.news-view-page .heroImg {
  position: relative;
  width: 100%;
  overflow: hidden;
  max-height: 420px;
}

.news-view-page .heroImg::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, transparent 0%, var(--color-bg-primary) 100%);
  pointer-events: none;
  opacity: 0.6;
}

.news-view-page .heroImg img {
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

/* ===== CONTENT AREA ===== */
.news-view-page .content {
  padding: var(--space-xl) var(--space-xl) var(--space-2xl);
}

/* ===== BREADCRUMBS ===== */
.news-view-page .breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  margin-bottom: var(--space-md);
}

.news-view-page .breadcrumbs a {
  color: var(--color-accent-primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: opacity 0.2s ease;
}

.news-view-page .breadcrumbs a:hover {
  opacity: 0.8;
}

.news-view-page .breadcrumbs .sep {
  color: var(--color-text-muted);
}

/* ===== META ROW ===== */
.news-view-page .meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
}

.news-view-page .meta .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  background: rgba(0, 230, 118, 0.08);
  border: 1px solid rgba(0, 230, 118, 0.15);
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--color-accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.news-view-page .meta .date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--color-text-tertiary);
}

/* ===== TITLE ===== */
.news-view-page h1 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 900;
  color: var(--color-text-primary);
  line-height: 1.25;
  margin-bottom: var(--space-sm);
}

/* ===== EXCERPT ===== */
.news-view-page .excerpt {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text-secondary);
  font-style: italic;
  border-left: 3px solid var(--color-accent-primary);
  padding-left: var(--space-md);
  margin-bottom: var(--space-md);
}

/* ===== DIVIDER ===== */
.news-view-page .divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  margin: var(--space-lg) 0;
}

/* ===== ARTICLE BODY ===== */
.news-view-page .article {
  font-size: 1.02rem;
  line-height: 1.9;
  color: var(--color-text-secondary);
  word-break: break-word;
  white-space: pre-wrap;
}

.news-view-page .article p {
  margin-bottom: 1.25em;
}

.news-view-page .article h2,
.news-view-page .article h3 {
  color: var(--color-text-primary);
  margin: 1.5em 0 0.6em;
}

.news-view-page .article a {
  color: var(--color-accent-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-view-page .article a:hover {
  opacity: 0.8;
}

.news-view-page .article img {
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: var(--space-md) 0;
}

.news-view-page .article blockquote {
  border-left: 3px solid var(--color-accent-primary);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
  background: rgba(0, 230, 118, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.news-view-page .article ul,
.news-view-page .article ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

.news-view-page .article li {
  margin-bottom: 0.5em;
}

.news-view-page .article code {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--color-accent-primary);
}

.news-view-page .article pre {
  background: var(--color-bg-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  overflow-x: auto;
  margin: var(--space-md) 0;
}

.news-view-page .article pre code {
  background: transparent;
  padding: 0;
}

/* ===== ACTIONS ROW ===== */
.news-view-page .actionsRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* Back button */
.news-view-page .actionsRow .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: transparent;
  color: var(--color-accent-primary);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 100px;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.news-view-page .actionsRow .btn:hover {
  background: var(--color-accent-primary);
  color: var(--color-bg-primary);
  border-color: var(--color-accent-primary);
}

/* Tool buttons (copy link, share) */
.news-view-page .tools {
  display: flex;
  gap: 10px;
  align-items: center;
}

.news-view-page .iconBtn {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--color-bg-glass);
  color: var(--color-text-secondary);
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.news-view-page .iconBtn:hover {
  border-color: rgba(0, 230, 118, 0.2);
  color: var(--color-accent-primary);
  background: rgba(0, 230, 118, 0.06);
}

/* ===== COPY HINT TOAST ===== */
.news-view-page .smallNote {
  margin-top: var(--space-sm);
  text-align: right;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-accent-primary);
  animation: fadeHint 0.3s ease;
}

@keyframes fadeHint {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .news-view-page .page-top {
    padding-top: 100px;
  }

  .news-view-page .heroImg {
    max-height: 240px;
  }

  .news-view-page .heroImg img {
    max-height: 240px;
  }

  .news-view-page .content {
    padding: var(--space-lg) var(--space-md) var(--space-xl);
  }

  .news-view-page .actionsRow {
    flex-direction: column;
    align-items: flex-start;
  }

  .news-view-page .tools {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .news-view-page h1 {
    font-size: 1.35rem;
  }

  .news-view-page .excerpt {
    font-size: 0.98rem;
  }

  .news-view-page .article {
    font-size: 0.95rem;
  }
}
