/* ==========================================================================
   Reading Nation - общие стили вёрстки (Header / Footer)
   Bootstrap 5 + кастом.
   ========================================================================== */

:root {
  --rn-navy:        #0B1E3E;
  --rn-gold:        #C9A84C;
  --rn-text-light:  #CECFD2;
  --rn-white:       #FFFFFF;
  --rn-copy:        #8A93A6;
  --rn-header-h:    72px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}


.rn-logo {
  display: block;
  background: center / contain no-repeat;
}
/* тёмный хедер (home, до скролла) → белый логотип */
.rn-logo--header { width: 96px;  height: 40px; background-image: url("../assets/header/logo-header-white.png"); }
/* белый хедер (внутренние страницы + home после скролла) → тёмный логотип */
.site-header--solid .rn-logo--header,
body.rn-home .site-header.is-scrolled .rn-logo--header {
  background-image: url("../assets/header/logo-header-dark.png");
}
.rn-logo--footer { width: 192px; height: 80px; background-image: url("../assets/footer/footer-logo.png"); }


/* ==========================================================================
   HEADER
   ========================================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--rn-header-h);
  z-index: 1030;
  background: transparent;
  transition: background-color .25s ease, box-shadow .25s ease;
}

body.rn-home .site-header {
  background: var(--rn-navy);
}

/* Белый хедер (#FFFFFF): внутренние страницы всегда (.site-header--solid)
   + главная при скролле (body.rn-home .is-scrolled) */
.site-header--solid,
body.rn-home .site-header.is-scrolled {
  background: var(--rn-white);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}

/* На белом хедере: обычные пункты тёмные (#0B1E3E), выбранный/hover - золотой */
.site-header--solid .rn-nav .nav-link,
body.rn-home .site-header.is-scrolled .rn-nav .nav-link { color: var(--rn-navy); }
.site-header--solid .rn-nav .nav-link:hover,
.site-header--solid .rn-nav .nav-link.active,
body.rn-home .site-header.is-scrolled .rn-nav .nav-link:hover,
body.rn-home .site-header.is-scrolled .rn-nav .nav-link.active { color: var(--rn-gold); }

.site-header--solid .rn-lang__item,
body.rn-home .site-header.is-scrolled .rn-lang__item { color: var(--rn-navy); }
.site-header--solid .rn-lang__item.is-active,
body.rn-home .site-header.is-scrolled .rn-lang__item.is-active { color: var(--rn-gold); }
.site-header--solid .rn-lang__sep,
body.rn-home .site-header.is-scrolled .rn-lang__sep { color: rgba(11, 30, 62, .4); }

.site-header--solid .rn-btn-login,
body.rn-home .site-header.is-scrolled .rn-btn-login { color: var(--rn-navy); border-color: var(--rn-navy); }
.site-header--solid .rn-btn-login:hover,
body.rn-home .site-header.is-scrolled .rn-btn-login:hover { color: var(--rn-white); background: var(--rn-navy); }

/* Бургер на белом хедере: navbar-dark задаёт белую иконку/рамку - перекрашиваем в navy */
.site-header--solid .site-navbar,
body.rn-home .site-header.is-scrolled .site-navbar {
  --bs-navbar-toggler-border-color: rgba(11, 30, 62, .35);
  --bs-navbar-toggler-icon-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2811, 30, 62, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.site-header--solid .navbar-toggler:focus,
body.rn-home .site-header.is-scrolled .navbar-toggler:focus {
  box-shadow: 0 0 0 .2rem rgba(11, 30, 62, .2);
}

.site-navbar {
  min-height: var(--rn-header-h);
  padding: 0;
}

/* Логотип центрируется в 72px */
.site-navbar .navbar-brand {
  margin: 0;
  padding: 0;
  line-height: 0;
}

/* Навигация: Roboto 16/24, белый */
.rn-nav .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  height: var(--rn-header-h);
  padding: 0 24px !important;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  letter-spacing: 0;
  text-align: center;
  color: var(--rn-white);
  transition: color .15s ease;
}
.rn-nav .nav-link:hover,
.rn-nav .nav-link:focus { color: var(--rn-gold); }

/* Активный пункт: золотой + нижний индикатор-таб */
.rn-nav .nav-link.active { color: var(--rn-gold); }
.rn-nav .nav-link.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 8px;
  background: var(--rn-gold);
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.rn-header-actions { gap: 0; }
.rn-header-actions--menu { display: none !important; }

.rn-lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 20px;
}
.rn-header-actions .rn-lang { margin-right: 30px; }
.rn-lang__item {
  color: var(--rn-white);
  text-decoration: none;
  transition: color .15s ease;
}
.rn-lang__item:hover { color: var(--rn-gold); }
.rn-lang__item.is-active { color: var(--rn-gold); }
.rn-lang__sep { color: rgba(255, 255, 255, .4); }

/* Кнопка Войти */
.rn-btn-login {
  display: inline-flex;
  align-items: center;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--rn-white);
  background: transparent;
  border: 1px solid var(--rn-white);
  border-radius: 8px;
  padding: 8px 22px;
  margin-right: 14px;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.rn-btn-login:hover { color: var(--rn-navy); background: var(--rn-white); }

/* Кнопка Старт */
.rn-btn-start {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: var(--rn-navy);
  background: var(--rn-gold);
  border: 1px solid var(--rn-gold);
  border-radius: 8px;
  padding: 8px 22px;
  text-decoration: none;
  transition: filter .15s ease;
}
.rn-btn-start:hover { color: var(--rn-navy); filter: brightness(1.06); }
.rn-btn-start .bi { font-size: 12px; }

@media (min-width: 1200px) {
  .site-navbar .container {
    display: flex;
    align-items: center;
    height: var(--rn-header-h);
  }
}

@media (max-width: 1199px) {
  /* Бар всегда фикс. высоты: панель - оверлей, не растягивает контейнер
     (иначе лого/бургер теряют центрирование и прыгают к верху при открытии) */
  .site-navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--rn-header-h);
    position: relative;
  }
  /* Панель - абсолютный оверлей во всю ширину, стартует под баром (top: 100%).
     Фон наследует состояние хедера: navy сверху главной, белый при скролле/solid. */
  .site-navbar .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--rn-navy);
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
    transition: background-color .25s ease;
  }
  /* Белый хедер (внутренние страницы + главная при скролле) → белая панель,
     текст/кнопки/бургер уже перекрашены общими правилами .site-header--solid /
     .is-scrolled выше (тёмные пункты, золотой активный). */
  .site-header--solid .site-navbar .navbar-collapse,
  body.rn-home .site-header.is-scrolled .site-navbar .navbar-collapse {
    background: var(--rn-white);
    border-top-color: rgba(11, 30, 62, .08);
  }
  .rn-nav { margin: 0 !important; }
  .rn-nav .nav-link {
    height: auto;
    padding: 10px 0;
    justify-content: flex-start;
  }
  .rn-nav .nav-link.active::after { display: none; }
  .rn-header-actions--bar {
    margin-left: auto;
    margin-right: 16px;
  }
  .rn-header-actions--bar .rn-lang { margin-right: 16px; }
  .rn-header-actions--bar .rn-btn-login { margin-right: 12px; }
}

@media (max-width: 767px) {
  .rn-header-actions--bar .rn-lang { display: none; }
  .rn-header-actions--bar { margin-right: 12px; }
  .rn-header-actions--bar .rn-btn-login {
    margin-right: 8px;
    padding: 8px 14px;
    font-size: 14px;
  }
  .rn-header-actions--bar .rn-btn-start {
    padding: 8px 14px;
    font-size: 14px;
  }

  .rn-header-actions--menu {
    display: flex !important;
    align-items: center;
    margin-top: 12px;
  }
  .rn-header-actions--menu .rn-lang { margin-right: 0; }
  .rn-header-actions--menu .rn-btn-login,
  .rn-header-actions--menu .rn-btn-start { display: none; }
}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background: var(--rn-navy);
  border-top: 4px solid var(--rn-gold);   /* золотая полоса 4px во всю ширину */
  color: var(--rn-text-light);
  padding-bottom: 32px;
}

.rn-footer-top { padding-top: 80px; }

.rn-footer-top [class*="col-"] { margin-bottom: 32px; }
@media (min-width: 1200px) {
  .rn-footer-top [class*="col-"] { margin-bottom: 0; }
}

/* Заголовки колонок: Playfair Display 700 24/32, золотой */
.rn-footer-title {
  margin: 0 0 16px;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  color: var(--rn-gold);
}

/* Пункты: Inter 400 16/32, светло-серый */
.rn-footer-list { list-style: none; margin: 0; padding: 0; }
.rn-footer-list a {
  display: inline-block;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 32px;
  color: var(--rn-text-light);
  text-decoration: none;
  transition: color .15s ease;
}
.rn-footer-list a:hover { color: var(--rn-gold); }

