/*--------------------------------------------------------------
# News Detail Page — layout & components
# Loaded after custom.css.  Same-specificity rules here win
# because this file is linked last in the <head>.
--------------------------------------------------------------*/

/* ── 1. Remove the 1200px cap custom.css puts on .blog-details ── */
.blog-details {
  max-width: none !important;
  margin-left:  0 !important;
  margin-right: 0 !important;
}



/* ═══════════════════════════════════════════════════════════════
   TWO-COLUMN LAYOUT  (article + sidebar)
═══════════════════════════════════════════════════════════════ */

.nd-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

.nd-main { min-width: 0; }

/* ═══════════════════════════════════════════════════════════════
   STICKY SIDEBAR
═══════════════════════════════════════════════════════════════ */

.nd-sidebar {
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--accent-color), transparent 65%) transparent;
}

.nd-sidebar::-webkit-scrollbar { width: 3px; }
.nd-sidebar::-webkit-scrollbar-track { background: transparent; }
.nd-sidebar::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent-color), transparent 65%);
  border-radius: 999px;
}

/* ── Shared widget shell ─────────────────────────────────────── */
.nd-widget {
  background: var(--surface-color);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05), 0 8px 28px rgba(0,0,0,0.06);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.nd-widget-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--accent-color), transparent 90%) 0%,
    var(--surface-color) 100%);
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.nd-widget-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  background: var(--accent-color);
  border-radius: 7px;
  color: #fff;
  font-size: 0.74rem;
  flex-shrink: 0;
}

.nd-widget-head h3 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--heading-color);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Related news items ──────────────────────────────────────── */
.nd-related-list { display: flex; flex-direction: column; }

.nd-related-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  text-decoration: none !important;
  border-bottom: 1px solid color-mix(in srgb, var(--default-color), transparent 93%);
  transition: background 0.2s ease;
}

.nd-related-item:last-child { border-bottom: none; }

.nd-related-item:hover {
  background: color-mix(in srgb, var(--accent-color), transparent 93%);
}

.nd-item-thumb {
  width: 72px;
  height: 56px;
  border-radius: 0.45rem;
  overflow: hidden;
  flex-shrink: 0;
}

.nd-item-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.nd-related-item:hover .nd-item-thumb img { transform: scale(1.08); }

.nd-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nd-item-date {
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-color);
  white-space: nowrap;
}

.nd-item-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--heading-color);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}

.nd-related-item:hover .nd-item-title { color: var(--accent-color); }

/* ── Share widget ────────────────────────────────────────────── */
.nd-share-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0.9rem;
}

.nd-share-btn {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
  text-decoration: none !important;
  background: color-mix(in srgb, var(--default-color), transparent 95%);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 87%);
  color: color-mix(in srgb, var(--default-color), transparent 15%);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.18s;
  white-space: nowrap;
  overflow: hidden;
}

.nd-share-btn i {
  font-size: 0.9rem;
  flex-shrink: 0;
}

.nd-btn-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Count badge — hidden until > 0 */
.nd-share-count {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 18px;
  padding: 0.1rem 0.38rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
  background: color-mix(in srgb, var(--accent-color), transparent 15%);
  color: #fff;
  transition: background 0.2s;
}

.nd-share-btn:hover .nd-share-count,
.nd-share-btn.copied .nd-share-count {
  background: rgba(255,255,255,0.28);
}

.nd-share-btn:hover { transform: translateY(-1px); }

.nd-share-btn.copy-link { font-family: inherit; }

/* Per-platform hover colours */
.nd-share-btn.facebook:hover  { background: #4267B2; color: #fff; border-color: #4267B2; }
.nd-share-btn.twitter:hover   { background: #111;    color: #fff; border-color: #111; }
.nd-share-btn.whatsapp:hover  { background: #25d366; color: #fff; border-color: #25d366; }
.nd-share-btn.linkedin:hover  { background: #0077B5; color: #fff; border-color: #0077B5; }
.nd-share-btn.email:hover     { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }
.nd-share-btn.copy-link:hover,
.nd-share-btn.copy-link.copied { background: #16a34a; color: #fff; border-color: #16a34a; }

/* ── Tags widget ─────────────────────────────────────────────── */
.nd-tags-body {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.9rem;
}

.nd-tag {
  display: inline-block;
  padding: 0.28rem 0.75rem;
  border-radius: 30px;
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  background: color-mix(in srgb, var(--accent-color), transparent 90%);
  color: var(--accent-color);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nd-tag:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* ═══════════════════════════════════════════════════════════════
   ARTICLE HEADER  — full column width, content centered
═══════════════════════════════════════════════════════════════ */

/* custom.css caps this at 800px — override so it spans the full column */
.blog-details .article-header {
  max-width: none !important;
  width: 100% !important;
  margin: 0 0 2.75rem !important;
  padding: 2.75rem 0 1.75rem !important;
  text-align: center !important;
}

.blog-details .article-header .title {
  font-size: clamp(1.75rem, 3.5vw, 3rem) !important;
  font-weight: 800 !important;
  line-height: 1.17 !important;
  letter-spacing: -0.025em !important;
  color: var(--heading-color) !important;
  margin: 0 auto 0.9rem !important;
  max-width: 820px;
  text-align: center;
}

/* Category badge */
.nd-kicker { margin-bottom: 1.25rem; }

.nd-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-color), transparent 88%);
  color: var(--accent-color);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  transition: background 0.22s, color 0.22s, border-color 0.22s;
}

.nd-category-badge i { font-size: 0.68rem; }

.nd-category-badge:hover {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
}

/* Decorative divider — line · dot · line */
.nd-title-accent {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  margin: 0 auto 1.5rem;
  width: fit-content;
}

.nd-title-accent::before,
.nd-title-accent::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  border-radius: 999px;
}

.nd-title-accent::before {
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--accent-color), transparent 72%), var(--accent-color));
}

