/* Раздел «Сведения об образовательной организации».
   Подключается только на страницах /sveden/* через опцию extraStyles в page_layout.
   Все классы с префиксом sv- и опираются на токены из styles.css,
   поэтому светлая и темная темы работают без отдельных правил. */

.sv-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

/* ---------- навигация по подразделам ---------- */

.sv-nav {
  position: sticky;
  top: 110px;
  padding: 22px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sv-nav-title {
  padding: 0 12px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.sv-nav-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-nav-item {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.sv-nav-item:hover {
  background: var(--surface-soft);
  transform: translateX(2px);
}

.sv-nav-item.is-active {
  background: #111217;
  color: #fff;
}

html[data-theme="dark"] .sv-nav-item.is-active {
  background: linear-gradient(135deg, #ff6a63 0%, #e53935 100%);
}

/* ---------- контент ---------- */

.sv-content {
  min-width: 0;
  padding: 34px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.sv-content-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 20px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
}

.sv-content-title {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.2;
}

.sv-copy-link {
  white-space: nowrap;
  font-weight: 800;
  color: var(--red);
}

.sv-copy-link:hover { text-decoration: underline; }

.sv-block { margin-bottom: 34px; }
.sv-block:last-child { margin-bottom: 0; }

.sv-block-title {
  margin: 0 0 14px;
  font-family: "Unbounded", sans-serif;
  font-size: 1.05rem;
  line-height: 1.3;
}

.sv-text {
  margin: 0 0 12px;
  color: var(--text);
}

.sv-text:last-child { margin-bottom: 0; }

/* ---------- таблицы ---------- */

.sv-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.sv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.sv-table th,
.sv-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.sv-table thead th {
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-soft);
}

.sv-table tbody tr:last-child th,
.sv-table tbody tr:last-child td { border-bottom: 0; }

.sv-table-info th[scope="row"] {
  width: 46%;
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-soft);
}

/* ---------- списки документов ---------- */

.sv-doc-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-doc-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.sv-doc-label {
  flex: 1;
  min-width: 220px;
  font-weight: 700;
}

.sv-doc-link {
  white-space: nowrap;
  font-weight: 800;
  color: var(--red);
}

.sv-doc-link:hover { text-decoration: underline; }

.sv-doc-links {
  display: inline-flex;
  align-items: baseline;
  gap: 14px;
  white-space: nowrap;
}

/* Метка формата, а не вторая равноправная ссылка: текст первичен. */
.sv-doc-pdf {
  padding: 3px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--muted);
}

.sv-doc-pdf:hover {
  border-color: var(--red);
  color: var(--red);
}

.sv-empty {
  margin: 12px 0 0;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 700;
}

/* ---------- адаптив: контрольные точки styles.css ---------- */

@media (max-width: 1100px) {
  .sv-layout { grid-template-columns: minmax(0, 1fr); }
  .sv-nav { position: static; }
  .sv-nav-title { display: none; }
  .sv-nav-list {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .sv-nav-item { white-space: nowrap; transform: none !important; }
}

@media (max-width: 820px) {
  .sv-content { padding: 24px 20px; }
}

@media (max-width: 560px) {
  .sv-content { padding: 22px 16px; }
  .sv-table th,
  .sv-table td { padding: 12px 14px; }
  .sv-table-info th[scope="row"] { width: auto; }
  .sv-doc-item { gap: 8px; }
  .sv-doc-label { min-width: 0; }
}

/* ---------- доступная среда: условия и фотографии кабинетов ---------- */

.sv-ovz-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sv-ovz-item {
  display: grid;
  gap: 6px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
}

.sv-ovz-title {
  font-family: "Unbounded", sans-serif;
  font-size: .95rem;
  line-height: 1.3;
}

.sv-ovz-text {
  font-size: .9rem;
  color: var(--muted);
}


.sv-gallery-title {
  margin: 22px 0 12px;
  font-family: "Unbounded", sans-serif;
  font-size: .98rem;
  line-height: 1.3;
}

.sv-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 0;
}

.sv-gallery-item {
  margin: 0;
  overflow: hidden;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.sv-gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.sv-gallery-item figcaption {
  padding: 12px 14px;
  font-size: .86rem;
  font-weight: 700;
  color: var(--muted);
}

@media (max-width: 560px) {
  .sv-gallery { grid-template-columns: minmax(0, 1fr); }
  .sv-gallery-item img { height: 210px; }
}

/* ---------- локальные нормативные акты ----------
   Страницы /docs/*. Вид документа, а не статьи: узкая колонка,
   нумерация пунктов вынесена на поле, таблицы реквизитов. */

.act {
  max-width: 860px;
  margin: 0 auto;
  padding: 38px 42px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.act-head {
  padding-bottom: 22px;
  margin-bottom: 28px;
  border-bottom: 2px solid var(--border);
}

.act-org {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.act-org-name {
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}

.act-approved {
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
}

/* Пока приказ не подписан — документ остаётся проектом, и это видно. */
.act-approved-pending { color: var(--red); }

/* Скачать и скопировать ссылку — рядом, действия одного порядка. */
.act-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.act-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--red);
  color: #fff;
  font-weight: 800;
  font-size: .9rem;
}

.act-download::before {
  content: "↓";
  font-size: 1rem;
  line-height: 1;
}

.act-download:hover { filter: brightness(1.08); }

/* Приложение к акту — контурной кнопкой: рядом с заливкой видно, что
   это другой документ, а не второй способ скачать тот же самый. */
.act-sample {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--red);
  color: var(--red);
  font-weight: 800;
  font-size: .9rem;
}

.act-sample::before {
  content: "◻";
  font-size: .95rem;
  line-height: 1;
}

.act-sample:hover { background: var(--red-soft); }

/* Приложение внутри текста акта: ссылка строкой, оговорка под ней
   мельче — она уточняет файл, а не продолжает норму. */
.act-attach {
  display: grid;
  gap: 6px;
  margin: 0 0 18px;
  padding: 16px 18px;
  border-radius: var(--radius-sm);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.act-attach-link {
  font-weight: 800;
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.act-attach-note {
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.55;
}

.act-title {
  margin: 0 0 14px;
  font-family: "Unbounded", sans-serif;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.25;
}

.act-h2 {
  margin: 32px 0 14px;
  font-family: "Unbounded", sans-serif;
  font-size: 1.02rem;
  line-height: 1.3;
}

.act-h2:first-child { margin-top: 0; }

.act-p {
  margin: 0 0 14px;
  line-height: 1.7;
}

.act-list {
  display: grid;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

/* Номер на поле, а не в тексте: так пункт читается и цитируется
   так же, как в бумажном акте — «пункт 3.4», а не «четвёртый абзац». */
.act-item {
  display: grid;
  grid-template-columns: 3.2em minmax(0, 1fr);
  gap: 12px;
  line-height: 1.7;
}

.act-num {
  font-weight: 800;
  color: var(--red);
  font-variant-numeric: tabular-nums;
}

.act-text { min-width: 0; }

.act-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.act-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

.act-table th,
.act-table td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}

.act-table thead th {
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-soft);
}

.act-table tbody tr:last-child td { border-bottom: 0; }

.act-foot {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.act-sign {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 0;
  font-weight: 700;
}

.act-sign-line {
  flex: 1;
  min-width: 120px;
  border-bottom: 1px solid var(--border);
}

@media (max-width: 820px) {
  .act { padding: 26px 22px; }
}

@media (max-width: 560px) {
  .act { padding: 22px 16px; }
  .act-item { grid-template-columns: 2.8em minmax(0, 1fr); gap: 8px; }
  .act-table th,
  .act-table td { padding: 11px 13px; }
}

/* Печать: акт подшивают к приказу, шапка сайта на листе не нужна. */
@media print {
  .site-header,
  .site-footer,
  .page-hero,
  .act-actions,
  .sv-copy-link { display: none !important; }

  .act {
    max-width: none;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .act-h2 { break-after: avoid; }
  .act-item,
  .act-table { break-inside: avoid; }
}