/* Разделитель 2px, ширина = контейнер, отступы 32px */
.rn-footer-divider {
  width: 100%;
  height: 2px;
  background: #1C3C72;
  margin: 32px 0;
}

/* Ряд копирайта - по центру контейнера */
.rn-footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 20px;
  color: #808389;
  text-align: center;
}
.rn-copy__dot { color: var(--rn-gold); font-size: 10px; line-height: 1; }

.rn-lang--footer { font-family: "Inter", sans-serif; font-size: 14px; }

/* Соцсети: контейнер 24×24, глиф 12px */
.rn-socials { display: inline-flex; align-items: center; gap: 12px; }
.rn-social {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rn-text-light);
  text-decoration: none;
  transition: color .15s ease;
}
.rn-social .bi { font-size: 12px; line-height: 1; }
.rn-social:hover { color: var(--rn-gold); }


/* ==========================================================================
   HERO - первая секция главной
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  min-height: 770px;
  background: var(--rn-navy) url("../assets/first-section/astana-background.jpg") center bottom / cover no-repeat;
  color: var(--rn-white);
  padding-top: var(--rn-header-h);   /* очистить фиксированный хедер */
  padding-bottom: 0;
}
.hero > .container { height: 100%; }
.hero .row { min-height: calc(770px - var(--rn-header-h)); }
.hero__left { padding-top: 0; }

/* Заголовок: первые две строки золотые, «Читающая нация» - белая */
.hero__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 48px;
  line-height: 72px;
  text-transform: uppercase;
}
.hero__title-accent,
.hero__title-main { display: block; }
.hero__title-accent { color: var(--rn-gold); }
.hero__title-main { color: var(--rn-white); }

/* Подпись прогресса */
.hero__progress-label {
  margin-top: 40px;
  margin-bottom: 16px;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rn-text-light);
}

/* Прогресс-бар: золотой градиент + «бегунок» с процентом на конце заливки */
.hero__progress {
  position: relative;
  display: flex;
  align-items: center;
  height: 20px;
  background: #1C3C72;
  border-radius: 10px;
  box-shadow: 0 4px 4px -1px rgba(0, 0, 0, .25);
}
.hero__progress-fill {
  position: relative;
  flex: 0 0 auto;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #B07627 0%, #E9C365 100%);
  border-radius: 10px;
}
.hero__progress-value {
  position: absolute;
  top: 50%;
  right: -20px;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rn-navy);
  border: 2px solid var(--rn-gold);
  border-radius: 50%;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 16px;
  color: var(--rn-gold);
}

/* Кнопки */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}
.hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: filter .15s ease, background-color .15s ease, color .15s ease;
}
.hero__btn .bi { font-size: 12px; }
.hero__btn--gold { background: var(--rn-gold); color: var(--rn-navy); font-weight: 700; border-color: var(--rn-gold); }
.hero__btn--gold:hover { color: var(--rn-navy); filter: brightness(1.06); }
.hero__btn--outline { background: transparent; color: var(--rn-white); font-weight: 700; border-color: var(--rn-white); }
.hero__btn--outline:hover { background: var(--rn-white); color: var(--rn-navy); }

/* Фото семьи: вырезка, прижата к правому нижнему углу секции */
.hero__right { position: static; }
.hero__image {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 1;
  width: 956px;
  max-width: 52vw;
  height: auto;
  pointer-events: none;
}

@media (max-width: 1199px) {
  .hero {
    min-height: 0;
    padding-bottom: 0;
    background-image: url("../assets/first-section/tablet-astana-background.png");
    background-position: center bottom;
    background-size: cover;
  }
  .hero .row { min-height: 0; }
  .hero__left { padding-top: 40px; text-align: center; }
  .hero__title { font-size: 32px; line-height: 1.3; }
  .hero__actions { justify-content: center; }
  .hero__right {
    display: block;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    padding-left: 0;
    padding-right: 0;
  }
  .hero__image {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: 32px;
  }
}

@media (max-width: 767px) {
  .hero {
    background-image: url("../assets/first-section/mobile-astana-background.png");
    min-height: min(166.4vw, 720px);
  }
  .hero__right { display: none; }

  .hero__actions { flex-wrap: nowrap; gap: 12px; }
  .hero__btn {
    flex: 0 1 auto;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    white-space: nowrap;
  }
}


/* ==========================================================================
   ORNAMENT - казахский орнамент-разделитель между секциями
   ========================================================================== */

.rn-ornament {
  height: 70px;
  background: #FCFAF8 url("../assets/second-section/top-glyphs.svg") center center / 1900px 36px no-repeat;
}
.rn-ornament--light { background-color: var(--rn-white); }

/* Разделитель-глиф и золотая кнопка - общие для секций «Список книг», «Лидеры», «Партнёры» */
.rn-rule {
  position: relative;
  display: block;
  width: 100%;
  height: 10px;
  margin: 16px 0 0;
  background:
    linear-gradient(var(--rn-gold), var(--rn-gold)) left 4px / calc(50% - 10px) 2px no-repeat,
    linear-gradient(var(--rn-gold), var(--rn-gold)) right 4px / calc(50% - 10px) 2px no-repeat;
}
.rn-rule::before {                 /* ромб по центру: квадрат 7×7, повёрнутый на 45° */
  content: "";
  position: absolute;
  left: 50%;
  top: 1px;
  width: 7px;
  height: 7px;
  margin-left: -4px;
  border: 2px solid var(--rn-gold);
  box-sizing: border-box;
  transform: rotate(45deg);
}
.rn-btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--rn-gold);
  color: var(--rn-navy);
  border: 1px solid var(--rn-gold);
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  white-space: nowrap;
  transition: filter .15s ease;
}
.rn-btn-gold:hover { color: var(--rn-navy); filter: brightness(1.06); }
.rn-btn-gold .bi { font-size: 12px; }

@media (max-width: 1199px) {
  .rn-ornament {
    height: 48px;
    background-size: 1200px 23px;
    background-clip: padding-box;
    border-inline: 16px solid #FCFAF8;
  }
  .rn-ornament--light { border-inline-color: var(--rn-white); }
}


/* ==========================================================================
   ABOUT - вторая секция (О проекте)
   ========================================================================== */

.about-section {
  position: relative;
  background: #FCFAF8 url("../assets/second-section/background-book.png") left bottom / 1100px auto no-repeat;
  padding: 40px 0 96px;
  border-bottom: 4px solid var(--rn-gold);
}
.about-section > .container { position: relative; z-index: 1; }

/* ---- Левая колонка ---- */
.about__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 64px;
  line-height: 96px;
  text-transform: uppercase;
  color: var(--rn-navy);
}
.about__rule {
  display: block;
  width: 100%;
  height: 10px;
  margin: 8px 0 32px;
}
.about__subtitle {
  margin: 0 0 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 26px;
  color: #16243D;
}
.about__text {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #5D5F64;
}
.about__text + .about__text { margin-top: 32px; }

.about__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 14px 28px;
  background: var(--rn-gold);
  color: var(--rn-navy);
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  transition: filter .15s ease;
}
.about__btn:hover { color: var(--rn-navy); filter: brightness(1.06); }
.about__btn .bi { font-size: 12px; }

/* ---- Правая колонка: 3 инфо-карточки ---- */
.about__features { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 1200px) {
  .about__intro { width: 54%; }
  .about__features { max-width: 39.5%; margin-left: auto; }
}
.feature-card {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 24px 28px;
  background: #FBF8F3;
  border: 1px solid #EFE7D8;
  border-radius: 12px;
}
.feature-card__icon {
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rn-white);
  border: 1px solid #EFE7D8;
  border-radius: 50%;
}
.feature-card__icon img { width: 48px; height: 48px; }
.feature-card__title {
  margin: 0 0 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 24px;
  color: #16243D;
}
.feature-card__desc {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 22px;
  color: #5D5F64;
}


@media (max-width: 1799px) {
  .about-section { background-size: 820px auto; }
}
@media (max-width: 1399px) {
  .about-section { background-size: 640px auto; }
}
@media (max-width: 1199px) {
  .about-section {
    background-size: 95% auto;
    background-position: left bottom;
    padding: 32px 0 64px;
  }
  .about__title { font-size: 44px; line-height: 1.2; text-align: center; }
  .about__features {
    margin-top: 40px;
    margin-left: auto;
    max-width: 67%;
  }
}
@media (max-width: 767px) {
  .about-section { background-size: 130% auto; }
  .about__title { font-size: 34px; }
  .about__features { max-width: 100%; }
  .about__btn { display: flex; justify-content: center; }
}


/* ==========================================================================
   STATS + DIRECTIONS - третья секция (цифры и выбор направления)
   ========================================================================== */

