/* Страница «Этапы аккредитации» (stages.html), в языке «О центре»: слева шапка с цифрами и список по неделям,
   справа липкая колонка с поиском, выбором этапа и неделями. Разметку списка строит js/stages.js */

.st-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;grid-template-areas:"hero side" "list side";grid-template-rows:auto 1fr;column-gap:48px;padding:28px 0 72px}
.st-hero{grid-area:hero;container-type:inline-size}
.st-layout .page-hero--in{margin-bottom:28px}
.st-side{grid-area:side;align-self:start;position:sticky;top:calc(var(--hdr,80px) + 20px);z-index:2;display:flex;flex-direction:column;gap:14px}
.st-list{grid-area:list;min-width:0}

/* Цифры шапки: как карточки фактов на «О центре», число и тёмно-синий значок в строку, подпись ниже */
.st-facts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:28px 0 0;padding:0;list-style:none}
.st-facts[hidden]{display:none}
.st-facts li{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"num ico" "txt txt";align-items:center;align-content:start;gap:12px 14px;padding:20px 20px 18px;background:#fff;border:1.5px solid var(--card-line);border-radius:18px;box-shadow:0 10px 30px #040d2e0f}
.st-facts i{grid-area:ico;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:linear-gradient(135deg,#011c73 0%,#040d2e 100%);color:#fff;font-size:16px}
.st-facts b{grid-area:num;font-size:32px;font-weight:700;line-height:1;letter-spacing:-.5px;white-space:nowrap;color:#001b72}
.st-facts span{grid-area:txt;align-self:start;padding-top:12px;border-top:1px solid #e3e7ee;font-size:14px;line-height:1.45;color:#5b6478}
/* месяц у дат: мельче числа, по одной линии с ним */
.st-facts b small{font-size:19px;font-weight:500;letter-spacing:0}
@container (min-width:900px){.st-facts{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}}
@container (max-width:520px){
  .st-facts{gap:10px;margin-top:24px}
  .st-facts li{grid-template-columns:1fr;grid-template-areas:"ico" "num" "txt";align-items:start;gap:10px;padding:16px 16px 14px;border-radius:16px}
  .st-facts i{width:34px;height:34px;border-radius:10px;font-size:14px}
  .st-facts b{font-size:26px}
  .st-facts b small{font-size:16px}
  .st-facts span{padding-top:10px;font-size:13px}
}

/* Правая колонка: белые карточки как меню разделов на «О центре» */
.st-panel{padding:16px;background:#fff;border:1.5px solid var(--card-line);border-radius:18px;box-shadow:0 10px 30px #040d2e0f}
.st-panel[hidden]{display:none}
.st-panel__title{display:block;margin:2px 4px 12px;font-size:11.5px;font-weight:700;letter-spacing:1px;text-transform:uppercase;color:#5b6478}
.st-filter{display:grid;gap:10px}
.st-filter .st-panel__title{margin-bottom:2px}
.st-search input{min-height:52px}
.st-filter__count{margin:4px 0 0;padding:12px 4px 0;border-top:1px solid #e3e7ee;font-size:14.5px;font-weight:500;line-height:1.4;color:var(--heading)}
.st-filter__note{margin:-4px 4px 0;font-size:13px;line-height:1.45;color:#5b6478}
.st-filter__note:empty{display:none}

/* Недели: пункты как в меню разделов, текущая неделя тёмно-синим градиентом; число этапов справа */
.st-weeks{display:flex;flex-direction:column;min-height:0}
.st-weeks__list{display:flex;flex-direction:column;gap:4px;min-height:0;overflow-y:auto;max-height:calc(100vh - var(--hdr,80px) - 340px)}
.st-weeks__link{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border-radius:12px;font-size:15px;font-weight:500;line-height:1.3;color:#0a0f24;transition:background-color .2s,color .2s}
.st-weeks__link[hidden]{display:none}
.st-weeks__link small{flex-shrink:0;font-size:13px;font-weight:500;color:#5b6478;font-variant-numeric:tabular-nums;transition:color .2s}
.st-weeks__link:hover{background:#f4f6fa;color:#001b72}
.st-weeks__link.is-active{background:linear-gradient(135deg,#040d2e 0%,#011c73 55%,#052091 100%);color:#fff}
.st-weeks__link.is-active small{color:#ffffffb3}
.st-weeks__link:focus-visible{outline:3px solid #eb002d;outline-offset:2px}

/* Неделя: заголовок и число этапов в строку, ниже карточки дней */
/* якорь недели не уходит под шапку за счёт общего scroll-padding-top у html (site.css) */
.st-week[hidden]{display:none}
.st-week:not([hidden])~.st-week:not([hidden]){margin-top:36px}
.st-week__head{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 0 14px}
.st-week__head h2{margin:0;font-size:26px;font-weight:500;line-height:1.25;letter-spacing:-.4px;color:var(--heading)}
.st-week__count{flex-shrink:0;font-size:14.5px;line-height:1.4;color:#5b6478}
.st-week__days{display:grid;gap:12px}

/* Карточка дня: слева дата (тёмно-синяя плитка с числом и месяцем, рядом день недели и число этапов), справа этапы строками */
.st-day{display:grid;grid-template-columns:212px minmax(0,1fr);background:#fff;border:1.5px solid var(--card-line);border-radius:18px;box-shadow:0 10px 30px #040d2e0f;overflow:hidden}
.st-day[hidden]{display:none}
.st-day__date{display:flex;align-items:center;gap:14px;padding:16px 20px;border-right:1px solid #e3e7ee}
.st-day__tile{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-shrink:0;width:58px;height:58px;border-radius:14px;background:linear-gradient(135deg,#011c73 0%,#040d2e 100%);color:#fff;line-height:1}
.st-day__tile b{font-size:24px;font-weight:700;letter-spacing:-.5px}
.st-day__tile small{margin-top:3px;font-size:12px;color:#ffffffc7}
.st-day__cap{display:flex;flex-direction:column;gap:3px;min-width:0}
.st-day__long{font-size:16px;font-weight:500;line-height:1.3;color:var(--heading)}
.st-day__wd{font-size:13.5px;line-height:1.35;color:#5b6478}
.st-day.is-today .st-day__tile{background:var(--g-red)}
.st-day__rows{margin:0;padding:0;list-style:none;align-self:center}

/* Строка этапа: номер этапа плиткой (1 красная, 2 тёмно-синяя, как на psa.html), специальность, ниже этап и поток */
.st-row{display:grid;grid-template-columns:40px minmax(0,1fr);align-items:center;gap:16px;padding:15px 24px}
.st-row[hidden]{display:none}
.st-row:not([hidden])~.st-row:not([hidden]){border-top:1px solid #e3e7ee}
.st-row__num{display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--g-red);color:#fff;font-size:18px;font-weight:700;line-height:1;box-shadow:0 8px 18px -8px #dc143c8c;transform:rotate(-4deg)}
.st-row__num--even{background:var(--g-blue);box-shadow:0 8px 18px -8px #011c738c}
.st-row__num i{font-size:15px}
.st-row__body{min-width:0}
.st-row__name{display:block;font-size:16.5px;font-weight:500;line-height:1.35;letter-spacing:-.1px;color:var(--heading)}
/* точки-разделители стоят перед каждой частью; та, что попала в начало строки, срезается: список сдвинут влево на ширину точки */
.st-row__meta{display:flex;flex-wrap:wrap;align-items:center;margin:4px 0 0 -24px;font-size:14px;line-height:1.5;color:#5b6478;clip-path:inset(0 0 0 24px)}
.st-row__meta span{white-space:nowrap}
.st-row__meta span:before{content:"";display:inline-block;width:4px;height:4px;margin:0 10px;border-radius:50%;background:#b4bfd3;vertical-align:middle}
.st-row__stage{color:#001b72;font-weight:500}

/* Пусто: по запросу ничего нет или в расписании нет этапов */
.st-empty{display:flex;align-items:center;flex-wrap:wrap;gap:14px 16px;padding:20px 24px;background:#fff;border:1.5px solid var(--card-line);border-radius:18px;box-shadow:0 10px 30px #040d2e0f}
.st-empty[hidden]{display:none}
.st-empty>i{display:grid;flex-shrink:0;place-items:center;width:44px;height:44px;border-radius:12px;background:#e8ecf4;color:#001b72;font-size:18px}
.st-empty p{flex:1;min-width:220px;margin:0;font-size:15.5px;line-height:1.6;color:#2a3242}
.st-empty .home-btn{padding:13px 22px}
.st-empty--plain{display:block;margin:0;font-size:15.5px;color:#2a3242}

/* Протоколы и порядок: тёмно-синяя карточка с узором, как «Не нашли ответ?» на главной и руководитель на «О центре»;
   текст сверху, кнопки строкой под ним */
.st-more{position:relative;display:grid;gap:22px;margin-top:40px;padding:30px 32px;overflow:hidden;border-radius:20px;background:linear-gradient(135deg,#011c73 0%,#040d2e 100%);color:#fff;box-shadow:0 18px 40px -22px #040d2ea6}
.st-more:before{content:"";position:absolute;inset:0;background:url('../img/Graphika_RGB_blue.webp') right -40px top -60px/900px auto no-repeat;opacity:.07;pointer-events:none}
.st-more>*{position:relative}
.st-more h2{margin:0 0 8px;font-size:24px;font-weight:500;line-height:1.25;letter-spacing:-.3px;color:#fff}
.st-more p{max-width:640px;margin:0;font-size:15px;line-height:1.6;color:#d5def0}
.st-more__btns{display:flex;flex-wrap:wrap;gap:12px}
.st-more .home-btn--white,.st-more .home-btn--white:hover{color:#011c73}
/* узкая колонка рядом с правой панелью: три кнопки в строку не входят, поэтому «Протоколы» строкой сверху,
   ниже две страницы аккредитации рядом, а не одна кнопка на отдельной строке */
@media(min-width:1001px) and (max-width:1240px){
  .st-more__btns{display:grid;grid-template-columns:auto minmax(0,1fr)}
  .st-more__btns .home-btn--white{grid-column:1/-1}
  /* дата столбиком (плитка над днём недели), чтобы длинным специальностям хватало строки */
  .st-day{grid-template-columns:150px minmax(0,1fr)}
  .st-day__date{flex-direction:column;justify-content:center;gap:10px;padding:16px 12px;text-align:center}
  .st-day__cap{align-items:center}
}

/* Без правой колонки (до 1000px): поиск и выбор над списком в одну строку, недели не нужны */
@media(max-width:1000px){
  .st-layout{grid-template-columns:minmax(0,1fr);grid-template-areas:"hero" "side" "list";grid-template-rows:auto;padding:20px 0 64px}
  .st-side{position:static;margin-bottom:28px}
  .st-weeks{display:none!important}
  .st-filter{grid-template-columns:minmax(0,1fr) 280px;column-gap:12px}
  .st-filter .st-panel__title,.st-filter__count,.st-filter__note{grid-column:1/-1}
}
@media(max-width:768px){.st-layout .page-hero--in{margin-bottom:24px}}
@media(max-width:620px){
  .st-filter{grid-template-columns:1fr}
  .st-side{margin-bottom:24px}
  .st-week:not([hidden])~.st-week:not([hidden]){margin-top:28px}
  .st-week__head h2{font-size:22px}
  .st-week__count{font-size:13.5px}
  .st-day{grid-template-columns:1fr;border-radius:16px}
  .st-day__date{gap:12px;padding:12px 16px;border-right:0;border-bottom:1px solid #e3e7ee}
  .st-day__tile{width:46px;height:46px;border-radius:12px}
  .st-day__tile b{font-size:19px}
  .st-day__tile small{font-size:11px}
  .st-row{grid-template-columns:34px minmax(0,1fr);gap:12px;padding:13px 16px}
  .st-row__num{width:34px;height:34px;border-radius:10px;font-size:16px}
  .st-row__name{font-size:15.5px}
  .st-row__meta{font-size:13.5px}
  .st-empty{padding:16px}
  .st-more{margin-top:32px;padding:24px 20px}
  .st-more h2{font-size:21px}
  .st-more__btns{flex-direction:column}
  .st-more .home-btn{width:100%;white-space:normal;text-align:center}
}
@media(prefers-reduced-motion:reduce){.st-weeks__link,.st-weeks__link small{transition:none}}

/* День (по замечанию заказчика): дата и этапы выровнены по верху, а не по середине высоты; левая часть с датой -
   тёмно-синяя с узором (плитка даты белая), строки этапов чередуются белым и светло-голубым, чтобы не было «белым бело» */
.st-day{border-color:#d3dbe8}
.st-day__date{position:relative;align-items:flex-start;padding:18px 20px;border-right:0;background:linear-gradient(135deg,#011c73 0%,#040d2e 100%);overflow:hidden}
.st-day__date:before{content:"";position:absolute;inset:0;background:url('../img/Graphika_RGB_blue.webp') right -60px top -40px/420px auto no-repeat;opacity:.1;pointer-events:none}
.st-day__date>*{position:relative}
.st-day__tile{background:#fff;color:#011c73;box-shadow:0 10px 20px -12px #00000080}
.st-day__tile small{color:#5b6478}
.st-day.is-today .st-day__tile{background:#fff;color:#eb002d;box-shadow:0 0 0 3px #eb002d}
.st-day__cap{padding-top:6px}
.st-day__long{color:#fff}
.st-day__wd{color:#c8d2f0}
.st-day__rows{align-self:start}
.st-row{align-items:start}
.st-row:not([hidden]):nth-child(even of :not([hidden])){background:#f4f7fc}
.st-row__num{margin-top:2px}
@media(max-width:620px){.st-day__date{padding:14px 16px}}

/* число этапов у недели - плашкой (заказчик: «нормально оформи»): светлая с тёмно-синим числом,
   у выбранной недели красная с белым, как число у выбранного раздела в каталоге */
.st-weeks__link small{display:grid;place-items:center;min-width:28px;height:24px;padding:0 8px;border-radius:8px;background:#e8ecf4;color:#011c73;font-size:12.5px;font-weight:700;line-height:1}
.st-weeks__link:hover small{background:#dde4f1;color:#011c73}
.st-weeks__link.is-active small{background:var(--g-red);color:#fff;box-shadow:0 6px 12px -6px #eb002d99}

/* единый радиус - 18 px */
.st-more{border-radius:18px}
