
/* ======================================================
   PRIVOZ — FOOTER
   REGLAMENT MODAL — RU

   Компактное оглавление
   Удобный для чтения текст
   Desktop / MacBook / Tablet / Mobile
====================================================== */

/* ======================================================
   01. BOX SIZING
====================================================== */

.rgm-modal,
.rgm-modal *,
.rgm-modal *::before,
.rgm-modal *::after {
  box-sizing: border-box;
}

/* ======================================================
   02. MODAL OVERLAY
====================================================== */

.rgm-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;

  display: none;

  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  color: #202020;
}

.rgm-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: clamp(10px, 2.5vw, 34px);
}

/* ЗАТЕМНЕНИЕ ФОНА */

.rgm-backdrop {
  position: absolute;
  inset: 0;

  background: rgba(6, 6, 6, 0.72);

  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

/* ======================================================
   03. MODAL WINDOW
====================================================== */

.rgm-dialog {
  position: relative;

  display: flex;
  flex-direction: column;

  width: min(1360px, 100%);
  height: min(880px, calc(100dvh - 40px));

  min-height: 0;

  background: #ffffff;

  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.22);

  clip-path: polygon(
    24px 0,
    100% 0,
    100% calc(100% - 24px),
    calc(100% - 24px) 100%,
    0 100%,
    0 24px
  );

  outline: none;
}

/* ======================================================
   04. HEADER
====================================================== */

.rgm-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 24px;

  padding:
    28px
    clamp(24px, 3.8vw, 52px)
    24px;

  border-bottom: 1px solid #eaeaea;

  flex: 0 0 auto;

  background: #ffffff;
}

/* ПЛАШКА */

