/* =========================================================
   boxing.md — прототип главной (RU)
   Токены соответствуют Work/audit/brand.md
   ========================================================= */
:root {
  /* Цвета логотипа */
  --navy: #234294;
  --navy-deep: #14275C;
  --red: #E30613;
  --red-dark: #B90812;
  --yellow: #FFED00;
  --bronze: #B07A45;
  /* Цвета флага Молдовы */
  --flag-blue: #0046AE;
  --flag-yellow: #FFD200;
  --flag-red: #CC092F;
  /* Нейтральные */
  --ink: #0E0F14;
  --ring: #140A0C;
  --text: #2B2E36;
  --muted: #6B7080;
  --paper: #F4F2EE;
  --white: #FFFFFF;
  --line: #E1DED7;
  --line-dark: rgba(255, 255, 255, .14);

  /* Типографика */
  --font-display: "Oswald", "Arial Narrow", sans-serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --fs-hero: clamp(2rem, 1.2rem + 3.2vw, 3.75rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  --fs-h3: clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --fs-base: 1rem;

  /* Ритм */
  --wrap: 1280px;
  --gutter: clamp(16px, 3vw, 32px);
  --section: clamp(56px, 4rem + 3vw, 112px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; line-height: 1.12; color: var(--ink); letter-spacing: .005em; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Ромб — мотив из логотипа */
.diamond { display: inline-block; width: 10px; height: 10px; transform: rotate(45deg); flex: none; }
.diamond--red { background: var(--red); }
.diamond--yellow { background: var(--yellow); }

.meta {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.kicker {
  display: inline-flex; align-items: center; gap: 12px;
  margin: 0 0 16px;
  font-family: var(--font-display); font-size: .875rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
}
.kicker--yellow { color: var(--yellow); }

/* Ссылка со стрелкой */
.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-size: .9375rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase; color: var(--navy);
  white-space: nowrap;
}
.link-arrow::after {
  /* Стрелка вправо: SVG как маска, цвет берётся из currentColor */
  content: ""; width: 24px; height: 12px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 5h20.2L16.6 1.4 18 0l6 6-6 6-1.4-1.4L20.2 7H0z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 5h20.2L16.6 1.4 18 0l6 6-6 6-1.4-1.4L20.2 7H0z'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .35s var(--ease);
}
.link-arrow:hover::after { transform: translateX(5px); }
.link-arrow--light { color: var(--white); }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 26px;
  font-family: var(--font-display); font-size: .9375rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--red); color: var(--white);
  border: 2px solid var(--red);
  transition: background .2s, border-color .2s, color .2s;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--ghost { background: transparent; border-color: rgba(255,255,255,.5); }
.btn--ghost:hover { background: var(--white); border-color: var(--white); color: var(--navy-deep); }

/* Заголовок секции: крупный текст + красная насечка */
.section { padding: var(--section) 0; }
.section__head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: clamp(28px, 3vw, 44px);
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink);
}
.section__head--light { border-color: var(--line-dark); }
.section__head--light .section__title { color: var(--white); }
.section__title {
  position: relative;
  font-size: var(--fs-h2); font-weight: 600; text-transform: uppercase; letter-spacing: .01em;
  padding-left: 22px;
}
.section__title::before {
  content: ""; position: absolute; left: 0; top: .18em; bottom: .18em; width: 6px; background: var(--red);
}
.section__links { display: flex; gap: 28px; flex-wrap: wrap; }

/* ---------- Триколор ---------- */
.tricolor { display: flex; height: 5px; }
.tricolor span { flex: 1; }
.tricolor span:nth-child(1) { background: var(--flag-blue); }
.tricolor span:nth-child(2) { background: var(--yellow); }
.tricolor span:nth-child(3) { background: var(--flag-red); }

/* ---------- Topbar ---------- */
.topbar { background: var(--navy-deep); color: rgba(255,255,255,.78); font-size: .8125rem; }
.topbar__inner { display: flex; align-items: center; gap: 24px; min-height: 42px; }
.topbar__contacts, .topbar__links { display: flex; gap: 22px; }
.topbar__links { margin-left: auto; }
.topbar a:hover { color: var(--white); }

