/* ИПКСЗ — публичный сайт: ГЛАВНАЯ (hero, карточки быстрого доступа, объявления + окно объявления, мероприятия, новости). */

/* =========================================================
   Главная: баннер
   ========================================================= */
.hero {
  position: relative;
  background: linear-gradient(120deg, var(--c-blue) 0%, var(--c-blue-600) 100%);
  color: #fff;
  overflow: hidden;
}

.hero__decor { position: absolute; inset: 0; pointer-events: none; }
.hero__cross {
  position: absolute;
  color: rgba(255,255,255,.12);
  font-family: var(--font-head);
  font-weight: 800;
  line-height: 1;
  user-select: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 48px;
  align-items: center;
  padding-top: 72px;
  padding-bottom: 72px;
  z-index: 1;
}

.hero__title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 0 0 18px;
  color: #fff;
  letter-spacing: -.5px;
}

.hero__lead {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(255,255,255,.85);
  margin: 0 0 28px;
  max-width: 560px;
}

.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero__stats {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
  margin-top: 36px;
}
.hero__stats div { display: flex; flex-direction: column; }
.hero__stats b {
  font-family: var(--font-head);
  font-size: 1.875rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.hero__stats span {
  font-size: 0.8125rem;
  color: rgba(255,255,255,.75);
  margin-top: 4px;
}

.hero__note {
  font-size: 0.75rem;
  color: rgba(255,255,255,.55);
  margin: 22px 0 0;
}

.hero__visual { position: relative; min-height: 380px; }

.hero__card {
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.hero__card img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); display: block; }
.hero__card--main {
  width: 100%;
  height: 340px;
  overflow: hidden;
}
.hero__card--float {
  position: absolute;
  right: -14px;
  bottom: -14px;
  background: var(--c-surface);
  color: var(--c-dark);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 230px;
}
.hero__card--float .ic { width: 18px; height: 18px; color: var(--c-link); margin-bottom: 6px; }
.hero__card--float b { font-family: var(--font-head); font-size: 0.9375rem; }
.hero__card--float span { font-size: 0.8125rem; color: var(--c-muted); }