.rgm-eyebrow {
  display: block;

  margin-bottom: 10px;

  color: #ff681e;

  font-size: 10px;
  font-weight: 700;

  line-height: 1.3;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* НАЗВАНИЕ ДОКУМЕНТА */

.rgm-header h2 {
  margin: 0 0 9px;

  color: #171717;

  font-size: clamp(32px, 3vw, 44px);
  font-weight: 600;

  line-height: 1.05;
  letter-spacing: -0.045em;
  word-spacing: normal;
}

/* ОРАНЖЕВОЕ СЛОВО */

.rgm-header h2 em {
  color: #ff681e;
  font-style: normal;
}

/* ПОДЗАГОЛОВОК */

.rgm-header p {
  margin: 0;

  color: #777777;

  font-size: 13px;
  line-height: 1.5;
  letter-spacing: 0;
}

/* ======================================================
   05. CLOSE BUTTON
====================================================== */

.rgm-close {
  display: grid;
  place-items: center;

  flex: 0 0 44px;

  width: 44px;
  height: 44px;

  padding: 0;

  border: 0;
  border-radius: 0;

  background: #ff681e;
  color: #ffffff;

  font-family: Arial, sans-serif;
  font-size: 30px;
  font-weight: 400;
  line-height: 1;

  cursor: pointer;

  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.rgm-close:hover {
  background: #df5110;
}

.rgm-close:focus-visible {
  outline: 2px solid #ff681e;
  outline-offset: 4px;
}

/* ======================================================
   06. TWO COLUMN LAYOUT
====================================================== */

.rgm-layout {
  display: grid;

  grid-template-columns:
    290px
    minmax(0, 1fr);

  flex: 1 1 auto;

  min-height: 0;

  overflow: hidden;
}

/* ======================================================
   07. LEFT SIDEBAR
====================================================== */

.rgm-aside {
  display: flex;
  flex-direction: column;

  min-width: 0;
  min-height: 0;

  padding: 24px 0 16px;

  background: #f6f6f6;

  border-right: 1px solid #e8e8e8;
}

/* СОДЕРЖАНИЕ */

.rgm-aside-caption {
  flex: 0 0 auto;

  padding: 0 19px 17px;

  color: #929292;

  font-size: 10px;
  font-weight: 700;

  line-height: 1.4;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ======================================================
   08. NAVIGATION
====================================================== */

.rgm-nav {
  flex: 1 1 auto;

  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  overscroll-behavior: contain;

  scrollbar-width: thin;
  scrollbar-color: #cccccc transparent;
}

.rgm-nav::-webkit-scrollbar {
  width: 5px;
}

.rgm-nav::-webkit-scrollbar-track {
  background: transparent;
}

.rgm-nav::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 5px;
}

/* ======================================================
   09. NAVIGATION ITEMS
====================================================== */

.rgm-nav-item {
  display: flex;
  align-items: flex-start;

  width: 100%;

  gap: 11px;

  padding: 12px 18px;

  margin: 0;

  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;

  background: transparent;

  color: #5b5b5b;

  font-family: "Plus Jakarta Sans", Arial, sans-serif;
  font-size: 13px;
  font-weight: 500;

  line-height: 1.45;
  letter-spacing: 0;
  word-spacing: normal;

  text-align: left;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

/* НОМЕР ПУНКТА СЛЕВА */

.rgm-nav-index {
  display: block;

  flex: 0 0 24px;

  color: #a4a4a4;

  font-size: 11px;
  font-weight: 700;

  line-height: 1.6;
  letter-spacing: 0.04em;
}

/* НАЗВАНИЕ ПУНКТА */

.rgm-nav-item > span:last-child {
  display: block;

  flex: 1;
  min-width: 0;

  font-size: 13px;
  line-height: 1.45;

  overflow-wrap: break-word;
}

/* НАВЕДЕНИЕ */

.rgm-nav-item:hover {
  background: #eeeeee;
  color: #242424;
}

/* АКТИВНЫЙ ПУНКТ */

.rgm-nav-item.is-active {
  background: #ffffff;

  color: #1b1b1b;

  border-left-color: #ff681e;

  font-weight: 600;
}

.rgm-nav-item.is-active .rgm-nav-index {
  color: #ff681e;
}

.rgm-nav-item.is-active > span:last-child {
  font-weight: 600;
}

/* КЛАВИАТУРНАЯ НАВИГАЦИЯ */

.rgm-nav-item:focus-visible {
  outline: 2px solid #ff681e;
  outline-offset: -3px;
}

/* УБИРАЕМ ПСЕВДОНОМЕРА */

.rgm-nav-item::before,
.rgm-nav-item::after {
  content: none !important;
}

/* ======================================================
   10. READING AREA
====================================================== */

.rgm-reading {
  flex: 1 1 auto;

  min-width: 0;
  min-height: 0;

  overflow-y: auto;
  overflow-x: hidden;

  background: #ffffff;

  overscroll-behavior: contain;

  scroll-behavior: smooth;

  scrollbar-width: thin;
  scrollbar-color: #bcbcbc #f4f4f4;
}

.rgm-reading::-webkit-scrollbar {
  width: 7px;
}

.rgm-reading::-webkit-scrollbar-track {
  background: #f4f4f4;
}

.rgm-reading::-webkit-scrollbar-thumb {
  background: #bcbcbc;
  border-radius: 10px;
}

.rgm-reading:focus-visible {
  outline: 2px solid #ff681e;
  outline-offset: -4px;
}

/* ======================================================
   11. READING CONTENT
====================================================== */

.rgm-reading-inner {
  width: 100%;
  max-width: 1100px;

  margin: 0 auto;

  padding:
    38px
    clamp(28px, 4.5vw, 64px)
    75px;
}

/* ======================================================
   12. DOCUMENT SECTIONS
====================================================== */

.rgm-section {
  margin: 0 0 55px;

  scroll-margin-top: 20px;
}

.rgm-section:last-child {
  margin-bottom: 0;
}

/* ======================================================
   13. SECTION HEADINGS
====================================================== */

.rgm-section h3 {
  display: flex;
  align-items: baseline;

  gap: 15px;

  margin: 0 0 26px;
  padding: 0 0 18px;

  border-bottom: 1px solid #e6e6e6;

  color: #1b1b1b;

  font-size: clamp(27px, 2.2vw, 34px);
  font-weight: 600;

  line-height: 1.15;
  letter-spacing: -0.035em;
  word-spacing: normal;

  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* ======================================================
   14. SECTION NUMBERS
====================================================== */

.rgm-heading-num {
  display: inline-block;

  flex: 0 0 auto;

  color: #ff681e;

  font-size: 20px;
  font-weight: 700;

  line-height: 1.25;
  letter-spacing: -0.01em;
}

/* НОМЕР И НАЗВАНИЕ НА ОДНОМ УРОВНЕ */

.rgm-section h3 .rgm-heading-num {
  align-self: baseline;
}

/* ======================================================
   15. SUBHEADINGS
====================================================== */

.rgm-section h4 {
  margin: 30px 0 17px;

  color: #202020;

  font-size: 19px;
  font-weight: 700;

  line-height: 1.35;
  letter-spacing: -0.015em;
}

/* ======================================================
   16. MAIN DOCUMENT TEXT
====================================================== */

.rgm-section p {
  margin: 0 0 20px;

  color: #414141;

  font-family: "Plus Jakarta Sans", Arial, sans-serif;

  font-size: 17px;
  font-weight: 400;

  line-height: 1.75;

  letter-spacing: 0.012em;
  word-spacing: 0.018em;

  overflow-wrap: break-word;
  hyphens: auto;
}

/* ПОСЛЕДНИЙ АБЗАЦ */

.rgm-section p:last-child {
  margin-bottom: 0;
}

/* ЖИРНЫЙ ТЕКСТ */

.rgm-section strong,
.rgm-section b {
  color: #222222;
  font-weight: 700;
}

/* ССЫЛКИ В ДОКУМЕНТЕ */

.rgm-section a {
  color: #d95412;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* СПИСКИ */

.rgm-section ul,
.rgm-section ol {
  margin: 0 0 22px;
  padding-left: 26px;
}

.rgm-section li {
  margin-bottom: 12px;

  color: #414141;

  font-size: 17px;
  line-height: 1.75;

  letter-spacing: 0.012em;
  word-spacing: 0.018em;
}

/* ======================================================
   17. FOOTER
====================================================== */

.rgm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;

  flex: 0 0 auto;

  gap: 18px;

  padding:
    15px
    clamp(24px, 3.8vw, 52px);

  border-top: 1px solid #ededed;

  background: #ffffff;

  color: #888888;

  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0;
}

/* ССЫЛКА НА ОРИГИНАЛ */

.rgm-footer a {
  color: #d4510d;

  font-size: 12px;
  font-weight: 700;

  line-height: 1.4;

  text-decoration: none;

  white-space: nowrap;
}

.rgm-footer a:hover {
  color: #ff681e;
  text-decoration: underline;
}

/* ======================================================
   18. MACBOOK / LAPTOP
   1025px — 1440px
====================================================== */

@media (min-width: 1025px) and (max-width: 1440px) {

  .rgm-dialog {
    width: min(1240px, 100%);
  }

  .rgm-header {
    padding: 25px 40px 20px;
  }

  .rgm-header h2 {
    font-size: 40px;
  }

  .rgm-layout {
    grid-template-columns:
      280px
      minmax(0, 1fr);
  }

  .rgm-aside {
    padding-top: 20px;
  }

  .rgm-nav-item {
    padding: 11px 17px;
  }

  .rgm-nav-item > span:last-child {
    font-size: 12.5px;
  }

  .rgm-reading-inner {
    padding:
      32px
      42px
      65px;
  }

  .rgm-section h3 {
    font-size: 29px;
  }

  .rgm-section p,
  .rgm-section li {
    font-size: 16px;
    line-height: 1.72;
  }

  .rgm-footer {
    padding: 13px 40px;
  }
}

/* ======================================================
   19. SHORT LAPTOP SCREENS
====================================================== */

@media (min-width: 801px) and (max-height: 750px) {

  .rgm-dialog {
    height: calc(100dvh - 24px);
  }

  .rgm-header {
    padding-top: 18px;
    padding-bottom: 16px;
  }

  .rgm-header h2 {
    font-size: 36px;
    margin-bottom: 6px;
  }

  .rgm-eyebrow {
    margin-bottom: 7px;
  }

  .rgm-aside {
    padding-top: 17px;
    padding-bottom: 12px;
  }

  .rgm-nav-item {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .rgm-reading-inner {
    padding-top: 28px;
  }

  .rgm-section {
    margin-bottom: 42px;
  }

  .rgm-footer {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

/* ======================================================
   20. TABLETS
   801px — 1024px
====================================================== */

@media (min-width: 801px) and (max-width: 1024px) {

  .rgm-dialog {
    width: 100%;
  }

  .rgm-header {
    padding: 24px 28px 20px;
  }

  .rgm-header h2 {
    font-size: 36px;
  }

  .rgm-layout {
    grid-template-columns:
      250px
      minmax(0, 1fr);
  }

  .rgm-aside {
    padding-top: 20px;
  }

  .rgm-aside-caption {
    padding-left: 15px;
  }

  .rgm-nav-item {
    gap: 9px;
    padding: 11px 13px;

    font-size: 12px;
  }

  .rgm-nav-item > span:last-child {
    font-size: 12px;
  }

  .rgm-nav-index {
    flex-basis: 21px;
    font-size: 10px;
  }

  .rgm-reading-inner {
    padding: 30px 27px 50px;
  }

  .rgm-section h3 {
    font-size: 26px;
  }

  .rgm-heading-num {
    font-size: 17px;
  }

  .rgm-section p,
  .rgm-section li {
    font-size: 15.5px;
    line-height: 1.7;
  }

  .rgm-footer {
    padding: 12px 28px;
  }
}

/* ======================================================
   21. MOBILE
   До 800px
====================================================== */

@media (max-width: 800px) {

  .rgm-modal.is-open {
    padding: 0;
  }

  .rgm-dialog {
    width: 100%;
    height: 100dvh;

    min-height: 0;

    clip-path: none;
  }

  /* HEADER */

  .rgm-header {
    align-items: flex-start;

    gap: 12px;

    padding: 18px 18px 16px;
  }

  .rgm-eyebrow {
    font-size: 9px;
    margin-bottom: 8px;
  }

  .rgm-header h2 {
    font-size: clamp(26px, 6vw, 34px);
    line-height: 1.08;
  }

  .rgm-header p {
    font-size: 11px;
    line-height: 1.45;
  }

  .rgm-close {
    flex: 0 0 38px;

    width: 38px;
    height: 38px;

    font-size: 27px;
  }

  /* LAYOUT */

  .rgm-layout {
    display: flex;
    flex-direction: column;
  }

  /* ОГЛАВЛЕНИЕ СВЕРХУ */

  .rgm-aside {
    flex: 0 0 auto;

    padding: 9px 0;

    border-right: 0;
    border-bottom: 1px solid #e8e8e8;
  }

  .rgm-aside-caption {
    display: none;
  }

  .rgm-nav {
    display: flex;

    gap: 5px;

    padding: 0 12px;

    overflow-x: auto;
    overflow-y: hidden;

    scrollbar-width: none;
  }

  .rgm-nav::-webkit-scrollbar {
    display: none;
  }

  /* ПУНКТЫ ОГЛАВЛЕНИЯ */

  .rgm-nav-item {
    flex: 0 0 auto;

    width: auto;
    max-width: 220px;
    min-height: 44px;

    align-items: center;

    gap: 7px;

    padding: 9px 12px;

    border-left: 0;
    border-bottom: 3px solid transparent;

    font-size: 11px;
    line-height: 1.3;
  }

  .rgm-nav-index {
    flex-basis: auto;
    font-size: 10px;
  }

  .rgm-nav-item > span:last-child {
    font-size: 11px;
    line-height: 1.3;
  }

  .rgm-nav-item.is-active {
    border-left-color: transparent;
    border-bottom-color: #ff681e;
  }

  /* ОБЛАСТЬ ТЕКСТА */

  .rgm-reading {
    flex: 1 1 auto;
    min-height: 0;
  }

  .rgm-reading-inner {
    padding: 27px 19px 60px;
  }

  /* РАЗДЕЛЫ */

  .rgm-section {
    margin-bottom: 43px;
  }

  .rgm-section h3 {
    gap: 10px;

    margin-bottom: 20px;
    padding-bottom: 15px;

    font-size: 25px;
    line-height: 1.18;
  }

  .rgm-heading-num {
    font-size: 16px;
  }

  .rgm-section h4 {
    margin-top: 24px;
    font-size: 17px;
  }

  /* ОСНОВНОЙ ТЕКСТ */

  .rgm-section p,
  .rgm-section li {
    font-size: 15px;
    line-height: 1.75;

    letter-spacing: 0.008em;
    word-spacing: normal;
  }

  .rgm-section p {
    margin-bottom: 17px;
  }

  /* FOOTER */

  .rgm-footer {
    padding: 12px 18px;

    font-size: 10px;
  }

  .rgm-footer > span {
    display: none;
  }

  .rgm-footer a {
    margin-left: auto;
    font-size: 11px;
  }
}

/* ======================================================
   22. SMALL MOBILE
====================================================== */

@media (max-width: 430px) {

  .rgm-header {
    padding: 15px 15px 13px;
  }

  .rgm-header h2 {
    font-size: 27px;
  }

  .rgm-header p {
    font-size: 10px;
  }

  .rgm-reading-inner {
    padding: 23px 16px 50px;
  }

  .rgm-section h3 {
    font-size: 22px;
  }

  .rgm-heading-num {
    font-size: 15px;
  }

  .rgm-section p,
  .rgm-section li {
    font-size: 14.5px;
    line-height: 1.72;
  }

  .rgm-footer {
    padding: 10px 15px;
  }
}

/* ======================================================
   23. REDUCED MOTION
====================================================== */

@media (prefers-reduced-motion: reduce) {

  .rgm-reading {
    scroll-behavior: auto;
  }

  .rgm-nav-item,
  .rgm-close {
    transition: none;
  }
}
