/* ==========================================================================
   Блог: карусель на главной, список статей, статья
   ========================================================================== */

/* ---------- Карточка ---------- */

.blog-card {
  height: 100%;
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 2px solid #1356b9;
  border-radius: 9px;
  padding: 9px;
  background: #fff;
  color: #091538;
  text-decoration: none;
  transition: box-shadow 0.3s ease;
}

.blog-card__link:hover,
.blog-card__link:focus-visible {
  box-shadow: 0 10px 30px rgba(9, 21, 56, 0.14);
}

.blog-card__image {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 5px;
  overflow: hidden;
  background: #e8edf6;
}

.blog-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card__link:hover .blog-card__image img {
  transform: scale(1.06);
}

.blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 6px 6px;
}

.blog-card__cat {
  font-size: 13px;
  font-weight: 600;
  color: #1356b9;
  margin-bottom: 6px;
}

.blog-card__title {
  font-family: 'Nekst', sans-serif;
  font-weight: 600;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.blog-card__text {
  font-size: 15px;
  line-height: 1.45;
  color: #2c333e;
  margin-bottom: 14px;
}

.blog-card__meta {
  margin-top: auto;
  font-size: 13px;
  color: #6b7488;
}

/* Карточка-тизер на главной: картинка с заголовком поверх, как у прежних «Историй» */

.blog-card--teaser .blog-card__link {
  position: relative;
  padding: 9px;
}

.blog-card--teaser .blog-card__image {
  aspect-ratio: auto;
  height: 190px;
}

.blog-card--teaser .blog-card__image:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 75%;
  background: linear-gradient(to top, rgba(5, 22, 58, 0.92) 0%, rgba(5, 22, 58, 0.55) 55%, rgba(5, 22, 58, 0) 100%);
}

.blog-card--teaser .blog-card__body {
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: 9px;
  padding: 12px 12px 12px;
  z-index: 1;
  color: #fff;
}

.blog-card--teaser .blog-card__cat {
  display: none;
}

.blog-card--teaser .blog-card__title {
  color: #fff;
  font-size: 14px;
  margin-bottom: 0;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card--teaser .blog-card__text,
.blog-card--teaser .blog-card__meta {
  display: none;
}

/* ---------- Карусель на главной (на месте «Историй») ---------- */

.blog-teasers {
  margin-top: -13px;
  background: #fff;
  border-radius: 13px;
  padding: 25px 15px;
  margin-left: -15px;
  margin-right: -15px;
  position: relative;
}

.home .blog-teasers {
  margin-bottom: 23px;
}

.blog-teasers__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 15px;
}

.blog-teasers .blog-teasers__title {
  margin: 0;
  font-family: 'Nekst', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.2;
  color: #091538;
}

.blog-teasers__title a {
  color: inherit;
  text-decoration: none;
}




.blog-teasers__slider {
  position: relative;
}

.blog-teasers .swiper {
  overflow: hidden;
}

.blog-teasers__slide {
  width: 190px;
  height: auto;
}

.blog-teasers__nav {
  display: none;
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 40px;
  height: 40px;
  margin-top: -20px;
  border: 0;
  border-radius: 50%;
  background: #1356b9;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(9, 21, 56, 0.25);
  transition: opacity 0.2s ease, background 0.2s ease;
}

.blog-teasers__nav .svg-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.blog-teasers__nav:hover {
  background: #091538;
}

.blog-teasers__nav.is-disabled {
  opacity: 0;
  pointer-events: none;
}

.blog-teasers__nav.swiper-button-lock {
  display: none !important;
}

.blog-teasers__nav--prev {
  left: -12px;
}

.blog-teasers__nav--next {
  right: -12px;
}

@media (min-width: 768px) {
  .blog-teasers {
    margin-left: -30px;
    margin-right: -30px;
    padding-left: 30px;
    padding-right: 30px;
  }

  .blog-teasers .blog-teasers__title {
    font-size: 26px;
  }

  .blog-teasers__slide {
    width: 210px;
  }

  .blog-card--teaser .blog-card__image {
    height: 209px;
  }

  .blog-teasers__nav {
    display: flex;
  }
}

@media (min-width: 992px) {
  .blog-teasers {
    margin: 0 0 23px;
    padding: 0;
    background: none;
    border-radius: 0;
  }

  .blog-teasers__slide {
    width: calc((100% - 5 * 28px) / 6);
    min-width: 190px;
  }

  .blog-card--teaser .blog-card__title {
    font-size: 15px;
  }
}

/* ---------- Список статей ---------- */

.blog {
  padding-bottom: 60px;
}

.blog__intro {
  max-width: 820px;
  font-size: 17px;
  color: #2c333e;
  margin-bottom: 24px;
}

.blog__intro p {
  margin: 0 0 10px;
}

.blog__cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

.blog__cat {
  display: inline-block;
  padding: 8px 16px;
  border: 1px solid #c9d3e6;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.2;
  color: #091538;
  text-decoration: none;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.blog__cat:hover {
  border-color: #1356b9;
  color: #1356b9;
}

.blog__cat.is-active {
  background: #1356b9;
  border-color: #1356b9;
  color: #fff;
}

.blog__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .blog__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1200px) {
  .blog__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

.blog__pagination {
  margin-top: 40px;
}

.blog__pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.blog__pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #c9d3e6;
  border-radius: 6px;
  color: #091538;
  text-decoration: none;
}