/* Анонс ближайшего мероприятия в герое (нарядная карточка вместо баннера-заглушки) */
.hero-event {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 340px;
  padding: 30px 28px 26px;
  background: linear-gradient(120deg, var(--c-surface) 0%, var(--c-surface-alt) 28%, var(--c-surface-alt) 58%, var(--c-surface) 100%);
  background-size: 240% 240%;
  animation: hero-event-shimmer 24s ease-in-out infinite;
  color: var(--c-dark);
  border-radius: 18px;
  box-shadow: 0 26px 60px rgba(6, 22, 43, .38), inset 0 0 0 1px rgba(13, 69, 115, .06);
  text-decoration: none;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.hero-event:hover { transform: translateY(-4px); box-shadow: 0 34px 74px rgba(6, 22, 43, .46), inset 0 0 0 1px rgba(13, 69, 115, .1); text-decoration: none; }
.hero-event::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 6px;
  background: linear-gradient(90deg, var(--c-blue), var(--c-blue-600) 40%, var(--c-aqua) 70%, var(--c-blue) 100%);
  background-size: 220% 100%;
  animation: hero-event-strip 18s linear infinite;
}
/* Очень мягкое переливание: медленный дрейф градиента (гасится prefers-reduced-motion) */
@keyframes hero-event-shimmer {
  0% { background-position: 0% 45%; }
  50% { background-position: 100% 55%; }
  100% { background-position: 0% 45%; }
}
@keyframes hero-event-strip {
  0% { background-position: 0% 0; }
  100% { background-position: 200% 0; }
}
.hero-event::after {
  content: "+";
  position: absolute;
  right: 12px;
  bottom: -14px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 120px;
  line-height: 1;
  color: rgba(13, 69, 115, .05);
  pointer-events: none;
}
.hero-event__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--c-link);
}
.hero-event__eyebrow svg { width: 15px; height: 15px; flex: 0 0 auto; }
/* «Все мероприятия» — ссылка в стиле подписи, прижата к правому краю строки */
.hero-event__eyebrow-link { margin-left: auto; color: inherit; text-decoration: none; }
.hero-event__eyebrow-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.hero-event__head { display: flex; align-items: center; gap: 16px; }
.hero-event__date {
  flex: 0 0 auto;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 82px;
  padding: 8px 12px;
  border-radius: 16px;
  background: linear-gradient(150deg, var(--c-blue-600) 0%, var(--c-blue) 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(13, 69, 115, .34);
}
.hero-event__weekday { font-style: normal; font-size: 0.625rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.hero-event__date b { font-family: var(--font-head); font-size: 2rem; font-weight: 800; line-height: 1; white-space: nowrap; }
.hero-event__date span { font-size: 0.6875rem; text-transform: lowercase; letter-spacing: .04em; opacity: .92; white-space: nowrap; }
.hero-event__title {
  font-family: var(--font-head);
  font-size: 1.1875rem;
  font-weight: 800;
  line-height: 1.32;
  color: var(--c-dark);
  text-align: justify;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Бейджи (время, место) центрируем по строке: широкий бейдж «аудитория» занимает строку
   целиком, а верхние чипы должны стоять по её центру (просьба заказчика). */
.hero-event__info { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hero-event__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(13, 69, 115, .055);
  border: 1px solid rgba(13, 69, 115, .10);
  font-size: 0.8125rem;
  color: var(--c-dark);
  line-height: 1.25;
}
.hero-event__chip svg { width: 15px; height: 15px; flex: 0 0 auto; color: var(--c-link); }
.hero-event__chip--who {
  background: linear-gradient(135deg, rgba(45, 109, 181, .12), rgba(28, 157, 106, .12));
  border-color: rgba(45, 109, 181, .18);
  font-weight: 600;
}
.hero-event__accr-list { display: flex; flex-direction: column; gap: 6px; }
.hero-event__accr { display: inline-flex; align-items: center; gap: 7px; font-size: 0.8125rem; font-weight: 600; }
.hero-event__accr svg { width: 15px; height: 15px; flex: 0 0 auto; }
.hero-event__accr--ok { color: #14603c; }
.hero-event__accr--ok a { color: #14603c; text-decoration: underline; }
.hero-event__accr--pending { color: #8a6d1a; }
.hero-event__actions { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(13, 69, 115, .10); display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.hero-event__actions .btn { border-radius: 999px; }

/* Полезные ресурсы (блок внизу главной; включается в админке: Настройки → «Полезные ресурсы») */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}
.link-block {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  background: var(--c-surface);
  transition: box-shadow .2s, transform .2s;
}
.link-block:hover { box-shadow: var(--shadow); transform: translateY(-2px); text-decoration: none; }
.link-block b { display: block; font-family: var(--font-head); font-size: 0.96875rem; color: var(--c-dark); margin-bottom: 3px; }
.link-block small { color: var(--c-muted); font-size: 0.8125rem; }
.link-block__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--c-blue-50);
  color: var(--c-link);
  font-size: 1.125rem;
}

/* =========================================================
   Карточки «быстрого доступа»
   ========================================================= */
.cards { display: grid; gap: 24px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); align-items: start; }
.cards--4 { grid-template-columns: repeat(4, 1fr); align-items: start; }

.card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 18px 20px 16px;
  display: flex;
  flex-direction: column;
}
/* Иконка компактная, в строке с заголовком (не отдельной плиткой — экономит вертикаль) */
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
}
.card__icon .ic { width: 17px; height: 17px; color: #fff; }
.card__icon--blue   { background: var(--c-blue-600); }
.card__icon--green  { background: var(--c-green); }
.card__icon--violet { background: var(--c-violet); }
.card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.0625rem;
  font-weight: 800;
  margin: 0 0 10px;
}

/* Ссылки — компактные строки. На широком экране (три карточки в ряд, колонки узкие) — в один
   столбец; когда карточек в ряд две (планшет) — в два столбца (см. site-responsive.css). */
.card__list {
  list-style: none;
  margin: 0;
  padding: 0;
  column-gap: 22px;
}
.card__list li { border-top: 1px solid var(--c-surface-alt); break-inside: avoid; }
.card__list li:first-child { border-top: 0; }
.card__list a {
  display: block;
  padding: 6px 0;
  color: var(--c-text);
  font-size: 0.8125rem;
  line-height: 1.3;
}
.card__list a:hover { color: var(--c-link); text-decoration: none; }
.cl-ic { width: 16px; height: 16px; flex: 0 0 auto; color: var(--c-link); }

/* =========================================================
   Заголовки секций
   ========================================================= */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-title { font-size: 1.75rem; font-weight: 800; margin: 0; }
.section-title--sm { font-size: 1.3125rem; }
.link-more { font-weight: 600; font-size: 0.90625rem; white-space: nowrap; }

/* =========================================================
   Мероприятия и анонсы
   ========================================================= */
.events {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 24px;
  align-items: stretch;
}
.events__grid, .events__side { display: flex; flex-direction: column; gap: 14px; }
/* Мини-карточки справа — компактные, по высоте ярлыка даты (не растягиваются на всю высоту featured) */
.events__grid .event--mini { flex: 0 0 auto; padding: 10px 22px; }
/* Заголовок и ярлык строго по вертикальному центру карточки (т.е. друг относительно друга) */
.events__grid .event--mini .event__date { align-self: center; }
.events__grid .event--mini .event__body { display: flex; flex-direction: column; justify-content: center; }

/* Агенда ближайших мероприятий (главная): компактные карточки в 2 колонки,
   без второй большой карточки-дубля героя; первая помечена «Ближайшее». */
.events__agenda { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.events__agenda .event--agenda { padding: 14px 18px; align-items: center; }
.events__agenda .event--agenda.is-next { border-left: 4px solid var(--c-blue); }
.events__agenda .event--agenda .event__body { display: flex; flex-direction: column; justify-content: center; }
.events__agenda .event--agenda .event__title { margin-bottom: 2px; }
.events__agenda .event--agenda .event__meta { margin: 0; }
.event__badge {
  display: inline-block; align-self: flex-start; margin-bottom: 5px;
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-blue);
}

/* «План мероприятий» — документ-строка под карточками мероприятий на главной */
.events-plan {
  display: flex; align-items: center; gap: 16px;
  margin-top: 18px; padding: 16px 20px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--c-dark); text-decoration: none;
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.events-plan:hover { box-shadow: var(--shadow-lg); border-color: var(--c-blue-100); transform: translateY(-2px); text-decoration: none; }
.events-plan__ico {
  flex: 0 0 auto; width: 46px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: linear-gradient(150deg, var(--c-blue-600), var(--c-blue)); color: #fff;
  box-shadow: 0 10px 20px rgba(13, 69, 115, .28);
}
.events-plan__ico svg { width: 23px; height: 23px; }
.events-plan__text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.events-plan__text b { font-family: var(--font-head); font-size: 1rem; font-weight: 700; line-height: 1.35; }
.events-plan__cta { margin-left: auto; flex: 0 0 auto; font-weight: 700; color: var(--c-link); white-space: nowrap; }
@media (max-width: 640px) {
  .events-plan { flex-wrap: wrap; gap: 12px; }
  .events-plan__cta { margin-left: 0; width: 100%; }
}

/* Правые карточки новостей (.events__side): ярлык даты — строго квадрат 76×76,
   текст рядом с ним — по центру высоты ярлыка и на всю оставшуюся ширину карточки.
   flex: 1 1 0 — карточки поровну делят высоту блока главной новости (без остатка). */
.events__side .event { align-items: center; flex: 1 1 0; }
.events__side .event .event__date {
  flex: 0 0 76px;
  width: 76px;
  height: 76px;
  min-height: 76px;
  padding: 8px 6px;
  align-self: center;
}
.events__side .event .event__date span { font-size: 0.6875rem; }
.events__side .event .event__body { display: flex; flex-direction: column; justify-content: center; }
.events__side .event .event__title { width: 100%; margin-bottom: 0; }

.event {
  display: flex;
  gap: 18px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: box-shadow .2s;
}
.event:hover { box-shadow: var(--shadow); }

.event--featured { border-left: 5px solid var(--c-blue); height: 100%; position: relative; }
/* Featured: контент сверху, кнопки — по центру карточки с разнесением и прижаты к низу */
.event--featured .event__body { display: flex; flex-direction: column; padding-bottom: 56px; }
.event--featured .event__actions {
  position: absolute;
  left: 22px; right: 22px; bottom: 20px;
  justify-content: center; gap: 14px 28px;
}

/* Правая колонка на главной: 3 последующих мероприятия — только дата и заголовок, шрифт чуть меньше */
.event--mini .event__title { font-size: 0.9375rem; margin-bottom: 0; }
.event--mini .event__date { flex-basis: 64px; min-height: 64px; padding: 10px 6px; }
.event--mini .event__date b { font-size: 1.25rem; }
.event--mini .event__date span { font-size: 0.6875rem; }

.event__date {
  flex: 0 0 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--c-blue-50);
  border-radius: var(--radius-sm);
  padding: 12px 8px;
  text-align: center;
  align-self: flex-start;
  min-height: 76px;
}
.event__date b {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--c-link);
  line-height: 1;
}
.event__date span {
  font-size: 0.75rem;
  color: var(--c-muted);
  margin-top: 3px;
  text-transform: lowercase;
}
.event__date--wide { flex-basis: 90px; }