.directions-section {
  background: var(--rn-white) url("../assets/third-section/third-background.png") center top / 100% auto no-repeat;
  padding: 48px 0 88px;
}

/* ---- Ряд из 4 карточек с цифрами ---- */
.stats-row {
  max-width: 1228px;
  margin-inline: auto;
}
.stats-row > [class*="col-"] { display: flex; }
.stat-card {
  position: relative;
  flex: 1 1 auto;
  margin-top: 46px;
  padding: 68px 24px 36px;
  background: var(--rn-white);
  border: 1px solid #E8E6E2;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(11, 30, 62, .06);
  text-align: center;
}
.stat-card__icon {
  position: absolute;
  top: -46px;
  left: 50%;
  transform: translateX(-50%);
  width: 88px;
  height: 88px;
}
.stat-card__num {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 56px;
  letter-spacing: 2px;
  white-space: nowrap;
  color: var(--rn-navy);
}
.stat-card__label {
  margin-top: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #5D5F64;
}
.stat-card__deco {
  display: block;
  width: 100%;
  height: 10px;
  margin-top: 24px;
}

/* ---- Заголовок «Выбери своё направление» ---- */
.dir__head { max-width: 1204px; margin: 56px auto 0; text-align: center; }
.dir__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 64px;
  line-height: 96px;
  text-transform: uppercase;
  text-align: center;
  color: var(--rn-navy);
}
.dir__rule {
  display: block;
  width: 100%;
  height: 10px;
  margin: 8px 0 0;
}
.dir__subtitle {
  margin: 32px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: #5D5F64;
}

.dir__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}
.dir__col { flex: 0 1 calc(25% - 18px); max-width: 283px; display: flex; }

@media (max-width: 1199px) { .dir__col { flex-basis: calc(33.3333% - 17px); } }
@media (max-width: 767px)  { .dir__col { flex-basis: 100%; max-width: 100%; } }

.dir-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 24px;
  background: var(--rn-white);
  border: 1px solid #E9EAEC;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}

.dir-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 6px;
  background: var(--rn-navy);
}
/* Ховер: тень (sds-приближение) + золотой бордер/полоса + сдвиг вверх на 4px */
.dir-card:hover {
  border-color: var(--rn-gold);
  box-shadow: 0 4px 4px -1px rgba(0, 0, 0, .25);
  transform: translateY(-4px);
}
.dir-card:hover::before { background: var(--rn-gold); }

.dir-card__img {
  width: 160px;
  height: 160px;
  max-width: 100%;
  border-radius: 50%;
  background: #ccc center / cover no-repeat;
}

.dir-card__img--school {
  background-image: url("../assets/fourth-section/reading-school.png");
}
.dir-card__img--teacher {
  background-image: url("../assets/fourth-section/reading-teacher.png");
}
.dir-card__img--college {
  background-image: url("../assets/fourth-section/reading-college.png");
}
.dir-card__img--university {
  background-image: url("../assets/fourth-section/reading-university.png");
}
.dir-card__img--dynasty {
  background-image: url("../assets/fourth-section/reading-dynasty.png");
}
.dir-card__img--intellectual {
  background-image: url("../assets/fourth-section/reading-intellectual.png");
}
.dir-card__img--servant {
  background-image: url("../assets/fourth-section/reading-servant.png");
}

html[lang="kk"] .dir-card__img--school {
  background-image: url("../assets/fourth-section/reading-school-kk.png");
}
html[lang="kk"] .dir-card__img--teacher {
  background-image: url("../assets/fourth-section/reading-teacher-kk.png");
}
html[lang="kk"] .dir-card__img--college {
  background-image: url("../assets/fourth-section/reading-college-kk.png");
}
html[lang="kk"] .dir-card__img--university {
  background-image: url("../assets/fourth-section/reading-university-kk.png");
}
html[lang="kk"] .dir-card__img--dynasty {
  background-image: url("../assets/fourth-section/reading-dynasty-kk.png");
}
html[lang="kk"] .dir-card__img--intellectual {
  background-image: url("../assets/fourth-section/reading-intellectual-kk.png");
}
html[lang="kk"] .dir-card__img--servant {
  background-image: url("../assets/fourth-section/reading-servant-kk.png");
}
.dir-card__text {
  margin: 16px 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: #5D5F64;
}
.dir-card__btn {
  display: flex;
  align-self: stretch;           /* кнопка на всю ширину карточки за вычетом padding */
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: auto;              /* прижать кнопку к низу (карточки равной высоты) */
  padding: 12px 16px;
  background: var(--rn-navy);
  color: var(--rn-white);
  border: 1px solid var(--rn-navy);
  border-radius: 6px;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}
.dir-card__btn .bi { font-size: 12px; }
.dir-card:hover .dir-card__btn {
  background: var(--rn-gold);
  border-color: var(--rn-gold);
  color: var(--rn-navy);
}

@media (max-width: 1199px) {
  .directions-section {
    background-color: #E1F3FC;
    background-position: center bottom;
    padding: 32px 0 56px;
  }
  .dir__head { margin-top: 40px; }
  .dir__title { font-size: 44px; line-height: 1.2; }
  .stat-card { margin-top: 0; padding: 24px 16px 28px; }
  .stat-card__icon {
    position: static;
    transform: none;
    display: block;
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
  }
  .stat-card__num { font-size: 36px; line-height: 44px; letter-spacing: 1px; }
  .dir-card__img { width: 140px; height: 140px; }
}

@media (max-width: 767px) {
  .directions-section { background-image: none; }
  .stat-card { margin-top: 46px; padding: 68px 24px 36px; }
  .stat-card__icon {
    position: absolute;
    top: -46px;
    left: 50%;
    transform: translateX(-50%);
    width: 88px;
    height: 88px;
    margin: 0;
  }
  .dir__title { font-size: 34px; }
  .dir-card__img { width: 160px; height: 160px; }
}


/* ==========================================================================
   WINNER - четвёртая секция (Как стать победителем)
   ========================================================================== */

.winner-section {
  position: relative;
  overflow: hidden;
  background: var(--rn-navy) url("../assets/fourth-section/fourth-background.jpg") center center / 100% 100% no-repeat;
  color: var(--rn-white);
  padding: 100px 0 96px;
}
.winner-section > .container { position: relative; z-index: 1; }

/* Медаль справа, вылетает за правый край секции */
.winner__medal {
  position: absolute;
  top: 58px;
  /* уезжает вправо на узких экранах, чтобы не наползать на 4-й шаг */
  right: min(0px, calc(50vw - 982px));
  z-index: 0;
  width: 380px;
  height: auto;
  pointer-events: none;
}

.winner__head { max-width: 1204px; margin: 0 auto; text-align: center; }
.winner__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 64px;
  line-height: 96px;
  text-transform: uppercase;
  text-align: center;
  color: var(--rn-gold);
}
.winner__rule {
  display: block;
  width: 100%;
  height: 10px;
  margin: 8px 0 0;
}
.winner__subtitle {
  margin: 32px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: var(--rn-text-light);
}

/* ---- Шаги ---- */
.winner__steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 64px;
}
.step {
  position: relative;
  flex: 0 1 calc(25% - 18px);
  max-width: 283px;
  padding-top: 54px;               /* бейдж наполовину выходит за верх арки */
}
.step__badge {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rn-gold);
  border-radius: 50%;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 40px;
  line-height: 48px;
  color: var(--rn-navy);
}
/* пунктирный коннектор до следующего шага + стрелка по центру */
.step__line {
  position: absolute;
  top: 39px;                       /* центр бейджа (40) минус половина линии */
  left: calc(50% + 44px);
  width: calc(100% - 64px);        /* до следующего бейджа: 100% + 24 (gap) - 2*44 */
  border-top: 2px dashed var(--rn-gold);
}
.step__line::after {
  content: "";
  position: absolute;
  top: -7px;
  left: 50%;
  margin-left: -9px;
  border-left: 18px solid var(--rn-gold);
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

/* «Арка»: купол сверху, растворяется в фоне снизу */
.step__panel {
  min-height: 336px;
  padding: 64px 24px 24px;
  border-radius: 50% 50% 0 0 / 101px 101px 0 0;
  background: linear-gradient(180deg, #263D6F 0%, rgba(11, 30, 62, 0) 100%);
  text-align: center;
}
.step__icon {
  display: block;
  width: auto;
  height: 60px;
  margin: 0 auto;
}
.step__title {
  margin: 24px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 20px;
  line-height: 24px;
  text-align: center;
  color: var(--rn-white);
}
.step__desc {
  margin: 24px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: var(--rn-text-light);
}

/* ---- Блок «Система баллов» ---- */
.score-box {
  max-width: 1204px;
  margin: 104px auto 0;
  padding: 32px 40px 24px;
  background: var(--rn-white);
  border-radius: 64px;
  text-align: center;
}
.score-box__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 64px;
  text-transform: uppercase;
  color: var(--rn-navy);
}
.score-box__text {
  margin: 32px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #16243D;
}
.score-box__btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px;
  padding: 12px 28px;
  background: var(--rn-gold);
  color: var(--rn-navy);
  border: 1px solid var(--rn-gold);
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  transition: filter .15s ease;
}
.score-box__btn:hover { color: var(--rn-navy); filter: brightness(1.06); }
.score-box__btn .bi { font-size: 12px; }