.blog__pagination .page-numbers.current {
  background: #1356b9;
  border-color: #1356b9;
  color: #fff;
}

.blog__pagination .screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* ---------- Статья ---------- */

.blog-post {
  padding-bottom: 60px;
}

.blog-post__header {
  max-width: 900px;
  margin-bottom: 24px;
}

.blog-post__cat {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: #1356b9;
  text-decoration: none;
  margin-bottom: 10px;
}

.blog-post__title {
  font-family: 'Nekst', sans-serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #091538;
  margin: 0 0 14px;
}

.blog-post__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 14px;
  color: #6b7488;
}

.blog-post__lead {
  margin-top: 18px;
  padding: 16px 20px;
  border-left: 4px solid #1356b9;
  background: #f1f5fc;
  border-radius: 0 8px 8px 0;
  font-size: 18px;
  line-height: 1.5;
  color: #091538;
}

.blog-post__cover {
  margin: 0 0 32px;
  max-width: 960px;
  border-radius: 10px;
  overflow: hidden;
}

.blog-post__cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.blog-post__layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1200px;
}

.blog-post__toc {
  border: 1px solid #c9d3e6;
  border-radius: 10px;
  padding: 16px 18px;
  font-size: 15px;
  align-self: start;
}

.blog-post__toc-title {
  font-family: 'Nekst', sans-serif;
  font-weight: 600;
  color: #091538;
  margin-bottom: 8px;
}

.blog-post__toc ol {
  margin: 0;
  padding-left: 20px;
}

.blog-post__toc li {
  margin: 6px 0;
}

.blog-post__toc a {
  color: #1356b9;
  text-decoration: none;
}

.blog-post__toc a:hover {
  text-decoration: underline;
}

@media (min-width: 1200px) {
  .blog-post__title {
    font-size: 40px;
  }

  .blog-post__layout {
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 48px;
  }

  .blog-post__layout--no-toc {
    grid-template-columns: minmax(0, 1fr);
  }

  .blog-post__toc {
    position: sticky;
    top: 160px;
  }
}

.blog-post__content {
  max-width: 820px;
  min-width: 0;
  font-size: 17px;
  line-height: 1.65;
  color: #2c333e;
}

.blog-post__content h2 {
  font-family: 'Nekst', sans-serif;
  font-weight: 600;
  font-size: 26px;
  line-height: 1.2;
  color: #091538;
  margin: 40px 0 14px;
  scroll-margin-top: 130px;
}

.blog-post__content h3 {
  font-family: 'Nekst', sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.25;
  color: #091538;
  margin: 28px 0 10px;
}

.blog-post__content p {
  margin: 0 0 16px;
}

.blog-post__content ul,
.blog-post__content ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

.blog-post__content li {
  margin-bottom: 6px;
}

.blog-post__content a:not(.site-button) {
  color: #1356b9;
}

.blog-post__cta .site-button {
  color: #fff;
}

.blog-post__content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.blog-post__content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.blog-post__content .wp-block-table {
  margin: 0 0 20px;
  overflow-x: auto;
}

.blog-post__content th,
.blog-post__content td {
  border: 1px solid #d5dcea;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.blog-post__content th {
  background: #f1f5fc;
  color: #091538;
  font-weight: 600;
}

.blog-post__content blockquote {
  margin: 0 0 20px;
  padding: 14px 20px;
  border-left: 4px solid #1356b9;
  background: #f7f9fd;
}

.blog-post__content details {
  border: 1px solid #d5dcea;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.blog-post__content summary {
  cursor: pointer;
  font-weight: 600;
  color: #091538;
}

.blog-post__cta {
  margin-top: 40px;
  padding: 24px;
  border-radius: 12px;
  background: #091538;
  color: #fff;
}

.blog-post__cta-title {
  font-family: 'Nekst', sans-serif;
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 8px;
}

.blog-post__cta p {
  color: #d6def0;
  margin-bottom: 16px;
}

.blog-post__cta-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

.blog-post__cta-link {
  color: #9fc0ff !important;
  font-weight: 600;
}

.blog-post__related {
  margin-top: 60px;
}

.blog-post__related-title {
  font-family: 'Nekst', sans-serif;
  font-weight: 600;
  font-size: 26px;
  color: #091538;
  margin: 0 0 20px;
}

/* ---------- Шапка карусели: «Блог» как кнопка перехода в раздел ---------- */

.blog-teasers__heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  flex: 1 1 0;
  min-width: 0;
}

.blog-teasers__title a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 14px 7px 22px;
  border: 2px solid #1356b9;
  border-radius: 40px;
  color: #1356b9;
  transition: background 0.2s ease, color 0.2s ease;
}

.blog-teasers__title .svg-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #1356b9;
  fill: #fff;
  transition: transform 0.2s ease, background 0.2s ease, fill 0.2s ease;
}

.blog-teasers__title .svg-icon svg {
  width: 14px;
  height: 14px;
}

.blog-teasers__title a:hover,
.blog-teasers__title a:focus-visible {
  background: #1356b9;
  color: #fff;
}

.blog-teasers__title a:hover .svg-icon,
.blog-teasers__title a:focus-visible .svg-icon {
  background: #fff;
  fill: #1356b9;
  transform: translateX(3px);
}

.blog-teasers__desc {
  flex-basis: 100%;
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: #5a6378;
}

@media (max-width: 767px) {
  .blog-teasers__desc {
    font-size: 14px;
  }
}
