/* ==========================================================================
   Полюшко: правки 11.2026
   1. Оценки статей   2. Видео в статьях   3. Пагинация блога   4. Эксперты
   ========================================================================== */

/* ---------- 1. Оценки статей ----------
   Сверху (в мета-строке статьи) остаётся только средняя оценка «5,0 ★★★★★».
   Блок kk Star Ratings, который плагин сам вставляет в текст статьи, скрыт.
   Внизу — звёзды для голосования и подпись «Оцените пользу статьи». */

body .pol-article-content .kk-star-ratings {
  display: none !important;
}

body .pol-article-meta__rating {
  gap: 8px;
}

body .pol-article-meta__rating-value {
  font-size: 15px;
  font-weight: 600;
  color: #ff2dad;
}

body .pol-article-meta__rating-stars {
  font-size: 16px;
  letter-spacing: 3px;
  color: #f3c6df;
}

body .pol-article-rating-vote {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin: 48px 0 0;
  padding: 28px 24px 30px;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(255, 45, 173, 0.18);
  box-shadow: 0 12px 32px rgba(31, 18, 26, 0.06);
  text-align: center;
}

body .pol-article-rating-vote::before {
  content: "Оцените пользу статьи";
  display: block;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 600;
  color: #1c1c1c;
}

body .pol-article-rating-vote .kk-star-ratings {
  display: flex !important;
  justify-content: center;
  align-items: center;
  margin: 0 !important;
}

/* Подпись плагина «5/5 – (2 голоса)» не выводим */
body .pol-article-rating-vote .kksr-legend {
  display: none !important;
}

body .pol-article-rating-vote .kksr-stars .kksr-star {
  padding: 0 4px !important;
  cursor: pointer;
}

/* ---------- 2. Видео в статьях ----------
   По умолчанию ролик вертикальный 9:16. Скрипт читает реальные размеры файла:
   горизонтальное видео растягивается на ширину текста. */

body .pol-article-content .wp-block-video.pol-video,
body .pol-article-content video.pol-video {
  margin: 32px 0;
}

body .pol-article-content .pol-video.is-portrait video,
body .pol-article-content video.pol-video.is-portrait {
  display: block;
  width: min(100%, 400px, calc(82vh * 9 / 16)) !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  aspect-ratio: 9 / 16;
  margin: 0 auto !important;
  border-radius: 24px;
  background: #0f0f0f;
  object-fit: contain;
}

body .pol-article-content .pol-video.is-landscape video,
body .pol-article-content video.pol-video.is-landscape {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: none !important;
  margin: 0 !important;
  border-radius: 24px;
  background: #0f0f0f;
  object-fit: contain;
}

body .pol-article-content .pol-video figcaption {
  margin-top: 10px;
  text-align: center;
  font-size: 14px;
  color: #6b6b6b;
}

/* Вертикальное видео из VK / Rutube / YouTube Shorts:
   в блоке «Встраивание» или «HTML» добавьте CSS-класс pol-video-vertical */
body .pol-article-content .pol-video-vertical iframe,
body .pol-article-content iframe.pol-video-vertical {
  display: block;
  width: min(100%, 400px, calc(82vh * 9 / 16)) !important;
  height: auto !important;
  aspect-ratio: 9 / 16;
  margin: 32px auto !important;
  border: 0;
  border-radius: 24px;
  background: #0f0f0f;
}

@media (max-width: 767px) {
  body .pol-article-content .pol-video.is-portrait video,
  body .pol-article-content video.pol-video.is-portrait,
  body .pol-article-content .pol-video-vertical iframe,
  body .pol-article-content iframe.pol-video-vertical {
    width: min(100%, 340px) !important;
    border-radius: 18px;
  }
}

/* ---------- 3. Пагинация блога ---------- */

#pol-blog-results {
  transition: opacity 0.2s ease;
}

#pol-blog-results.is-loading {
  opacity: 0.5;
  pointer-events: none;
}

.pol-blog-pagination--v2 .page-numbers.dots {
  min-width: 28px;
  padding: 0 4px;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #8a8a8a;
  cursor: default;
}

.pol-blog-pagination--v2 .page-numbers.dots:hover {
  transform: none;
}

/* ---------- 4. Эксперты ---------- */

.pol-xp-page {
  padding: 130px 0 0;
  font-family: 'Montserrat', system-ui, sans-serif;
  color: #1c1c1c;
}

.pol-xp-page .pol-breadcrumbs {
  margin-bottom: 28px;
}

/* Шапка эксперта */
.pol-xp-hero {
  display: grid;
  grid-template-columns: minmax(260px, 400px) minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  margin-bottom: 64px;
}

.pol-xp-hero--no-photo {
  grid-template-columns: minmax(0, 1fr);
}

.pol-xp-hero__media {
  position: relative;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(160deg, #ffe3f2 0%, #f6f6f6 100%);
  box-shadow: 0 18px 40px rgba(31, 18, 26, 0.10);
}

.pol-xp-hero__photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
}

.pol-xp-hero__kicker {
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff2dad;
}