/* Переключатель языков */
.lang { display: flex; align-items: center; border-left: 1px solid var(--line-dark); padding-left: 18px; }
.lang__item {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 28px;
  font-family: var(--font-display); font-weight: 500; letter-spacing: .08em;
}
.lang__item.is-active { background: var(--yellow); color: var(--ink); }
.lang__item.is-disabled { color: rgba(255,255,255,.4); cursor: not-allowed; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  /* Без backdrop-filter: он ломает position: fixed у мобильного меню */
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header__inner { display: flex; align-items: center; gap: 28px; min-height: 84px; }
.brand { display: flex; align-items: flex-start; align-self: stretch; gap: 14px; flex: none; }
/* Логотип на всю высоту шапки и перекрывает её нижнюю линию (1px), чтобы не было светлой черты */
.brand { perspective: 700px; }
.brand__logo {
  height: 85px; width: auto; margin-bottom: -1px; position: relative; z-index: 1;
  transform-origin: 50% 50%;
  transition: transform .9s cubic-bezier(.65, 0, .35, 1);
}
/* Hover: плавный горизонтальный переворот — полный оборот вокруг вертикальной оси, как монета */
.brand:hover .brand__logo, .brand:focus-visible .brand__logo { transform: rotateY(360deg); }
.brand__name { align-self: center; }
.brand__name {
  display: flex; flex-direction: column;
  font-family: var(--font-display); font-weight: 600; text-transform: uppercase;
  line-height: 1.05; color: var(--navy); font-size: 1.1875rem; letter-spacing: .02em;
}
/* «Федерация бокса Молдовы» — две строки одним стилем */
.brand__name span + span { margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav__list { display: flex; align-items: center; }
.nav__item { position: relative; }
.nav__item > a {
  position: relative; display: flex; align-items: center; height: 84px; padding: 0 9px;
  font-family: var(--font-display); font-size: .9375rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: .06em; color: var(--ink);
  white-space: nowrap;
}
.nav__item > a::after {
  /* Полоса под текстом пункта: от центра строки до низа заглавных букв (~.45em) + отступ 8px */
  content: ""; position: absolute; left: 9px; right: 9px; top: calc(50% + .45em + 8px); height: 4px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.nav__item > a:hover::after, .nav__item:focus-within > a::after { transform: scaleX(1); }
.has-sub > a { padding-right: 24px; }
.has-sub > a::before {
  content: ""; position: absolute; right: 9px; top: 50%; width: 6px; height: 6px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-70%) rotate(45deg);
}
.nav__sub {
  position: absolute; left: 0; top: 100%; min-width: 260px; padding: 10px 0;
  background: var(--navy-deep); box-shadow: 0 18px 40px rgba(14,15,20,.25);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .3s var(--ease), visibility .2s;
}
.has-sub:hover .nav__sub, .has-sub:focus-within .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__sub a { display: block; padding: 9px 22px; color: rgba(255,255,255,.85); font-size: .9375rem; }
.nav__sub a:hover { background: var(--navy); color: var(--white); }
/* Кнопка подменю нужна только в мобильном меню */
.nav__toggle { display: none; }

.search { display: flex; align-items: center; border: 1px solid transparent; height: 40px; transition: border-color .2s; }
.nav__contacts { display: none; }
/* На десктопе поиск свёрнут в иконку и раскрывается по фокусу */
.search input { width: 0; border: 0; padding: 0; font: inherit; font-size: .875rem; background: transparent; transition: width .35s var(--ease), padding .35s var(--ease); }
.search:focus-within input { width: 170px; padding: 0 12px; }
.search input:focus { outline: none; }
.search:focus-within { border-color: var(--navy); }
.search button { display: grid; place-items: center; width: 40px; height: 38px; border: 0; background: var(--navy); color: var(--white); cursor: pointer; }

.burger { display: none; margin-left: auto; width: 48px; height: 48px; border: 0; background: var(--navy); cursor: pointer; padding: 14px 12px; flex-direction: column; justify-content: space-between; }
.burger span { display: block; height: 2px; background: var(--white); transition: transform .3s var(--ease), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--ink); color: var(--white);
  padding: clamp(28px, 3vw, 48px) 0 clamp(48px, 5vw, 80px);
}
/* Фон «Флаг во весь фон» (вариант D): вертикальный триколор Молдовы на всю ширину */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--flag-blue) 0 33.34%, var(--flag-yellow) 33.34% 66.67%, var(--flag-red) 66.67% 100%);
}
/* Тёмный слой приглушает флаг, чтобы контент читался; точечная фактура сверху */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 4px 4px,
    linear-gradient(90deg, rgba(14,15,20,.72) 0%, rgba(14,15,20,.5) 50%, rgba(14,15,20,.38) 100%);
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); align-items: start; }