.nd-title-accent::after {
  background: linear-gradient(90deg,
    var(--accent-color), color-mix(in srgb, var(--accent-color), transparent 72%));
}

.nd-title-accent-dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-color);
  flex-shrink: 0;
}

/* Meta chip row */
.nd-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.35rem;
}

.nd-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--default-color), transparent 18%);
  background: color-mix(in srgb, var(--default-color), transparent 94%);
  border: 1px solid color-mix(in srgb, var(--default-color), transparent 86%);
  white-space: nowrap;
}

.nd-meta-chip i { color: var(--accent-color); font-size: 0.78rem; flex-shrink: 0; }

/* Audio controls */
.blog-details .article-header .article-audio {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.25rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--default-color), transparent 90%);
}

.blog-details .article-header .audio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.48rem 1.2rem 0.48rem 0.9rem !important;
  border-radius: 999px !important;
  font-size: 0.84rem !important;
  font-weight: 600;
  background: color-mix(in srgb, var(--accent-color), transparent 91%) !important;
  color: var(--accent-color) !important;
  border: 1.5px solid color-mix(in srgb, var(--accent-color), transparent 68%) !important;
  cursor: pointer;
  transition: background 0.22s, color 0.22s, border-color 0.22s, box-shadow 0.22s;
}

.blog-details .article-header .audio-toggle i { font-size: 1rem; flex-shrink: 0; }

.blog-details .article-header .audio-toggle:hover,
.blog-details .article-header .audio-toggle[aria-pressed="true"] {
  background: var(--accent-color) !important;
  color: #fff !important;
  border-color: var(--accent-color) !important;
  box-shadow: 0 4px 18px color-mix(in srgb, var(--accent-color), transparent 65%);
}

.blog-details .article-header .audio-toggle[aria-pressed="true"] i {
  animation: nd-audio-pulse 1.4s ease-in-out infinite;
}

@keyframes nd-audio-pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.22); }
}

.blog-details .article-header .audio-stop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  padding: 0 !important;
  border-radius: 50% !important;
  font-size: 0.9rem;
  background: color-mix(in srgb, #ef4444, transparent 88%) !important;
  color: #ef4444 !important;
  border: 1.5px solid color-mix(in srgb, #ef4444, transparent 68%) !important;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.blog-details .article-header .audio-stop:hover {
  background: #ef4444 !important;
  color: #fff !important;
  border-color: #ef4444 !important;
}

/* ═══════════════════════════════════════════════════════════════
   FEATURED IMAGE
═══════════════════════════════════════════════════════════════ */

/* custom.css sets height:500px and margin:0 -2rem — override both */
.blog-details .article-featured-image {
  margin: 0 0 3rem !important;
  height: auto !important;
  aspect-ratio: 16 / 7;
  border-radius: 1rem !important;
  overflow: hidden;
  box-shadow:
    0 2px 8px  color-mix(in srgb, var(--default-color), transparent 92%),
    0 10px 32px color-mix(in srgb, var(--accent-color),  transparent 90%),
    0 28px 64px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.4s ease;
}

.blog-details .article-featured-image:hover {
  box-shadow:
    0 4px 12px  color-mix(in srgb, var(--default-color), transparent 89%),
    0 16px 48px color-mix(in srgb, var(--accent-color),  transparent 82%),
    0 40px 80px rgba(0, 0, 0, 0.13);
}

.blog-details .article-featured-image img {
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  display: block;
  border-radius: 1rem;
  transition: transform 0.6s ease;
}

.blog-details .article-featured-image:hover img { transform: scale(1.03); }

/* ═══════════════════════════════════════════════════════════════
   ARTICLE BODY
═══════════════════════════════════════════════════════════════ */

.blog-details .article-wrapper { display: block !important; }

.nd-article-body {
  font-size: 1.06rem;
  line-height: 1.88;
  color: color-mix(in srgb, var(--default-color), transparent 6%);
}

.nd-article-body .lead p:first-child,
.nd-article-body .lead .rich-text p:first-child {
  font-size: 1.12rem;
  line-height: 1.82;
  color: color-mix(in srgb, var(--heading-color), transparent 14%);
}

.nd-article-body p { margin-bottom: 1.45rem; }

.nd-article-body h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-top: 2.5rem;
  margin-bottom: 0.95rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid color-mix(in srgb, var(--accent-color), transparent 80%);
  line-height: 1.25;
}