.pol-xp-hero__title {
  margin: 0 0 12px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pol-xp-hero__position {
  margin-bottom: 24px;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 600;
  color: #ff2dad;
}

.pol-xp-hero__description {
  max-width: 760px;
  margin-bottom: 28px;
  font-size: 18px;
  line-height: 1.65;
  color: #3a3a3a;
}

.pol-xp-hero__description p {
  margin: 0 0 12px;
}

.pol-xp-hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.pol-xp-hero__fact {
  margin: 0;
  padding: 12px 18px;
  border-radius: 999px;
  background: #fff0f8;
  border: 1px solid rgba(255, 45, 173, 0.25);
  font-size: 15px;
  line-height: 1.3;
  color: #1c1c1c;
}

.pol-xp-hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 30px;
  border-radius: 999px;
  background: #ff2dad;
  color: #fff !important;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background 0.2s ease, transform 0.2s ease;
}

.pol-xp-hero__cta:hover {
  background: #1c1c1c;
  transform: translateY(-1px);
}

/* Текст «Об эксперте» из редактора */
.pol-xp-about {
  margin-bottom: 64px;
  padding: 48px 56px;
  border-radius: 34px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31, 18, 26, 0.06);
}

.pol-xp-about__inner {
  max-width: 880px;
}

.pol-xp-about__inner > *:first-child {
  margin-top: 0;
}

/* Материалы эксперта */
.pol-xp-articles {
  margin-bottom: 24px;
}

.pol-xp-articles__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.pol-xp-articles__title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  font-weight: 700;
}

.pol-xp-articles__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: #ff2dad;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.pol-xp-articles__nav {
  display: flex;
  gap: 10px;
}

.pol-xp-articles__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: #1c1c1c;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.pol-xp-articles__arrow:hover:not(:disabled) {
  background: #ff2dad;
}

.pol-xp-articles__arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.pol-xp-articles__track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 4px 2px 16px;
}

.pol-xp-articles__track::-webkit-scrollbar {
  display: none;
}

.pol-xp-articles__slide {
  flex: 0 0 calc((100% - 48px) / 3);
  min-width: 0;
  scroll-snap-align: start;
}

.pol-xp-articles__slide .pol-blog-card {
  height: 100%;
}

/* Архив экспертов */
.pol-xp-archive-hero {
  max-width: 900px;
  margin-bottom: 48px;
}

.pol-xp-archive-hero__title {
  margin: 0 0 18px;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pol-xp-archive-hero__text {
  margin: 0;
  font-size: 18px;
  line-height: 1.6;
  color: #3a3a3a;
}

.pol-xp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  margin-bottom: 24px;
}

.pol-xp-card {
  min-width: 0;
}

.pol-xp-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31, 18, 26, 0.08);
  color: inherit;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pol-xp-card__inner:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 48px rgba(31, 18, 26, 0.14);
}

.pol-xp-card__media {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: linear-gradient(160deg, #ffe3f2 0%, #f3f3f3 100%);
}

.pol-xp-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s ease;
}

.pol-xp-card__inner:hover .pol-xp-card__media img {
  transform: scale(1.03);
}

.pol-xp-card__placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 96px;
  font-weight: 700;
  color: #ff2dad;
}

.pol-xp-card__badge {
  position: absolute;
  left: 16px;
  bottom: 16px;
  padding: 7px 14px;
  border-radius: 999px;
  background: #ff2dad;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.pol-xp-card__body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  padding: 24px 26px 28px;
}

.pol-xp-card__name {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  color: #1c1c1c;
}

.pol-xp-card__position {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
  color: #ff2dad;
}

.pol-xp-card__desc {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: #3a3a3a;
}

.pol-xp-card__facts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.pol-xp-card__facts li {
  margin: 0;
  padding: 9px 14px;
  border-radius: 14px;
  background: #fff0f8;
  font-size: 13px;
  line-height: 1.35;
  color: #1c1c1c;
}

.pol-xp-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #ff2dad;
}

.pol-xp-empty {
  font-size: 18px;
}

/* Адаптив */
@media (max-width: 1279.98px) {
  .pol-xp-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pol-xp-articles__slide {
    flex-basis: calc((100% - 24px) / 2);
  }
}

@media (max-width: 991.98px) {
  .pol-xp-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }
  .pol-xp-hero__media {
    max-width: 420px;
  }
  .pol-xp-about {
    padding: 32px 28px;
  }
}

@media (max-width: 767.98px) {
  .pol-xp-page {
    padding-top: 100px;
  }
  .pol-xp-hero {
    margin-bottom: 44px;
  }
  .pol-xp-hero__media {
    max-width: 100%;
    border-radius: 26px;
  }
  .pol-xp-hero__position {
    font-size: 17px;
  }
  .pol-xp-hero__description {
    font-size: 16px;
  }
  .pol-xp-hero__fact {
    font-size: 14px;
    border-radius: 18px;
  }
  .pol-xp-hero__cta {
    width: 100%;
  }
  .pol-xp-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
  .pol-xp-articles__slide {
    flex-basis: 85%;
  }
  .pol-xp-articles__arrow {
    width: 44px;
    height: 44px;
  }
  .pol-xp-about {
    padding: 24px 20px;
    border-radius: 24px;
  }
}