/*
 * Single-post reading system.
 * This file intentionally styles only WordPress posts so page templates and
 * the blog archive retain their own compositions.
 */

body.single-post {
  --article-canvas: #f5f5f5;
  --article-surface: #ffffff;
  --article-ink: #092240;
  --article-muted: #6b737d;
  --article-primary: #1d81f8;
  --article-primary-hover: #0b69d8;
  --article-primary-soft: #eaf3ff;
  --article-warning: #fff7d9;
  --article-warning-border: #f0cf62;
  --article-border: rgb(9 34 64 / 14%);
  --article-shadow: 0 2px 4px rgb(9 34 64 / 4%), 0 14px 28px rgb(9 34 64 / 7%);
  --article-radius-control: 12px;
  --article-radius-card: 24px;
  --article-ease: cubic-bezier(0.23, 1, 0.32, 1);
  background-color: #eef4fa !important;
  background-image: url("../images/article/education-pattern-v1.webp") !important;
  background-position: center top !important;
  background-repeat: repeat !important;
  background-size: 320px 320px !important;
}

body.single-post .article-post-shell {
  padding: 24px 0 80px;
}

body.single-post .article-post__hero-frame {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 440px;
  overflow: hidden;
  border: 1px solid rgb(9 34 64 / 8%);
  border-radius: var(--article-radius-card);
  background: var(--article-primary-soft);
}

body.single-post .article-post__hero-frame::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(180deg, rgb(245 245 245 / 0%) 24%, rgb(245 245 245 / 70%) 67%, rgb(245 245 245 / 98%) 100%);
  content: "";
  pointer-events: none;
}

body.single-post .article-post__hero-frame--plain::after {
  display: none;
}

body.single-post .article-post__hero-media,
body.single-post .article-post__hero-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

body.single-post .article-post__hero-image {
  object-fit: cover;
}

body.single-post .article-post__hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  max-width: 840px;
  padding: 48px;
}

body.single-post .article-post__category {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  margin: 0 0 12px;
  padding: 4px 12px;
  border: 1px solid var(--article-primary);
  border-radius: 100px;
  background: var(--article-primary);
  color: #ffffff !important;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}

body.single-post .article-post__category:focus-visible,
body.single-post .article-post__vk:focus-visible,
body.single-post .article-post__content a:focus-visible,
body.single-post .article-post__related .link_blog:focus-visible .grid_newspage {
  outline: 3px solid var(--article-primary);
  outline-offset: 3px;
}

body.single-post .article-post__category:active,
body.single-post .article-post__vk:active,
body.single-post .article-post__content :is(.main_banner_block a, .instruction_ppnso_block_item_one_btn a):active {
  transform: scale(0.98);
}

body.single-post .article-post__title {
  max-width: 760px;
  margin: 0;
  color: var(--article-ink) !important;
  font-family: "Manrope", sans-serif;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 52px;
  text-wrap: balance;
}

body.single-post .article-post__container {
  margin-top: 48px;
  padding: 48px 40px 40px;
  border: 1px solid rgb(9 34 64 / 6%);
  border-radius: var(--article-radius-card);
  background: var(--article-surface);
  box-shadow: 0 1px 2px rgb(9 34 64 / 4%), 0 18px 36px rgb(9 34 64 / 7%);
}

body.single-post .article-post__content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 760px) minmax(0, 1fr);
  row-gap: 0;
  color: var(--article-ink) !important;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 30px;
  font-synthesis: none;
}

body.single-post .article-post__content > * {
  grid-column: 2;
  min-width: 0;
}

body.single-post .article-post__content > :first-child {
  margin-top: 0 !important;
}

body.single-post .article-post__content > p {
  margin: 0 0 20px;
  font-family: "Manrope", sans-serif !important;
  font-size: 18px !important;
  font-weight: 400;
  line-height: 30px !important;
  text-wrap: pretty;
}

body.single-post .article-post__content > :is(p, ul, ol) {
  font-family: "Manrope", sans-serif !important;
  font-size: 18px !important;
  font-weight: 400;
  line-height: 30px !important;
  text-wrap: pretty;
}