@media (max-width: 1199px) {
  .step { flex-basis: calc(50% - 12px); max-width: 420px; }
  .step:nth-child(2n) .step__line { display: none; }
  .winner-section {
    background-image: none;
    padding: 56px 0 64px;
  }
  .winner__title { font-size: 44px; line-height: 1.2; }
  .winner__medal {
    top: auto;
    right: 0;
    bottom: 0;
    width: 46%;
    max-width: 340px;
  }
  .score-box {
    max-width: 58%;
    margin: 72px 0 0;
    padding: 32px 24px;
    border-radius: 40px;
  }
  .score-box__title { font-size: 32px; line-height: 40px; }
}

@media (max-width: 767px) {
  .winner-section { padding: 40px 0 48px; }
  .winner__title { font-size: 26px; line-height: 1.25; }
  .winner__subtitle { margin-top: 24px; }

  .winner__steps { gap: 16px; margin-top: 48px; }
  .step { flex-basis: calc(50% - 8px); padding-top: 32px; }
  .step__badge {
    width: 48px;
    height: 48px;
    font-size: 24px;
    line-height: 32px;
  }
  .step__line {
    top: 23px;
    left: calc(50% + 28px);
    width: calc(100% - 40px);   /* 100% + 16 (gap) - 2*28 */
  }
  .step__line::after {
    top: -6px;
    margin-left: -6px;
    border-left-width: 12px;
    border-top-width: 5px;
    border-bottom-width: 5px;
  }
  .step__panel {
    min-height: 0;
    padding: 40px 12px 24px;
    border-radius: 50% 50% 0 0 / 60px 60px 0 0;
  }
  .step__icon { height: 40px; }
  .step__title { margin-top: 16px; font-size: 15px; line-height: 20px; }
  .step__desc { margin-top: 12px; font-size: 13px; line-height: 18px; }

  .winner__medal { display: none; }
  .score-box { max-width: 100%; margin: 48px auto 0; border-radius: 32px; }
}