.lead { position: relative; }
.lead__media { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: #222; border: 5px solid #fff; }
/* Главное фото без hover-анимации */
.lead__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.lead__body {
  position: relative; margin: -110px 0 0 clamp(0px, 4vw, 56px);
  padding: clamp(22px, 2.5vw, 36px) clamp(22px, 2.5vw, 40px);
  background: var(--navy); border-left: 6px solid var(--yellow);
  box-shadow: 0 30px 60px rgba(0,0,0,.35);
}
.lead__body .kicker { color: var(--yellow); }
.lead__body .kicker .diamond--red { background: var(--yellow); }
.lead__title { font-size: var(--fs-hero); font-weight: 600; line-height: 1.04; text-transform: uppercase; color: var(--white); margin-bottom: 16px; }
/* Hover: без подчёркивания, текст становится жёлтым */
.lead__title a { transition: color .2s; }
.lead__title a:hover { color: var(--yellow); }
.lead__excerpt { color: rgba(255,255,255,.82); max-width: 62ch; }
.lead__body .meta { color: rgba(255,255,255,.6); }

/* Фон ленты — фирменный тёмно-синий */
.latest { padding: clamp(20px, 2vw, 28px); background: var(--navy-deep); border-top: 4px solid var(--red); }
.latest__title { color: var(--white); font-size: 1.25rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.latest__list { counter-reset: n; margin-bottom: 22px; }
.latest__item { counter-increment: n; border-bottom: 1px solid var(--line-dark); }
.latest__item a { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 16px 0; align-items: start; }
/* Миниатюра: белая рамка 1px, при hover фото плавно увеличивается внутри рамки */
.latest__thumb { display: block; width: 96px; height: 72px; overflow: hidden; border: 1px solid #fff; }
.latest__thumb img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.25); transition: transform .6s var(--ease), filter .3s; }
.latest__item a:hover .latest__thumb img { transform: scale(1.08); filter: none; }
.latest__text .meta { color: var(--yellow); margin-bottom: 4px; }
.latest__head { font-weight: 600; line-height: 1.35; color: var(--white); font-size: .9375rem; }
.latest__item a:hover .latest__head { color: var(--yellow); }

/* Появление при загрузке */
@media (prefers-reduced-motion: no-preference) {
  .lead__media, .lead__body, .latest { animation: rise .9s var(--ease) both; }
  .lead__body { animation-delay: .12s; }
  .latest { animation-delay: .24s; }
  @keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
}

/* ---------- Facts ---------- */
.facts { background: var(--navy); color: var(--white); }
.facts__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.fact { position: relative; display: flex; flex-direction: column; gap: 6px; padding: clamp(24px, 3vw, 40px) clamp(16px, 2vw, 32px); border-left: 1px solid var(--line-dark); }
.fact:first-child { border-left: 0; padding-left: 0; }
.fact__num { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.5rem, 1.8rem + 2.6vw, 4.25rem); line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; }
.fact__label { font-size: .9375rem; color: rgba(255,255,255,.85); max-width: 24ch; }

/* ---------- News ---------- */
.news { background: var(--paper); }
.news__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: clamp(20px, 2.5vw, 36px); align-items: start; }
.card { display: flex; flex-direction: column; background: var(--white); }
.card__media { display: block; overflow: hidden; aspect-ratio: 3 / 2; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__body { padding: 20px 22px 26px; }
.card__body .meta { margin-bottom: 8px; }
.card__title { font-size: var(--fs-h3); line-height: 1.22; }
.card__title a:hover { color: var(--navy); }
.card__excerpt { margin: 12px 0 0; color: var(--muted); }
.card--big .card__title { font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); text-transform: uppercase; }
.card--big .card__media { aspect-ratio: 16 / 10; }
/* Средняя колонка — стопка из двух компактных карточек; большая карточка тянется по её высоте */
.news .news__grid { align-items: stretch; }
.news .card--big .card__media { flex: 1 1 auto; aspect-ratio: auto; min-height: 320px; }
.news .headlines { align-self: start; }
.news__stack { display: flex; flex-direction: column; gap: clamp(20px, 2.5vw, 36px); }
.card--compact .card__media { aspect-ratio: 16 / 9; }
.card--compact .card__body { padding: 16px 20px 20px; }
.card--compact .card__title { font-size: 1.125rem; }