body.single-post .article-post__content > :is(p, ul, ol, blockquote) :is(span, strong, b, em, i, u, s, mark) {
  font-family: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

body.single-post .article-post__content :is(strong, b) {
  color: inherit;
  font-style: normal;
  font-weight: 700;
}

body.single-post .article-post__content :is(em, i) {
  color: inherit;
  font-style: italic;
  font-weight: 500;
}

body.single-post .article-post__content mark {
  padding: 0 0.12em;
  border-radius: 3px;
  background: #fff0b8;
}

body.single-post .article-post__content u {
  text-decoration-color: currentColor;
  text-decoration-thickness: from-font;
  text-underline-offset: 0.12em;
}

body.single-post .article-post__content > :is(h2, h3, h4, h5) {
  color: var(--article-ink) !important;
  font-family: "Manrope", sans-serif;
  font-weight: 700;
  letter-spacing: -0.015em;
}

body.single-post .article-post__content > h2 {
  margin: 64px 0 20px;
  font-size: 30px;
  line-height: 38px;
  text-wrap: balance;
}

body.single-post .article-post__content > h3 {
  margin: 48px 0 16px;
  font-size: 24px;
  line-height: 32px;
  text-wrap: balance;
}

body.single-post .article-post__content > :is(h4, h5) {
  margin: 36px 0 12px;
  font-size: 20px;
  line-height: 28px;
  text-wrap: balance;
}

body.single-post .article-post__content > :is(ul, ol) {
  margin: 0 0 28px;
  padding-left: 26px;
}

body.single-post .article-post__content > :is(ul, ol) li {
  font-family: "Manrope", sans-serif !important;
  margin-bottom: 10px;
  padding-left: 4px;
}

body.single-post .article-post__content a {
  color: var(--article-primary);
  text-decoration-thickness: 1px;
  text-decoration-underline-offset: 3px;
}

body.single-post .article-post__content > :is(figure, .wp-block-image, .wp-block-embed, .wp-block-columns, .mg_bt_20, .instruction_ppnso_block) {
  grid-column: 2;
  width: 100%;
  justify-self: stretch;
}

body.single-post .article-post__content > :is(figure, .wp-block-image, .wp-block-embed) {
  margin-top: 40px;
  margin-bottom: 40px;
}

body.single-post .article-post__content > :is(figure, .wp-block-image) img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
}

body.single-post .article-post__content figcaption {
  margin-top: 8px;
  color: var(--article-muted);
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
}

body.single-post .article-post__content blockquote {
  margin: 40px 0;
  padding: 4px 0 4px 24px;
  border-left: 3px solid var(--article-primary);
  color: var(--article-ink);
  font-family: "Manrope", sans-serif !important;
  font-size: 20px;
  font-style: italic;
  line-height: 32px;
  text-wrap: pretty;
}

body.single-post .article-post__content blockquote p:last-child {
  margin-bottom: 0;
}

/* The table-of-contents plugin keeps its own markup; only its presentation changes. */
body.single-post .article-post__content > .lwptoc {
  margin: 32px 0 48px;
  padding: 20px 24px;
  border: 1px solid #d6e6fc;
  border-radius: var(--article-radius-control);
  background: #f0f6ff;
}

body.single-post .article-post__content .lwptoc .lwptoc_i {
  padding: 0 !important;
  background: transparent !important;
}

body.single-post .article-post__content .lwptoc .lwptoc_title,
body.single-post .article-post__content .lwptoc > div:first-child {
  color: var(--article-ink);
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 25px;
}

