/* Единый стиль сайтов организаций Профсоюза образования.
   Цвета и шрифты повторяют сайт краевой организации — не меняйте их,
   чтобы все сайты филиалов выглядели одинаково. */
:root {
  --blue: #3951A3;          /* шапка, подвал, подменю */
  --blue-dark: #1E3A8A;     /* заголовки разделов */
  --green: #0BAB4D;         /* кнопка «Вступить», активный пункт меню */
  --red: #D62828;           /* бегущая строка */
  --text: #333333;
  --muted: #6B7280;
  --border: #E5E7EB;
  --bg: #F7F7F8;
  --card: #FFFFFF;
  --radius: 16px;
  --gutter: 20px;
  --font-ui: 'Roboto', -apple-system, 'Segoe UI', Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh; /* на телефонах учитывает панель адреса браузера */
  display: flex;
  flex-direction: column;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background-color: var(--bg);
  /* лёгкая фоновая текстура, как на сайте-образце */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='%23000' fill-opacity='.025'%3E%3Ccircle cx='10' cy='10' r='1.4'/%3E%3Ccircle cx='50' cy='30' r='1.1'/%3E%3Ccircle cx='30' cy='60' r='1.3'/%3E%3Ccircle cx='70' cy='70' r='1'/%3E%3C/g%3E%3C/svg%3E");
  overflow-x: hidden;
}
body.nav-locked { overflow: hidden; }
.site-main { flex: 1 0 auto; width: 100%; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 14px; }

