/* ==========================================================================
   REGLAMENT PAGE - регламент направления (reglament-servant.html)
   Один «лист» документа по центру: логотип → текст → кнопка регистрации.
   Блок общий на все направления - новая страница только копирует разметку.
   ========================================================================== */

.rg { background: #FAF9F9; padding: 28px 0 80px; }

/* Белый «лист»: фиксированная ширина колонки текста для читаемости */
.rg-doc {
  max-width: 880px;
  margin: 0 auto;
  background: var(--rn-white);
  border: 1px solid #E9EAEC;
  border-radius: 8px;
  padding: 48px 64px 40px;
}

/* ---- Шапка документа ---- */
.rg-doc__head {
  text-align: center;
  padding-bottom: 32px;
  border-bottom: 1px solid #EEF0F3;
}
/* Логотип проекта на белом фоне документа */
.rg-doc__logo {
  display: block;
  width: 168px; height: 70px;
  margin: 0 auto 24px;
  background: url("../assets/reglament-logo.png") no-repeat center / contain;
}
.rg-doc__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 36px;
  text-transform: uppercase;
  color: var(--rn-navy);
}
.rg-doc__rule {
  width: 72px; height: 3px;
  margin: 16px auto;
  background: var(--rn-gold);
}
.rg-doc__dir {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 28px;
  color: #5D5F64;
}
/* Переключатель языка документа: показывается, только если есть вторая версия
   страницы (пока - госслужащий). Внутри .rg-doc__head, а он text-align: center. */
.rg-doc__lang {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-family: "Roboto", sans-serif;
  font-size: 14px;
  line-height: 20px;
}
.rg-doc__lang-item {
  color: #8A93A6;
  text-decoration: none;
  transition: color .15s ease;
}
.rg-doc__lang-item:hover { color: var(--rn-navy); }
.rg-doc__lang-item.is-active { color: var(--rn-gold); font-weight: 500; }
.rg-doc__lang-sep { color: #D5D8DE; }

/* Вторичная кнопка: скачать исходник документа.
   ПОКА СКРЫТА - вернуть можно, удалив правило .rg-doc__download { display: none } ниже. */
.rg-doc__download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 10px 20px;
  border: 1px solid var(--rn-gold);
  border-radius: 8px;
  background: transparent;
  color: var(--rn-navy);
  font-family: "Roboto", sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.rg-doc__download:hover { background: var(--rn-gold); color: var(--rn-navy); }
.rg-doc__download .bi { font-size: 14px; }
/* Скачивание пока не нужно - разметка и стили выше остаются, кнопка просто скрыта.
   Чтобы вернуть - удалить это правило. */
.rg-doc__download { display: none; }

/* ---- Тело документа ---- */
.rg-sec { margin-top: 32px; }
.rg-sec__title {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-weight: 600;
  font-size: 22px;
  line-height: 30px;
  color: var(--rn-navy);
}
.rg-p {
  margin: 12px 0 0;
  font-family: "Inter", sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 28px;
  color: #3C3C3C;
}
.rg-link { color: var(--rn-navy); text-decoration: underline; }
.rg-link:hover { color: var(--rn-gold); }

/* Маркер списка рисуем сами - золотой */
.rg-list {
  margin: 8px 0 0;
  padding-left: 22px;
  list-style: none;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 28px;
  color: #5D5F64;
}
.rg-list li { position: relative; padding-left: 18px; margin-top: 4px; }
.rg-list li::before {
  content: "•";
  position: absolute; left: 0;
  color: var(--rn-gold);
  font-size: 18px;
  line-height: 28px;
}

/* Подзаголовок внутри раздела (этапы I/II) */
.rg-sub {
  margin: 24px 0 0;
  padding-left: 12px;
  border-left: 3px solid var(--rn-gold);
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 26px;
  color: var(--rn-navy);
}

/* Шаг участия: золотой бейдж с номером + название */
.rg-step {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
}
.rg-step__num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--rn-gold);
  color: var(--rn-white);
  font-family: "Roboto", sans-serif;
  font-weight: 700;
  font-size: 15px;
  line-height: 20px;
}
.rg-step__title {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 17px;
  line-height: 26px;
  color: var(--rn-navy);
}

/* Сроки: период слева, событие справа */
.rg-terms { margin: 12px 0 0; }
.rg-terms__row {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #EEF0F3;
}
.rg-terms__row:last-child { border-bottom: 0; }
.rg-terms__date {
  margin: 0;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  color: var(--rn-navy);
}
.rg-terms__text {
  margin: 0;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  line-height: 24px;
  color: #5D5F64;
}

/* ---- Подвал документа: регистрация ---- */
.rg-doc__foot {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #EEF0F3;
  text-align: center;
}
.rg-doc__note {
  margin: 0 0 20px;
  font-family: "Inter", sans-serif;
  font-size: 15px;
  line-height: 24px;
  color: #8A93A6;
}
/* Геометрия и цвета - как у .cta__btn (баннер регистрации на главной) */
.rg-doc__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: var(--rn-gold);
  color: var(--rn-navy);
  border-radius: 8px;
  font-family: "Roboto", sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 24px;
  text-decoration: none;
  transition: filter .15s ease;
}
.rg-doc__btn:hover { color: var(--rn-navy); filter: brightness(1.06); }
.rg-doc__btn .bi { font-size: 12px; }

@media (max-width: 991px) {
  .rg-doc { padding: 40px 32px; }
  .rg-doc__title { font-size: 24px; line-height: 32px; }
}
@media (max-width: 767px) {
  .rg-terms__row { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 575px) {
  .rg { padding: 20px 0 56px; }
  .rg-doc { padding: 32px 20px; }
  .rg-doc__title { font-size: 20px; line-height: 28px; }
  .rg-doc__logo { width: 132px; height: 55px; }
  .rg-sec__title { font-size: 19px; line-height: 26px; }
  .rg-doc__btn { width: 100%; justify-content: center; }
}

/* Печать (Ctrl+P) - чистый документ без хрома сайта */
@media print {
  body.rn-inner { padding-top: 0; }
  .site-header, #site-footer, .breadcrumb-rn,
  .rg-doc__download, .rg-doc__foot { display: none !important; }
  .rg { background: none; padding: 0; }
  .rg-doc { max-width: none; border: 0; border-radius: 0; padding: 0; }
  .rg-sec { break-inside: avoid; }
}