.event__body { flex: 1; min-width: 0; }
.event__title { font-size: 1.0625rem; font-weight: 700; margin: 0 0 8px; line-height: 1.35; }
.event__title a { color: var(--c-dark); }
.event__title a:hover { color: var(--c-link); text-decoration: none; }
.event__text { font-size: 0.875rem; color: var(--c-muted); margin: 0 0 14px; }
.event__meta { font-size: 0.84375rem; color: var(--c-muted); margin: -2px 0 10px; }
.event__audience { font-size: 0.875rem; color: var(--c-muted); margin: 0 0 12px; }

/* Аккредитация в промо-карточке на главной */
.event__accr { font-size: 0.875rem; font-weight: 700; line-height: 1.35; margin: 0 0 12px; }
.event__accr a { font-weight: 700; }
.event__accr--ok, .event__accr--ok a { color: var(--c-green); }
.event__accr--ok a:hover { color: #357a6f; text-decoration: underline; }
.event__accr--pending { color: var(--c-red); }
.event__actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.events__empty {
  margin: 0;
  padding: 22px 24px;
  background: var(--c-blue-50);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  color: var(--c-muted);
  font-size: 0.9375rem;
}

/* Страница ошибки (404 и др.) — в стиле сайта */
.error-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 40px 44px;
  text-align: center;
  background: var(--c-blue-50);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
}
.error-page__code {
  font-family: var(--font-head);
  font-size: 5.25rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -2px;
  color: var(--c-link);
  opacity: .3;
}
.error-page__title { font-size: 1.75rem; font-weight: 800; color: var(--c-dark); margin: 8px 0 10px; }
.error-page__text { max-width: 560px; margin: 0 auto 24px; color: var(--c-muted); font-size: 0.9375rem; }
.error-page__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.error-page__hint { margin: 22px 0 0; color: var(--c-muted); font-size: 0.875rem; }
.error-page__hint a { color: var(--c-link); }

