/* =========================================
   NEWS ARTICLE PAGE (Show)
   Route: /news/<slug>
========================================= */

.news-article-page {
  min-height: 100vh;
  background: radial-gradient(
      circle at top,
      rgba(245, 158, 11, 0.12),
      transparent 55%
    ),
    radial-gradient(circle at bottom, rgba(37, 99, 235, 0.12), transparent 55%),
    #020617;
  color: #e5e7eb;
  padding-bottom: 3rem;
}

/* Shared inline dot separator (used in meta rows) */
.dot {
  display: inline-block;
  margin: 0 0.15rem;
  opacity: 0.7;
}

/* =========================================
   HERO / COVER HEADER
   - Uses backdrop image as full-bleed hero
========================================= */

.news-article-hero {
  position: relative;
  min-height: 340px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  margin-bottom: 1.25rem;
}

/* Hero background image
   - Recommended size: 1920 x 1080 (16:9)
   - Fills entire hero top area */
.news-article-backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  filter: brightness(0.35);
  transform: scale(1.05);
}

/* Dark overlay for improved text contrast */
.news-article-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.3),
    rgba(15, 23, 42, 0.9)
  );
}

/* Centered hero content container */
.news-article-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 1.7rem 1rem 2.2rem;
}

/* ---------- Breadcrumb ---------- */

.news-article-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  font-size: 0.75rem;
  margin-bottom: 0.75rem;
  color: #9ca3af;
}

.news-article-breadcrumb-link {
  color: #e5e7eb;
  text-decoration: none;
}

.news-article-breadcrumb-link:hover {
  text-decoration: underline;
}

.news-article-breadcrumb-separator {
  opacity: 0.6;
}

/* ---------- Category pill ---------- */

.news-article-kicker-row {
  margin-bottom: 0.35rem;
}

.news-article-category-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 500;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(96, 165, 250, 0.6);
  color: #bfdbfe;
}

/* ---------- Title & summary ---------- */

.news-article-header {
  margin-bottom: 0.75rem;
}

.news-article-title {
  margin: 0 0 0.4rem;
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.news-article-summary {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e5e7f0;
}

/* ---------- Meta row: author, date, actions ---------- */

.news-article-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 0.75rem;
}

/* Author block */

.news-article-author-block {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

/* Author avatar wrapper
   - Recommended image size: 64 x 64 (1:1) */
.news-article-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-article-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fallback initials circle */
.news-article-author-initials {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f5b200;
}

.news-article-author-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.news-article-author-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.news-article-author-role {
  font-size: 0.78rem;
  color: #9ca3af;
}

/* Meta details (date, reading time) */

.news-article-meta-details {
  font-size: 0.78rem;
  color: #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.news-article-meta-details .dot {
  opacity: 0.6;
}

/* Save / Share actions */

.news-article-meta-actions {
  display: flex;
  gap: 0.4rem;
}

.news-article-meta-btn {
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.95);
  color: #e5e7eb;
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

/* =========================================
   ARTICLE LAYOUT
   - Main article + sidebar
========================================= */

.news-article-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

/* Main content column */

.news-article-main {
  flex: 1 1 auto;
}

/* ---------- Cover image block ---------- */

.news-article-cover {
  margin: 0 0 1rem;
  border-radius: 1rem;
  overflow: hidden;
  background: #020617;
  border: 1px solid rgba(15, 23, 42, 0.9);
}

/* Cover image
   - Recommended size: 1920 x 1080 (16:9)
   - Constrained with max-height for readability */
.news-article-cover img {
  display: block;
  width: 100%;
  max-height: 420px;
  object-fit: cover;
}

.news-article-cover-caption {
  font-size: 0.75rem;
  color: #9ca3af;
  padding: 0.5rem 0.75rem 0.65rem;
  background: rgba(15, 23, 42, 0.98);
}

/* ---------- Article body ---------- */

.news-article-body {
  padding: 1rem 1rem 1.1rem;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 1rem;
  border: 1px solid rgba(31, 41, 55, 0.95);
}

.news-article-body p {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e5e7eb;
}

.news-article-body p:last-child {
  margin-bottom: 0;
}

/* ---------- Footer: tags + share ---------- */

.news-article-footer {
  padding: 0.9rem 1rem;
  margin-top: 0.75rem;
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.98);
  border: 1px solid rgba(31, 41, 55, 0.95);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Tags row */

.news-article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.news-article-tags-label {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-right: 0.25rem;
}

.news-article-tag-pill {
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.95);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
}

/* Share row */

.news-article-share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.news-article-share-label {
  font-size: 0.78rem;
  color: #9ca3af;
  margin-right: 0.25rem;
}

.news-article-share-btn {
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.95);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  cursor: pointer;
}