.headlines { border-top: 4px solid var(--navy); }
.headlines li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.headlines .meta { margin-bottom: 6px; }
.headlines a { font-weight: 600; line-height: 1.4; color: var(--ink); }
.headlines a:hover { color: var(--red); }

/* ---------- Pro boxing ---------- */
.pro {
  position: relative; overflow: hidden;
  padding: var(--section) 0; color: var(--white);
  background:
    linear-gradient(115deg, var(--ring) 0%, var(--ring) 55%, #3A0408 100%);
}
/* Контурная надпись PRO (inline SVG) с мягким бликом, проходящим по контуру слева направо.
   viewBox = метрики Oswald 700 при font-size 1000: ascent 1193, descent 289, ширина 1749.
   Высота SVG = 1.482 em; сдвиг вниз на .241 em совмещает базовую линию с прежней CSS-надписью. */
.pro__outline {
  --pro-f: clamp(8rem, 22vw, 22rem);
  position: absolute; right: -2vw; bottom: calc(-6vw - var(--pro-f) * .241);
  height: calc(var(--pro-f) * 1.482); width: auto; aspect-ratio: 1749 / 1482;
  pointer-events: none; overflow: visible;
}
.pro__outline text { font-family: var(--font-display); font-weight: 700; font-size: 1000px; fill: none; vector-effect: non-scaling-stroke; }
.pro__outline-base { stroke: rgba(227, 6, 19, .35); stroke-width: 2; }
/* Блик: обводка надписи залита градиентом #proSweep — светлая полоса идёт слева направо */
.pro__outline-sweep {
  stroke: url(#proSweep); stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(255,255,255,.35));
}
@media (prefers-reduced-motion: reduce) {
  .pro__outline-sweep { display: none; }
}
.pro .wrap { position: relative; z-index: 1; }
.pro__grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 3vw, 48px); }
.pro__media { display: block; overflow: hidden; aspect-ratio: 16 / 9; }
.pro__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.pro__feature:hover .pro__media img { transform: scale(1.04); }
.pro__body { padding-top: 22px; max-width: 64ch; }
.pro__body .meta { color: var(--red); margin-bottom: 8px; }
.pro__title { color: var(--white); font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem); text-transform: uppercase; margin-bottom: 12px; }
.pro__title a:hover { color: var(--yellow); }
.pro__excerpt { color: rgba(255,255,255,.75); margin: 0; }
.pro__side { display: flex; flex-direction: column; }

/* Мини-карточка (горизонтальная) */
.mini { display: grid; grid-template-columns: 132px 1fr; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); align-items: start; }
.mini:first-child { padding-top: 0; }
.mini__media { position: relative; display: block; overflow: hidden; aspect-ratio: 4 / 3; }
.mini__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.mini:hover .mini__media img { transform: scale(1.06); }
.mini__title { font-family: var(--font-body); font-size: 1rem; font-weight: 700; line-height: 1.38; margin-top: 6px; }
.mini__title a:hover { color: var(--red); }
.mini--dark { border-color: var(--line-dark); }
/* Фото мини-карточек на тёмном фоне: белая рамка 1px */
.mini--dark .mini__media { border: 1px solid #fff; }
.mini--dark .mini__title { color: var(--white); }
.mini--dark .mini__title a:hover { color: var(--yellow); }
.mini--dark .meta { color: rgba(255,255,255,.55); }

/* ---------- Media ---------- */
.media__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(24px, 3vw, 48px); }
.video-main__media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 9; margin-bottom: 18px; background: var(--ink); }
.video-main__media img { width: 100%; height: 100%; object-fit: cover; opacity: .88; transition: transform .8s var(--ease), opacity .3s; }
.video-main:hover .video-main__media img { transform: scale(1.04); opacity: 1; }
.video-main .meta { margin-bottom: 8px; }

/* Кнопка воспроизведения — ромб с треугольником */
.play {
  position: absolute; left: 50%; top: 50%;
  display: grid; place-items: center;
  width: 76px; height: 76px;
  background: var(--red);
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform .35s var(--ease), background .2s;
}
.play::after {
  content: ""; transform: rotate(-45deg) translateX(3px);
  border-left: 20px solid var(--white); border-top: 12px solid transparent; border-bottom: 12px solid transparent;
}
.video-main:hover .play, .mini:hover .play { transform: translate(-50%, -50%) rotate(45deg) scale(1.1); background: var(--red-dark); }
.play--sm { width: 34px; height: 34px; }
.play--sm::after { border-left-width: 10px; border-top-width: 6px; border-bottom-width: 6px; transform: rotate(-45deg) translateX(2px); }

