/* ==========================================================================
   7.2 — детальна сторінка статті (single.php)
   Типографіка тіла статті тут же: її бачить і редактор (add_editor_style).
   ========================================================================== */

.nd-article {
  --nd-art-card: #faf4e8;
  --nd-art-sand: #F2EADC;
  --nd-art-terra: #c57858;
  --nd-art-terra-d: #8e5740;
  --nd-art-ink: #2E2520;
  --nd-art-muted: #7C6F62;
  --nd-art-line: rgba(46, 37, 32, 0.12);

  max-width: 760px;
  margin: 0 auto;
  color: var(--nd-art-ink);
  -webkit-font-smoothing: antialiased;
}

.nd-article *,
.nd-article *::before,
.nd-article *::after { box-sizing: border-box; }

/* --------------------------------------------------------------------------
   Хлібні крихти
   -------------------------------------------------------------------------- */
.nd-article__crumbs { margin: 0 0 18px; }
.nd-article__crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--nd-art-muted);
}
.nd-article__crumb + .nd-article__crumb::before {
  content: "→";
  margin-right: 10px;
  opacity: 0.6;
}
.nd-article__crumbs a {
  color: var(--nd-art-muted);
  text-decoration: none;
}
.nd-article__crumbs a:hover { color: var(--nd-art-terra-d); }

/* --------------------------------------------------------------------------
   Категорія · дата · час читання
   -------------------------------------------------------------------------- */
.nd-article__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--nd-art-muted);
}
.nd-article__cat {
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(197, 120, 88, 0.14);
  color: var(--nd-art-terra-d);
  font-weight: 600;
  text-decoration: none;
}
.nd-article__cat:hover { background: rgba(197, 120, 88, 0.24); color: var(--nd-art-terra-d); }
.nd-article__read::before {
  content: "·";
  margin-right: 10px;
  opacity: 0.6;
}

.nd-article__title {
  margin: 0 0 22px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.2;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Головне зображення
   -------------------------------------------------------------------------- */
.nd-article__cover {
  margin: 0 0 26px;
}
.nd-article__cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
}
.nd-article__cover figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: var(--nd-art-muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   Лід
   -------------------------------------------------------------------------- */
.nd-article__lead,
.nd-lead {
  margin: 0 0 28px;
  padding: 22px 24px;
  background: var(--nd-art-card);
  border-left: 3px solid var(--nd-art-terra);
  border-radius: 0 14px 14px 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--nd-art-ink);
}
.nd-article__lead p { margin: 0 0 10px; font-size: inherit; line-height: inherit; color: inherit; }
.nd-article__lead p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Тіло статті
   -------------------------------------------------------------------------- */
.nd-article__body {
  font-size: 17px;
  line-height: 1.75;
}
.nd-article__body > *:first-child { margin-top: 0; }

.nd-article__body p {
  margin: 0 0 20px;
  font-size: inherit;
  line-height: inherit;
  color: var(--nd-art-ink);
}

.nd-article__body h2 {
  margin: 40px 0 14px;
  font-size: 28px;
  line-height: 1.25;
  font-weight: 700;
}
.nd-article__body h3 {
  margin: 30px 0 12px;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
}

.nd-article__body ul,
.nd-article__body ol {
  margin: 0 0 22px;
  padding-left: 22px;
}
.nd-article__body li { margin-bottom: 8px; }
.nd-article__body ul { list-style: none; padding-left: 4px; }
.nd-article__body ul > li {
  position: relative;
  padding-left: 26px;
}
.nd-article__body ul > li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nd-art-terra);
}
.nd-article__body .bullet-list ul > li::before {
  display: none;
}
.nd-article__body .bullet-list ul,
.nd-article__body .bullet-list ol {
  padding-left: 0px;
}
.nd-article__body .bullet-list ul li,
.nd-article__body .bullet-list ol li {
  padding-left: 0px;
}
.nd-article__body ol > li::marker {
  color: var(--nd-art-terra-d);
  font-weight: 700;
}

