/*
Theme Name: Neirum Child
Theme URI: https://neirum.by/
Description: Дочерняя тема Hello Elementor для единого шаблона статей Neirum.
Author: Neirum
Template: hello-elementor
Version: 1.0.0
Text Domain: neirum-child
*/

:root {
  --nr-navy: #090B68;
  --nr-purple: #5C46C7;
  --nr-yellow: #F3C900;
  --nr-lavender: #F6F5FC;
  --nr-border: #E9E7F2;
  --nr-text: #292A55;
  --nr-muted: #6E708A;
  --nr-white: #FFFFFF;
}

/* =========================================================
   ЕДИНЫЙ ШАБЛОН СТАТЬИ
   ========================================================= */

.single-post .nr-article-page {
  padding: 54px 20px 76px;
  background: #fff;
}

.single-post .nr-article {
  max-width: 1140px;
  margin: 0 auto;
}

.nr-breadcrumbs {
  max-width: 920px;
  margin: 0 auto 28px;
  color: var(--nr-muted);
  font: 400 13px/1.5 Roboto, Arial, sans-serif;
}

.nr-breadcrumbs a {
  color: var(--nr-purple);
  text-decoration: none;
}

.nr-breadcrumbs span {
  margin: 0 7px;
  color: #A1A2B5;
}

.nr-article-header {
  max-width: 920px;
  margin: 0 auto;
}

.nr-article-category {
  margin-bottom: 12px;
  color: var(--nr-purple);
  font: 700 12px/1.4 Roboto, Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nr-article-category a {
  color: inherit;
  text-decoration: none;
}

.nr-article-title {
  max-width: 880px;
  margin: 0;
  color: var(--nr-navy);
  font-family: "Roboto Serif", Georgia, serif;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.nr-article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin-top: 22px;
  color: var(--nr-muted);
  font: 400 14px/1.5 Roboto, Arial, sans-serif;
}

.nr-article-meta a {
  color: var(--nr-navy);
  font-weight: 600;
  text-decoration: none;
}

.nr-article-featured {
  margin-top: 34px;
  overflow: hidden;
  border-radius: 22px;
  background: var(--nr-lavender);
}

.nr-article-featured img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: cover;
}

.nr-article-reading {
  max-width: 820px;
  margin: 40px auto 0;
}

/* Содержание */
.nr-article-toc {
  margin: 0 0 46px;
  padding: 26px 30px;
  border: 1px solid var(--nr-border);
  border-radius: 18px;
  background: var(--nr-lavender);
}

.nr-article-toc__title {
  margin: 0 0 14px;
  color: var(--nr-navy);
  font-family: "Roboto Serif", Georgia, serif;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
}

.nr-article-toc ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nr-article-toc li {
  margin: 8px 0;
}

.nr-article-toc li.nr-toc-h3 {
  padding-left: 20px;
}

.nr-article-toc a {
  color: var(--nr-text);
  font: 400 15px/1.55 Roboto, Arial, sans-serif;
  text-decoration: none;
}

.nr-article-toc a:hover {
  color: var(--nr-purple);
}

/* Основной текст */
.nr-article-content {
  color: var(--nr-text);
  font-family: Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.74;
}

.nr-article-content > *:first-child {
  margin-top: 0;
}

.nr-article-content p {
  margin: 0 0 22px;
}

.nr-article-content h2,
.nr-article-content h3,
.nr-article-content h4 {
  scroll-margin-top: 120px;
  color: var(--nr-navy);
  font-family: "Roboto Serif", Georgia, serif;
  font-weight: 700;
}

.nr-article-content h2 {
  margin: 54px 0 20px;
  font-size: 34px;
  line-height: 1.18;
}

.nr-article-content h3 {
  margin: 38px 0 16px;
  font-size: 25px;
  line-height: 1.25;
}

.nr-article-content h4 {
  margin: 30px 0 14px;
  font-size: 20px;
  line-height: 1.3;
}

.nr-article-content ul,
.nr-article-content ol {
  margin: 0 0 26px;
  padding-left: 24px;
}

.nr-article-content li {
  margin-bottom: 8px;
}

.nr-article-content a {
  color: var(--nr-purple);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.nr-article-content blockquote {
  margin: 32px 0;
  padding: 22px 24px;
  border-left: 4px solid var(--nr-yellow);
  border-radius: 0 14px 14px 0;
  background: var(--nr-lavender);
  color: var(--nr-navy);
}

.nr-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 18px;
}

.nr-article-content figure {
  margin: 32px 0;
}

.nr-article-content figcaption {
  margin-top: 8px;
  color: var(--nr-muted);
  font-size: 13px;
  line-height: 1.5;
}

.nr-article-content table {
  width: 100%;
  margin: 30px 0;
  border-collapse: collapse;
  font-size: 15px;
}

.nr-article-content th,
.nr-article-content td {
  padding: 12px 14px;
  border: 1px solid var(--nr-border);
  text-align: left;
  vertical-align: top;
}

.nr-article-content th {
  background: var(--nr-lavender);
  color: var(--nr-navy);
}

