/* Ассоциация врачей акушеров-гинекологов — стили сайта (v2: шире, плотнее, как на старом сайте) */

@font-face {
  font-family: "Lora";
  src: url("../fonts/lora.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("../fonts/lora-italic.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #292e65;          /* цвет эмблемы */
  --ink-deep: #1c2050;
  --ink-soft: #3d4385;
  --rose: #a8345c;         /* акцент */
  --rose-soft: #f6e3ea;
  --paper: #e9ecf5;        /* фон страницы */
  --surface: #ffffff;
  --tint: #e2e6f4;         /* кнопки меню */
  --tint-2: #f3f5fb;
  --text: #1b1e33;
  --muted: #565b76;
  --line: #d3d8e8;
  --ok: #1f7a4d;
  --err: #b42318;

  --serif: "Lora", "PT Serif", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1440px;
  --gutter: clamp(14px, 2.4vw, 32px);
  --radius: 8px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { margin: 0; background: var(--paper); color: var(--text); font-family: var(--sans); font-size: 17px; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rose); }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 2px; border-radius: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--ink-deep); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.6rem, 2.4vw, 2.1rem); }
h2 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); }
h3 { font-size: 1.12rem; }
p { margin: 0 0 1.05em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- Верхняя полоса ---------- */
.topbar { background: var(--ink-deep); color: #c9cde6; font-size: .86rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.topbar-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 38px; }
.topbar-contacts { display: flex; gap: 22px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 500; }
.topbar a:hover { color: #f2b8cc; text-decoration: underline; }
@media (max-width: 640px) { .topbar-org { display: none; } .topbar-row { justify-content: center; } }

/* ---------- Шапка: синяя полоса, эмблема ведёт на главную, дальше кнопки меню ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 8px rgba(28, 32, 80, .06); }
.nav-row { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 10px; min-height: 54px; }

.home-logo { flex: none; display: block; line-height: 0; }
.home-logo img { width: 54px; height: 54px; }
.home-logo:hover img { opacity: .85; }

.site-nav { flex: 1 1 auto; min-width: 0; }
.site-nav ul { list-style: none; display: flex; flex-wrap: nowrap; gap: 5px; margin: 0; padding: 0; }
.site-nav li { flex: 0 0 auto; display: flex; }
.site-nav a { flex: 1 1 auto; display: flex; align-items: center; justify-content: center; text-align: center; white-space: nowrap; padding: 7px 12px; border-radius: 5px; background: var(--tint); color: var(--ink-deep); text-decoration: none; font-weight: 600; font-size: .84rem; line-height: 1.25; }
.site-nav a:hover { background: #d3d9ef; color: var(--ink-deep); }
.site-nav a[aria-current="page"] { background: var(--ink); color: #fff; box-shadow: inset 0 -2px 0 var(--rose); }

.nav-toggle { display: none; margin-left: 0; align-items: center; gap: 10px; background: var(--ink); border: 0; border-radius: 6px; padding: 10px 16px; font: inherit; font-weight: 600; color: #fff; cursor: pointer; flex: none; }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after { display: block; width: 18px; height: 2px; background: currentColor; position: relative; content: ""; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after { position: absolute; top: 6px; }

@media (max-width: 1280px) {
  /* На планшетах и телефонах: шапка не закреплена (во встроенных браузерах мессенджеров она «плывёт»),
     а все кнопки меню видны сразу и переносятся на несколько строк — как на старом сайте */
  .site-header { position: relative; top: auto; box-shadow: none; }
  .site-nav ul { flex-wrap: wrap; gap: 5px; }
  .site-nav li { flex: 1 1 auto; }
}

/* ---------- Кнопки, уведомления ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 11px 20px; border-radius: 6px; font: inherit; font-weight: 700; font-size: .96rem; text-decoration: none; border: 2px solid transparent; cursor: pointer; line-height: 1.2; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--ink-deep); color: #fff; }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: var(--surface); }
.btn-ghost:hover { background: var(--tint); color: var(--ink-deep); }
.btn-small { padding: 7px 14px; font-size: .9rem; }

.notice { margin: 0 0 18px; padding: 14px 18px; border-radius: var(--radius); background: #e6f3ec; color: var(--ok); border: 1px solid #b9dcc8; font-weight: 500; }
.notice-error { background: #fdecea; color: var(--err); border-color: #f4c7c3; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--tint); color: var(--ink-deep); text-decoration: none; }
.tag-open { background: var(--rose-soft); color: var(--rose); }
.empty { color: var(--muted); padding: 16px 0; margin: 0; }
.lead-muted { color: var(--muted); }
.callout { background: var(--tint-2); border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 26px; }
.callout p:last-child { margin: 0; }
.sub-title { font-size: 1.2rem; margin: 8px 0 4px; }

/* ---------- Главная: верхний блок ---------- */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.hero-row { display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); padding-top: 36px; padding-bottom: 36px; }
.hero-emblem { width: clamp(110px, 12vw, 170px); flex: none; }
.hero-text { min-width: 0; }
.hero-title { font-size: clamp(1.8rem, 3.4vw, 2.9rem); line-height: 1.1; margin-bottom: 16px; letter-spacing: -0.01em; }
.hero-lead { font-size: 1.1rem; line-height: 1.65; max-width: 80ch; color: #2f3350; margin-bottom: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
@media (max-width: 640px) {
  .hero-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 4px 16px; align-items: center; padding-top: 22px; padding-bottom: 24px; }
  .hero-emblem { width: 78px; }
  .hero-text { display: contents; }
  .hero-title { grid-column: 2; margin: 0; font-size: 1.45rem; line-height: 1.15; }
  .hero-lead { grid-column: 1 / -1; margin-top: 14px; font-size: 1rem; }
}

/* ---------- Главная: история (синяя плашка) ---------- */
.timeline { background: var(--ink); color: #eef0fb; }
.timeline-list { list-style: none; margin: 0; padding: 40px 0 44px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.timeline-item { position: relative; padding: 28px 36px 0 0; border-top: 2px solid rgba(255,255,255,.3); }
.timeline-item::before { content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 4px var(--ink); }
.timeline-item:last-child::before { background: #ef8fb1; }
.timeline-year { display: block; font-family: var(--serif); font-size: clamp(2.2rem, 3.6vw, 3.3rem); font-weight: 700; line-height: 1; color: #fff; margin-bottom: 14px; font-variant-numeric: lining-nums; }
.timeline-item p { margin: 0; font-size: 1.02rem; font-weight: 500; line-height: 1.6; max-width: 38ch; }
@media (max-width: 640px) {
  .timeline-list { grid-template-columns: 1fr 1fr; gap: 24px 0; }
}
@media (max-width: 520px) {
  .timeline-list { grid-template-columns: 1fr; padding-left: 8px; gap: 0; }
  .timeline-item { border-top: 0; border-left: 2px solid rgba(255,255,255,.3); padding: 0 0 22px 24px; }
  .timeline-item:last-child { padding-bottom: 0; }
  .timeline-item::before { top: 8px; left: -8px; }
}

/* ---------- Каркас: содержимое + правая колонка, как на старом сайте ---------- */
.page-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 36px; align-items: start; padding-top: 40px; padding-bottom: 64px; }
@media (max-width: 640px) { .page-grid { grid-template-columns: 1fr; } }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: clamp(22px, 3.2vw, 44px); margin-bottom: 32px; }
.panel:last-child { margin-bottom: 0; }
.panel-head { border-bottom: 2px solid var(--tint); padding-bottom: 20px; margin-bottom: 14px; }
.panel-head h1, .panel-head h2 { margin: 0; }
.panel-head-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.panel-head-row a { font-weight: 600; white-space: nowrap; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.tabs a { padding: 10px 20px; border-radius: 6px; background: var(--tint); text-decoration: none; color: var(--ink-deep); font-weight: 600; font-size: .95rem; }
.tabs a:hover { background: #d3d9ef; }
.tabs a[aria-current="page"] { background: var(--ink); color: #fff; }

.page-main { padding-top: 40px; padding-bottom: 64px; }
.news-home { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0 36px; }

/* Правая колонка: новости, как на старом сайте */
.side-col { display: grid; gap: 28px; position: sticky; top: 80px; align-self: start; }
@media (max-width: 640px) { .side-col { position: static; } }
@media (max-width: 640px) { .side-col { grid-template-columns: 1fr; } }
.side-card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.side-menu ul { list-style: none; margin: 0; padding: 10px; }
.side-menu a { display: block; padding: 13px 16px; border-radius: 6px; text-decoration: none; color: var(--ink-deep); font-weight: 600; font-size: .97rem; }
.side-menu a:hover { background: var(--tint); color: var(--ink-deep); }
.side-menu a[aria-current="page"] { background: var(--ink); color: #fff; }
.side-menu li + li { border-top: 1px solid var(--tint-2); }
.side-news { padding: 26px 26px 28px; }
.side-news h2 { font-size: 1.35rem; text-align: left; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 2px solid var(--tint); }
.side-news ul { list-style: none; margin: 0 0 20px; padding: 0; }
.side-news li { padding: 16px 0; border-bottom: 1px solid var(--tint); }
.side-news time { display: block; font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.side-news a { color: var(--ink-deep); font-weight: 600; text-decoration: none; line-height: 1.5; font-size: .97rem; }
.side-news a:hover { color: var(--rose); text-decoration: underline; }
.side-more { display: inline-block; padding: 11px 20px; border-radius: 6px; background: var(--tint); font-weight: 700 !important; }
.side-more:hover { background: var(--ink); color: #fff !important; text-decoration: none !important; }

/* ---------- Нумерованные списки (мероприятия, новости, публикации) ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 22px; padding: 24px 0; border-bottom: 1px solid var(--tint); }
.list-item:last-child { border-bottom: 0; }
.list-item.has-thumb { grid-template-columns: 40px minmax(0, 1fr) 170px; }
.list-num { width: 38px; height: 38px; border-radius: 50%; background: var(--tint); color: var(--ink-deep); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: .92rem; }
.list-title { font-size: 1.08rem; font-weight: 600; line-height: 1.55; margin: 5px 0 10px; color: var(--ink-deep); }
.list-title a { color: inherit; text-decoration: none; }
.list-title a:hover { color: var(--rose); text-decoration: underline; }
.list-title-serif { font-family: var(--serif); font-size: 1.12rem; font-weight: 700; }
.list-excerpt { color: var(--muted); margin: 0 0 10px; font-size: .97rem; line-height: 1.6; }
.list-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; color: var(--muted); font-size: .9rem; margin: 0; }
.list-date { margin-left: auto; white-space: nowrap; }
.meta-strong { color: var(--ink-deep); font-weight: 700; }
.read-more { font-weight: 700; color: var(--ink); }
.list-thumb img { width: 170px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; background: var(--tint); }
.pub-authors { margin: 0 0 8px; color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  .list-item, .list-item.has-thumb { grid-template-columns: 30px minmax(0, 1fr); gap: 10px; }
  .list-num { width: 28px; height: 28px; font-size: .84rem; }
  .list-thumb { grid-column: 2; }
  .list-thumb img { width: 100%; max-width: 320px; }
  .list-date { margin-left: 0; }
}

/* Файлы (PDF, Word) */
.file-chip { display: inline-flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--tint-2); text-decoration: none; color: var(--ink-deep); max-width: 100%; }
.file-chip:hover { border-color: var(--ink); color: var(--ink-deep); background: #fff; }
.file-ext { flex: none; font-size: .72rem; font-weight: 800; color: #fff; background: var(--rose); border-radius: 4px; padding: 4px 6px; letter-spacing: .02em; }
.file-name { font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.docs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 14px; }
.file-chip-big { display: flex; padding: 18px 22px 18px 18px; gap: 18px; }
.file-chip-big .file-ext { font-size: .85rem; padding: 10px 10px; min-width: 52px; text-align: center; }
.file-text { display: flex; flex-direction: column; min-width: 0; }
.file-title { font-weight: 700; font-size: 1.05rem; }
.file-chip-big .file-name { color: var(--muted); font-weight: 500; }

/* ---------- Статья ---------- */
.article-title { font-size: clamp(1.45rem, 2.4vw, 2rem); line-height: 1.25; margin-bottom: 10px !important; }
.article-meta { margin-top: 4px; }
.article-meta .list-date { margin-left: 0; }
.article-body { padding-top: 24px; }
.article-cover { margin: 0 0 28px; }
.article-cover img { border-radius: 8px; max-height: 560px; width: auto; background: var(--tint); }
.prose { font-size: 1.07rem; line-height: 1.78; max-width: 880px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.4em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.3em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 4px solid var(--rose); font-family: var(--serif); font-style: italic; color: var(--ink-deep); }
.prose img { border-radius: 6px; margin: 1em 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose a[href$=".pdf"], .prose a[href$=".doc"], .prose a[href$=".docx"] { font-weight: 700; }
.prose p:last-child { margin-bottom: 0; }
.letter p:first-child { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; font-style: italic; color: var(--ink-deep); }
.letter { max-width: none; }

.video-frame { position: relative; aspect-ratio: 16 / 9; background: #0e1030; border-radius: 8px; overflow: hidden; margin: 20px 0; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.more { margin-top: 36px; padding-top: 26px; border-top: 2px solid var(--tint); }
.more h2 { font-size: 1.2rem; }
.news-compact { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 24px; }
.news-compact li { padding: 14px 0; border-bottom: 1px solid var(--tint); }
.news-compact time { display: block; font-size: .84rem; color: var(--muted); font-weight: 600; }
.news-compact a { color: var(--ink-deep); text-decoration: none; font-weight: 600; line-height: 1.4; font-size: .95rem; }
.news-compact a:hover { color: var(--rose); text-decoration: underline; }

/* ---------- Регистрация ---------- */
.register { margin-top: 36px; background: var(--tint-2); border: 1px solid var(--line); border-top: 4px solid var(--ink); border-radius: 8px; padding: clamp(18px, 3vw, 30px); scroll-margin-top: 20px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px; }
.field { display: flex; flex-direction: column; gap: 5px; font-size: .94rem; font-weight: 600; }
.field b { color: var(--rose); }
.field-wide { grid-column: 1 / -1; }
.field input, .field textarea { font: inherit; font-weight: 400; font-size: 1rem; padding: 10px 12px; border: 1px solid #b9bfd6; border-radius: 6px; background: #fff; color: var(--text); width: 100%; }
.field input:focus, .field textarea:focus { border-color: var(--ink); outline: 2px solid rgba(41,46,101,.18); outline-offset: 0; }
.field [aria-invalid="true"] { border-color: var(--err); }
.field-error { color: var(--err); font-size: .88rem; font-weight: 600; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .94rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--ink); }
.hp { position: absolute; left: -9999px; }
@media (max-width: 640px) { .form { grid-template-columns: 1fr; } }
.reg-list { list-style: none; margin: 0; padding: 0; }
.reg-list li { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--tint); }
@media (max-width: 640px) { .reg-list li { flex-direction: column; align-items: flex-start; } }

/* ---------- Фотогалерея (как на старом сайте: название, фото, «Смотреть весь альбом…») ---------- */
.albums { display: grid; gap: 0; }
.album { padding: 28px 0; border-bottom: 1px solid var(--tint); }
.album:last-child { border-bottom: 0; padding-bottom: 0; }
.album-title { font-size: 1.15rem; line-height: 1.5; margin-bottom: 16px; }
.album-title a { color: var(--ink-deep); text-decoration: none; }
.album-title a:hover { color: var(--rose); text-decoration: underline; }
.album-strip { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.album-strip a { display: block; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--tint) url("../img/mark.png") center / 44px no-repeat; }
.album-strip img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.album-strip a:hover img { transform: scale(1.04); }
.album-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 0; font-size: .92rem; color: var(--muted); }
@media (max-width: 640px) { .album-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .album-strip img { transition: none; } }

.photo-grid { list-style: none; margin: 16px 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.photo-grid a { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: var(--tint); }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 520px) { .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; } }
.album-desc { margin: 12px 0; }

.video-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 36px 28px; }
.video-item .video-frame { margin: 0 0 12px; }
.video-item h2 { font-family: var(--sans); font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; }

/* Лайтбокс */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12, 14, 36, .95); display: flex; align-items: center; justify-content: center; padding: 56px 64px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 0; width: 48px; height: 48px; border-radius: 50%; font-size: 26px; line-height: 1; cursor: pointer; }
.lightbox button:hover { background: rgba(255,255,255,.26); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #c9cce0; font-size: .9rem; }
@media (max-width: 600px) { .lightbox { padding: 56px 8px; } .lb-prev, .lb-next { top: auto; bottom: 6px; transform: none; } }

/* ---------- Контакты, об ассоциации ---------- */
.contact-list { margin: 8px 0 0; display: grid; }
.contact-list > div { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--tint); align-items: center; }
.contact-list > div:last-child { border-bottom: 0; }
.contact-list dt { color: var(--muted); font-weight: 600; }
.contact-list dd { margin: 0; font-weight: 600; color: var(--ink-deep); }
@media (max-width: 600px) { .contact-list > div { grid-template-columns: 1fr; gap: 2px; } }

.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 48px; align-items: start; padding-top: 16px; }
.about-grid .prose p:first-child { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; line-height: 1.5; color: var(--ink-deep); }
.about-emblem { width: 100%; max-width: 240px; }
@media (max-width: 640px) { .about-grid { grid-template-columns: 1fr; } .about-emblem { max-width: 150px; order: -1; } }

/* ---------- Страницы списков ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.pager a, .pager span { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; text-decoration: none; background: var(--tint); font-weight: 700; color: var(--ink-deep); }
.pager span { background: var(--ink); color: #fff; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--ink-deep); color: #c9cce0; font-size: .94rem; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #f2b8cc; }
.site-footer h2 { font-family: var(--sans); font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.2fr; gap: 48px; padding-top: 52px; padding-bottom: 36px; }
.footer-org { display: flex; gap: 18px; align-items: flex-start; }
.footer-org img { width: 84px; flex: none; filter: brightness(0) invert(1); opacity: .92; }
.footer-org p { margin: 0; color: #fff; font-family: var(--serif); font-size: 1.05rem; font-weight: 600; line-height: 1.45; }
.footer-contacts p { margin-bottom: .45em; }
.footer-links ul { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 24px; }
.footer-links li { margin-bottom: 9px; break-inside: avoid; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; border-top: 1px solid rgba(255,255,255,.14); padding-top: 16px; padding-bottom: 22px; font-size: .85rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; gap: 24px; } }



/* ---------- Узкий экран и телефон (на телефоне страница рисуется шириной 820px — как компьютерная, только ближе) ---------- */
@media (max-width: 1280px) {
  .topbar { font-size: .82rem; }
  .topbar-org { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .topbar-contacts { flex: none; gap: 16px; }
  .page-grid { grid-template-columns: minmax(0, 1fr) 230px; gap: 18px; padding-top: 24px; }
  .side-col { position: static; }
  .side-news { padding: 18px 18px 20px; }
  .about-grid { grid-template-columns: minmax(0, 1fr) 160px; gap: 22px; }
  /* Новости — голубые ссылки, сразу видно, что на них можно нажать */
  .side-news li a, .news-compact a { color: #1f63c6; text-decoration: underline; text-underline-offset: 2px; }
  .side-news li a:hover, .news-compact a:hover { color: var(--rose); }
}

@media print {
  .topbar, .site-header, .site-footer, .side-col, .more, .register, .hero, .timeline { display: none; }
  body { background: #fff; }
  .page-grid { display: block; }
  .panel { border: 0; padding: 0; }
}