.tag { display: inline-block; padding: 2px 8px; background: var(--red); color: var(--white); font-family: var(--font-display); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.tag--photo { background: var(--navy); }

/* ---------- Olympic ---------- */
.olympic {
  position: relative; overflow: hidden;
  padding: var(--section) 0; color: rgba(255,255,255,.85);
  background-color: var(--navy-deep);
}
.olympic .wrap { position: relative; z-index: 1; }
/* Фон «Сборная под флагом»: фото сборной в монохромной тёмно-синей тонировке */
.olympic--photo::before, .olympic--photo::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
.olympic--photo::before {
  background: url("img/n1662.jpg") center 35% / cover no-repeat;
  filter: grayscale(1) contrast(1.15); opacity: .5; mix-blend-mode: luminosity;
}
.olympic--photo::after { background: linear-gradient(90deg, rgba(20,39,92,.96) 0%, rgba(20,39,92,.82) 50%, rgba(35,66,148,.7) 100%); }
.olympic__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 96px); align-items: center; }
.olympic__title { color: var(--white); font-size: var(--fs-h2); text-transform: uppercase; margin-bottom: 24px; }
.olympic__links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.medals { background: var(--white); color: var(--text); padding: clamp(24px, 3vw, 44px); border-top: 6px solid var(--bronze); }
.medals__title { font-size: 1.25rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; }
.medal {
  display: grid; grid-template-columns: 56px auto 1fr; grid-template-rows: auto auto;
  column-gap: 20px; align-items: center;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.medal:last-child { border-bottom: 0; padding-bottom: 0; }
/* Ромб-медаль: поворачивается только фон, текст остаётся прямым */
.medal__mark {
  position: relative; grid-row: 1 / 3; display: grid; place-items: center; width: 56px; height: 56px;
  color: var(--white); line-height: 1;
  font-family: var(--font-display); font-weight: 600; font-size: .875rem; letter-spacing: .04em;
}
.medal__mark::before {
  content: ""; position: absolute; inset: 7px; z-index: -1;
  background: var(--bronze); transform: rotate(45deg);
}
.medal { position: relative; z-index: 0; }
.medal__year { grid-row: 1 / 3; font-family: var(--font-display); font-weight: 700; font-size: clamp(2rem, 1.6rem + 1.4vw, 2.75rem); color: var(--navy); line-height: 1; }
.medal__name { font-weight: 700; color: var(--ink); font-size: 1.0625rem; }
.medal__place { color: var(--muted); font-size: .875rem; }

/* ---------- Docs ---------- */
.docs { background: var(--paper); }
.docs__grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 64px); }
.docs__subtitle { font-size: 1.125rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 8px; color: var(--navy); }
.files li { border-bottom: 1px solid var(--line); }
.files a { display: grid; grid-template-columns: 56px 1fr; gap: 16px; align-items: center; padding: 16px 0; font-weight: 600; line-height: 1.4; color: var(--ink); transition: padding .3s var(--ease); }
.files a:hover { padding-left: 8px; color: var(--navy); }
.file {
  display: grid; place-items: center; height: 30px;
  font-family: var(--font-display); font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  background: var(--red); color: var(--white);
  clip-path: polygon(0 0, 78% 0, 100% 30%, 100% 100%, 0 100%);
}
.file--xls { background: #1D6B44; }
.file--doc { background: var(--navy); }
/* Календарь: выбор формата — исходный файл или PDF */
.files--choice li { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 16px 0; }
.file-row__title { font-weight: 600; line-height: 1.4; color: var(--ink); }
.file-row__dl { display: flex; gap: 8px; }
.files--choice a.file {
  display: grid; grid-template-columns: none; width: 56px; padding: 0;
  color: var(--white); transition: transform .2s var(--ease), filter .2s;
}
.files--choice a.file:hover { padding: 0; color: var(--white); transform: translateY(-2px); filter: brightness(1.15); }

/* ---------- About boxing ---------- */
/* Стрелка-иконка для ссылок оглавления */
.ab-arrow {
  display: inline-block; width: 24px; height: 12px; flex: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 5h20.2L16.6 1.4 18 0l6 6-6 6-1.4-1.4L20.2 7H0z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 5h20.2L16.6 1.4 18 0l6 6-6 6-1.4-1.4L20.2 7H0z'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* ---------- О боксе: «Справочник» — факт на фото + оглавление разделов ---------- */
.ab-ref { padding: var(--section) 0; background: var(--white); border-bottom: 1px solid var(--line); }
.ab-ref__grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(28px, 4vw, 72px); align-items: stretch; }
.ab-ref__fact { margin: 0; position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 440px; padding: clamp(24px, 3vw, 40px); color: var(--white); overflow: hidden; border: 5px solid #fff; }
.ab-ref__fact img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ab-ref__fact::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,39,92,.15) 0%, rgba(20,39,92,.92) 70%); }
.ab-ref__fact > *:not(img) { position: relative; z-index: 1; }
.ab-ref__big { font-family: var(--font-display); font-weight: 700; font-size: clamp(3.5rem, 2.5rem + 3vw, 5.5rem); line-height: .95; color: var(--yellow); }
.ab-ref__quote { margin: 14px 0 0; font-size: 1.0625rem; line-height: 1.5; max-width: 40ch; }
.ab-ref__src { margin: 12px 0 0; font-size: .8125rem; color: rgba(255,255,255,.7); }
.ab-ref__src a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.ab-ref__src a:hover { color: var(--yellow); }
.ab-ref__toc { display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(20px, 3vw, 40px); align-content: start; counter-reset: toc; }
.ab-ref__toc li { counter-increment: toc; border-bottom: 1px solid var(--line); }
.ab-ref__toc a { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 18px 0; font-weight: 700; color: var(--ink); transition: color .2s; }
.ab-ref__toc a::before { content: counter(toc, decimal-leading-zero); font-family: var(--font-display); font-weight: 600; color: var(--red); }
.ab-ref__toc .ab-arrow { color: var(--navy); opacity: .35; transition: opacity .2s, transform .35s var(--ease); }
.ab-ref__toc a:hover { color: var(--navy); }
.ab-ref__toc a:hover .ab-arrow { opacity: 1; transform: translateX(4px); }