body.single-post .article-post__content .lwptoc .lwptoc_toggle a {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  margin-left: 4px;
  color: var(--article-primary);
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

body.single-post .article-post__content .lwptoc .lwptoc_itemWrap {
  margin-top: 12px;
}

body.single-post .article-post__content .lwptoc :is(ul, ol) {
  margin: 0;
  padding-left: 20px;
}

body.single-post .article-post__content .lwptoc li {
  margin: 0 0 8px;
  padding: 0;
}

body.single-post .article-post__content .lwptoc li:last-child {
  margin-bottom: 0;
}

body.single-post .article-post__content .lwptoc li a {
  color: var(--article-ink);
  font-size: 14px;
  line-height: 20px;
}

body.single-post .article-post__content .lwptoc li a:hover {
  color: var(--article-primary);
}

body.single-post .article-post__content :is(.alert_noicon_news, .alert_news) {
  grid-column: 2;
  margin: 32px 0;
  border-radius: var(--article-radius-control);
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  text-align: left;
}

body.single-post .article-post__content .alert_noicon_news {
  padding: 20px 24px;
  border: 1px solid #c7defb;
  background: var(--article-primary-soft);
  color: var(--article-ink) !important;
}

body.single-post .article-post__content .alert_news {
  padding: 20px 24px 20px 56px;
  border: 1px solid var(--article-warning-border);
  background: var(--article-warning);
  color: var(--article-ink) !important;
}

body.single-post .article-post__content .alert_news::before {
  top: 20px;
  left: 20px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  border: 1px solid currentColor;
  color: var(--article-ink);
  font-size: 14px;
  line-height: 1;
}

body.single-post .article-post__content :is(.alert_noicon_news, .alert_news) :last-child {
  margin-bottom: 0;
}

/* Existing reusable promotional blocks inside older WordPress posts. */
body.single-post .article-post__content > .mg_bt_20 {
  margin: 40px 0;
}

body.single-post .article-post__content .mg_bt_20 > .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  margin: 0;
}

body.single-post .article-post__content .mg_bt_20 > .row > [class*="col-"] {
  width: 100%;
  max-width: none;
  flex: 0 0 auto;
  padding: 0;
}

body.single-post .article-post__content .main_banner_block_block {
  display: block;
  margin: 0;
}

body.single-post .article-post__content .main_banner_block,
body.single-post .article-post__content .second_main_banner_block,
body.single-post .article-post__content .instruction_ppnso_block {
  min-height: 0;
  margin: 0;
  padding: 24px;
  border-radius: 16px;
}

body.single-post .article-post__content .main_banner_block {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  background: var(--article-primary);
}

body.single-post .article-post__content .second_main_banner_block {
  border: 1px solid #d6e6fc;
  background-color: var(--article-primary-soft);
  background-image: none !important;
}

body.single-post .article-post__content .main_banner_block_title {
  min-height: 0 !important;
}

body.single-post .article-post__content .main_banner_block_title h3,
body.single-post .article-post__content .second_main_banner_block_first h3,
body.single-post .article-post__content .instruction_ppnso_block_item_one h4 {
  margin: 0 0 8px;
  color: var(--article-ink) !important;
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 29px;
}

body.single-post .article-post__content .main_banner_block_title h3,
body.single-post .article-post__content .main_banner_block_title span {
  color: #ffffff !important;
}

body.single-post .article-post__content .main_banner_block_title span,
body.single-post .article-post__content .hero__list_home,
body.single-post .article-post__content .instruction_ppnso_block_item_one p {
  margin: 0;
  color: inherit;
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 23px;
}

body.single-post .article-post__content .second_main_banner_block_first {
  display: grid;
  width: 100%;
  gap: 8px;
}

body.single-post .article-post__content .second_main_banner_block_first p {
  margin: 0 !important;
}

body.single-post .article-post__content .hero__list_home {
  position: relative;
  padding-left: 16px;
}

body.single-post .article-post__content .hero__list_home::before {
  position: absolute;
  top: 9px;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--article-primary);
  content: "";
}

body.single-post .article-post__content .main_banner_block a,
body.single-post .article-post__content .instruction_ppnso_block_item_one_btn a {
  display: inline-flex;
  min-height: 51px;
  align-items: center;
  justify-content: center;
  padding: 16px 24px;
  border: 1px solid transparent;
  border-radius: var(--article-radius-control);
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 22px;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 100ms ease;
}

body.single-post .article-post__content .main_banner_block a {
  width: auto;
  min-width: 196px;
  margin: 0;
  background: #ffffff;
  color: var(--article-ink) !important;
}