@media (max-width: 640px) {
  .error-page { padding: 32px 20px 30px; }
  .error-page__code { font-size: 4rem; }
  .error-page__title { font-size: 1.375rem; }
}

.event--news {
  flex-direction: column;
  padding: 0;
  gap: 0;
  overflow: hidden;
}
.event__news-media {
  aspect-ratio: 3 / 1;   /* та же пропорция, что и рамка кадрирования в редакторе */
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-color: var(--c-blue-100);
}
.event__news-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.event__news-wrap { display: flex; flex-direction: column; gap: 16px; padding: 20px 22px; }

/* Карточка последней новости слева (главная): ярлык даты — квадрат,
   заголовок — сразу после ярлыка и по центру его строки, кнопка «Читать» —
   по содержимому и прижата к низу карточки (пустое место уходит под текст). */
.event--news .event__news-wrap { flex: 1 1 auto; }
.event__news-top { display: flex; align-items: center; gap: 16px; }
.event--news .event__date { flex: 0 0 76px; width: 76px; height: 76px; padding: 8px 6px; }
.event--news .event__date span { font-size: 0.6875rem; }
.event--news .event__title { font-size: 1.375rem; line-height: 1.3; margin: 0; min-width: 0; }
.event--news .event__text { margin: 0; }
.event--news .btn { align-self: flex-start; margin-top: auto; }

.events--split { grid-template-columns: 1.1fr .9fr; align-items: stretch; }
.events--split .event--news { height: 100%; }

/* Объявления на главной — слайдер (Swiper, public/assets/vendor/swiper), карточка: квадрат слева.
   Карточки компактные: изображение 156×156 = высота карточки, текст обрезается клампами. */
/* Заголовок блока — тот же 28px, что у «Мероприятий» и «Новостей» */
.ann-head { margin-top: 0; align-items: baseline; }