/* ---------- Schools ---------- */
.schools { padding: var(--section) 0; }
.schools__grid { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(28px, 4vw, 72px); align-items: start; }
.schools__intro .section__title { margin-bottom: 18px; }
.schools__intro p { color: var(--muted); margin-bottom: 26px; }
.schools__list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); border: 2px solid var(--line); }
.schools__list li { display: flex; }
/* Карточка школы — ссылка на Google Maps (сайтов у школ нет) */
.school { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 26px 24px; background: var(--white); transition: background .25s; }
.school:hover { background: var(--paper); }
.school__map {
  display: inline-flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 10px;
  font-family: var(--font-display); font-size: .8125rem; letter-spacing: .1em; text-transform: uppercase; color: var(--navy);
}
.school__map::after {
  content: ""; width: 18px; height: 9px; background: currentColor; transition: transform .35s var(--ease);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 5h20.2L16.6 1.4 18 0l6 6-6 6-1.4-1.4L20.2 7H0z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 12'%3E%3Cpath d='M0 5h20.2L16.6 1.4 18 0l6 6-6 6-1.4-1.4L20.2 7H0z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.school:hover .school__map::after { transform: translateX(4px); }
.school__area { font-family: var(--font-display); font-size: .8125rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.school__name { font-weight: 700; color: var(--ink); font-size: 1.0625rem; line-height: 1.35; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.7); font-size: .9375rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-top: clamp(48px, 5vw, 80px); padding-bottom: 40px; }
/* Белый логотип подвала с сайта boxing.md (footer_logo.png), исходный размер 268×70 */
.footer__brand img { width: 268px; max-width: 100%; height: auto; }
/* Логотип подвала: знак (верхние 40 из 70 px) неподвижен, отражение под ним «рябит» */
.footer-logo { position: relative; display: inline-block; width: 268px; max-width: 100%; margin-bottom: 18px; }
.footer-logo img { display: block; }
.footer-logo__main { clip-path: inset(0 0 42.86% 0); }
/* Отдельная картинка только с отражением (верх прозрачный) — фильтр не втягивает в рябь светлый низ ромба */
.footer-logo__reflection { position: absolute; inset: 0; clip-path: inset(57.14% 0 0 0); filter: url(#ripple); }
@media (prefers-reduced-motion: reduce) {
  .footer-logo__reflection { filter: none; }
}
.footer__brand p { line-height: 1.7; }
.footer__title { color: var(--white); font-size: 1rem; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 16px; }
.footer address { font-style: normal; line-height: 1.9; }
.footer li { margin-bottom: 8px; }
.footer a:hover { color: var(--yellow); }
.footer__bottom { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 22px; padding-bottom: 22px; border-top: 1px solid var(--line-dark); font-size: .8125rem; }
.footer__bottom p { margin: 0; }
.footer__bottom ul { display: flex; gap: 22px; }
.footer__bottom li { margin: 0; }
.footer__links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
/* Правовые ссылки отделены вертикальной чертой от сервисных */
.footer__legal { padding-right: 22px; border-right: 1px solid var(--line-dark); }

/* =========================================================
   Адаптив
   ========================================================= */
/* Компактная шапка на всех ширинах: меню должно помещаться в сетку 1280px */
@media (min-width: 0) {
  .header__inner { gap: 20px; }
  .brand__name { font-size: 1.0625rem; }
  .nav__item > a { padding: 0 7px; font-size: .875rem; letter-spacing: .04em; }
  .nav__item > a::after { left: 7px; right: 7px; }
  /* Место под стрелку подменю; полоса hover только под текстом */
  .has-sub > a { padding-right: 22px; }
  .has-sub > a::before { right: 7px; }
  .has-sub > a::after { right: 22px; }
}

/* Планшет и мобильное меню */
@media (max-width: 1350px) {
  .burger { display: flex; }
  /* Служебные ссылки дублируются в подвале */
  .topbar__links, .topbar__contacts li:first-child { display: none; }
  .topbar__contacts li { white-space: nowrap; }
  .lang { margin-left: auto; }
  .nav {
    position: fixed; left: 0; right: 0; top: var(--nav-top, 131px); bottom: 0;
    flex-direction: column; align-items: stretch; gap: 0; margin: 0;
    padding: 12px var(--gutter) 32px; background: var(--white); overflow-y: auto;
    /* Скрыто без выезда за край экрана, чтобы не было горизонтального скролла */
    opacity: 0; visibility: hidden; transform: translateY(-12px);
    transition: opacity .25s, transform .4s var(--ease), visibility .25s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__list { flex-direction: column; align-items: stretch; }
  .nav__item { border-bottom: 1px solid var(--line); }
  .nav__item > a { height: 56px; font-size: 1.0625rem; }
  .nav__item > a::after { display: none; }
  .has-sub > a::before { display: none; }
  /* Аккордеон: пункт-ссылка слева, кнопка-стрелка справа, подменю свёрнуто */
  .has-sub { display: grid; grid-template-columns: 1fr 56px; }
  .nav__toggle {
    display: grid; place-items: center; width: 56px; height: 56px; padding: 0;
    border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer;
  }
  .nav__toggle::before {
    content: ""; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: translateY(-25%) rotate(45deg); transition: transform .35s var(--ease);
  }
  .has-sub.is-open .nav__toggle { color: var(--red); }
  .has-sub.is-open .nav__toggle::before { transform: translateY(25%) rotate(-135deg); }
  .nav__sub {
    grid-column: 1 / -1; position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; background: transparent;
    max-height: 0; overflow: hidden; padding: 0; transition: max-height .4s var(--ease), padding .4s var(--ease);
  }
  .has-sub.is-open .nav__sub { max-height: 480px; padding: 0 0 12px; }
  .has-sub:hover .nav__sub, .has-sub:focus-within .nav__sub { opacity: 1; visibility: visible; }
  .nav__sub a { color: var(--text); padding: 7px 14px; }
  .nav__sub a:hover { background: var(--paper); color: var(--navy); }
  /* Мобильное меню: поиск сверху, контакты внизу */
  .search { display: flex; order: -1; margin: 8px 0 12px; height: 48px; border-color: var(--line); }
  .nav__contacts { display: flex; flex-direction: column; gap: 4px; margin-top: 20px; padding-top: 16px; border-top: 4px solid var(--red); }
  .nav__contact { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-weight: 600; color: var(--ink); }
  .nav__contact:hover { color: var(--navy); }
  .nav__contact::before {
    content: ""; width: 18px; height: 18px; flex: none; background: var(--red);
    -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
  }
  .nav__contact--map { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.2 7 13 7 13s7-7.8 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); }
  .nav__contact--tel { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25 11.4 11.4 0 0 0 3.6.57 1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E"); }
  .nav__contact--mail { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 5h18a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1zm9 7.2L4 7.3V17h16V7.3z'/%3E%3C/svg%3E"); }
  .search input, .search:focus-within input { width: 100%; padding: 0 12px; }
  .search button { height: 46px; width: 48px; }
  body.nav-open { overflow: hidden; }

  .hero__grid { grid-template-columns: 1fr; }
  .news__grid { grid-template-columns: 1fr 1fr; }
  .card--big { grid-column: 1 / -1; }
  .news .card--big .card__media { flex: none; aspect-ratio: 16 / 10; min-height: 0; }
  .pro__grid, .media__grid, .olympic__grid { grid-template-columns: 1fr; }
  .facts__grid { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { border-left: 0; padding-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--line-dark); }
  .ab-ref__grid { grid-template-columns: 1fr; }
  .ab-ref__fact { min-height: 360px; }
  /* Одна колонка: кнопка «Все школы» после карточек */
  .schools__grid { display: flex; flex-direction: column; gap: 0; }
  .schools__intro { display: contents; }
  .schools__list { order: 1; margin-bottom: 28px; }
  .schools__intro .btn { order: 2; align-self: flex-start; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .topbar__contacts, .topbar__links { display: none; }
  .lang { margin-left: auto; border-left: 0; padding-left: 0; }
  .header__inner { min-height: 72px; gap: 12px; }
  .brand__logo { height: 73px; }
  .brand__name { font-size: 1rem; }
  .nav { top: var(--nav-top, 119px); }

  .lead__media { aspect-ratio: 4 / 3; }
  .lead__body { margin: -48px 12px 0; }
  .news__grid, .docs__grid, .schools__list, .footer__grid { grid-template-columns: 1fr; }
  .mini { grid-template-columns: 104px 1fr; gap: 14px; }
  /* Мобильная версия: у последней новости PRO без нижней линии */
  .pro__side .mini:last-child { border-bottom: 0; }
  /* Мобильная версия: плотнее строки заголовков в ленте «Последние новости» */
  .latest__head { display: block; line-height: 1.3; }
  /* Мобильная версия: фото статьи в ленте во всю ширину над текстом */
  .latest__item a { grid-template-columns: 1fr; gap: 12px; }
  .latest__thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  /* Шапка: бургер всегда у правого края, название сжимается и переносится */
  .brand { flex: 1 1 auto; min-width: 0; }
  .brand__name { min-width: 0; font-size: clamp(.8125rem, 3.4vw, 1rem); line-height: 1.08; }
  .burger { flex: none; margin-left: 0; }
  /* Закреплённая шапка при прокрутке — компактная, с тенью */
  .header { transition: box-shadow .25s; }
  .header .header__inner { transition: min-height .25s var(--ease); }
  .header .brand__logo { transition: height .25s var(--ease), transform .9s cubic-bezier(.65, 0, .35, 1); }
  .header.is-stuck { box-shadow: 0 6px 18px rgba(14, 15, 20, .18); }
  .header.is-stuck .header__inner { min-height: 56px; }
  .header.is-stuck .brand__logo { height: 57px; }
  .header.is-stuck .burger { width: 44px; height: 44px; padding: 12px 11px; }
  /* Мобильная версия: кнопки в группе одинаковой длины — на всю ширину */
  .olympic__links .btn { flex: 1 1 100%; }
  .files--choice li { grid-template-columns: 1fr; gap: 10px; }
  .ab-ref__toc { grid-template-columns: 1fr; }
  .medal { grid-template-columns: 48px auto 1fr; column-gap: 14px; }
  .medal__mark { width: 48px; height: 48px; font-size: .75rem; }
  .section__head { align-items: flex-start; flex-direction: column; gap: 12px; }
  .footer__bottom { flex-direction: column; }
  /* Мобильная версия: весь подвал по центру */
  .footer__grid, .footer__bottom { text-align: center; align-items: center; }
  .footer-logo { display: block; margin-left: auto; margin-right: auto; }
  .footer__bottom ul { justify-content: center; flex-wrap: wrap; }
  .footer__links { flex-direction: column; gap: 10px; }
  .footer__bottom ul { row-gap: 10px; column-gap: 20px; }
  .footer__legal { padding-right: 0; border-right: 0; }
}

@media (max-width: 420px) {
  .fact__label { font-size: .875rem; }
  .facts__grid { grid-template-columns: 1fr 1fr; }
  .fact { padding: 22px 12px; }
  .fact:nth-child(odd) { padding-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}

/* Десктоп: название дублирует надпись на логотипе, место отдано меню */
@media (min-width: 1351px) {
  .brand__name { display: none; }
}