/* =========================================
   RELATED STORIES
   - Grid of related articles (16:9 images)
========================================= */

.news-related-section {
  margin-top: 1.1rem;
  padding: 1.1rem 1rem 1.2rem;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 1rem;
  border: 1px solid rgba(31, 41, 55, 0.95);
}

/* Section header reused from listing style */

.news-section-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 0.9rem;
}

.news-section-title {
  margin: 0;
  font-size: 1rem;
}

.news-section-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #9ca3af;
}

.news-section-link {
  font-size: 0.75rem;
  color: #fbbf24;
  text-decoration: none;
  font-weight: 500;
}

.news-section-link:hover {
  text-decoration: underline;
}

/* Grid wrapper */

.news-related-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

/* Related card */

.news-related-card {
  background: rgba(15, 23, 42, 0.98);
  border-radius: 0.9rem;
  overflow: hidden;
  border: 1px solid rgba(31, 41, 55, 0.95);
}

.news-related-thumb-link {
  display: block;
}

/* Thumbnail wrapper
   - Uses fixed height; image is 16:9 thumbnail
   - Recommended size: 640 x 360 */
.news-related-thumb {
  position: relative;
}

.news-related-thumb img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

/* Category badge on related thumbnail */

.news-related-category {
  position: absolute;
  left: 0.6rem;
  bottom: 0.5rem;
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  font-size: 0.7rem;
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  border: 1px solid rgba(148, 163, 184, 0.9);
}

/* Card body */

.news-related-body {
  padding: 0.6rem 0.75rem 0.8rem;
}

.news-related-title {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.3;
}

.news-related-title a {
  color: #f9fafb;
  text-decoration: none;
}

.news-related-title a:hover {
  text-decoration: underline;
}

/* =========================================
   SIDEBAR
   - Sections, latest headlines, CTA
========================================= */

.news-article-sidebar {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Generic sidebar section */

.news-article-sidebar-section {
  padding: 0.9rem 0.85rem 1rem;
  background: rgba(15, 23, 42, 0.98);
  border-radius: 1rem;
  border: 1px solid rgba(31, 41, 55, 0.95);
}

/* CTA section with gradient accent */

.news-article-sidebar-section--cta {
  background: radial-gradient(
      circle at top left,
      rgba(245, 158, 11, 0.18),
      transparent 55%
    ),
    rgba(15, 23, 42, 0.98);
}

/* Sidebar title (reused name from index page) */

.news-sidebar-title {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}

/* ---------- Sections pills ---------- */

.news-article-sections-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.news-article-section-pill {
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.95);
  background: rgba(15, 23, 42, 0.98);
  color: #e5e7eb;
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  text-decoration: none;
}

.news-article-section-pill.is-active {
  border-color: #f5b200;
  color: #fef3c7;
}

/* ---------- Latest headlines list ---------- */

.news-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.news-sidebar-latest-list {
  list-style: none;
  padding: 0;
  margin: 0.3rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.news-sidebar-latest-item {
  border-radius: 0.75rem;
}

.news-sidebar-latest-link {
  display: block;
  padding: 0.35rem 0.35rem;
  text-decoration: none;
}

.news-sidebar-latest-link:hover {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 0.75rem;
}

.news-sidebar-latest-title {
  display: block;
  font-size: 0.85rem;
  color: #f9fafb;
  margin-bottom: 0.1rem;
}

.news-sidebar-latest-meta {
  display: block;
  font-size: 0.72rem;
  color: #9ca3af;
}

/* ---------- CTA block ---------- */

.news-sidebar-text {
  font-size: 0.8rem;
  color: #e5e7eb;
  margin: 0 0 0.7rem;
}

/* "View plans" button */

.news-sidebar-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #f5b200, #f97316);
  color: #020617;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.news-sidebar-note {
  font-size: 0.72rem;
  color: #9ca3af;
  margin: 0;
}

/* =========================================
   RESPONSIVE BREAKPOINTS
========================================= */

@media (min-width: 640px) {
  /* Slightly more breathing room on larger screens */
  .news-article-hero-inner {
    padding-inline: 1.5rem;
  }

  .news-article-title {
    font-size: 2rem;
  }

  /* Meta row becomes horizontal */
  .news-article-meta-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .news-article-meta-details {
    justify-content: flex-start;
  }

  /* Related grid becomes 3 cards in a row */
  .news-related-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .news-article-hero {
    min-height: 420px;
  }

  .news-article-title {
    font-size: 2.4rem;
  }

  /* Two-column layout: main + sidebar */
  .news-article-layout {
    flex-direction: row;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .news-article-main {
    flex: 0 0 68%;
  }

  .news-article-sidebar {
    flex: 0 0 32%;
  }
}
