/* LOD CMS for ОБС Пазарджик — публичен сайт
   Палитра: зелено на Община Пазарджик + хералдическо злато от герба */
:root {
  --green-950: #062f1c;
  --green-800: #0b5e35;
  --green-700: #0d6d3e;
  --green-600: #00923f;
  --green-100: #e3efe8;
  --green-50: #f1f6f3;
  --gold: #a8822a;
  --gold-soft: #e9d9a8;
  --ink: #18221d;
  --ink-2: #47564e;
  --ink-3: #6b7a72;
  --line: #d5dfd9;
  --paper: #ffffff;
  --bg: #ffffff;
  --focus: #f2b632;
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --fs: 1rem;
  --radius: 6px;
  --wrap: 1200px;
}
html[data-fs="1"] { font-size: 112.5%; }
html[data-fs="2"] { font-size: 125%; }
html[data-fs="-1"] { font-size: 93.75%; }

html[data-contrast="high"] {
  --green-800: #003d1f;
  --green-700: #003d1f;
  --green-600: #004d26;
  --ink: #000;
  --ink-2: #000;
  --ink-3: #1a1a1a;
  --line: #000;
  --gold: #6b4f00;
  --green-50: #fff;
  --green-100: #fff;
}
html[data-contrast="high"] a { text-decoration: underline; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--green-800); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--green-600); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; z-index: 100; border-radius: var(--radius); }
.skip:focus { top: 12px; color: #fff; }
.muted { color: var(--ink-3); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }

/* ---------- Горна лента ---------- */
.topbar { background: var(--green-950); color: #cfe0d6; font-size: .84rem; }
.topbar-in { display: flex; align-items: center; gap: 24px; min-height: 38px; flex-wrap: wrap; }
.topbar a { color: #e8f2ec; text-decoration: none; }
.topbar a:hover { color: #fff; text-decoration: underline; }
.a11y { display: flex; gap: 2px; margin-left: auto; }
.a11y button {
  background: transparent; color: #e8f2ec; border: 1px solid transparent; font: inherit;
  padding: 3px 8px; border-radius: 4px; cursor: pointer;
}
.a11y button:hover { border-color: rgba(255,255,255,.35); }
.a11y button[aria-pressed="true"] { background: #fff; color: var(--green-950); }
.topbar-contact { display: flex; gap: 18px; }
.to-admin { font-weight: 600; }
.topbar-contact { align-items: center; }
.fb-link { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: #1877f2; color: #fff !important; }
.fb-link:hover { background: #fff; color: #1877f2 !important; text-decoration: none !important; }
.footer-fb { display: inline-flex; align-items: center; gap: 9px; margin-top: 4px; padding: 8px 14px; border-radius: 999px; background: #1877f2; color: #fff; font-weight: 600; }
.footer-fb:hover { background: #fff; color: #1877f2; text-decoration: none !important; }
.credits a { color: #dfeae4; }
.footer-bottom p { margin: 0; }

/* ---------- Шапка ---------- */
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.masthead-in { display: flex; align-items: center; gap: 28px; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-crest { width: 56px; height: 73px; object-fit: contain; flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.55rem; line-height: 1.15; color: var(--green-800); }
.brand-tag { color: var(--ink-3); font-size: .9rem; margin-top: 2px; }
.masthead-search { margin-left: auto; display: flex; width: min(380px, 40%); }
.masthead-search input {
  flex: 1; min-width: 0; font: inherit; font-size: .95rem; padding: 10px 14px;
  border: 1px solid var(--line); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); background: var(--green-50);
}
.masthead-search input:focus { background: #fff; border-color: var(--green-700); outline: none; box-shadow: 0 0 0 3px rgba(0,146,63,.18); }
.masthead-search button {
  border: 0; background: var(--green-800); color: #fff; padding: 0 14px; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer;
}
.masthead-search button:hover { background: var(--green-700); }
.nav-toggle { display: none; }

.mainnav { background: var(--green-800); border-bottom: 4px solid var(--gold); }
.nav-list { list-style: none; display: flex; flex-wrap: wrap; margin: 0 auto; padding-top: 0; padding-bottom: 0; }
.nav-list > li { position: relative; display: flex; align-items: stretch; }
.nav-list > li > a {
  display: block; color: #fff; text-decoration: none; padding: 13px 15px; font-weight: 500; font-size: .97rem;
}
.nav-list > li > a:hover, .nav-list > li:focus-within > a, .nav-list > li > a[aria-current="page"] { background: var(--green-950); color: #fff; }
.sub-toggle { display: none; }
.sub {
  list-style: none; margin: 0; padding: 8px 0; position: absolute; top: 100%; left: 0; min-width: 280px;
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--gold);
  box-shadow: 0 12px 28px rgba(6,47,28,.16); display: none; z-index: 30;
}
.sub-wide { columns: 2; column-gap: 0; min-width: 560px; }
.sub li { break-inside: avoid; }
.sub a { display: block; padding: 8px 18px; color: var(--ink); text-decoration: none; font-size: .94rem; line-height: 1.4; }
.sub a:hover { background: var(--green-50); color: var(--green-800); }
.has-sub:hover > .sub, .has-sub:focus-within > .sub { display: block; }
.nav-list > li:nth-last-child(-n+3) > .sub { left: auto; right: 0; }

/* ---------- Начало: hero ---------- */
.hero { background: var(--green-800); color: #fff; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; right: -120px; top: -140px; width: 520px; height: 520px; border-radius: 50%;
  border: 70px solid rgba(255,255,255,.04); pointer-events: none;
}
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 56px; padding-top: 52px; padding-bottom: 56px; position: relative; z-index: 1; }
.hero h1 { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 12px; font-weight: 700; letter-spacing: -.02em; }
.hero-lead { font-size: 1.15rem; color: #d9eadf; margin: 0 0 28px; max-width: 34em; }
.hero-search label { display: block; font-weight: 600; margin-bottom: 8px; color: #fff; }
.hero-search-row { display: flex; max-width: 640px; background: #fff; border-radius: var(--radius); padding: 5px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.hero-search-row input { flex: 1; min-width: 0; border: 0; font: inherit; font-size: 1.08rem; padding: 12px 14px; color: var(--ink); background: transparent; }
.hero-search-row input:focus { outline: none; }
.hero-search-row button {
  border: 0; background: var(--gold); color: #fff; font: inherit; font-weight: 600; padding: 0 26px; border-radius: 4px; cursor: pointer;
}
.hero-search-row button:hover { background: #8d6c1f; }
.hero-search.plain .hero-search-row { box-shadow: none; border: 1px solid var(--line); }
.hero-chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-chips a {
  display: inline-block; color: #fff; text-decoration: none; padding: 6px 14px; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; font-size: .92rem;
}
.hero-chips a:hover { background: #fff; color: var(--green-800); }

.session-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 24px 26px; align-self: start; border-top: 6px solid var(--gold); }
.session-kicker { margin: 0; color: var(--ink-3); font-weight: 600; font-size: .92rem; }
.session-date { margin: 4px 0 14px; display: flex; align-items: baseline; gap: 12px; }
.session-date .d { font-family: var(--serif); font-size: 4.2rem; line-height: 1; color: var(--green-800); font-weight: 700; font-variant-numeric: lining-nums; }
.session-date .m { font-size: 1.1rem; font-weight: 600; }
.session-links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.session-links li { border-bottom: 1px solid var(--line); }
.session-links a { display: block; padding: 10px 0; text-decoration: none; font-weight: 500; }
.session-links a:hover { text-decoration: underline; }

/* ---------- Начало: решения + съобщения ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 56px; padding-top: 48px; padding-bottom: 56px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.sec-head h2 { margin: 0 0 8px; font-size: 1.45rem; }
.more { font-weight: 600; font-size: .95rem; white-space: nowrap; }

.register { list-style: none; margin: 0; padding: 0; }
.register li { border-bottom: 1px solid var(--line); }
.register a {
  display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 18px; padding: 14px 12px 14px 0;
  text-decoration: none; color: var(--ink); border-left: 3px solid transparent; transition: border-color .15s, background .15s;
}
.register a:hover { background: var(--green-50); border-left-color: var(--gold); }
.reg-no { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--green-800); padding-left: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.reg-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.reg-subj { line-height: 1.45; }
.register a:hover .reg-subj { color: var(--green-800); }
.reg-meta { color: var(--ink-3); font-size: .87rem; }
.register-full a { grid-template-columns: 92px minmax(0, 1fr); }

.home-side section + section { margin-top: 40px; }
.dated { list-style: none; margin: 0; padding: 0; }
.dated li { display: grid; grid-template-columns: 54px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: start; }
.dated time, .newslist time {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  background: var(--green-50); border: 1px solid var(--green-100); border-radius: var(--radius); padding: 5px 0 6px; font-size: .78rem; color: var(--ink-2); line-height: 1.1;
}
.dated time span, .newslist time span { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--green-800); }
.dated a { text-decoration: none; color: var(--ink); line-height: 1.45; font-size: .97rem; }
.dated a:hover { color: var(--green-800); text-decoration: underline; }

.live { background: var(--green-950); color: #fff; border-radius: var(--radius); padding: 20px 22px; }
.live h2 { margin: 0 0 8px; font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
.live h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #e5484d; box-shadow: 0 0 0 4px rgba(229,72,77,.25); }
.live ul { list-style: none; margin: 0; padding: 0; }
.live li { padding: 9px 0; border-top: 1px solid rgba(255,255,255,.14); }
.live a { color: #fff; text-decoration: none; font-size: .95rem; line-height: 1.45; }
.live a:hover { text-decoration: underline; }

.docs-index { background: var(--green-50); border-top: 1px solid var(--line); padding: 48px 0 56px; }
.docs-index h2 { margin: 0 0 20px; font-size: 1.45rem; }
.docs-index-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 48px; }
.docs-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 40px; }
.docs-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.docs-list a { display: block; padding: 11px 0; text-decoration: none; color: var(--ink); font-weight: 500; }
.docs-list a:hover { color: var(--green-800); }
.docs-list a::after { content: "›"; float: right; color: var(--gold); font-weight: 700; }
.info-block { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.info-block + .info-block { margin-top: 14px; }
.info-block h3 { margin: 0 0 8px; font-size: 1.05rem; }
.prose-sm { font-size: .95rem; }
.prose-sm ul { list-style: none; padding: 0; margin: 0; }
.prose-sm li { padding: 8px 0; border-top: 1px solid var(--line); color: var(--ink-3); font-size: .88rem; }
.prose-sm li:first-child { border-top: 0; padding-top: 0; }
.prose-sm li a { font-size: .97rem; font-weight: 600; }
.prose-sm p { margin: 0 0 6px; }

/* ---------- Вътрешни страници ---------- */
.page { padding-top: 22px; padding-bottom: 64px; }
.page-narrow { max-width: 760px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 0; margin: 0 0 22px; padding: 0; font-size: .88rem; color: var(--ink-3); }
.crumbs li + li::before { content: "/"; margin: 0 9px; color: var(--line); }
.crumbs a { color: var(--ink-2); }
.page-head h1 { font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.3rem); margin: 0 0 8px; color: var(--ink); }
.page-head { margin-bottom: 22px; }
.lead { font-size: 1.1rem; color: var(--ink-2); max-width: 46em; }

.subcats { list-style: none; padding: 0; margin: 0 0 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.subcats a { display: inline-block; padding: 7px 15px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); font-size: .94rem; background: #fff; }
.subcats a:hover { border-color: var(--green-700); color: var(--green-800); }
.subcats a[aria-current="page"] { background: var(--green-800); border-color: var(--green-800); color: #fff; }

.cat-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; }
.cat-filter label { font-weight: 600; font-size: .92rem; }
.cat-filter input { flex: 1; min-width: 200px; max-width: 420px; font: inherit; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.cat-filter button, .search-form button, .btn {
  font: inherit; font-weight: 600; border: 0; background: var(--green-800); color: #fff; padding: 10px 20px; border-radius: var(--radius); cursor: pointer;
}
.cat-filter button:hover, .search-form button:hover, .btn:hover { background: var(--green-700); }
.count { color: var(--ink-3); font-size: .92rem; margin: 6px 0 14px; }
.empty { color: var(--ink-2); background: var(--green-50); padding: 18px 20px; border-radius: var(--radius); }

.doclist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 900px; }
.doclist li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.doclist a { text-decoration: none; font-weight: 500; color: var(--ink); }
.doclist a:hover { color: var(--green-800); text-decoration: underline; }

.pager { display: flex; flex-wrap: wrap; gap: 6px; margin: 28px 0 0; align-items: center; }
.pager a, .pager span { min-width: 40px; text-align: center; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-size: .94rem; }
.pager a:hover { border-color: var(--green-700); color: var(--green-800); }
.pager .cur { background: var(--green-800); color: #fff; border-color: var(--green-800); font-weight: 600; }
.pager .gap { border: 0; }

/* ---------- Документ ---------- */
.doc { max-width: 860px; }
.doc-head { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 28px; }
.doc-kind { margin: 0 0 6px; font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--gold); }
.doc-head h1 { font-family: var(--serif); font-size: clamp(1.45rem, 2.6vw, 2rem); margin: 0 0 14px; line-height: 1.3; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; font-size: .92rem; }
.doc-meta div { display: flex; gap: 6px; }
.doc-meta dt { color: var(--ink-3); }
.doc-meta dd { margin: 0; font-weight: 600; }
.doc-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn-line {
  font: inherit; font-size: .88rem; background: #fff; color: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 6px 12px; cursor: pointer; text-decoration: none;
}
.btn-line:hover { border-color: var(--green-700); color: var(--green-800); }
.draft-note { background: #fff6e0; border: 1px solid #efd58e; padding: 8px 12px; border-radius: var(--radius); font-size: .92rem; }

.prose { font-size: 1.05rem; line-height: 1.7; overflow-wrap: anywhere; }
.prose-doc { font-family: var(--serif); font-size: 1.1rem; line-height: 1.75; }
.prose p { margin: 0 0 .9em; }
.prose img { border-radius: 4px; }
.prose h2, .prose h3 { font-family: var(--sans); margin: 1.6em 0 .6em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin-bottom: .35em; }
.prose blockquote { margin: 1em 0; padding: .4em 1.2em; border-left: 3px solid var(--gold); color: var(--ink-2); }
.table-wrap { overflow-x: auto; margin: 1em 0 1.4em; -webkit-overflow-scrolling: touch; }
.prose table { border-collapse: collapse; min-width: 50%; font-family: var(--sans); font-size: .95rem; margin: 0 auto; }
.prose td, .prose th { border: 1px solid var(--line) !important; padding: 8px 10px; vertical-align: top; }
.prose th, .prose tr:first-child td { background: var(--green-50); }
.prose td p { margin: 0; }
.prose a.file-link { font-weight: 600; }
.prose a.file-link::after {
  content: attr(data-ext); text-transform: uppercase; font-family: var(--sans); font-size: .68rem; font-weight: 700;
  margin-left: .45em; padding: 1px 5px; border-radius: 3px; background: var(--green-100); color: var(--green-800); vertical-align: .15em;
}
.prose a.file-pdf::after { background: #fbe4e4; color: #a32121; }
.prose a.file-xls::after { background: #e1f3e6; color: #17693a; }

.attachments { margin-top: 36px; border-top: 2px solid var(--ink); padding-top: 14px; }
.attachments h2 { font-size: 1.15rem; margin: 0 0 10px; }
.attachments ul { list-style: none; margin: 0; padding: 0; }
.attachments li a {
  display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink);
}
.attachments .ext { font-size: .74rem; font-weight: 700; text-align: center; padding: 6px 0; border-radius: 4px; background: var(--green-100); color: var(--green-800); }
.attachments .file-pdf .ext { background: #fbe4e4; color: #a32121; }
.attachments .file-xls .ext { background: #e1f3e6; color: #17693a; }
.attachments .fname { font-weight: 500; }
.attachments a:hover .fname { color: var(--green-800); text-decoration: underline; }
.attachments .fsize { color: var(--ink-3); font-size: .86rem; }

.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 40px; }
.doc-pager a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font-weight: 600; }
.doc-pager a span { display: block; font-weight: 400; color: var(--ink-3); font-size: .85rem; }
.doc-pager .next { text-align: right; grid-column: 2; }
.doc-pager a:hover { border-color: var(--green-700); }

/* ---------- Новини ---------- */
.newslist { list-style: none; margin: 0; padding: 0; max-width: 900px; }
.newslist li { display: grid; grid-template-columns: 72px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.newslist time { padding: 8px 0; }
.newslist h2 { font-size: 1.12rem; margin: 0 0 4px; line-height: 1.4; }
.newslist h2 a { text-decoration: none; color: var(--ink); }
.newslist h2 a:hover { color: var(--green-800); text-decoration: underline; }
.newslist p { margin: 0; color: var(--ink-2); }
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; }
.news-figure { margin: 0 0 24px; }
.related h2 { font-size: 1.05rem; border-bottom: 2px solid var(--ink); padding-bottom: 8px; margin: 0; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li { padding: 11px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.related a { text-decoration: none; color: var(--ink); font-size: .95rem; line-height: 1.45; }
.related a:hover { color: var(--green-800); }
.video-embed { display: block; position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: var(--radius); overflow: hidden; margin: 1em 0 .4em; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-link { font-size: .9rem; }

/* ---------- Търсене ---------- */
.search-form { max-width: 820px; margin-bottom: 24px; }
.sf-main { display: flex; gap: 8px; }
.sf-main input { flex: 1; min-width: 0; font: inherit; font-size: 1.08rem; padding: 12px 14px; border: 1px solid #b9c7bf; border-radius: var(--radius); }
.sf-main input:focus { border-color: var(--green-700); outline: none; box-shadow: 0 0 0 3px rgba(0,146,63,.18); }
.sf-filters { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; }
.sf-filters label { display: flex; gap: 8px; align-items: center; font-size: .92rem; color: var(--ink-2); }
.sf-filters select { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.results { list-style: none; margin: 0; padding: 0; max-width: 880px; }
.results li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.r-kind { margin: 0 0 4px; font-size: .86rem; color: var(--gold); font-weight: 600; }
.results h2 { font-size: 1.1rem; margin: 0 0 6px; line-height: 1.4; font-weight: 600; }
.results h2 a { text-decoration: none; color: var(--ink); }
.results h2 a:hover { color: var(--green-800); text-decoration: underline; }
.r-snip { margin: 0; color: var(--ink-2); font-size: .95rem; }
mark { background: var(--gold-soft); color: inherit; padding: 0 2px; border-radius: 2px; }

/* ---------- Контакти ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.contact-grid h2 { margin-top: 0; }
.contact-list { margin: 0 0 24px; }
.contact-list div { display: grid; grid-template-columns: 130px 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
.contact-list dt { color: var(--ink-3); }
.contact-list dd { margin: 0; font-weight: 500; }
.map { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; }
.form label { display: block; font-weight: 600; font-size: .93rem; margin-bottom: 14px; }
.form input, .form textarea { display: block; width: 100%; margin-top: 5px; font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid #b9c7bf; border-radius: var(--radius); }
.form input:focus, .form textarea:focus { border-color: var(--green-700); outline: none; box-shadow: 0 0 0 3px rgba(0,146,63,.18); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opt { font-weight: 400; color: var(--ink-3); }
.fine { font-size: .85rem; color: var(--ink-3); }
.hp { position: absolute; left: -9999px; }
.notice { padding: 12px 16px; border-radius: var(--radius); margin-bottom: 16px; }
.notice p { margin: 0; }
.notice.ok { background: #e6f4ea; border: 1px solid #b6dcc2; }
.notice.err { background: #fdecea; border: 1px solid #f3c1bb; color: #8c1d18; }

/* ---------- Футър ---------- */
.site-footer { background: var(--green-950); color: #c7d8ce; font-size: .94rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; padding-top: 44px; padding-bottom: 36px; }
.footer-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.footer-brand strong { font-family: var(--serif); color: #fff; font-size: 1.15rem; }
.footer-brand img { width: 44px; height: 57px; object-fit: contain; }
.footer-about p { margin: 0 0 12px; }
.footer-about .muted { color: #9fb6a9; }
.footer-h { font-size: 1rem; color: #fff; margin: 0 0 12px; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { padding: 4px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 16px; padding-bottom: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; color: #9fb6a9; font-size: .86rem; }

/* ---------- Адаптивност ---------- */
@media (max-width: 1080px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .session-card { max-width: 520px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .news-layout { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 900px) {
  .masthead-in { flex-wrap: wrap; gap: 14px; }
  .brand { flex: 1 1 0; }
  .masthead-search { order: 3; width: 100%; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px; margin-left: auto;
    width: 46px; height: 42px; padding: 0 11px; background: var(--green-800); border: 0; border-radius: var(--radius); cursor: pointer;
  }
  .nav-toggle span:not(.sr) { display: block; height: 2px; background: #fff; border-radius: 2px; }
  .mainnav { display: none; }
  .mainnav.open { display: block; }
  .nav-list { flex-direction: column; padding: 6px 0; }
  .nav-list > li { flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.1); }
  .nav-list > li > a { flex: 1; }
  .sub-toggle {
    display: block; width: 52px; background: transparent; border: 0; border-left: 1px solid rgba(255,255,255,.1); color: #fff; cursor: pointer; position: relative;
  }
  .sub-toggle::before { content: ""; position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: translate(-50%, -70%) rotate(45deg); transition: transform .2s; }
  .sub-toggle[aria-expanded="true"]::before { transform: translate(-50%, -30%) rotate(-135deg); }
  .sub, .has-sub:hover > .sub, .has-sub:focus-within > .sub { position: static; display: none; width: 100%; min-width: 0; box-shadow: none; border: 0; columns: 1; background: var(--green-950); padding: 4px 0 8px; }
  .has-sub.open > .sub { display: block; }
  .sub a { color: #e3efe8; padding: 9px 22px; }
  .sub a:hover { background: transparent; color: #fff; }
  .docs-index-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-in > a, .topbar-contact > a:not(.fb-link) { display: none; }
  .doc-head h1 { font-size: 1.3rem; }
  .page-head h1 { font-size: 1.55rem; }
  .hero h1 { font-size: 1.75rem; }
  .a11y { margin-left: 0; }
  .topbar-in { gap: 12px; justify-content: space-between; }
  .brand-crest { width: 44px; height: 57px; }
  .brand-name { font-size: 1.08rem; }
  .brand { gap: 10px; }
  .brand-tag { font-size: .82rem; }
  .hero-in { padding-top: 32px; padding-bottom: 36px; }
  .hero-lead { font-size: 1.02rem; }
  .hero-search-row button { padding: 0 16px; }
  .docs-list { columns: 1; }
  .register a, .register-full a { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .reg-no { font-size: 1rem; padding-left: 6px; }
  .newslist li { grid-template-columns: 58px 1fr; gap: 14px; }
  .doc-pager { grid-template-columns: 1fr; }
  .doc-pager .next { grid-column: 1; text-align: left; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .contact-list div { grid-template-columns: 1fr; }
  .sf-main { flex-direction: column; }
  .attachments li a { grid-template-columns: 48px 1fr; }
  .attachments .fsize { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

@media print {
  .topbar, .mainnav, .masthead-search, .nav-toggle, .site-footer, .doc-tools, .doc-pager, .crumbs, .skip { display: none !important; }
  .masthead { border: 0; }
  body { font-size: 11pt; }
  .prose a { color: inherit; text-decoration: none; }
  .wrap { max-width: none; padding: 0; }
}