/* ===== Модальное окно объявления (у объявлений нет полной страницы) =====
   Ширина окна = ширина фото (500px), фото строго квадратное 500×500.
   Текст ниже — без скролла на целевом объёме (лимит задаётся в редакторе). */
.ann-modal {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  padding: 24px; box-sizing: border-box;
}
.ann-modal.is-open { display: flex; }
.ann-modal__backdrop { position: absolute; inset: 0; background: rgba(10, 25, 45, .55); }
.ann-modal__box {
  position: relative;
  width: 500px; max-width: 100%;
  /* Потолок окна = 760px: 500 фото + 42 padding + 52 заголовок(2 стр.) + 2×10 gap
     + 90 текст(4 стр.) + 23 кнопка = 727px -> на экранах от 808px по высоте
     скролла нет. overflow-y:auto — страховка для низких экранов. */
  max-height: 760px;
  display: flex; flex-direction: column;
  background: var(--c-surface); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(10, 25, 45, .35);
  overflow: hidden;
}
.ann-modal__x {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 36px; height: 36px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, .92); color: #15293d;
  cursor: pointer;
}
.ann-modal__x svg { width: 20px; height: 20px; }
.ann-modal__x:hover { background: #fff; color: var(--c-blue-600); }
.ann-modal__media {
  flex: 0 0 500px; width: 500px; max-width: 100%;
  height: 500px;
  background: var(--c-soft);
  overflow: hidden;
}
.ann-modal__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ann-modal__img[src=""] { display: none; }
.ann-modal__body {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
  padding: 20px 24px 22px;
  display: flex; flex-direction: column; gap: 10px;
}
.ann-modal__title {
  font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin: 0;
  /* по ширине: переносы слов расставляет сервер (мягкие переносы, см. Hyphenator) —
     без них justify даёт «дыры» между словами (замер: 9.7px против 31.2px) */
  text-align: justify;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ann-modal__text {
  font-size: 0.9375rem; line-height: 1.5; color: var(--c-text); margin: 0;
  text-align: justify;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.ann-modal__text:empty { display: none; }
.ann-modal__btn { margin-top: auto; align-self: flex-start; }
/* Видимость — только классом: атрибут hidden перебивается display:flex (см. AGENTS.md) */
.ann-modal__btn.is-hidden, .ann-modal__img.is-hidden { display: none; }
html.is-modal-open, html.is-modal-open body { overflow: hidden; }
@media (max-width: 560px) {
  .ann-modal { padding: 12px; }
  .ann-modal__box { max-height: calc(100vh - 24px); }
  .ann-modal__media { flex-basis: auto; height: auto; aspect-ratio: 1 / 1; }
}

/* Плашка предпросмотра материала (админ открыл новость до публикации) */
.preview-bar {
  position: sticky; top: 0; z-index: 95;
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 20px; background: #17406d; color: #fff; font-size: 0.875rem;
}
.preview-bar b { color: #fff; }
.preview-bar a { color: #cfe1f7; }
.preview-bar a:hover { color: #fff; }

.ann-nav { display: flex; align-items: center; gap: 8px; }
.ann-nav__btn {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--c-border); background: var(--c-surface);
  color: var(--c-link); cursor: pointer; padding: 0;
  transition: background .15s, border-color .15s, color .15s;
}
.ann-nav__btn svg { width: 20px; height: 20px; }
.ann-nav__btn:hover { background: var(--c-blue-600); border-color: var(--c-blue-600); color: #fff; }
.ann-nav__btn:disabled,
.ann-nav__btn.swiper-button-disabled { opacity: .38; cursor: default; background: var(--c-surface); border-color: var(--c-border); color: var(--c-link); }

.ann-slider { padding-bottom: 0; }
.ann-slider .swiper-wrapper { display: flex; gap: 24px; }
/* до инициализации Swiper (нет JS) — нативный горизонтальный скролл с прокруткой по карточке */
.ann-slider:not(.swiper-initialized) { overflow-x: auto; scroll-snap-type: x mandatory; }
.ann-slider:not(.swiper-initialized) .swiper-slide { flex: 0 0 382px; scroll-snap-align: start; }
.ann-slider.swiper-initialized .swiper-wrapper { gap: 0; }

.ann-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  display: flex;
  gap: 16px;
  padding: 16px;
  min-height: 188px;
  box-sizing: border-box;
  cursor: pointer;
}
.ann-card:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.ann-card__media {
  flex: 0 0 156px;
  width: 156px;
  height: 156px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ann-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ann-card__media.ph::after { font-size: 0.8125rem; }
.ann-card__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 auto; }
/* Размеры шрифтов — как в блоках «Мероприятия» и «Новости»:
   заголовок 17px (как .events__side .event__title), текст 14px (как .event__text) */
.ann-card__title {
  font-size: 1.0625rem; font-weight: 700; line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.ann-card__title a { color: var(--c-dark); }
.ann-card__title a:hover { color: var(--c-link); text-decoration: none; }
.ann-card__text {
  font-size: 0.875rem; color: var(--c-muted); margin: 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ann-card .btn-text { margin-top: auto; align-self: flex-start; font-size: 0.875rem; }

/* Точки — в потоке под лентой (у Swiper пагинация по умолчанию absolute и налезает на карточки).
   padding-bottom: активная точка увеличена transform: scale(1.15) и вылезает на 0.7px
   за нижний край контейнера, а .ann-slider имеет overflow: hidden — точка обрезалась снизу. */
.ann-dots { position: static; width: 100%; display: flex; justify-content: center; gap: 4px; margin-top: 12px; padding-bottom: 4px; }
.ann-dots .swiper-pagination-bullet {
  width: 24px; height: 24px; box-sizing: border-box; padding: 0; border: 0;
  border-radius: 50%; background: transparent; opacity: 1; margin: 0 !important;
  position: relative; cursor: pointer;
}
/* Точка-индикатор: кликабельная область 24×24 (ГОСТ/мобильная доступность),
   а визуальная точка рисуется псевдоэлементом и остаётся компактной. */
.ann-dots .swiper-pagination-bullet::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: #c9d6e3;
  transition: background .15s, transform .15s;
}
.ann-dots .swiper-pagination-bullet:hover::after { background: #a9bccf; }
.ann-dots .swiper-pagination-bullet-active::after { background: var(--c-blue-600); transform: scale(1.15); }
.ann-dots .swiper-pagination-bullet:focus-visible { outline: 3px solid var(--c-focus); outline-offset: -2px; }

@media (max-width: 1024px) {
  .ann-card__media { flex: 0 0 140px; width: 140px; height: 140px; }
  .ann-card { min-height: 172px; }
}
@media (max-width: 768px) {
  .ann-slider:not(.swiper-initialized) .swiper-slide { flex: 0 0 300px; }
  .ann-card__media { flex: 0 0 120px; width: 120px; height: 120px; }
  .ann-card { min-height: 152px; }
}
@media (max-width: 480px) {
  .ann-card { min-height: 128px; padding: 12px; gap: 12px; }
  .ann-card__media { flex: 0 0 96px; width: 96px; height: 96px; }
  .ann-card__title { font-size: 0.9375rem; -webkit-line-clamp: 2; }
  .ann-card__text { display: none; }
  .ann-nav__btn { width: 34px; height: 34px; }
}


/* Декоративные «кресты» героя — позиции классами (без инлайн-стилей) */
.hero__cross--a { top: 12%; left: 6%; font-size: 44px; }
.hero__cross--b { top: 64%; left: 14%; font-size: 26px; opacity: .5; }
.hero__cross--c { top: 18%; right: 8%; font-size: 60px; opacity: .35; }
.hero__cross--d { bottom: 14%; right: 20%; font-size: 32px; opacity: .5; }
/* Заглушка обложки новости на главной (без фото) */
.event__news-media--ph { background-image: url('../img/news-1.svg'); }

/* Герой: прокрутка, если на дату ближайшего выпало несколько мероприятий */
.hero-event-slider { position: relative; }
.hero-event-slider__viewport { display: grid; }
.hero-event-slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .5s ease, visibility .5s; }
.hero-event-slide.is-active { opacity: 1; visibility: visible; }
.hero-event-dots { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.hero-event-dot {
  width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%;
  background: rgba(255,255,255,.35); cursor: pointer; transition: background .2s, transform .2s;
}
.hero-event-dot:hover { background: rgba(255,255,255,.6); }
.hero-event-dot.is-active { background: #fff; transform: scale(1.25); }
@media (prefers-reduced-motion: reduce) { .hero-event-slide { transition: none; } }
