/* Дополнения к верстке: статусы форм, honeypot, отключённые стрелки пагинации */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.form-status { margin: 16px 0 0; padding: 12px 16px; border-radius: 8px; font-size: 15px; line-height: 1.4; }
.form-status.is-success { background: #e6f7ee; color: #146c43; }
.form-status.is-error { background: #fdecec; color: #a4262c; }

.join-modal__panel--compact {
  max-width: 480px;
  padding: 48px 40px 40px;
}

.form-success-modal .join-modal__title {
  margin-bottom: 16px;
  font-size: 24px;
  line-height: 28px;
  text-align: center;
}

.form-success-modal__text {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: #4a596a;
  text-align: center;
}
.pagination .is-disabled { opacity: .35; pointer-events: none; }
.docs__list .doc-row.is-hidden { display: none; }
.org-list__empty, .news-list__empty { padding: 40px 0; text-align: center; font-size: 18px; }

/* Контакты: четыре карточки одинаковой ширины, длинные e-mail и телефоны не растягивают колонку */
.contacts__cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.contact-card { min-width: 0; }
.contact-card__text, .contact-card__text a { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 1240px) { .contacts__cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 576px) { .contacts__cards { grid-template-columns: minmax(0, 1fr); } }
.org-card__info li strong { font-weight: 500; }
.news-docs { padding-top: 0; }

/* Слайдер: видео (iframe) наравне с картинками */
.slider--hero .swiper-slide--video { background: #000; }
.slider--hero .swiper-slide iframe { display: block; width: 100%; height: 100%; border: 0; }

.footer__lang {
  display: flex;
  gap: 6px;
  margin-top: 28px;
}
.footer__lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 36px;
  border: 1px solid rgba(6, 39, 75, .35);
  border-radius: 6px;
  color: #06274b;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.footer__lang-link:hover,
.footer__lang-link:focus-visible {
  border-color: #06274b;
  background: rgba(6, 39, 75, .1);
}
.footer__lang-link.active,
.footer__lang-link.active:hover,
.footer__lang-link.active:focus-visible {
  border-color: #06274b;
  background: #06274b;
  color: #fff;
}

/* Текст из редактора на странице «О Союзе». */
.about-hero__text,
.about-hero__lead {
  font-size: 16px;
  line-height: 1.65;
}
.about-hero__lead {
  max-width: 820px;
}
.about-hero__text > p + p,
.about-hero__lead > p + p:not(:empty) {
  margin-top: 18px;
}
.about-hero__lead > p:has(> strong:only-child) {
  margin-top: 34px;
  font-size: 18px;
  line-height: 1.4;
  color: #06274b;
}
.about-hero__lead > p:first-child {
  margin-top: 0;
}
.about-hero__text > ul,
.about-hero__lead > ul,
.about-hero__lead > ol {
  margin-top: 10px;
  padding-left: 24px;
  list-style-position: outside;
}
.about-hero__text li + li,
.about-hero__lead li + li {
  margin-top: 8px;
}
@media (max-width: 767px) {
  .about-hero__text,
  .about-hero__lead {
    font-size: 15px;
    line-height: 1.6;
  }
  .about-hero__lead > p:has(> strong:only-child) {
    margin-top: 28px;
    font-size: 17px;
  }
}

/* Главная: элементы открываются при входе в область просмотра. */
.has-motion [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.has-motion [data-reveal="right"] { transform: translate3d(48px, 0, 0); }
.has-motion [data-reveal].is-visible { opacity: 1; transform: translate3d(0, 0, 0); }
.has-motion .member[data-reveal].is-visible:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) {
  .has-motion [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Заголовок «Новости» и ссылка «Все» переносятся, если не помещаются в строку (KZ на телефоне). */
.news__head { flex-wrap: wrap; column-gap: 20px; row-gap: 5px; }

/* Подписи в блоке «О Союзе»: при 16px длинные казахские слова не помещались в 106px. */
@media (min-width: 577px) { .about__feature { width: 132px; } }

/*
 * Шапка на десктопе: меню в одну строку при любой длине названий (их меняют в админке).
 * Свободное место делится между пунктами; если не хватает, js/app.js уменьшает шрифт (--nav-font).
 */
@media (min-width: 993px) {
  .header .container { max-width: 1272px; }
  .header__menu, .header--inner .header__menu { min-width: 0; margin-left: clamp(20px, 2.5vw, 40px); }
  .header__nav { flex: 1; min-width: 0; }
  .header__nav-list { justify-content: space-between; gap: 12px; }
  .header__nav-link { white-space: nowrap; font-size: var(--nav-font, 14px); transition: color .2s ease-in-out, opacity .2s ease-in-out; }
  .header__lang { flex-shrink: 0; margin-left: clamp(20px, 2.2vw, 32px); }
  /* крайний случай: названия не помещаются даже мелким шрифтом — разрешаем перенос внутри пункта */
  .header--wrap .header__nav-link { white-space: normal; text-align: center; line-height: 16px; }
}
@media (min-width: 993px) and (max-width: 1199px) {
  .header__logo img, .header--inner .header__logo img { width: 104px; }
  .header__nav-list { gap: 10px; }
  .header__lang { gap: 10px; }
}

/* Документы: подзаголовок под H1. */
.docs__subtitle { max-width: 720px; margin-top: 20px; font-size: 18px; line-height: 26px; font-weight: 500; color: #4a596a; }
@media (min-width: 993px) { .docs__subtitle + .docs__tabs { margin-top: 50px; } }

/* «О Союзе»: кнопка скачивания презентации под слайдером. */
.presentation-download { display: flex; justify-content: center; margin-top: 24px; }
/* точки слайдера выступают на 28px ниже него */
.slider--hero + .presentation-download { margin-top: 56px; }
.presentation-download__btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.presentation-download__btn img { width: 18px; height: 18px; filter: brightness(0) invert(1); }
@media (max-width: 576px) { .presentation-download__btn { width: 100%; } }

/* «Казахстан» набран тем же кеглем, что и цифры: на узких телефонах уменьшаем всё вместе */
@media (max-width: 359px) {
  .stats__icon { width: 72px; height: 72px; }
  .stats__item { gap: 14px; }
  .stats__num { font-size: 32px; }
}

/* в две колонки крупное «Казахстан» помещается только от 700px */
@media (max-width: 699px) {
  .stats__list { grid-template-columns: 1fr; }
}

/* название члена Союза без ссылки — обычный текст */
div.org-card__title:hover { text-decoration: none; }
div.org-card__logo:hover img { transform: none; }

/* Футер: свободные отступы между текстами и без переносов внутри строк (на телефонах перенос остаётся) */
.footer__links { gap: 18px; }
.footer__links a { line-height: 20px; }
.footer__contacts { gap: 18px; }
.footer__bottom-row { row-gap: 12px; }

@media (min-width: 577px) {
  .footer__links a,
  .footer__contacts > *,
  .footer__bottom-row > * { white-space: nowrap; }
  .footer__org { max-width: 260px; }
  .footer__bottom-row { flex-wrap: wrap; column-gap: 40px; }
}

/* на широких экранах колонки идут в ряд по ширине своего содержимого; не поместились — переходят на новую строку целиком */
@media (min-width: 993px) {
  .footer__top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 40px 30px; }
  .footer__col { flex: 0 0 auto; }
  /* одинаковая ширина колонок в RU и KZ: промежутки между ними не зависят от языка */
  .footer__col:nth-child(1) { flex-basis: 260px; }
  .footer__col:nth-child(2) { flex-basis: 358px; }
  .footer__col:nth-child(3) { flex-basis: 332px; }
  .footer__col:nth-child(4) { flex-basis: 196px; }
}

/* планшет: две равные колонки, на узком планшете — одна: в RU и KZ они стоят одинаково */
@media (min-width: 768px) and (max-width: 992px) {
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; }
}
@media (min-width: 577px) and (max-width: 767px) {
  .footer__top { grid-template-columns: minmax(0, 1fr); row-gap: 30px; }
}

/* Карточка члена Союза: полное название и описание на всю ширину карточки, чтобы «Полное название» стояло в одну строку */
@media (min-width: 577px) {
  .org-card__top { grid-template-rows: auto 1fr; }
  .org-card__body { display: contents; }
  .org-card__logo { grid-row: 1 / span 2; }
  .org-card__title { grid-column: 2; grid-row: 1; }
  .org-card__more { grid-column: 2; grid-row: 2; align-self: start; margin-bottom: 0; }
  .org-card__text { grid-column: 1 / -1; max-width: none; margin-top: 16px; }
}

/* на телефоне длинные адреса, сайты и почта в карточке не должны раздвигать страницу вширь */
@media (max-width: 576px) {
  .org-card__info { grid-template-columns: minmax(0, 1fr); }
  .org-card__info li,
  .org-card__info li span,
  .org-card__info li a { min-width: 0; overflow-wrap: anywhere; }
}

/* фильтры членов Союза: список по ширине самого длинного пункта, чтобы текст не обрезался */
@media (min-width: 577px) {
  .filters__row { flex-wrap: wrap; }
  .filters__select { flex: 1 0 auto; width: auto; min-width: 205px; max-width: 100%; }
}
@media (min-width: 993px) {
  .filters__select { flex-grow: 0; }
}