/* Автор */
.nr-author-box {
  max-width: 820px;
  margin: 58px auto 0;
  padding: 26px;
  display: flex;
  gap: 20px;
  align-items: center;
  border: 1px solid var(--nr-border);
  border-radius: 18px;
  background: var(--nr-lavender);
}

.nr-author-box__avatar img {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
}

.nr-author-box__label {
  margin-bottom: 4px;
  color: var(--nr-purple);
  font: 700 11px/1.4 Roboto, Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nr-author-box__name {
  color: var(--nr-navy);
  font-family: "Roboto Serif", Georgia, serif;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
}

.nr-author-box__name a {
  color: inherit;
  text-decoration: none;
}

.nr-author-box__bio {
  margin-top: 7px;
  color: var(--nr-muted);
  font: 400 14px/1.55 Roboto, Arial, sans-serif;
}

/* Похожие статьи */
.nr-related {
  max-width: 920px;
  margin: 68px auto 0;
}

.nr-related__heading {
  margin: 0 0 24px;
  color: var(--nr-navy);
  font-family: "Roboto Serif", Georgia, serif;
  font-size: 32px;
  line-height: 1.2;
  font-weight: 700;
}

.nr-related__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.nr-related-card {
  overflow: hidden;
  border: 1px solid var(--nr-border);
  border-radius: 18px;
  background: #fff;
}

.nr-related-card__image {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--nr-lavender);
}

.nr-related-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nr-related-card__body {
  padding: 20px;
}

.nr-related-card__title {
  display: block;
  color: var(--nr-navy);
  font-family: "Roboto Serif", Georgia, serif;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
  text-decoration: none;
}

.nr-related-card__link {
  display: inline-block;
  margin-top: 18px;
  color: var(--nr-purple);
  font: 700 13px/1.4 Roboto, Arial, sans-serif;
  text-decoration: none;
}

/* CTA */
.nr-article-cta {
  max-width: 920px;
  margin: 60px auto 0;
  padding: 34px;
  border-radius: 22px;
  background: var(--nr-lavender);
}

.nr-article-cta__label {
  margin-bottom: 8px;
  color: var(--nr-purple);
  font: 700 11px/1.4 Roboto, Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nr-article-cta h2 {
  max-width: 680px;
  margin: 0;
  color: var(--nr-navy);
  font-family: "Roboto Serif", Georgia, serif;
  font-size: 31px;
  line-height: 1.18;
  font-weight: 700;
}

.nr-article-cta p {
  max-width: 680px;
  margin: 14px 0 0;
  color: var(--nr-text);
  font: 400 16px/1.65 Roboto, Arial, sans-serif;
}

.nr-article-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.nr-button {
  display: inline-flex;
  min-height: 46px;
  padding: 0 22px;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 9px;
  font: 700 14px/1 Roboto, Arial, sans-serif;
  text-decoration: none !important;
}

.nr-button--primary {
  border-color: var(--nr-yellow);
  background: var(--nr-yellow);
  color: var(--nr-navy) !important;
}

.nr-button--secondary {
  border-color: var(--nr-purple);
  background: #fff;
  color: var(--nr-navy) !important;
}

.nr-article-footer-link {
  max-width: 920px;
  margin: 26px auto 0;
  text-align: center;
}

.nr-article-footer-link a {
  color: var(--nr-purple);
  font: 700 14px/1.5 Roboto, Arial, sans-serif;
  text-decoration: none;
}

@media (max-width: 767px) {
  .single-post .nr-article-page {
    padding: 34px 16px 56px;
  }

  .nr-breadcrumbs {
    margin-bottom: 20px;
  }

  .nr-article-title {
    font-size: 36px;
    line-height: 1.12;
  }

  .nr-article-meta {
    margin-top: 18px;
    gap: 6px 12px;
    font-size: 13px;
  }

  .nr-article-featured {
    margin-top: 26px;
    border-radius: 16px;
  }

  .nr-article-reading {
    margin-top: 30px;
  }

  .nr-article-toc {
    margin-bottom: 36px;
    padding: 21px 20px;
    border-radius: 16px;
  }

  .nr-article-content {
    font-size: 16px;
    line-height: 1.68;
  }

  .nr-article-content h2 {
    margin-top: 42px;
    font-size: 28px;
  }

  .nr-article-content h3 {
    margin-top: 32px;
    font-size: 22px;
  }

  .nr-author-box {
    margin-top: 46px;
    padding: 21px 20px;
    align-items: flex-start;
  }

  .nr-author-box__avatar img {
    width: 62px;
    height: 62px;
  }

  .nr-related {
    margin-top: 52px;
  }

  .nr-related__heading {
    font-size: 28px;
  }

  .nr-related__grid {
    grid-template-columns: 1fr;
  }

  .nr-article-cta {
    margin-top: 48px;
    padding: 26px 20px;
    border-radius: 18px;
  }

  .nr-article-cta h2 {
    font-size: 27px;
  }

  .nr-article-cta__actions {
    flex-direction: column;
  }

  .nr-button {
    width: 100%;
  }
}