/* ---------- admin bar ---------- */
.admin-bar {
  display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center;
  padding: 6px var(--gutter); background: #1F2937; color: #E5E7EB; font: 13px var(--font-ui);
}
.admin-bar a { display: inline-flex; align-items: center; gap: 6px; color: #93C5FD; text-decoration: none; }
.ico { flex: none; display: block; }
.ticker-icon { display: inline-flex; color: var(--red); }
.nav-close { display: grid; place-items: center; }
.admin-bar a:hover { text-decoration: underline; }

/* ---------- header ---------- */
.site-header { background: var(--blue); color: #fff; }
.header-inner { display: flex; align-items: center; gap: 16px 28px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; min-width: 0; flex: 0 1 auto; }
.brand-logo { display: block; width: 52px; height: 59px; object-fit: contain; flex: none; }
.brand-name { font-family: var(--font-ui); font-weight: 700; font-size: 20px; line-height: 1.12; display: flex; flex-direction: column; }
.header-tools { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.search { display: flex; height: 36px; }
.search input {
  width: 170px; min-width: 0; border: 0; padding: 0 12px; font: 14px var(--font-ui); color: var(--text);
  background: #F1F2F3; border-radius: 3px 0 0 3px; outline: none;
}
.search input:focus { box-shadow: inset 0 0 0 2px #93C5FD; }
.search button {
  width: 40px; flex: none; border: 0; background: #54595F; color: #fff; cursor: pointer; border-radius: 0 3px 3px 0;
  display: grid; place-items: center;
}
.search button:hover { background: #3F4349; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.social {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex: none;
  transition: transform .15s ease, filter .15s ease;
}
.social:hover { transform: scale(1.1); filter: brightness(1.08); }
.btn-join {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px; border-radius: 3px;
  background: var(--green); color: #fff; text-decoration: none; font: 500 14px var(--font-ui); white-space: nowrap;
  transition: transform .15s ease, background .15s;
}
.btn-join:hover { background: #09964A; transform: scale(1.04); }
.nav-burger {
  display: none; flex: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 0 11px; margin-left: auto; border: 0; border-radius: 8px;
  background: rgba(255,255,255,.14); cursor: pointer;
}
.nav-burger span { display: block; height: 2px; background: #fff; border-radius: 2px; }
.nav-burger:hover { background: rgba(255,255,255,.24); }

/* ---------- main nav ---------- */
.main-nav { background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.nav-panel-head, .nav-extra, .nav-overlay { display: none; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item > a, .nav-item > .nav-label {
  display: block; padding: 14px 18px; font: 600 13px var(--font-ui); letter-spacing: .02em; text-transform: uppercase;
  color: var(--blue); text-decoration: none; cursor: pointer;
}
.nav-item.has-sub > a, .nav-item.has-sub > .nav-label { padding-right: 4px; }
/* подчёркивание на весь пункт, включая стрелку подменю */
.nav-item::after {
  content: ''; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; background: var(--green);
  transform: scaleX(0); transition: transform .2s ease; pointer-events: none;
}
.nav-item:hover::after, .nav-item.active::after, .nav-item:focus-within::after { transform: scaleX(1); }
.nav-item.active > a, .nav-item.active > .nav-label, .nav-item:hover > a, .nav-item:hover > .nav-label { color: var(--green); }
.sub-toggle { border: 0; background: none; color: var(--blue); padding: 14px 16px 14px 4px; cursor: pointer; display: grid; place-items: center; }
.sub-toggle svg { transition: transform .2s; }
.nav-item:hover .sub-toggle, .nav-item.active .sub-toggle { color: var(--green); }
.sub {
  list-style: none; margin: 0; padding: 6px 0; position: absolute; top: 100%; left: 0; min-width: 270px;
  background: var(--blue); box-shadow: 0 10px 24px rgba(0,0,0,.18); display: none; z-index: 60;
}
.nav-item:hover > .sub, .nav-item:focus-within > .sub { display: block; }
.nav-item:last-child > .sub, .nav-item:nth-last-child(2) > .sub { left: auto; right: 0; }
.sub a { display: block; padding: 10px 18px; color: #fff; text-decoration: none; font: 600 13px var(--font-ui); text-transform: uppercase; }
.sub a:hover, .sub a.active { background: var(--green); }

/* ---------- ticker ---------- */
.ticker { overflow: hidden; background: #fff; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ticker-track {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 0 8px 100%;
  animation: ticker 28s linear infinite; animation-delay: -8s; font-size: 20px; color: var(--red);
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker a, .ticker span { color: var(--red); text-decoration: none; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; padding-left: 20px; white-space: normal; } }

/* ---------- hero ---------- */
.hero { padding-top: 28px; }
.hero-card {
  position: relative; overflow: hidden; border-radius: 24px; color: #fff; padding: 56px 56px 0;
  background:
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.16), transparent 42%),
    radial-gradient(circle at 10% 110%, rgba(11,171,77,.28), transparent 45%),
    linear-gradient(135deg, #3951A3 0%, #2C4593 55%, #1E3A8A 100%);
  box-shadow: 0 24px 50px rgba(30,58,138,.22);
}
.hero-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(rgba(255,255,255,.14) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 35%, #000 100%);
}
/* триколор в правом нижнем углу */
.hero-flag { position: absolute; right: -80px; bottom: 70px; width: 62%; transform: rotate(-14deg); transform-origin: right bottom; pointer-events: none; }
.hero-flag i { display: block; height: 16px; margin-top: 6px; border-radius: 16px 0 0 16px; }
.hero-flag i:nth-child(1) { background: rgba(255,255,255,.85); width: 70%; margin-left: 30%; }
.hero-flag i:nth-child(2) { background: #5C7BE6; width: 85%; margin-left: 15%; }
.hero-flag i:nth-child(3) { background: var(--red); }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding-bottom: 52px; }
.hero-eyebrow {
  display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28); font: 500 13px var(--font-ui); letter-spacing: .06em; text-transform: uppercase;
}
.hero-title { margin: 18px 0 16px; font-family: var(--font-ui); font-weight: 700; font-size: clamp(34px, 5vw, 64px); line-height: 1.04; }
.hero-title span { display: block; color: #8BF0B4; }
.hero-lead { margin: 0; max-width: 560px; font-size: 18px; line-height: 1.6; color: #DCE3F7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center; padding: 14px 28px; border-radius: 999px;
  font: 500 16px var(--font-ui); text-decoration: none; transition: transform .15s, background .15s, color .15s, box-shadow .15s;
}
.hero-btn.primary { background: var(--green); color: #fff; box-shadow: 0 10px 24px rgba(11,171,77,.4); }
.hero-btn.primary:hover { background: #0DC25A; transform: translateY(-2px); }
.hero-btn.ghost { border: 2px solid rgba(255,255,255,.65); color: #fff; }
.hero-btn.ghost:hover { background: #fff; color: var(--blue); }
.hero-visual { display: flex; justify-content: center; }
.hero-emblem { position: relative; width: min(330px, 100%); aspect-ratio: 1; }
.hero-emblem .ring { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.28); }
.hero-emblem .r1 { inset: 0; background: rgba(255,255,255,.05); }
.hero-emblem .r2 { inset: 11%; border-style: dashed; animation: spin 60s linear infinite; }
.hero-emblem-core {
  position: absolute; inset: 22%; border-radius: 50%; background: #fff; display: grid; place-items: center;
  box-shadow: 0 24px 50px rgba(0,0,0,.28); animation: float 6s ease-in-out infinite;
}
.hero-emblem-core .hero-logo { display: block; width: 54%; height: auto; }
.hero-photo { position: relative; width: 100%; }
.hero-photo > img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 20px; box-shadow: 0 24px 50px rgba(0,0,0,.28); }
.hero-badge { position: absolute; left: -18px; bottom: -18px; width: 88px; height: 88px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(0,0,0,.25); }
.hero-badge .hero-logo { display: block; width: 56%; height: auto; }
.hero-features {
  position: relative; z-index: 1; list-style: none; margin: 0 -56px; padding: 18px 56px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 24px;
  background: rgba(12,26,82,.38); backdrop-filter: blur(4px);
}
.hero-features li { display: flex; align-items: center; gap: 10px; font: 500 15px var(--font-ui); }
.hero-features svg { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--green); color: #fff; }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hero-emblem .r2, .hero-emblem-core { animation: none; } }

/* ---------- quick links (pills) ---------- */
.quick-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; padding-top: 24px; padding-bottom: 4px; }
.pill {
  display: inline-block; padding: 9px 22px; border-radius: 25px; color: #fff; text-decoration: none; white-space: nowrap;
  font: 500 15px var(--font-ui); transition: transform .15s ease, filter .15s;
}
.pill:hover { transform: translateY(-2px); filter: brightness(1.08); }

/* ---------- banners ---------- */
.banner-slider { position: relative; max-width: 1240px; margin: 24px auto 0; padding: 0 var(--gutter); }
.banner-slider .slide { display: none; }
.banner-slider .slide.active { display: block; animation: fade .5s ease; }
.banner-slider img { display: block; width: 100%; border-radius: 16px; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.slider-dots button { width: 10px; height: 10px; padding: 0; border-radius: 50%; border: 0; background: #C7CCD8; cursor: pointer; }
.slider-dots button.active { background: var(--blue); }
@keyframes fade { from { opacity: .3; } to { opacity: 1; } }

/* ---------- sections ---------- */
.section { padding-top: 36px; padding-bottom: 36px; }
.section.narrow { max-width: 1000px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.section-title { margin: 0; color: var(--blue-dark); font-size: 36px; font-weight: 700; text-transform: uppercase; line-height: 1.1; }
.section-title.small { font-size: 26px; margin: 40px 0 20px; }
.section-foot { display: flex; justify-content: center; margin-top: 28px; }
.pager { display: inline-flex; align-items: stretch; height: 40px; border-radius: 6px; overflow: hidden; background: var(--blue); color: #fff; }
.pager-btn { display: grid; place-items: center; width: 44px; background: var(--blue-dark); color: #fff; text-decoration: none; font-size: 18px; }
.pager-btn:hover { background: var(--green); }
.pager-btn.disabled { opacity: .45; }
.pager-info { display: grid; place-items: center; padding: 0 22px; font-size: 14px; }
.empty { color: var(--muted); }

/* ---------- news cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.news-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; min-width: 0; transition: box-shadow .2s, transform .2s;
}
.news-card:hover { box-shadow: 0 12px 28px rgba(30,58,138,.12); transform: translateY(-2px); }
.card-cover { position: relative; display: block; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: #EEF1F8; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.card-cover-empty { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #E8EDFA, #F4F6FC); }
.card-cover-empty .card-emblem { display: block; width: 26%; height: auto; opacity: .6; object-fit: contain; }
.card-open {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(30,58,138,.8); color: #fff; font-size: 20px; opacity: 0; transition: opacity .25s;
}
.card-cover:hover .card-open, .card-cover:focus .card-open { opacity: 1; }
.card-cover:hover img { transform: scale(1.04); }
.card-likes {
  position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px;
  background: #fff; border-radius: 8px; padding: 3px 9px; font-size: 13px; color: var(--muted);
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.card-likes svg { color: #C81E1E; }
.card-date { display: flex; align-items: center; gap: 6px; margin: 14px 0 8px; color: var(--muted); font-size: 13px; }
.card-title { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.45; text-align: center; overflow-wrap: anywhere; }
.card-title a { color: var(--blue-dark); text-decoration: none; }
.card-title a:hover { color: var(--green); }

/* ---------- content pages ---------- */
.breadcrumbs { font-size: 14px; color: var(--muted); margin-bottom: 18px; overflow-wrap: anywhere; }
.breadcrumbs a { color: var(--blue); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span { margin: 0 2px; }
.content-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 36px 40px; min-width: 0; }
.page-title { margin: 0 0 22px; color: var(--blue-dark); font-size: 32px; line-height: 1.2; font-weight: 700; overflow-wrap: anywhere; }
.article-meta { display: flex; gap: 20px; color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-cover { display: block; width: 100%; border-radius: 12px; margin-bottom: 24px; }
.article-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--border); }
.like-btn {
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); background: #fff;
  border-radius: 999px; padding: 8px 18px; font: 500 15px var(--font-ui); color: var(--text); cursor: pointer;
}
.like-btn svg { color: #9CA3AF; transition: transform .2s; }
.like-btn.liked svg { color: #C81E1E; }
.like-btn:hover svg { transform: scale(1.2); }
.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin-top: 8px; padding: 10px 24px; border: 2px solid var(--blue); border-radius: 25px;
  color: var(--blue); text-decoration: none; font: 500 15px var(--font-ui); transition: background .15s, color .15s;
}
.btn-outline:hover { background: var(--blue); color: #fff; }
.section .center { margin-top: 28px; }

.prose { font-size: 17px; line-height: 1.7; overflow-wrap: anywhere; }
.prose h2 { color: var(--blue-dark); font-size: 26px; margin: 1.4em 0 .6em; line-height: 1.25; }
.prose h3 { color: var(--blue-dark); font-size: 21px; margin: 1.3em 0 .5em; line-height: 1.3; }
.prose h4, .prose h5, .prose h6 { color: var(--blue-dark); font-size: 17px; margin: 1.1em 0 .5em; line-height: 1.4; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose img { border-radius: 10px; }
.prose a { color: var(--blue); }
.prose blockquote { margin: 1.2em 0; padding: 12px 20px; border-left: 4px solid var(--green); background: #F2FAF5; border-radius: 0 10px 10px 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: 15px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; vertical-align: top; }
.prose th { background: #EEF1F8; color: var(--blue-dark); }
/* значок документа перед ссылками на файлы */
.prose a[href$=".pdf"]::before, .prose a[href$=".doc"]::before, .prose a[href$=".docx"]::before,
.prose a[href$=".xls"]::before, .prose a[href$=".xlsx"]::before, .prose a[href$=".odt"]::before,
.prose a[href$=".rtf"]::before, .prose a[href$=".ppt"]::before, .prose a[href$=".pptx"]::before {
  content: ''; display: inline-block; width: 1.05em; height: 1.05em; margin-right: .3em; vertical-align: -.17em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H6a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V8z'/%3E%3Cpath d='M14 3v5h5M9 13h6M9 17h6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose iframe { display: block; width: 100%; max-width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; }

.section-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
}
.prose .section-link-list { list-style: none; padding: 0; margin: 0 0 24px; }
.section-link-list a, .section-document-tile a, .section-media-tile {
  border: 1px solid #DDE4F0;
  border-radius: 14px;
  background: #F9FBFE;
  color: var(--blue-dark);
  box-shadow: 0 2px 8px rgb(30 58 138 / 5%);
}
.section-link-list a, .section-document-tile a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  height: 100%;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
}
.section-link-list a::after, .section-document-tile a::after {
  content: '→';
  margin-inline-start: auto;
  color: var(--blue);
  flex: none;
}
.section-document-tile { margin: 0 0 10px !important; }
.section-document-tile > br, .section-document-tile img[src$=".gif"] { display: none; }
.section-document-tile + hr:has(+ .section-document-tile) { display: none; }
.prose.section-content a::before { content: none; }
.section-content .section-document-tile a::before, .section-content .section-link-list a::before { flex: 0 0 1.05em; }
.section-content :is(.section-document-tile, .section-link-list) a:is([href$=".pdf"], [href$=".doc"], [href$=".docx"], [href$=".xls"], [href$=".xlsx"], [href$=".odt"], [href$=".rtf"], [href$=".ppt"], [href$=".pptx"])::before { content: ''; }
.section-content img:is([src*="7740748"], [src*="7994402"], [src*="7920891"], [src*="10826769"])[src$=".gif"] { display: none; }
.section-document-grid { margin-bottom: 24px; }
.section-document-grid > .section-document-tile { margin: 0 !important; }
.section-photo-grid a { display: block; }
.section-photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.section-media-grid > :not(.section-media-tile) { grid-column: 1 / -1; }
.section-media-tile { padding: 14px; line-height: 1.45; }
.section-media-tile img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; margin-bottom: 12px; }
[data-section="rukovodstvo"] .section-media-tile img { width: 96px; aspect-ratio: 1; }
.section-media-tile a { color: var(--blue-dark); font-weight: 600; text-decoration: none; }
.section-link-list a:hover, .section-document-tile a:hover, .section-media-tile:hover,
.section-media-tile:focus-within { border-color: #9EADD0; background: #F1F5FD; }
.section-content a:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
article:has(> .section-content) > .page-title { color: var(--text); }
.prose.section-content :is(h2, h3, h4, h5, h6, a, th, summary, .section-media-tile) { color: inherit; }
.section-content .section-link-list a:hover, .section-content .section-document-tile a:hover,
.section-content .section-media-tile a:hover { color: inherit; }
.section-content .section-resource-notes { margin-top: 24px; }
.section-content .section-resource-notes summary { cursor: pointer; font-weight: 600; }
.section-content .section-offers { grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.section-content .section-offers img { object-fit: contain; background: #fff; }
.section-content .section-offers a { text-decoration: underline; }
.resource-filters { display: flex; flex-wrap: wrap; gap: 12px 16px; margin-bottom: 20px; }
.resource-filters label { flex: 1 1 250px; min-width: 0; font-weight: 600; }
.resource-filters :is(input, select) {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid #A9B5CB;
  border-radius: 8px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-weight: 400;
}
.resource-filters p { flex: 1 0 100%; margin: 0; font-size: 14px; }

.search-big { height: 46px; margin-bottom: 14px; }
.search-big input { flex: 1; width: auto; font-size: 16px; }
.search-big button { width: 56px; background: var(--blue); }
.search-results { padding-left: 20px; }
.search-results li { margin-bottom: 18px; }
.search-results a { font-size: 18px; font-weight: 500; }
.search-results p { margin: 4px 0 0; }

/* ---------- footer ---------- */
.site-footer { background: var(--blue); color: #EEE; margin-top: 40px; flex-shrink: 0; }
.footer-inner { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; padding-top: 36px; padding-bottom: 28px; }
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-logo { display: block; width: 56px; height: 63px; object-fit: contain; flex: none; }
.footer-name { font-family: var(--font-ui); font-weight: 700; font-size: 18px; line-height: 1.25; color: #fff; margin-bottom: 12px; }
.footer-contacts p { margin: 0 0 6px; }
.site-footer a { color: #fff; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding-top: 14px; padding-bottom: 18px; border-top: 1px solid rgba(255,255,255,.2); font-size: 13px; color: #C8D0EA; }

/* ========== адаптив ========== */

/* небольшие ноутбуки */
@media (max-width: 1240px) {
  .header-inner { gap: 14px 20px; }
  .search input { width: 140px; }
  .nav-item > a, .nav-item > .nav-label { padding: 14px 13px; font-size: 12.5px; }
  .nav-item.has-sub > a, .nav-item.has-sub > .nav-label { padding-right: 3px; }
  .sub-toggle { padding-right: 12px; }
  .nav-item::after { left: 8px; right: 8px; }
}

/* планшеты и телефоны: компактная шапка + выезжающее меню */
@media (max-width: 1024px) {
  .site-header { position: sticky; top: 0; z-index: 900; box-shadow: 0 2px 10px rgba(0,0,0,.15); }
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
  .header-tools { display: none; }
  .nav-burger { display: flex; }

  .main-nav {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1000; width: min(380px, 88vw);
    border: 0; overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s;
    box-shadow: -10px 0 30px rgba(0,0,0,.2);
  }
  .main-nav.open { transform: none; visibility: visible; }
  .nav-container { padding: 0; }
  .nav-panel-head {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2;
    padding: 0 8px 0 20px; height: 60px; background: var(--blue); color: #fff; font: 700 18px var(--font-ui);
  }
  .nav-close { width: 44px; height: 44px; border: 0; border-radius: 8px; background: rgba(255,255,255,.14); color: #fff; font-size: 18px; cursor: pointer; }
  .nav-overlay { display: block; position: fixed; inset: 0; z-index: 999; background: rgba(17,24,39,.5); }
  .nav-overlay[hidden] { display: none; }

  .nav-list { flex-direction: column; flex-wrap: nowrap; padding: 6px 0; }
  .nav-item { flex-wrap: wrap; border-bottom: 1px solid var(--border); }
  .nav-item::after { display: none; }
  .nav-item > a, .nav-item > .nav-label { flex: 1; padding: 15px 20px; font-size: 14px; }
  .nav-item.has-sub > a, .nav-item.has-sub > .nav-label { padding-right: 8px; }
  .nav-item.active > a, .nav-item.active > .nav-label { box-shadow: inset 4px 0 0 var(--green); }
  .sub-toggle { width: 52px; align-self: stretch; padding: 0; border-left: 1px solid var(--border); }
  .nav-item.open .sub-toggle svg { transform: rotate(180deg); }
  .sub { position: static; width: 100%; flex-basis: 100%; min-width: 0; box-shadow: none; background: #F4F6FB; padding: 4px 0; }
  .nav-item:hover > .sub, .nav-item:focus-within > .sub { display: none; }
  .nav-item.open > .sub { display: block; }
  .sub a { color: var(--blue); padding: 12px 20px 12px 34px; font-size: 13px; }
  .sub a:hover, .sub a.active { background: #E6EBF7; color: var(--green); }

  .nav-extra { display: flex; flex-direction: column; gap: 14px; padding: 20px; }
  .nav-extra .search { height: 44px; }
  .nav-extra .search input { flex: 1; width: auto; font-size: 16px; border: 1px solid #D5D9E2; border-right: 0; }
  .nav-extra .search button { width: 48px; }
  .nav-extra .btn-join { height: 46px; font-size: 16px; border-radius: 6px; }
  .nav-extra .socials { justify-content: center; gap: 10px; }
  .nav-extra .social { width: 42px; height: 42px; }

  .hero-card { padding: 44px 40px 0; }
  .hero-features { margin: 0 -40px; padding: 16px 40px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 40px; }
  .hero-visual { order: -1; justify-content: flex-start; }
  .hero-emblem { width: 150px; }
  .hero-photo { max-width: 460px; }
  .hero-flag { width: 90%; bottom: 60px; opacity: .55; }
}

/* телефоны */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .admin-bar { font-size: 12px; }
  .brand { gap: 10px; }
  .brand-logo { width: 40px; height: 45px; }
  .brand-name { font-size: 15px; line-height: 1.15; }
  .ticker-track { font-size: 16px; padding-top: 6px; padding-bottom: 6px; }

  .hero { padding-top: 16px; }
  .hero-card { border-radius: 18px; padding: 28px 22px 0; }
  .hero-eyebrow { font-size: 11px; padding: 5px 11px; }
  .hero-title { margin: 14px 0 12px; }
  .hero-lead { font-size: 16px; }
  .hero-actions { margin-top: 22px; }
  .hero-btn { flex: 1 1 100%; padding: 13px 20px; }
  .hero-emblem { width: 110px; }
  .hero-badge { width: 64px; height: 64px; left: 10px; bottom: -14px; }
  .hero-features { margin: 0 -22px; padding: 14px 22px; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .hero-features li { font-size: 13px; gap: 8px; }
  .hero-features svg { width: 20px; height: 20px; padding: 3px; }

  /* кнопки-ссылки листаются по горизонтали, а не переносятся в несколько рядов */
  .quick-links {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; gap: 8px; padding-top: 16px; padding-bottom: 8px;
    scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .quick-links::after { content: ''; flex: 0 0 1px; } /* отступ справа у последней кнопки */
  .quick-links::-webkit-scrollbar { display: none; }
  .pill { flex: none; padding: 8px 16px; font-size: 14px; scroll-snap-align: start; }
  .banner-slider { margin-top: 16px; }
  .banner-slider img { border-radius: 12px; }

  .section { padding-top: 26px; padding-bottom: 26px; }
  .section-head { margin-bottom: 16px; }
  .section-title { font-size: 26px; }
  .section-title.small { font-size: 21px; margin: 30px 0 14px; }
  .pager { height: 36px; }
  .pager-btn { width: 38px; }
  .pager-info { padding: 0 14px; }
  .news-grid { grid-template-columns: 1fr; gap: 16px; }
  .news-card { padding: 14px; }
  .card-title { font-size: 17px; }

  .breadcrumbs { font-size: 13px; margin-bottom: 12px; }
  .content-card { padding: 22px 16px; border-radius: 14px; }
  .page-title { font-size: 24px; margin-bottom: 16px; }
  .prose { font-size: 16px; }
  .prose h2 { font-size: 21px; }
  .prose h3 { font-size: 18px; }
  .article-actions { flex-direction: column-reverse; align-items: stretch; }
  .article-actions .btn-outline, .like-btn { justify-content: center; text-align: center; }

  .site-footer { margin-top: 28px; }
  .footer-inner { grid-template-columns: 1fr; gap: 22px; padding-top: 28px; }
  .footer-name { font-size: 16px; }
  .footer-bottom { flex-direction: column; }
}

@media (max-width: 380px) {
  .brand-name { font-size: 13.5px; }
  .hero-features { grid-template-columns: 1fr; }
}
