/* ============================================================
   News Detail Page — Premium Article Layout
   ============================================================ */

.nd-page {
  padding: 2rem 0 3rem;
}

/* ---- Article header ---- */
.nd-article-header {
  margin-bottom: 1.75rem;
}

.nd-breadcrumb {
  margin-bottom: 1rem;
}

.nd-breadcrumb .breadcrumb-item a {
  color: var(--ink-muted);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.nd-breadcrumb .breadcrumb-item a:hover {
  color: var(--brand-accent);
}

.nd-breadcrumb .breadcrumb-item.active {
  color: var(--ink-soft);
  font-size: 0.8125rem;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.nd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.nd-badge--category {
  background: var(--brand-primary);
  color: #fff;
}

.nd-badge--category:hover {
  color: #fff;
  opacity: 0.88;
}

.nd-badge--breaking {
  background: var(--brand-accent);
  color: #fff;
}

.nd-badge--trending {
  background: #f59e0b;
  color: #fff;
}

.nd-badge--type {
  background: var(--paper-warm);
  color: var(--brand-primary);
  border: 1px solid var(--line);
}

.nd-article-title {
  font-size: clamp(1.75rem, 4vw, 2.625rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.75rem;
}

.nd-article-subtitle {
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 500;
  margin: 0 0 1.25rem;
}

.nd-article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-muted);
}

.nd-article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.nd-article-meta i {
  color: var(--brand-primary);
  font-size: 0.9rem;
}

/* ---- Featured image ---- */
.nd-featured-media {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-lg);
}

.nd-featured-media img {
  width: 100%;
  /* aspect-ratio: 16 / 9; */
  /* object-fit: cover; */
  display: block;
}

.nd-featured-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2.5rem 1.25rem 1rem;
  background: linear-gradient(transparent, rgba(7, 31, 74, 0.75));
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.8125rem;
  font-style: italic;
}

/* ---- Article body ---- */
.nd-article-lead {
  font-size: 1.1875rem;
  line-height: 1.65;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.75rem;
  padding-left: 1rem;
  border-left: 4px solid var(--brand-accent);
}

.nd-article-body {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink-soft);
}

.nd-article-body p {
  margin-bottom: 1.35rem;
}

.nd-article-body h2,
.nd-article-body h3,
.nd-article-body h4 {
  color: var(--brand-primary);
  margin: 2rem 0 1rem;
  font-weight: 800;
}

.nd-article-body h2 { font-size: 1.5rem; }
.nd-article-body h3 { font-size: 1.25rem; }

.nd-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  margin: 1.5rem 0;
}

.nd-article-body blockquote {
  margin: 1.75rem 0;
  padding: 1.25rem 1.5rem;
  background: var(--paper-warm);
  border-left: 4px solid var(--brand-primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--ink);
}

.nd-article-body ul,
.nd-article-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.5rem;
}

.nd-article-body a {
  color: var(--brand-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.nd-article-body a:hover {
  color: var(--brand-accent-hover);
}

/* ---- Video embed ---- */
.nd-video-embed {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.75rem;
  aspect-ratio: 16 / 9;
  background: #000;
  box-shadow: var(--shadow);
}

.nd-video-embed iframe,
.nd-video-embed video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Share bar ---- */
.nd-share-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding: 1.25rem 0;
  border-top: 2px solid var(--line);
}

.nd-share-bar__label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  margin: 0;
}

.nd-share-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nd-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--bs-border-radius-pill);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nd-share-btn:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  background: var(--brand-accent-soft);
  transform: translateY(-1px);
}

.nd-share-btn--facebook:hover { border-color: #1877f2; color: #1877f2; background: #e7f0ff; }
.nd-share-btn--twitter:hover { border-color: #000; color: #000; background: #f0f0f0; }
.nd-share-btn--whatsapp:hover { border-color: #25d366; color: #25d366; background: #e8faf0; }

/* ---- Related stories (inline) ---- */
.nd-related-strip {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 2px solid var(--line);
}

.nd-related-strip h2 {
  font-size: 1.125rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-primary);
  margin-bottom: 1.25rem;
}

.nd-related-card {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: transform 0.2s ease;
}

.nd-related-card:last-child {
  border-bottom: none;
}

.nd-related-card:hover {
  transform: translateX(4px);
}

.nd-related-card img {
  width: 96px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

.nd-related-card__title {
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ink);
  margin: 0;
  transition: color 0.2s ease;
}

.nd-related-card:hover .nd-related-card__title {
  color: var(--brand-accent);
}

/* ---- Sticky sidebar (reuses cat-widget patterns) ---- */
.nd-sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1rem);
  align-self: flex-start;
}

.nd-sidebar-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.nd-sidebar-card__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1rem;
  background: var(--brand-primary);
  color: #fff;
}

.nd-sidebar-card__head--hot {
  background: linear-gradient(90deg, var(--brand-accent) 0%, var(--brand-accent-hover) 100%);
}

.nd-sidebar-card__head h3 {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0;
  color: #fff;
}

.nd-sidebar-card__body {
  padding: 1rem;
}

.nd-trending-list {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: nd-rank;
}

.nd-trending-list li {
  counter-increment: nd-rank;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.nd-trending-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.nd-trending-list li:first-child {
  padding-top: 0;
}

.nd-trending-list li::before {
  content: counter(nd-rank);
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.8125rem;
  color: #fff;
  background: var(--brand-accent);
  border-radius: 6px;
}

.nd-trending-list li:nth-child(1)::before {
  background: linear-gradient(135deg, #e21c24 0%, #bb1620 100%);
}

.nd-trending-list li:nth-child(2)::before {
  background: linear-gradient(135deg, #0b2d6e 0%, #1a4494 100%);
}

.nd-trending-list li:nth-child(3)::before {
  background: linear-gradient(135deg, #2d5aa8 0%, #1a4494 100%);
}

.nd-trending-list a {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--ink);
  text-decoration: none;
}

.nd-trending-list a:hover {
  color: var(--brand-accent);
}

.nd-ad-slot {
  background: var(--paper-warm);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  min-height: 250px;
}

@media (max-width: 991.98px) {
  .nd-sidebar {
    position: static;
    margin-top: 1.5rem;
  }
}

@media (max-width: 575.98px) {
  .nd-page {
    padding: 1.25rem 0 2rem;
  }

  .nd-share-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nd-related-card img {
    width: 80px;
    height: 60px;
  }
}