body.single-post .article-post__content .instruction_ppnso_block {
  display: block;
  border: 1px solid var(--article-border);
  background: var(--article-surface);
}

body.single-post .article-post__content .instruction_ppnso_block_item_one {
  width: 100%;
}

body.single-post .article-post__content .instruction_ppnso_block_item_one_btn {
  margin-top: 24px;
}

body.single-post .article-post__content .instruction_ppnso_block_item_one_btn a {
  background: var(--article-primary);
  color: #ffffff !important;
}

body.single-post .article-post__content .instruction_ppnso_block_item_two img {
  display: none;
}

body.single-post .article-post__footer {
  display: grid;
  max-width: 760px;
  gap: 16px;
  margin: 48px auto 0;
  padding-top: 32px;
  padding-bottom: 0;
  border-top: 1px solid var(--article-border);
  background: transparent;
}

body.single-post .article-post__vk {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--article-border);
  border-radius: var(--article-radius-card);
  background: var(--article-surface);
  box-shadow: var(--article-shadow);
  color: var(--article-ink);
  text-decoration: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

body.single-post .article-post__vk-image {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
}

body.single-post .article-post__vk-image img {
  display: block;
  max-width: 100%;
  max-height: 100%;
}

body.single-post .article-post__vk-title {
  color: var(--article-ink);
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 24px;
}

body.single-post .article-post__vk-action {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: var(--article-radius-control);
  background: var(--article-primary);
  color: #ffffff;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 19px;
  text-align: center;
}

body.single-post .article-post__source {
  margin: 0;
  color: var(--article-muted);
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  line-height: 18px;
  overflow-wrap: anywhere;
}

body.single-post .article-post__share {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  margin: 0;
}

body.single-post .article-post__share p {
  margin: 0;
  color: var(--article-muted);
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  line-height: 20px;
}

body.single-post .article-post__share .ya-share2 {
  display: flex;
  align-items: center;
  min-height: 44px;
}

body.single-post .article-post__related {
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--article-border);
}

body.single-post .article-post__related > h2 {
  margin: 0 0 24px;
  color: var(--article-ink);
  font-family: "Manrope", sans-serif;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 45px;
}

body.single-post .article-post__related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