.nd-article-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.nd-article-body h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading-color);
  margin-top: 1.6rem;
  margin-bottom: 0.55rem;
}

.nd-article-body a {
  color: var(--accent-color);
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--accent-color), transparent 55%);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s;
}

.nd-article-body a:hover { text-decoration-color: var(--accent-color); }

.nd-article-body blockquote {
  position: relative;
  margin: 2rem 0;
  padding: 1.25rem 1.4rem 1.25rem 1.85rem;
  border-left: 4px solid var(--accent-color);
  background: color-mix(in srgb, var(--accent-color), transparent 93%);
  border-radius: 0 0.75rem 0.75rem 0;
  font-style: italic;
  font-size: 1.03rem;
  color: var(--heading-color);
  line-height: 1.7;
}

.nd-article-body blockquote::before {
  content: '\201C';
  position: absolute;
  top: -0.3rem; left: 0.8rem;
  font-size: 3.2rem;
  color: color-mix(in srgb, var(--accent-color), transparent 58%);
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

.nd-article-body ul,
.nd-article-body ol   { padding-left: 1.5rem; margin-bottom: 1.45rem; }
.nd-article-body li   { margin-bottom: 0.5rem; }
.nd-article-body ul li::marker { color: var(--accent-color); }

.nd-article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px color-mix(in srgb, var(--default-color), transparent 87%);
  margin: 1.4rem 0;
}

.nd-article-body hr {
  border: none;
  height: 1px;
  background: color-mix(in srgb, var(--default-color), transparent 88%);
  margin: 2.25rem 0;
}

/* ═══════════════════════════════════════════════════════════════
   GALLERY SECTION
═══════════════════════════════════════════════════════════════ */

#gallery { scroll-margin-top: 140px; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */

/* Medium desktop: tighten sidebar */
@media (max-width: 1199.98px) {
  .nd-layout { grid-template-columns: 1fr 265px; gap: 2rem; }
}

/* Tablet: collapse to single column */
@media (max-width: 991.98px) {
  .nd-layout { grid-template-columns: 1fr; }

  .nd-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  /* Each widget fills roughly half-width on tablet */
  .nd-sidebar .nd-widget { flex: 1 1 280px; }

  /* Related items: 2-column grid on tablet */
  .nd-related-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .nd-related-item {
    border-right: 1px solid color-mix(in srgb, var(--default-color), transparent 93%);
  }

  .nd-related-item:nth-child(2n)   { border-right: none; }
  .nd-related-item:nth-last-child(1):nth-child(odd),
  .nd-related-item:nth-last-child(2) { border-bottom: none; }

  .blog-details .article-header .title { font-size: clamp(1.65rem, 5vw, 2.5rem) !important; }
  .blog-details .article-featured-image { aspect-ratio: 16 / 7; }
}

/* Mobile: full-width stacked */
@media (max-width: 767.98px) {
  .nd-sidebar { flex-direction: column; }
  .nd-sidebar .nd-widget { flex: none; width: 100%; }

  .nd-related-list { grid-template-columns: 1fr; }
  .nd-related-item { border-right: none; }

  .nd-share-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Small phone */
@media (max-width: 575.98px) {
  .blog-details .article-header { padding: 1.5rem 0 1rem !important; margin-bottom: 1.75rem !important; }
  .blog-details .article-header .title { font-size: clamp(1.4rem, 7vw, 1.9rem) !important; }
  .blog-details .article-featured-image { aspect-ratio: 4 / 3; border-radius: 0.75rem !important; margin-bottom: 2rem !important; }
  .nd-article-body { font-size: 1rem; }
  .nd-share-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #nd-progress,
  .blog-details .article-featured-image,
  .blog-details .article-featured-image img,
  .nd-item-thumb img,
  .nd-share-btn,
  .nd-category-badge,
  .nd-related-item,
  .nd-tag { transition: none !important; }
  .blog-details .article-header .audio-toggle[aria-pressed="true"] i { animation: none; }
}