.carousel__controls { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.carousel__arrow {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #CECFD2;
  border-radius: 50%;
  color: var(--rn-navy);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, opacity .15s ease;
}
.carousel__arrow:hover { border-color: var(--rn-gold); color: var(--rn-gold); }
.carousel__arrow.slick-disabled { opacity: .4; cursor: default; }
.carousel__arrow.slick-disabled:hover { border-color: #CECFD2; color: var(--rn-navy); }

.carousel__dots { display: flex; align-items: center; gap: 8px; }
.carousel__dots ul,
.carousel__dots .slick-dots {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.carousel__dots li { line-height: 0; }
.carousel__dot {
  width: 8px;
  height: 8px;
  padding: 0;
  font-size: 0;
  background: #CECFD2;
  border: none;
  border-radius: 50%;
  cursor: pointer;
}
.carousel__dots li.slick-active .carousel__dot { background: var(--rn-gold); }
.carousel__dots > .carousel__dot.is-active { background: var(--rn-gold); }


/* ==========================================================================
   BOOKS - шестая секция (Список книг)
   ========================================================================== */

.books-section {
  background: var(--rn-white);
  padding: 80px 0 96px;
}

/* Заголовок секции: тайтл слева, золотая кнопка справа */
.books__head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.books__title {
  margin: 0;
  flex: 0 0 auto;
  font-family: "Playfair Display", serif;
  font-weight: 500;
  font-size: 64px;
  line-height: 96px;
  text-transform: uppercase;
  color: var(--rn-navy);
}

/* Чипы-фильтры */
.books__filters { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }
.books__chip {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 11px 16px;
  background: transparent;
  border: 1px solid var(--rn-navy);
  border-radius: 6px;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  text-transform: uppercase;
  color: var(--rn-navy);
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.books__chip:hover { border-color: var(--rn-gold); color: var(--rn-gold); }
.books__chip.is-active { border-color: var(--rn-gold); color: var(--rn-gold); }

/* Трек карточек книг (карусель Slick).
   Slick ставит слайды вплотную, поэтому промежуток задаём паддингом слайда,
   а трек сдвигаем отрицательными полями - крайние карточки остаются вровень
   с контейнером. */
.books__grid { margin: 32px -12px 0; }
.books__grid .slide { padding: 0 12px; }
.book-card {
  width: 100%;
  height: 609px;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: var(--rn-white);
  border: 1px solid #F0F1F2;
  border-radius: 8px;
}
.book-card__cover {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  object-fit: contain;
  background: center / contain no-repeat;
}
.book-card__title {
  margin: 32px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 32px;
  text-align: center;
  color: var(--rn-navy);
}
.book-card__author {
  margin: 8px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  text-align: center;
  color: #5D5F64;
}
.book-card__meta {
  margin: 12px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
  color: var(--rn-gold);
}

/* Низ: навигация карусели */
.books__foot { margin-top: 40px; overflow: hidden; }   /* overflow скрывает bleed за экраном */
.books__foot-inner { display: flex; align-items: center; justify-content: center; gap: 16px; }

@media (max-width: 1199px) {
  .books-section { padding: 56px 0 64px; }
  .books__head { flex-wrap: wrap; }
  .books__title { font-size: 48px; line-height: 64px; }
  .books-section .books__head {
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
  }
  .books__filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .books__filters::-webkit-scrollbar { display: none; }
  .books__chip { flex: 0 0 auto; }
  .books__grid .slick-slide > div + div { margin-top: 24px; }
}

@media (max-width: 767px) {
  .books__title,
  .leaders__head .books__title { font-size: 34px; line-height: 1.2; }
  .books__head {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    text-align: center;
  }
  .rn-btn-gold { justify-content: center; }
}


/* ==========================================================================
   RATING - пятая секция (Лидеры)
   ========================================================================== */

.rating-section { background: var(--rn-white); padding: 0 0 120px; }

/* Карточка со скруглённой золотой «шапкой»: толстый верхний бордер + большой радиус */
.leaders-card {
  padding: 32px;
  background: var(--rn-white);
  border: 0;
  border-top: 16px solid var(--rn-gold);
  border-radius: 54px;
  box-shadow: 0 8px 32px rgba(11, 30, 62, .08);
}
.leaders__head { margin-top: 8px; }
.leaders__filters { margin-top: 24px; }   /* использует .books__chip */

.leaders__list { list-style: none; margin: 32px 0 0; padding: 0; }
.leader {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  height: 58px;
  padding: 0 24px;
  border: 1px solid #F3F4F6;
  border-radius: 10px;
}
.leader--top { border-color: #E9DCB7; }
.leader + .leader { margin-top: 16px; }
.leader__rank {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0F1F3;
  border-radius: 50%;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 13px;
  line-height: 1;
  color: #8A93A6;
}
.leader__rank--1 { background: linear-gradient(135deg, #E8C84A 0%, #C9A84C 50%, #A8892E 100%); color: var(--rn-white); }
.leader__rank--2 { background: linear-gradient(135deg, #D0D0D0 0%, #A8A8A8 50%, #888888 100%); color: var(--rn-white); }
.leader__rank--3 { background: linear-gradient(135deg, #D4956A 0%, #B87333 50%, #9A5C1A 100%); color: var(--rn-white); }
.leader__main { display: flex; align-items: center; gap: 16px; min-width: 0; }
.leader__name {
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--rn-navy);
}
.leader__city {
  text-align: center;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 24px;
  color: #5D5F64;
}
.leader__points {
  text-align: right;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--rn-navy);
  white-space: nowrap;
}

@media (max-width: 1199px) {
  .rating-section { padding-bottom: 64px; }
  .leaders-card { padding: 24px; border-radius: 40px; }
}

@media (max-width: 767px) {
  .leaders-card { padding: 20px; border-radius: 32px; }
  .leader { height: auto; padding: 12px 16px; grid-template-columns: 1fr auto; gap: 4px 12px; }
  .leader__city { grid-column: 1; text-align: left; padding-left: 44px; }
  .leader__points { grid-row: 1; grid-column: 2; }
}


/* ==========================================================================
   REVIEW CARD - карточка отзыва (страница «Что говорят участники»)
   ========================================================================== */

.review-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #fff;
  border: 1px solid #EEE;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.review-card__top { display: flex; align-items: flex-start; justify-content: space-between; }
.review-card__stars { color: var(--rn-gold); font-size: 16px; letter-spacing: 2px; }
.review-card__stars .bi-star { color: #D9D9D9; }
.review-card__quote { color: #E3E3E3; font-size: 40px; line-height: 1; }
.review-card__quote img { width: 40px; height: auto; display: block; }
.review-card__name {
  margin: 16px 0 4px;
  font-family: "Roboto", sans-serif; font-weight: 700; font-size: 18px; line-height: 24px; color: var(--rn-navy);
}
.review-card__role {
  margin: 0;
  font-family: "Roboto", sans-serif; font-weight: 400; font-size: 14px; line-height: 20px; color: #5D5F64;
}
.review-card__text {
  margin: 16px 0;
  padding-bottom: 16px;
  border-bottom: 1px solid #EEE;
  font-family: "Roboto", sans-serif; font-weight: 400; font-size: 16px; line-height: 24px; color: #3D3F45;
}
.review-card__book {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;                 /* прижать низ карточки при равной высоте */
  font-family: "Roboto", sans-serif; font-size: 14px; line-height: 20px; color: #5D5F64;
}
.review-card__book .bi { color: #8A93A6; }
.review-card__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  font-family: "Roboto", sans-serif; font-size: 14px; line-height: 20px; color: #5D5F64;
}
.review-card__pts { color: var(--rn-gold); font-weight: 600; }
.review-card__meta .bi-play-fill { color: var(--rn-navy); }
.review-card__tag { color: #3B6FB0; text-decoration: none; }
.review-card__tag:hover { text-decoration: underline; }


/* ==========================================================================
   PARTNERS - седьмая секция (Партнёры)
   ========================================================================== */

.partners-section { background: var(--rn-white); padding: 0 0 120px; }

/* Ширина карточки - по логотипу, поэтому обычный flex-ряд с переносом */
.partners__track {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 64px;
}
.partners__track > .slide {
  flex: 0 0 auto;
  display: flex;
}
.partner-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 108px;
  padding: 24px 32px;
  background: var(--rn-white);
  border: 1px solid #F0F1F2;
  border-radius: 8px;
}
/* Все логотипы приводим к одной оптической высоте, ширина — по пропорции */
.partner-card img {
  width: auto;
  height: 44px;   /* 5 логотипов должны помещаться в один ряд контейнера */
  max-height: 100%;
  max-width: none;
  display: block;
  object-fit: contain;
}
.partner-card--compact img { height: 56px; }
/* Квадратные логотипы: по высоте 44px выглядят вдвое мельче широких, поэтому
   уменьшаем поля карточки и даём логотипу большую оптическую высоту */
.partner-card--square { padding: 16px 24px; }
.partner-card--square img { height: 72px; }

@media (max-width: 1199px) {
  .partners-section { padding-bottom: 64px; }
  .partners__track {
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
  }
  .partners__track > .slide {
    flex: 1 1 calc(33.3333% - 17px);
    min-width: 0;
  }
  .partner-card img {
    height: auto;
    max-height: 44px;
    max-width: 100%;
  }
  .partner-card--compact img { max-height: 56px; }
  .partner-card--square img { max-height: 72px; }
}

@media (max-width: 767px) {
  .partners__track { gap: 16px; }
  .partners__track > .slide { flex-basis: calc(50% - 9px); }
  .partner-card {
    height: 88px;
    padding: 16px 20px;
  }
  .partner-card img { max-height: 36px; }
  .partner-card--compact img { max-height: 44px; }
  .partner-card--square { padding: 10px 14px; }
  .partner-card--square img { max-height: 60px; }
}

.partners__track.slick-slider { display: block; }
.partners__track .slick-list { margin: 0 -12px; }
.partners__track .slick-slide { padding: 0 12px; }
.partners__track.slick-slider { touch-action: pan-y; }


/* ==========================================================================
   CTA - одиннадцатая секция (баннер регистрации)
   ========================================================================== */

.cta-section {
  background: var(--rn-gold);
  border-radius: 56px 56px 0 0;    /* скругление только верхних углов */
  padding: 72px 0 80px;
  color: var(--rn-white);
}
.cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 32px;
}
.cta__text { flex: 1 1 auto; }
.cta__title {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 36px;
  line-height: 44px;
  text-transform: uppercase;
  color: var(--rn-navy);
}
.cta__subtitle {
  margin: 8px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: var(--rn-white);
}
.cta__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 17px 32px;
  background: var(--rn-navy);
  color: var(--rn-white);
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  transition: filter .15s ease;
}
.cta__btn:hover { color: var(--rn-white); filter: brightness(1.35); }
.cta__btn .bi { font-size: 12px; }

@media (max-width: 1199px) {
  .cta__inner { flex-direction: column; text-align: center; }
  .cta__btn { justify-content: center; }
}
@media (max-width: 767px) {
  .cta__title { font-size: 24px; line-height: 32px; }
}


/* ==========================================================================
   NEWS PAGE - отдельная страница новостей (news.html)
   Хедер здесь сплошной белый (.site-header--solid, position: fixed),
   поэтому контенту нужен верхний отступ на высоту хедера.
   ========================================================================== */

body.rn-inner { padding-top: var(--rn-header-h); }

/* Hero: заголовок + золотая линия + подзаголовок */
.news-hero { background: #fff; padding: 56px 0 8px; text-align: center; }
.news-hero__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--rn-navy);
}
.news-hero__rule {
  width: 840px;
  max-width: 80%;
  height: 3px;
  margin: 24px auto 0;
  background: var(--rn-gold);
  border-radius: 2px;
}
.news-hero__subtitle {
  margin: 20px auto 0;
  max-width: 720px;
  font-family: "Inter", sans-serif;
  font-size: 18px;
  line-height: 28px;
  color: #5D5F64;
}

/* Панель фильтров: поиск + период + сортировка */
.news-tools { background: #fff; padding: 28px 0 8px; }
.news-tools__row { display: flex; gap: 20px; align-items: stretch; flex-wrap: wrap; }
.news-tools__search { flex: 1 1 420px; }
.news-tools__field  { flex: 0 0 240px; }
.news-tools__sort   { flex: 0 0 220px; }

.news-tools__search,
.news-tools__field,
.news-tools__sort {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 18px;
  background: #fff;
  border: 1px solid #E9EAEC;
  border-radius: 12px;
}
.news-tools__row .bi { color: #8A93A6; font-size: 18px; flex: 0 0 auto; }
.news-tools__search input,
.news-tools__field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--rn-navy);
}
.news-tools__sort select {
  flex: 1 1 auto;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--rn-navy);
  cursor: pointer;
}

/* Сетка карточек новостей */
.newsfeed { background: #fff; padding: 40px 0 80px; }
.newsfeed__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.nf-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #EEE;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  transition: box-shadow .2s ease, transform .2s ease;
}
.nf-card:hover { box-shadow: 0 10px 28px rgba(11, 30, 62, .12); transform: translateY(-2px); }
.nf-card__img { width: 100%; aspect-ratio: 16 / 10; background: #ccc; object-fit: cover; }
.nf-card__body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 22px 22px 24px; }
.nf-card__date {
  display: flex; align-items: center; gap: 8px;
  font-family: "Roboto", sans-serif; font-size: 14px; line-height: 20px; color: #5D5F64;
}
.nf-card__date .bi { color: #8A93A6; }
.nf-card__title {
  margin: 14px 0 12px;
  font-family: "Roboto", sans-serif; font-weight: 700; font-size: 19px; line-height: 26px;
  color: var(--rn-navy);
}
.nf-card__text {
  margin: 0 0 20px;
  font-family: "Inter", sans-serif; font-size: 15px; line-height: 24px; color: #5D5F64;
}
.nf-card__link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: auto;
  font-family: "Roboto", sans-serif; font-weight: 600; font-size: 16px; line-height: 24px;
  color: #3B6FB0; text-decoration: none;
}
.nf-card__link:hover { color: var(--rn-navy); }
.nf-card__link .bi { font-size: 14px; }

/* Пагинация: «на странице» + номера */
.news-pagination {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 20px; margin-top: 48px;
}
.news-pagination__perpage {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 14px;
  border: 1px solid #E9EAEC; border-radius: 10px;
  font-family: "Inter", sans-serif; font-size: 15px; color: #5D5F64;
}
.news-pagination__perpage select {
  border: 0; outline: 0; background: transparent;
  font-family: "Inter", sans-serif; font-size: 15px; color: var(--rn-navy); cursor: pointer;
}
.news-pagination__nav {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0; padding: 0; list-style: none;
}
.news-pagination__nav li { display: inline-flex; }
.news-pagination__nav a { text-decoration: none; }
.pg {
  min-width: 44px; height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #E9EAEC; border-radius: 10px; background: #fff;
  font-family: "Roboto", sans-serif; font-size: 15px; color: var(--rn-navy);
  cursor: pointer; transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.pg:hover { border-color: var(--rn-gold); color: var(--rn-gold); }
.pg.is-active { border-color: var(--rn-gold); color: var(--rn-gold); font-weight: 700; }
.news-pagination__nav .is-active .pg {
  border-color: var(--rn-gold); color: var(--rn-gold); font-weight: 700;
}
.news-pagination__nav .disabled .pg { color: #B5B8BE; cursor: not-allowed; }
.pg:disabled { color: #B5B8BE; cursor: not-allowed; }
.pg:disabled:hover { border-color: #E9EAEC; color: #B5B8BE; }
.pg-ellipsis { padding: 0 4px; color: #8A93A6; }

/* Адаптив страницы новостей */
@media (max-width: 991px) {
  .newsfeed__grid { grid-template-columns: repeat(2, 1fr); }
  .news-hero__title { font-size: 40px; }
}
@media (max-width: 575px) {
  .newsfeed__grid { grid-template-columns: 1fr; }
  .news-hero__title { font-size: 30px; }
  .news-tools__field, .news-tools__sort { flex: 1 1 100%; }
  .news-pagination { justify-content: center; }
}


/* ==========================================================================
   BOOKS LIST - страница «Список книг проекта» (books.html)
   Hero переиспользует .news-hero, карточки - .book-card, пагинация - .news-*.
   ========================================================================== */

/* Панель фильтра по направлению + кнопка «Применить» */
.books-filter { background: #fff; padding: 28px 0 8px; }
.books-filter__row { display: flex; gap: 20px; align-items: stretch; flex-wrap: wrap; }
.books-filter__field {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 8px 0 18px;
  background: #FAF9F9;
  border: 1px solid #E9EAEC;
  border-radius: 10px;
}
.books-filter__field select {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: var(--rn-navy);
  cursor: pointer;
}
.books-filter__btn {
  flex: 0 0 auto;
  padding: 0 32px;
  height: 56px;
  border: 0;
  border-radius: 10px;
  background: var(--rn-navy);
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease;
}
.books-filter__btn:hover { background: #12294f; }

/* Сетка карточек книг: 4 в ряд */
.books-list { background: #fff; padding: 32px 0 80px; }
.books-list__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* Адаптив страницы списка книг */
@media (max-width: 1200px) {
  .books-list__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
  .books-list__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .books-list__grid { grid-template-columns: 1fr; }
  .books-filter__field, .books-filter__btn { flex: 1 1 100%; }
}


/* ==========================================================================
   REVIEWS LIST - страница «Что говорят участники» (reviews.html)
   Hero переиспользует .news-hero, карточки - .review-card, пагинация - .news-*.
   ========================================================================== */

/* Сетка отзывов: 3 в ряд */
.reviews-list { background: #FFF; padding: 40px 0 80px; }
.reviews-list__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Адаптив страницы отзывов */
@media (max-width: 991px) {
  .reviews-list__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .reviews-list__grid { grid-template-columns: 1fr; }
}


/* ==========================================================================
   NEWS DETAIL - просмотр одной новости (news-detail.html)
   Хедер сплошной белый (.rn-inner). Слева статья, справа - другие новости.
   ========================================================================== */

.article { background: #fff; padding: 28px 0 80px; }

/* Хлебные крошки */
.breadcrumb-rn {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-bottom: 28px;
  font-family: "Inter", sans-serif; font-size: 14px; line-height: 20px; color: #8A93A6;
}
.breadcrumb-rn a { color: #8A93A6; text-decoration: none; transition: color .15s ease; }
.breadcrumb-rn a:hover { color: var(--rn-navy); }
.breadcrumb-rn .bi { font-size: 12px; color: #B5B8BE; }
.breadcrumb-rn__current { color: var(--rn-navy); }

/* Двухколоночная раскладка */
.article__layout { display: flex; align-items: flex-start; gap: 48px; }
.article__main { flex: 1 1 auto; min-width: 0; }
.article__aside { flex: 0 0 340px; }

/* Статья */
.article__cover {
  width: 100%; aspect-ratio: 16 / 10;
  background: #ccc; border-radius: 16px; overflow: hidden;
}
.article__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article__title {
  margin: 26px 0 20px;
  font-family: "Roboto", sans-serif; font-weight: 700; font-size: 28px; line-height: 38px;
  color: var(--rn-navy);
}
.article__body p {
  margin: 0 0 18px;
  font-family: "Inter", sans-serif; font-size: 17px; line-height: 30px; color: #5D5F64;
}
.article__body .rn-news-indent { text-indent: 2em; color: #3C3C3C; }
.article__body .rn-news-font-7 { font-size: 7pt; }
.article__body .rn-news-font-9 { font-size: 9pt; }
.article__body .rn-news-font-11 { font-size: 11pt; }
.article__body .rn-news-font-12 { font-size: 12pt; }
.article__body .rn-news-font-14 { font-size: 14pt; }
.article__body .rn-news-font-16 { font-size: 16pt; }
.article__body .rn-news-font-18 { font-size: 18pt; }
.article__body .rn-news-font-20 { font-size: 20pt; }
.article__body .rn-news-font-24 { font-size: 24pt; }
.article__body .rn-news-font-28 { font-size: 28pt; }
.article__body .rn-news-font-32 { font-size: 32pt; }
.article__meta {
  display: flex; align-items: center; gap: 28px; margin-top: 26px;
  font-family: "Roboto", sans-serif; font-size: 15px; line-height: 20px; color: #5D5F64;
}
.article__meta span { display: inline-flex; align-items: center; gap: 8px; }
.article__meta .bi { color: #8A93A6; font-size: 16px; }

/* Сайдбар «другие новости» */
.side-news {
  position: relative;
  background: #fff;
  border: 1px solid #EEE;
  border-radius: 0 0 4px 4px;             /* верхние углы square - под navy-полосу */
  box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
  padding: 6px 22px;
}
/* Верхняя полоса - как у .dir-card (4px navy, square, с нахлёстом на бордер) */
.side-news::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 4px;
  background: var(--rn-navy);
}
.side-item { padding: 20px 0; border-bottom: 1px solid #EEE; }
.side-item:last-child { border-bottom: 0; }
.side-item__date {
  display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
  font-family: "Roboto", sans-serif; font-size: 13px; line-height: 18px; color: #8A93A6;
}
.side-item__date .bi { color: #B5B8BE; }
.side-item__title {
  display: block;
  font-family: "Roboto", sans-serif; font-weight: 700; font-size: 16px; line-height: 24px;
  color: var(--rn-navy); text-decoration: none; transition: color .15s ease;
}
.side-item__title:hover { color: var(--rn-gold); }

/* Адаптив: сайдбар уходит вниз */
@media (max-width: 991px) {
  .article__layout { flex-direction: column; gap: 40px; }
  .article__aside { flex: 1 1 auto; width: 100%; }
  .article__title { font-size: 24px; line-height: 32px; }
}


/* ==========================================================================
   FAQ - страница «Часто задаваемые вопросы» (faq.html)
   Hero переиспользует .news-hero. Ниже - аккордеон: один пункт открыт.
   ========================================================================== */

.faq { background: #fff; padding: 24px 0 90px; }
.faq-list { list-style: none; margin: 0 auto; padding: 0; max-width: 900px; }

/* Закрытый пункт: строка с вопросом + разделитель снизу */
.faq-item { border-bottom: 1px solid #ECECEE; }
.faq-item:last-child { border-bottom: 0; }

.faq-item__head {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 26px 4px;
  background: transparent; border: 0; text-align: left; cursor: pointer;
}
.faq-item__q {
  font-family: "Roboto", sans-serif; font-weight: 700;
  font-size: 18px; line-height: 26px; color: var(--rn-navy);
}

/* Иконка: «+» из двух полосок; в открытом состоянии поворачивается в «×» */
.faq-item__icon {
  position: relative; flex: 0 0 auto;
  width: 24px; height: 24px; border-radius: 50%;
  transition: background .2s ease, transform .25s ease;
}
.faq-item__icon::before,
.faq-item__icon::after {
  content: ""; position: absolute; top: 50%; left: 50%;
  background: #8A93A6; transition: background .2s ease;
}
.faq-item__icon::before { width: 13px; height: 2px; transform: translate(-50%, -50%); }
.faq-item__icon::after  { width: 2px; height: 13px; transform: translate(-50%, -50%); }

/* Тело ответа: плавно раскрывается по высоте */
.faq-item__body { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.faq-item__a {
  margin: 0; padding: 0 4px 26px;
  font-family: "Inter", sans-serif; font-size: 15px; line-height: 24px; color: #5D5F64;
}

/* Открытый пункт: серая карточка + крестик в круге */
.faq-item.is-open {
  background: #F5F5F6; border-radius: 16px; border-bottom-color: transparent;
  margin: 6px 0;
}
.faq-item.is-open .faq-item__head { padding: 26px 22px 12px; }
.faq-item.is-open .faq-item__a { padding: 0 22px 24px; }
.faq-item.is-open .faq-item__body { max-height: 1000px; }
.faq-item.is-open .faq-item__icon { background: #9B9FA7; transform: rotate(45deg); }
.faq-item.is-open .faq-item__icon::before,
.faq-item.is-open .faq-item__icon::after { background: #fff; }

/* Адаптив */
@media (max-width: 575px) {
  .faq-item__q { font-size: 16px; line-height: 24px; }
  .faq-item__head { padding: 20px 4px; }
  .faq-item.is-open .faq-item__head { padding: 20px 16px 10px; }
  .faq-item.is-open .faq-item__a { padding: 0 16px 20px; }
}


/* ==========================================================================
   RATING - страница «Рейтинг участников» (rating.html)
   Hero переиспользует .news-hero. Карточки - как .dir-card (4-я секция),
   но без hover-эффекта: верхняя navy-полоса, square-углы сверху, 1px бордер.
   ========================================================================== */

.rating-stats { background: #fff; padding: 48px 0 80px; }

.rating-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.rating-card {
  position: relative;
  padding: 32px 32px 40px;
  background: #fff;
  border: 1px solid #E9EAEC;
  border-radius: 0 0 8px 8px;       /* верхние углы square - под navy-полосу */
}
/* Верхняя полоса - отдельный элемент, без закруглений (как в .dir-card, .stat-card) */
.rating-card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 4px;
  background: var(--rn-navy);
}
.rating-card__label {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #5D5F64;
}
.rating-card__num {
  margin-top: 16px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 44px;
  line-height: 52px;
  letter-spacing: 1px;
  color: var(--rn-navy);
}

@media (max-width: 991px) {
  .rating-stats__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575px) {
  .rating-stats { padding: 32px 0 56px; }
  .rating-stats__grid { grid-template-columns: 1fr; }
  .rating-card__num { font-size: 38px; line-height: 44px; }
}

/* ---- Таблица «Рейтинг по регионам» (в первой секции, под карточками) ---- */
.region-rating { margin-top: 64px; }
.region-rating__title {
  margin: 0 0 32px;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 48px;
  line-height: 1.15;
  text-transform: uppercase;
  text-align: center;
  color: var(--rn-navy);
}
.region-rating__wrap {
  overflow-x: auto;
  background: #fff;
  border: 1px solid #F0F1F2;
  border-radius: 8px;
}
.region-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.region-table thead th {
  padding: 14px 20px;
  text-align: left;
  background: #FBFBFC;
  border-bottom: 1px solid #F0F1F2;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 11px;
  line-height: 16px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #8A93A6;
  white-space: nowrap;
}
.region-table tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid #F0F1F2;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 20px;
  color: #5D5F64;
  white-space: nowrap;
}
.region-table tbody tr:last-child td { border-bottom: 0; }
.region-table th:nth-child(1),
.region-table td:nth-child(1) { width: 56px; color: #8A93A6; }
.region-table th:nth-child(2) { width: 42%; }
.region-table td:nth-child(2) { color: #16243D; font-weight: 500; }

@media (max-width: 575px) {
  .region-rating__title { font-size: 32px; }
}

/* ---- Интерактивная карта Казахстана (между карточками и таблицей) ---- */
.kzmap { position: relative; margin-top: 80px; margin-bottom: 80px; }
.kzmap__canvas { position: relative; width: 100%; aspect-ratio: 1202 / 661; }
.kzmap__canvas svg { width: 100%; height: 100%; display: block; }
/* Только области ловят курсор; подписи/обводки прозрачны для мыши */
#kzmap path { pointer-events: none; }
#kzmap .kzmap__region { pointer-events: auto; cursor: pointer; transition: fill .15s ease; }
#kzmap .kzmap__region:hover { fill: rgb(201 168 76 / 0.15); }
/* Подписи областей (заменяют вектор-контуры из map.svg) */
#kzmap .kzmap__label {
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 14px;
  fill: #0B1E3E;
  pointer-events: none;
}

/* Тултип региона (и города респ. значения - рядом) */
.kzmap-tips {
  position: absolute;
  z-index: 5;
  display: none;
  width: 0;
  height: 0;
  pointer-events: none;              /* ловит мышь только сама карточка */
}
.kzmap-tips.is-visible { display: block; }
/* Обёртка - точка в центроиде области; карточки ставит JS по кончику стрелки
   (смещения из макетов, REGIONS[].tips) с клампом в границы карты. */
.kzmap-tip {
  position: absolute;
  transform: translateX(-50%);
  pointer-events: auto;              /* чтобы кликалась кнопка «Смотреть» */
  width: 226px;
  padding: 16px;
  background: #fff;
  border: 2px solid #C9A84C;
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(11, 30, 62, .18);
}
.kzmap-tip__title {
  margin-bottom: 10px;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 24px;
  color: #1E1F21;
}
.kzmap-tip__row { display: flex; align-items: center; justify-content: space-between; }
.kzmap-tip__row span {
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 24px;
  color: #5D5F64;
}
.kzmap-tip__row b {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 32px;
  color: #0B1E3E;
}
.kzmap-tip__btn {
  display: block;
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  background: var(--rn-gold);
  color: #FFF;
  text-align: center;
  text-decoration: none;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 14px;
  letter-spacing: .01em;
}
/* стрелка вниз (указывает на регион) - карточка НАД областью */
.kzmap-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: calc(50% + var(--arrow-x, 0px));   /* сдвиг стрелки внутри карточки */
  transform: translateX(-50%);
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 14px solid #C9A84C;    /* 20×14 - как в макете */
}
/* карточка города - ПОД областью: стрелка смотрит вверх (чтобы 2 тултипа не
   накладывались на адаптиве - один сверху выделенной области, другой снизу) */
.kzmap-tip--below::after {
  top: auto;
  bottom: 100%;
  border-top: none;
  border-bottom: 14px solid #C9A84C;
}
/* Адаптив: карта узкая - ужимаем тултип, чтобы две карточки помещались.
   За края карты не уезжают: JS клампит позицию и компенсирует стрелку. */
@media (max-width: 991px) {
  .kzmap-tip { width: 190px; padding: 12px; }
  .kzmap-tip__title { font-size: 14px; line-height: 20px; margin-bottom: 6px; }
  .kzmap-tip__row b { line-height: 24px; }
  .kzmap-tip__btn { padding: 9px; font-size: 14px; }
}
@media (max-width: 575px) {
  .kzmap-tip { width: 150px; padding: 10px; border-radius: 10px; }
  .kzmap-tip__title { font-size: 13px; line-height: 18px; }
  .kzmap-tip__row span { font-size: 11px; line-height: 18px; }
  .kzmap-tip__row b { font-size: 11px; line-height: 20px; }
  .kzmap-tip__btn { padding: 8px; font-size: 13px; }
}


/* ==========================================================================
   RATING → «Лидеры по направлениям» (rating.html)
   Секция на светло-сером фоне. 6 карточек направлений в сетке 3×2 +
   широкая карточка «Читающая династия» с большой картинкой.
   ========================================================================== */

.leaders-dir { background: #FAF9F9; padding: 72px 0 88px; }
.leaders-dir__title {
  margin: 0 0 48px;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 48px;
  line-height: 1.15;
  text-transform: uppercase;
  text-align: center;
  color: var(--rn-navy);
}

.leaders-dir__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Карточка направления */
.ldir-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  background: #fff;
  border: 1px solid #EDEDED;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

/* Шапка карточки: иконка + название направления на плашке #EDF0FC */
.ldir-card__head {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px;
  background: #EDF0FC;
  border-radius: 8px;
}
.ldir-card__icon {
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--rn-navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ldir-card__icon .bi { color: var(--rn-white); font-size: 30px; }
.ldir-card__name {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 32px;
  text-transform: uppercase;
  color: #0B1E3E;
}

/* Список лидеров */
.ldir-list { list-style: none; margin: 4px 0 0; padding: 0; }
.ldir-leader {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #EFEFEF;
}
.ldir-leader__medal { flex: 0 0 40px; width: 40px; height: 40px; }
.ldir-leader__body { flex: 1 1 auto; min-width: 0; }
.ldir-leader__name {
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #1E1F21;
}
.ldir-leader__org {
  margin-top: 2px;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 16px;
  color: #5D5F64;
}
.ldir-leader__stats {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.ldir-leader__books {
  flex: 0 0 auto;
  font-family: "Roboto", sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 24px;
  text-align: center;
  color: #5D5F64;
}
.ldir-leader__bar {
  flex: 1 1 auto;
  height: 4px;
  background: #F0F1F2;
  border-radius: 2px;
  overflow: hidden;
}
.ldir-leader__bar > span {
  display: block;
  height: 100%;
  background: var(--rn-gold);
  border-radius: 2px;
}
.ldir-leader__points {
  flex: 0 0 auto;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 32px;
  color: var(--rn-gold);
}

/* Ссылка «Смотреть весь рейтинг» */
.ldir-card__more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: var(--rn-navy);
  text-decoration: none;
  transition: color .15s ease;
}
.ldir-card__more:hover { color: var(--rn-gold); }
.ldir-card__more .bi { font-size: 14px; }

/* Широкая карточка «Читающая династия»: колонка лидеров + большая картинка */
.ldir-card--wide { grid-column: 1 / -1; }
.ldir-card--wide .ldir-card__inner {
  display: flex;
  gap: 24px;
  align-items: stretch;
}
.ldir-card--wide .ldir-card__col {
  flex: 0 0 360px;
  display: flex;
  flex-direction: column;
}
.ldir-card__media {
  flex: 1 1 auto;
  min-width: 0;
  aspect-ratio: 780 / 532;
  border-radius: 8px;
  background: #ccc center / cover no-repeat;
  overflow: hidden;
}
.ldir-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 1199px) {
  .leaders-dir__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .leaders-dir { padding: 48px 0 56px; }
  .leaders-dir__title { font-size: 32px; margin-bottom: 32px; }
  .leaders-dir__grid { grid-template-columns: 1fr; }
  .ldir-card--wide .ldir-card__inner { flex-direction: column; }
  .ldir-card--wide .ldir-card__col { flex: 1 1 auto; }
}


/* ==========================================================================
   RATING REGION - внутренняя страница рейтинга по региону (rating-region.html)
   Слева (6 колонок) название региона + 3 карточки статистики, справа - карта
   РК с залитым регионом (отдельный svg на регион, статичный: без тултипов).
   Чипы переиспользуют .books__chip, таблица - .region-table, пагинация - .news-*.
   ========================================================================== */

.region-hero { background: #fff; padding: 28px 0 8px; }

.region-hero__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 1.1;
  letter-spacing: .01em;
  text-transform: uppercase;
  color: var(--rn-navy);
}

/* 3 карточки в ряд внутри половины ширины → компактный вариант .rating-card */
.region-hero__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.rating-card--sm { padding: 18px 20px 22px; }
.rating-card--sm::before { background: var(--rn-gold); }   /* полоса под цвет выделения на карте */
.rating-card--sm .rating-card__label { font-size: 14px; line-height: 20px; }
.rating-card--sm .rating-card__num { margin-top: 8px; font-size: 32px; line-height: 40px; }

/* Карта: тот же контур, но меньше, чем на rating.html. Активная область залита
   золотом, остальные кликабельны; у 3 областей с городом респ. значения при
   наведении - 2 тултипа (position: relative нужен как якорь для .kzmap-tips) */
.region-hero__map { position: relative; max-width: 543px; margin: 0 auto; aspect-ratio: 543 / 299; }
.region-hero__map svg { width: 100%; height: 100%; display: block; }
/* Курсор ловят только области; обводки/подложки прозрачны для мыши */
.region-hero__map path { pointer-events: none; }
.region-hero__map .kzmap-r {
  pointer-events: auto;
  cursor: pointer;
  transition: fill .15s ease;
}
.region-hero__map .kzmap-r:hover,
.region-hero__map .kzmap-r:focus-visible { fill: rgba(201, 168, 76, .5); outline: none; }
.region-hero__map .kzmap-r.is-active {
  fill: var(--rn-gold);
  pointer-events: none;                 /* текущий регион - не ссылка */
  cursor: default;
}

/* ---- Фильтры + таблица участников + пагинация ---- */
.region-rank { background: #fff; padding: 40px 0 80px; }
.region-rank__filters { margin-top: 0; margin-bottom: 28px; }   /* .books__filters даёт margin-top */
.region-table--members { min-width: 860px; }
.region-table--members th:nth-child(2) { width: 26%; }
.region-table--members th:nth-child(3) { width: 26%; }
.region-table--members td:nth-child(3) { color: #16243D; font-weight: 400; }

@media (max-width: 1199px) {
  .region-hero__title { font-size: 44px; }
  .region-hero__stats { margin-top: 28px; }
}
@media (max-width: 991px) {
  .region-hero__map { margin-top: 24px; }
}
@media (max-width: 767px) {
  .region-hero__title { font-size: 34px; }
  .region-hero__stats { grid-template-columns: 1fr; }
  .region-rank { padding: 32px 0 56px; }
}


/* ===========================================================================
   MARATHON PAGE - страница марафона
   ========================================================================== */

.mrt { background: #FAF9F9; padding: 32px 0 72px; }

.mrt-path { background: #fff; padding: 40px 0 32px; }
.mrt-path__label {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #8A93A6;
}
.mrt-path__list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin: 14px 0 0;
  padding: 0;
}
.mrt-path__step {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 24px;
  color: #16243D;
}
.mrt-path__step:not(:last-child)::after {
  content: "\2192";
  color: #B5B8BE;
  font-size: 15px;
  line-height: 1;
}
.mrt-path__step.is-current { color: var(--rn-gold); }
.mrt-path__step.is-current .mrt-path__name {
  padding-bottom: 2px;
  border-bottom: 2px solid var(--rn-gold);
}
.mrt-path__note {
  margin: 16px 0 0;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  line-height: 21px;
  color: #8A93A6;
}

.mrt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.mrt-card {
  display: flex;
  flex-direction: column;
  padding: 20px 24px 24px;
  background: var(--rn-white);
  border: 1px solid #EEF0F3;
  border-radius: 16px;
  box-shadow: 0 1px 3px rgba(11, 30, 62, .04);
}
.mrt-card__head { display: flex; align-items: center; gap: 10px; }
.mrt-card__badge {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--rn-gold);
  border-radius: 6px;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
  color: var(--rn-white);
}
.mrt-card__step {
  font-family: "Inter", sans-serif;
  font-size: 13px;
  line-height: 20px;
  color: #8A93A6;
}
.mrt-card__title {
  margin: 16px 0 0;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--rn-navy);
}
.mrt-card__desc {
  margin: 10px 0 0;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 21px;
  color: #8A93A6;
}
.mrt-card--cta { justify-content: space-between; padding: 24px; }
.mrt-card--cta .mrt-card__title { margin: 0; }
.mrt-card__btn {
  align-self: flex-start;
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  background: var(--rn-navy);
  color: var(--rn-white);
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: filter .15s ease;
}
.mrt-card__btn:hover { color: var(--rn-white); filter: brightness(1.35); }

.mrt-score {
  background: #1C3C72;
  border-radius: 8px 8px 0 0;
  padding: 28px 0;
}
.mrt-score__inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
}
.mrt-score .score-box__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 24px;
  color: var(--rn-white);
}
.mrt-score .score-box__label .bi { color: var(--rn-gold); font-size: 18px; }
.mrt-score .score-box__text {
  flex: 1 1 320px;
  margin: 0;
  color: var(--rn-text-light);
}
.mrt-score .score-box__text b { color: var(--rn-white); }
.mrt-score .score-box__btn {
  flex: 0 0 auto;
  margin-top: 0;
  margin-left: auto;
  white-space: nowrap;
}

@media (max-width: 1199px) {
  .mrt-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 991px) {
  .mrt { padding: 32px 0 56px; }
  .mrt-grid { grid-template-columns: repeat(2, 1fr); }
  .mrt-score__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .mrt-score .score-box__text { flex: 1 1 auto; }
  .mrt-score .score-box__btn { margin-left: 0; }
}
@media (max-width: 575px) {
  .mrt-grid { grid-template-columns: 1fr; }
  .mrt-path__list { gap: 4px 8px; }
}

.rn-w-56 { width: 56%; }
.rn-w-66 { width: 66%; }
.rn-w-76 { width: 76%; }
.rn-w-100 { width: 100%; }

[data-ajax-zone] { position: relative; }

[data-ajax-zone].is-ajax-loading { min-height: 260px; }

[data-ajax-zone].is-ajax-loading > * {
  opacity: .3;
  pointer-events: none;
  transition: opacity .15s ease;
}

[data-ajax-zone].is-ajax-loading::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 3px solid rgba(11, 30, 62, .15);
  border-top-color: var(--rn-gold);
  border-radius: 50%;
  animation: rn-ajax-spin .8s linear infinite;
}

@keyframes rn-ajax-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  [data-ajax-zone].is-ajax-loading::after { animation-duration: 2.4s; }
  [data-ajax-zone].is-ajax-loading > * { transition: none; }
}