.nd-article__body a {
  color: var(--nd-art-terra-d);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.nd-article__body a:hover { color: var(--nd-art-terra); }

.nd-article__body img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}
.nd-article__body figure { margin: 26px 0; }
.nd-article__body figcaption {
  margin-top: 8px;
  font-size: 14px;
  color: var(--nd-art-muted);
  text-align: center;
}

.nd-article__body blockquote,
blockquote.nd-quote {
  margin: 28px 0;
  padding: 22px 26px;
  background: var(--nd-art-sand);
  border-radius: 16px;
  font-size: 19px;
  font-style: italic;
  line-height: 1.6;
}
.nd-article__body blockquote p:last-child { margin-bottom: 0; }
.nd-article__body blockquote cite {
  display: block;
  margin-top: 10px;
  font-size: 14px;
  font-style: normal;
  color: var(--nd-art-muted);
}

/* Виділений блок «Важливо» — формат у редакторі (div.nd-note). */
.nd-note {
  position: relative;
  margin: 28px 0;
  padding: 22px 24px 22px 60px;
  background: rgba(197, 120, 88, 0.10);
  border: 1px solid rgba(197, 120, 88, 0.28);
  border-radius: 16px;
  font-size: 16px;
  line-height: 1.65;
}
.nd-note::before {
  content: "!";
  position: absolute;
  left: 22px;
  top: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--nd-art-terra);
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
}
.nd-note p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Блок «Коротко»
   -------------------------------------------------------------------------- */
.nd-article__summary {
  margin: 40px 0 0;
  padding: 26px 28px;
  background: var(--nd-art-card);
  border: 1px solid var(--nd-art-line);
  border-radius: 18px;
}
.nd-article__summary-title {
  margin: 0 0 14px;
  font-size: 20px;
  font-weight: 700;
}
.nd-article__summary ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.nd-article__summary li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 30px;
  font-size: 16px;
  line-height: 1.6;
}
.nd-article__summary li:last-child { margin-bottom: 0; }
.nd-article__summary li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 6px;
  width: 14px;
  height: 8px;
  border-left: 2px solid var(--nd-art-terra);
  border-bottom: 2px solid var(--nd-art-terra);
  transform: rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Поширення
   -------------------------------------------------------------------------- */
.nd-article__share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--nd-art-line);
}
.nd-article__share-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nd-art-muted);
}
.nd-article__share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.nd-article__share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--nd-art-line);
  border-radius: 999px;
  background: transparent;
  color: var(--nd-art-ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.nd-article__share-btn svg { width: 18px; height: 18px; fill: currentColor; }
.nd-article__share-btn:hover,
.nd-article__share-btn:focus-visible {
  border-color: var(--nd-art-terra);
  color: var(--nd-art-terra-d);
}
.nd-article__share-btn--facebook:hover { color: #1877F2; border-color: #1877F2; }
.nd-article__share-btn--telegram:hover { color: #229ED9; border-color: #229ED9; }
.nd-article__share-btn--viber:hover { color: #7360F2; border-color: #7360F2; }
.nd-article__share-btn.is-copied {
  border-color: var(--nd-art-terra);
  background: var(--nd-art-terra);
  color: #ffffff;
}

/* --------------------------------------------------------------------------
   Схожі статті
   -------------------------------------------------------------------------- */
.nd-posts--related .nd-posts__title-main { font-size: clamp(24px, 3vw, 32px); }

/* --------------------------------------------------------------------------
   Адаптив
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
  .nd-article__lead,
  .nd-lead { padding: 18px 18px; font-size: 17px; }
  .nd-article__body { font-size: 16px; }
  .nd-article__body h2 { font-size: 24px; }
  .nd-article__body h3 { font-size: 20px; }
  .nd-note { padding: 18px 18px 18px 54px; }
  .nd-article__summary { padding: 22px 20px; }
  .nd-article__share-btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .nd-article__share-btn { transition: none; }
}