body.single-post .article-post__related .newspage_title :is(h2, h3) {
  display: -webkit-box;
  min-height: 75px;
  margin: 0;
  overflow: hidden;
  color: var(--article-ink) !important;
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 25px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

@media (hover: hover) and (pointer: fine) {
  body.single-post .article-post__category:hover {
    border-color: var(--article-primary-hover);
    background: var(--article-primary-hover);
    box-shadow: 0 5px 12px rgb(29 129 248 / 22%);
  }

  body.single-post .article-post__vk:hover {
    border-color: rgb(29 129 248 / 40%);
    box-shadow: 0 2px 4px rgb(9 34 64 / 5%), 0 14px 28px rgb(9 34 64 / 9%);
    transform: translateY(-2px);
  }

  body.single-post .article-post__content :is(.main_banner_block a, .instruction_ppnso_block_item_one_btn a):hover {
    box-shadow: 0 7px 16px rgb(9 34 64 / 16%);
  }
}

@media (max-width: 1199px) {
  body.single-post .article-post__hero-frame {
    min-height: 400px;
  }

  body.single-post .article-post__title {
    font-size: 32px;
    line-height: 40px;
  }

  body.single-post .article-post__content {
    grid-template-columns: minmax(0, 1fr) minmax(0, 680px) minmax(0, 1fr);
  }

}

@media (max-width: 991px) {
  body.single-post .article-post__container {
    width: calc(100% - 32px);
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 767px) {
  body.single-post {
    background-size: 256px 256px !important;
  }

  body.single-post .article-post-shell {
    padding: 16px 0 56px;
  }

  body.single-post .article-post__hero-frame {
    min-height: 332px;
    border-radius: 20px;
  }

  body.single-post .article-post__hero-content {
    padding: 24px;
  }

  body.single-post .article-post__category {
    min-height: 28px;
    margin-bottom: 8px;
    font-size: 12px;
    line-height: 17px;
  }

  body.single-post .article-post__title {
    max-width: 100%;
    font-size: 26px;
    line-height: 34px;
  }

  body.single-post .article-post__container {
    margin-top: 32px;
    padding: 32px 20px 28px;
    border-radius: 20px;
  }

  body.single-post .article-post__content {
    display: block;
    font-size: 17px;
    line-height: 29px;
  }

  body.single-post .article-post__content > :is(p, ul, ol) {
    font-size: 17px !important;
    line-height: 29px !important;
  }

  body.single-post .article-post__content > p {
    margin-bottom: 18px;
  }

  body.single-post .article-post__content > h2 {
    margin-top: 40px;
    margin-bottom: 16px;
    font-size: 26px;
    line-height: 34px;
  }

  body.single-post .article-post__content > h3 {
    margin-top: 32px;
    margin-bottom: 12px;
    font-size: 22px;
    line-height: 29px;
  }

  body.single-post .article-post__content > :is(h4, h5) {
    margin-top: 24px;
    font-size: 19px;
    line-height: 26px;
  }

  body.single-post .article-post__content > :is(ul, ol) {
    padding-left: 20px;
  }

  body.single-post .article-post__content blockquote {
    margin: 32px 0;
    padding-left: 20px;
    font-size: 18px;
    line-height: 29px;
  }

  body.single-post .article-post__content > :is(figure, .wp-block-image, .wp-block-embed) {
    margin-top: 32px;
    margin-bottom: 32px;
  }

  body.single-post .article-post__content > .lwptoc {
    margin: 24px 0 40px;
    padding: 16px 20px;
  }

  body.single-post .article-post__content :is(.alert_noicon_news, .alert_news) {
    margin: 24px 0;
    font-size: 16px;
    line-height: 24px;
  }

  body.single-post .article-post__content .alert_noicon_news {
    padding: 16px 20px;
  }

  body.single-post .article-post__content .alert_news {
    padding: 16px 20px 16px 52px;
  }

  body.single-post .article-post__content .alert_news::before {
    top: 16px;
    left: 16px;
  }

  body.single-post .article-post__content > .mg_bt_20 {
    margin: 32px 0;
  }

  body.single-post .article-post__content .main_banner_block,
  body.single-post .article-post__content .second_main_banner_block,
  body.single-post .article-post__content .instruction_ppnso_block {
    padding: 20px;
    border-radius: 16px;
  }

  body.single-post .article-post__content .main_banner_block {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  body.single-post .article-post__content .main_banner_block_title h3,
  body.single-post .article-post__content .second_main_banner_block_first h3,
  body.single-post .article-post__content .instruction_ppnso_block_item_one h4 {
    font-size: 21px;
    line-height: 28px;
  }

  body.single-post .article-post__content .second_main_banner_block_first {
    width: 100%;
  }

  body.single-post .article-post__content .instruction_ppnso_block_item_two {
    display: none;
  }

  body.single-post .article-post__footer {
    margin-top: 40px;
    padding-top: 24px;
  }

  body.single-post .article-post__vk {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 16px;
    border-radius: 20px;
  }

  body.single-post .article-post__vk-image {
    width: 48px;
    height: 48px;
  }

  body.single-post .article-post__vk-title {
    font-size: 16px;
    line-height: 22px;
  }

  body.single-post .article-post__vk-action {
    grid-column: 1 / -1;
    width: 100%;
  }

  body.single-post .article-post__share {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  body.single-post .article-post__related {
    margin-top: 56px;
    padding-top: 40px;
  }

  body.single-post .article-post__related > h2 {
    margin-bottom: 20px;
    font-size: 26px;
    line-height: 34px;
  }

  body.single-post .article-post__related-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  body.single-post .article-post__related .newspage_title :is(h2, h3) {
    min-height: 66px;
    font-size: 16px;
    line-height: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.single-post .article-post__category,
  body.single-post .article-post__vk,
  body.single-post .article-post__content :is(.main_banner_block a, .instruction_ppnso_block_item_one_btn a) {
    transition: none;
  }
}

@media (prefers-reduced-data: reduce) {
  body.single-post {
    background-image: none !important;
  }
}
