/* Ассоциация производителей детского питания — стили
   Дизайн-система: Accessible & Ethical (navy + blue), Lexend / Source Sans 3 */

:root {
  --navy-900: #0b1a33;
  --navy-800: #0f2347;
  --navy-700: #16315f;
  --blue-600: #0369a1;
  --blue-700: #075985;
  --blue-100: #e0f0fa;
  --gold: #b08d3c;
  --flag-blue: #0039a6;
  --flag-red: #d52b1e;
  --tricolor: linear-gradient(90deg, #fff 0 33.34%, var(--flag-blue) 33.34% 66.67%, var(--flag-red) 66.67% 100%);
  --bg: #f4f6f9;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #d5dce6;
  --danger: #b42318;
  --success: #17703a;
  --radius: 4px;
  --container: 1200px;
  --shadow: 0 1px 2px rgba(15, 35, 71, .08), 0 4px 16px rgba(15, 35, 71, .06);
  --fs-base: 17px;
}

html.large-text { --fs-base: 20px; }
html.high-contrast { --bg: #fff; --muted: #111; --border: #000; --blue-600: #00487a; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: var(--fs-base); }
body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: "Lexend", "Source Sans 3", Arial, sans-serif;
  line-height: 1.25;
  color: var(--navy-800);
  margin: 0 0 .6em;
  font-weight: 600;
}
h1 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
a { color: var(--blue-600); text-underline-offset: 3px; }
a:hover { color: var(--blue-700); }
img, svg { max-width: 100%; }

:focus-visible { outline: 3px solid #f59e0b; outline-offset: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: #fff; color: var(--navy-800); padding: 10px 16px; border-radius: var(--radius); font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Верхняя служебная панель ---------- */
.topbar { background: var(--navy-900); color: #cbd5e1; font-size: .82rem; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 40px; padding-block: 12px; }
.topbar a { color: #e2e8f0; }
.topbar-tools { display: flex; gap: 8px; }
.tool-btn {
  background: transparent; color: #e2e8f0; border: 1px solid rgba(255,255,255,.35);
  padding: 4px 12px; border-radius: var(--radius); font: inherit; cursor: pointer; min-height: 30px;
  transition: background-color .2s;
}
.tool-btn:hover, .tool-btn[aria-pressed="true"] { background: rgba(255,255,255,.18); }

/* ---------- Шапка ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.container.header-main { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--navy-800); }
.brand-mark { flex: none; width: 64px; height: 64px; }
.brand-text strong { display: block; font-family: "Lexend", sans-serif; font-size: 1.02rem; line-height: 1.25; letter-spacing: .01em; text-transform: uppercase; }
.brand-text span { display: block; font-size: .85rem; color: var(--muted); margin-top: 2px; }

.nav { display: flex; gap: 4px; }
.nav a {
  display: block; padding: 12px 14px; text-decoration: none; color: var(--navy-800);
  font-weight: 600; font-size: .95rem; border-bottom: 3px solid transparent; transition: color .2s, border-color .2s;
}
.nav a:hover { color: var(--blue-600); border-color: var(--blue-100); }
.nav a[aria-current="page"] { border-color: var(--blue-600); color: var(--blue-600); }
.nav .nav-cta {
  background: var(--navy-800); color: #fff; border-radius: var(--radius); margin-left: 8px; border-bottom: 0;
}
.nav .nav-cta:hover { background: var(--blue-600); color: #fff; }
.nav .nav-cta[aria-current="page"] { background: var(--blue-600); color: #fff; }

.menu-toggle {
  display: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  min-width: 44px; min-height: 44px; cursor: pointer; color: var(--navy-800);
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 26px; border-radius: var(--radius);
  font: 600 1rem "Lexend", sans-serif; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-primary { background: var(--blue-600); color: #fff; }
.btn-primary:hover { background: var(--blue-700); color: #fff; }
.btn-light { background: #fff; color: var(--navy-800); }
.btn-light:hover { background: var(--blue-100); color: var(--navy-800); }
.btn-outline { border-color: rgba(255,255,255,.7); color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.14); color: #fff; }
.btn-outline-dark { border-color: var(--navy-800); color: var(--navy-800); }
.btn-outline-dark:hover { background: var(--navy-800); color: #fff; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(11,26,51,.97), rgba(22,49,95,.93)),
    repeating-linear-gradient(45deg, #0f2347 0 2px, #16315f 2px 4px);
  color: #fff; position: relative; overflow: hidden;
}
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--tricolor); }
.hero .container { display: grid; grid-template-columns: 1.4fr 1fr; gap: 56px; align-items: center; padding-top: 80px; padding-bottom: 88px; }
.hero h1 { color: #fff; margin-bottom: .5em; }
.hero .lead { font-size: 1.2rem; color: #dbe5f3; max-width: 36em; }
.eyebrow { font: 600 .8rem "Lexend", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #e5c97f; margin-bottom: 1rem; display: block; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2rem; }
.hero-card { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: 28px; }
.hero-card h2 { color: #fff; font-size: 1.1rem; margin-bottom: 1rem; }
.hero-card ul { list-style: none; margin: 0; padding: 0; }
.hero-card li { padding: 12px 0; border-top: 1px solid rgba(255,255,255,.18); display: flex; gap: 12px; align-items: flex-start; color: #e6edf7; }
.hero-card li:first-child { border-top: 0; padding-top: 0; }
.hero-card svg { flex: none; margin-top: 3px; color: #e5c97f; }

/* ---------- Заголовок внутренней страницы ---------- */
.page-head { background: var(--navy-800); color: #fff; padding: 48px 0 52px; position: relative; }
.page-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: var(--tricolor); }
.page-head h1 { color: #fff; margin: 0; }
.page-head p { color: #cbd5e1; margin: .6em 0 0; max-width: 46em; font-size: 1.1rem; }
.breadcrumbs { font-size: .88rem; margin-bottom: 14px; color: #a9b8d0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }
.breadcrumbs a { color: #dbe5f3; }

/* ---------- Секции ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-title { max-width: 46em; margin-bottom: 40px; }
.section-title p { color: var(--muted); font-size: 1.08rem; }
.section-title h2::after { content: ""; display: block; width: 84px; height: 6px; background: var(--tricolor); border: 1px solid var(--border); margin-top: 14px; }

.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--flag-blue); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.section.alt .card { background: var(--bg); box-shadow: none; }
.card .icon { width: 44px; height: 44px; color: var(--blue-600); margin-bottom: 14px; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }

/* Показатели */
.stats { background: var(--navy-900); color: #fff; }
.stats .grid { gap: 0; }
.stat { padding: 36px 24px; border-left: 1px solid rgba(255,255,255,.15); }
.stat:first-child { border-left: 0; }
.stat b { display: block; font: 600 2.4rem "Lexend", sans-serif; color: #e5c97f; line-height: 1.1; }
.stat span { color: #cbd5e1; }

/* Председатель */
.chair { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.portrait {
  aspect-ratio: 4/5; background: linear-gradient(160deg, #e6ebf3, #cfd8e6); border: 1px solid var(--border);
  border-radius: var(--radius); display: grid; place-items: center; color: #7a8aa5; text-align: center; padding: 16px; font-size: .9rem;
}
.portrait svg { width: 90px; height: 90px; display: block; margin: 0 auto 8px; }
.quote { border-left: 4px solid var(--flag-red); padding: 4px 0 4px 20px; font-size: 1.15rem; color: var(--navy-800); margin: 0 0 1.4rem; }
.chair-name { font: 600 1.35rem "Lexend", sans-serif; color: var(--navy-800); margin-bottom: 2px; }
.chair-role { color: var(--muted); margin-bottom: 1.4rem; }

/* Шаги вступления */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--navy-800); color: #fff; font: 600 1.05rem "Lexend", sans-serif; margin-bottom: 14px;
}
.steps h3 { font-size: 1.02rem; }
.steps p { color: var(--muted); margin: 0; font-size: .96rem; }

.cta-band { background: var(--blue-100); border: 1px solid #b6d8ee; border-radius: var(--radius); padding: 36px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { margin: 0 0 .3em; }
.cta-band p { margin: 0; color: var(--muted); }

/* Списки / таблица */
.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { padding-left: 32px; position: relative; margin-bottom: .7em; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 18px; height: 18px;
  background: var(--blue-600); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.data-table { width: 100%; border-collapse: collapse; background: var(--surface); }
.data-table th, .data-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { width: 32%; color: var(--navy-800); background: #eef2f7; font-weight: 600; }

/* Устав */
.doc-layout { display: grid; grid-template-columns: 300px 1fr; gap: 48px; align-items: start; }
.toc { position: sticky; top: 110px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.toc h2 { font-size: 1rem; margin-bottom: .8em; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: .5em; font-size: .95rem; }
.doc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 48px; box-shadow: var(--shadow); }
.doc h2 { margin-top: 1.8em; font-size: 1.35rem; scroll-margin-top: 110px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc li { max-width: 46em; }
.doc-placeholder { border: 2px dashed #9fb0c8; background: #f1f5fa; border-radius: var(--radius); padding: 22px; color: var(--muted); }
.doc-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 28px; }

/* ---------- Формы ---------- */
.form-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }
.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; box-shadow: var(--shadow); }
.form fieldset { border: 0; padding: 0; margin: 0 0 32px; }
.form legend { font: 600 1.15rem "Lexend", sans-serif; color: var(--navy-800); padding: 0 0 12px; margin-bottom: 18px; border-bottom: 2px solid var(--border); width: 100%; }
.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--navy-800); }
.req { color: var(--danger); }
.hint { font-size: .88rem; color: var(--muted); margin-top: 4px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; color: var(--text);
  background: #fff; border: 1.5px solid #8795ab; border-radius: var(--radius); transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--navy-700); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(3,105,161,.3); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.error-msg { color: var(--danger); font-size: .9rem; margin-top: 4px; font-weight: 600; display: none; }
.field.has-error .error-msg { display: block; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; }
.check input { width: 24px; height: 24px; flex: none; margin-top: 2px; accent-color: var(--blue-600); }
.check label { font-weight: 400; }
.form-status { margin-top: 20px; padding: 16px 18px; border-radius: var(--radius); display: none; font-weight: 600; }
.form-status.show { display: block; }
.form-status.ok { background: #e7f5ec; border: 1px solid #9ad2b0; color: var(--success); }
.form-status.err { background: #fdecea; border: 1px solid #f1a9a2; color: var(--danger); }
.hp { position: absolute; left: -9999px; }

.aside-box { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--flag-red); border-radius: var(--radius); padding: 26px; margin-bottom: 20px; }
.aside-box h2, .aside-box h3 { font-size: 1.05rem; }
.aside-box p:last-child, .aside-box ul:last-child { margin-bottom: 0; }

.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 14px; margin-bottom: 18px; }
.contact-list svg { flex: none; width: 24px; height: 24px; color: var(--blue-600); margin-top: 2px; }
.contact-list b { display: block; color: var(--navy-800); }
.map-ph { aspect-ratio: 16/9; background: repeating-linear-gradient(45deg, #e8edf4 0 12px, #dfe6f0 12px 24px); border: 1px solid var(--border); border-radius: var(--radius); display: grid; place-items: center; color: var(--muted); }

/* Подвал */
.site-footer { background: var(--navy-900); color: #cbd5e1; padding: 56px 0 0; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--tricolor); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; padding-bottom: 40px; }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; }
.site-footer a { color: #dbe5f3; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .55em; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.15); padding: 20px 0; font-size: .88rem; color: #94a3b8; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .nav a { padding: 12px 10px; font-size: .9rem; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 960px) {
  .hero .container { grid-template-columns: 1fr; gap: 36px; padding-top: 56px; padding-bottom: 64px; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .chair { grid-template-columns: 1fr; }
  .portrait { max-width: 240px; }
  .doc-layout, .form-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.15); padding: 24px 8px; }
  .stat:first-child { border-top: 0; }
}
@media (max-width: 600px) {
  :root { --fs-base: 16px; }
  .container { padding: 0 18px; }
  .topbar .container > span { display: none; }
  .topbar .container { justify-content: flex-end; }
  .brand-mark { width: 46px; height: 46px; }
  .brand-text strong { font-size: .82rem; }
  .brand-text span { display: none; }
  .section { padding: 48px 0; }
  .steps, .grid-4, .row-2, .footer-grid { grid-template-columns: 1fr; }
  .form, .doc { padding: 24px 18px; }
  .hero-actions .btn, .cta-band .btn { width: 100%; }
  .data-table th, .data-table td { display: block; width: 100%; }
  .data-table th { border-bottom: 0; padding-bottom: 4px; }
  .cta-band { padding: 24px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .topbar, .site-header, .site-footer, .toc, .doc-actions { display: none; }
  .doc { border: 0; box-shadow: none; padding: 0; }
}

/* Чтобы липкая шапка не перекрывала поля при фокусе и переходах по якорям */
input, select, textarea, [id] { scroll-margin-top: 120px; }

/* ---------- Триколор ---------- */
.flag-stripe { height: 8px; background: var(--tricolor); border-bottom: 1px solid rgba(0,0,0,.25); }
.flag { display: inline-block; vertical-align: middle; width: 30px; height: 20px; margin-right: 12px; border: 1px solid rgba(255,255,255,.55); border-radius: 2px; overflow: hidden; flex: none; }
.flag svg { display: block; width: 100%; height: 100%; }
.topbar .flag-label { display: inline-flex; align-items: center; }
.nav a:hover { border-color: var(--flag-red); }
.nav a[aria-current="page"] { border-color: var(--flag-red); }
.hero .container { position: relative; }
.hero-emblem { position: absolute; right: -80px; top: 50%; width: 520px; height: 520px; transform: translateY(-50%); opacity: .06; pointer-events: none; }
@media (max-width: 960px) { .hero-emblem { display: none; } }
@media (max-width: 600px) { .brand-mark { width: 52px; height: 52px; } }

/* ---------- Мероприятия ---------- */
.event-card { display: grid; grid-template-columns: 140px 1fr; gap: 36px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-left: 6px solid var(--flag-blue); border-radius: var(--radius); padding: 36px; box-shadow: var(--shadow); }
.event-card h2 { margin-bottom: .3em; }
.forum-logo { width: 140px; height: 140px; display: block; }
.lead-dark { font-size: 1.1rem; color: var(--muted); }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 40px; }
.chip { display: block; text-decoration: none; background: var(--bg); border: 1px solid var(--border); border-top: 4px solid var(--flag-red); border-radius: var(--radius); padding: 18px 20px; color: var(--text); transition: border-color .2s, background-color .2s; }
.chip:hover { background: var(--blue-100); border-top-color: var(--flag-blue); color: var(--text); }
.chip b { display: block; font-family: "Lexend", sans-serif; color: var(--navy-800); margin-bottom: 4px; }
.chip span { color: var(--muted); font-size: .95rem; }
.day { margin-bottom: 40px; }
.day h3 { font-size: 1.3rem; padding-bottom: 12px; border-bottom: 2px solid var(--border); margin-bottom: 8px; }
.day h3 span { color: var(--flag-red); }
.slots { list-style: none; margin: 0; padding: 0; }
.slot { display: grid; grid-template-columns: 150px 1fr; gap: 24px; padding: 20px 0; border-bottom: 1px solid var(--border); }
.slot-time { font: 600 1rem "Lexend", sans-serif; color: var(--flag-blue); white-space: nowrap; }
.slot h4 { font: 600 1.02rem "Source Sans 3", sans-serif; margin: 0 0 .3em; }
.slot p { margin: 0; color: var(--muted); }
@media (max-width: 960px) { .chips { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .event-card { grid-template-columns: 1fr; padding: 24px 18px; gap: 20px; }
  .forum-logo { width: 96px; height: 96px; }
  .slot { grid-template-columns: 1fr; gap: 4px; }
}

.badge { display: inline-block; margin: 0 0 12px 12px; padding: 3px 12px; border: 1.5px solid #5b6577; border-radius: 999px; background: #eef1f6; color: #3b4556; font: 600 .8rem "Lexend", sans-serif; vertical-align: top; }
.eyebrow + .badge { margin-top: -4px; }

.cal-icon { width: 140px; height: 140px; display: grid; place-items: center; border-radius: 50%; background: var(--blue-100); color: var(--flag-blue); }
.slot .role { font-size: .95rem; margin-bottom: .5em; }
@media (max-width: 600px) { .cal-icon { width: 96px; height: 96px; } .cal-icon svg { width: 44px; height: 44px; } }

/* Эмблема ассоциации в круге с кольцами цветов флага */
.brand-mark { display: grid; place-items: center; width: 68px; height: 68px; margin: 3px; padding: 7px; border-radius: 50%; background: #fff; border: 3px solid var(--flag-blue); box-shadow: 0 0 0 3px var(--flag-red); }
.brand-mark img { display: block; width: 100%; height: 100%; }
img.hero-emblem { opacity: .1; right: -60px; }
@media (max-width: 600px) { .brand-mark { width: 54px; height: 54px; padding: 5px; } }

/* Эмблема: логотип в сером кольце поверх флага РФ */
.brand-emblem { position: relative; flex: none; display: grid; place-items: center; width: 108px; height: 72px; }
.emblem-flag { position: absolute; left: 0; right: 0; top: 10px; bottom: 10px; border: 1px solid #8a94a6; border-radius: 2px; background: linear-gradient(180deg, #fff 0 33.34%, var(--flag-blue) 33.34% 66.67%, var(--flag-red) 66.67% 100%); }
.brand-emblem .brand-mark { position: relative; margin: 0; width: 70px; height: 70px; border: 5px solid #9aa3b2; box-shadow: 0 1px 4px rgba(15,35,71,.25); }
@media (max-width: 1100px) { .brand-emblem { width: 92px; height: 62px; } .brand-emblem .brand-mark { width: 60px; height: 60px; padding: 5px; } .emblem-flag { top: 8px; bottom: 8px; } }
@media (max-width: 600px) { .brand-emblem { width: 76px; height: 52px; } .brand-emblem .brand-mark { width: 50px; height: 50px; border-width: 4px; padding: 4px; } .emblem-flag { top: 7px; bottom: 7px; } }

/* Эмблема: логотип в сером кольце, под ним флаг РФ в виде ленточки */
.brand-emblem { display: block; width: 104px; height: 84px; place-items: initial; }
.brand-emblem .brand-mark { position: absolute; left: 50%; top: 0; transform: translateX(-50%); width: 68px; height: 68px; }
.emblem-flag {
  position: absolute; left: 0; right: 0; top: auto; bottom: 0; height: 24px; z-index: 2; border: 0; border-radius: 0;
  background: linear-gradient(180deg, #fff 0 33.34%, var(--flag-blue) 33.34% 66.67%, var(--flag-red) 66.67% 100%);
  clip-path: polygon(0 0, 100% 0, calc(100% - 9px) 50%, 100% 100%, 0 100%, 9px 50%);
}
.brand-emblem { filter: drop-shadow(0 0 .6px #5b6577) drop-shadow(0 1px 2px rgba(15,35,71,.25)); }
@media (max-width: 1100px) { .brand-emblem { width: 92px; height: 74px; } .brand-emblem .brand-mark { width: 60px; height: 60px; } .emblem-flag { height: 21px; } }
@media (max-width: 600px) { .brand-emblem { width: 72px; height: 60px; } .brand-emblem .brand-mark { width: 48px; height: 48px; } .emblem-flag { height: 17px; clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 50%, 100% 100%, 0 100%, 6px 50%); } }

/* Текст устава */
.doc-title { text-align: center; margin-bottom: 2.2em; padding-bottom: 1.6em; border-bottom: 2px solid var(--border); }
.doc-title .approved { text-align: right; margin-left: auto; color: var(--muted); font-size: .95rem; max-width: none; }
.doc-title .doc-h { font-size: 1.6rem; text-transform: uppercase; margin: 1em 0 .6em; letter-spacing: .02em; }
.doc-title .reg { color: var(--muted); font-size: .92rem; max-width: 40em; margin: 0 auto; }
.doc h2.sec { font-size: 1.2rem; text-transform: uppercase; margin: 2.4em 0 1em; padding: .6em 0; border-block: 2px solid var(--navy-800); text-align: center; letter-spacing: .02em; }
.doc h3.art { font-size: 1.08rem; margin: 1.8em 0 .6em; color: var(--navy-800); scroll-margin-top: 110px; }
.doc p { max-width: none; text-align: justify; hyphens: auto; }
.doc p.sub { padding-left: 1.6em; margin-bottom: .55em; }
.doc p.sub .n { display: inline-block; min-width: 2.2em; margin-left: -1.6em; font-weight: 600; color: var(--navy-700); }
@media (max-width: 600px) { .doc p { text-align: left; } }

/* Мобильное меню включается раньше, чтобы пункты не переносились */
.nav a { white-space: nowrap; }
@media (max-width: 1100px) {
  .menu-toggle { display: inline-grid; place-items: center; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface);
    flex-direction: column; padding: 8px 24px 20px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 4px; border-bottom: 1px solid var(--border); }
  .nav .nav-cta { margin: 14px 0 0; text-align: center; }
  .header-main { position: relative; }
}

/* Фото председателя */
.chair-photo { display: block; width: 100%; max-width: 280px; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius); border: 1px solid var(--border); border-bottom: 5px solid var(--flag-red); box-shadow: var(--shadow); background: #e6ebf3; }
@media (max-width: 960px) { .chair-photo { max-width: 240px; } }

.addr-link { color: inherit; text-decoration: underline; text-decoration-color: var(--blue-600); text-underline-offset: 3px; }
.addr-link:hover { color: var(--blue-600); }
.site-footer .addr-link { color: #dbe5f3; }
.site-footer .addr-link:hover { color: #fff; }

/* Фото председателя: исходные пропорции 3:4, без обрезки и растяжения */
.chair-photo { height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 0; max-width: 300px; }
@media (max-width: 960px) { .chair-photo { max-width: 260px; } }

/* ================= Светлая шапка главной ================= */
.hero {
  background:
    radial-gradient(900px 420px at 85% 10%, rgba(0,57,166,.10), transparent 60%),
    linear-gradient(135deg, #f5f8fd 0%, #e6eef9 55%, #d7e5f6 100%);
  color: var(--navy-800);
}
.hero h1 { color: var(--navy-800); }
.hero .lead { color: #2f3d57; }
.hero .eyebrow { color: var(--flag-red); }
.hero::after { height: 8px; }
.hero-card { background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--flag-blue); box-shadow: var(--shadow); }
.hero-card h2 { color: var(--navy-800); }
.hero-card li { color: var(--text); border-top-color: var(--border); }
.hero-card svg { color: var(--flag-blue); }
img.hero-emblem { opacity: .13; }

/* ================= Кнопки: ряд с отступами ================= */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.2rem; }
.event-card .btn-row .btn, .chair .btn-row .btn { margin: 0; }
.hero-actions { gap: 12px; }
@media (max-width: 600px) {
  .btn-row { flex-direction: column; }
  .btn-row .btn, .event-card .btn, .chair .btn, .cta-band .btn { width: 100%; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .event-card .cal-icon, .event-card .forum-logo { margin: 0; }
  .chair-photo { max-width: 100%; width: 70%; }
}

/* ================= Появление блоков при прокрутке ================= */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; will-change: opacity, transform; }
  .js .reveal.in { opacity: 1; transform: none; }
}
@media print { .js .reveal { opacity: 1 !important; transform: none !important; } }

/* Выравнивание бейджа «Мероприятие завершено» по левому краю текста */
.badge { margin-left: 0; margin-right: 0; }
.eyebrow + .badge { margin-top: 0; }
img.hero-emblem { opacity: .06; }

/* ===== Бейдж и «бровка»: единое выравнивание по левому краю текста ===== */
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 14px; padding: 0; }
.meta-row .eyebrow { margin: 0; display: block; }
.meta-row .badge, .badge, .badge-solo { margin: 0; display: inline-block; vertical-align: baseline; }
.badge-solo { margin-bottom: 12px; }
.aside-box > .badge-solo:first-child { display: table; }
.event-card .badge-solo { display: table; margin-bottom: 10px; }

/* Бровка и бейдж — столбиком, по одной вертикали с заголовком */
.meta-row { flex-direction: column; align-items: flex-start; gap: 8px; }

/* ===== Направления деятельности: крупные карточки с фото ===== */
.section-directions { padding: 96px 0; }
.section-title-wide { max-width: 56em; margin-bottom: 52px; }
.lead-text { font-size: 1.18rem; line-height: 1.7; color: #2f3d57; }
.feature-grid { gap: 36px; }
.feature-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.card-media { aspect-ratio: 3 / 2; overflow: hidden; background: #e8eef7; }
.card-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.feature-card:hover .card-media img { transform: scale(1.03); }
.card-body { padding: 32px 32px 36px; flex: 1; }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.card-head svg { flex: none; color: var(--flag-blue); }
.card-head h3 { margin: 0; font-size: 1.25rem; }
.feature-card .card-body p { font-size: 1.04rem; line-height: 1.7; color: #3f4d66; }
@media (max-width: 960px) { .section-directions { padding: 64px 0; } .feature-grid { gap: 28px; } .lead-text { font-size: 1.08rem; } }
@media (max-width: 600px) { .section-directions { padding: 48px 0; } .card-body { padding: 24px 20px 28px; } .section-title-wide { margin-bottom: 32px; } }
@media (prefers-reduced-motion: reduce) { .card-media img { transition: none; } }
@media (min-width: 961px) { .card-head { min-height: 3.6rem; } }

/* ===== Цветное пятно из эмблемы в шапке главной ===== */
.hero .container > *:not(.hero-emblem) { position: relative; z-index: 1; }
img.hero-emblem { z-index: 0; opacity: .9; right: -80px; top: auto; bottom: -190px; transform: none; width: 520px; height: 520px; filter: none; }
@media (max-width: 960px) {
  /* на планшете и телефоне пятно возвращаем, слегка размытое и ниже по странице */
  img.hero-emblem { display: block; width: 380px; height: 380px; right: -120px; bottom: -150px; opacity: .85; filter: blur(5px); }
  .hero .container { padding-bottom: 96px; }
}
@media (max-width: 600px) {
  img.hero-emblem { width: 340px; height: 340px; right: -110px; bottom: -130px; filter: blur(6px); }
  .hero .container { padding-bottom: 104px; }
}
@media print { img.hero-emblem { display: none; } }

/* ===== Логотип целиком, размытый, под карточкой «Ассоциация — это» ===== */
img.hero-emblem { display: none !important; }
.hero .container { padding-bottom: 88px; }
.hero-side { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.hero-side .hero-card { width: 100%; }
.hero-logo { display: block; width: 180px; height: 180px; filter: blur(3.5px); opacity: .95; pointer-events: none; user-select: none; }
@media (max-width: 960px) {
  .hero .container { padding-bottom: 64px; }
  .hero-logo { width: 200px; height: 200px; filter: blur(4px); }
}
@media (max-width: 600px) {
  .hero .container { padding-bottom: 56px; }
  .hero-logo { width: 180px; height: 180px; }
}

/* ===== Логотип позади карточки (по оси Z), крупный и размытый ===== */
.hero-side { --logo: 460px; position: relative; display: block; padding-bottom: calc(var(--logo) * .62); }
.hero-side .hero-card { position: relative; z-index: 2; }
.hero-logo { position: absolute; z-index: 1; left: 50%; bottom: 0; width: var(--logo); height: var(--logo); transform: translateX(-50%); filter: blur(4px); opacity: 1; }
.hero .container { padding-bottom: 48px; }
@media (max-width: 960px) {
  .hero-side { --logo: 400px; }
  .hero .container { padding-bottom: 40px; }
  .hero-logo { filter: blur(4px); width: var(--logo); height: var(--logo); }
}
@media (max-width: 600px) {
  .hero-side { --logo: 330px; }
  .hero .container { padding-bottom: 32px; }
  .hero-logo { width: var(--logo); height: var(--logo); }
}

/* Инструкция по вступлению и дословные выдержки из устава. */
.membership-guide { min-width: 0; }
.membership-guide section + section { margin-top: 36px; }
.membership-guide h2 { font-size: 1.45rem; }
.membership-guide li { margin-bottom: .65em; }
.charter-quote { margin: 20px 0 8px; padding: 20px 24px; border-left: 4px solid var(--blue-600); background: var(--surface); overflow-wrap: anywhere; }
.charter-quote p:last-child { margin-bottom: 0; }
.quote-source { font-size: .9rem; margin-bottom: 24px; }

/* Форма обратной связи. */
.contact-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--flag-blue); border-radius: var(--radius); box-shadow: var(--shadow); overflow-y: auto; }
.contact-dialog::backdrop { background: rgba(11, 26, 51, .65); }
.contact-dialog-heading { position: sticky; top: 0; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: start; gap: 12px; padding: 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.contact-dialog-heading h2 { min-width: 0; margin: 0; font-size: clamp(13px, 3.5vw, 18px); line-height: 1.4; overflow-wrap: normal; word-break: normal; hyphens: none; }
.contact-dialog-body { padding: 20px; }
.contact-close { display: grid; place-items: center; padding: 0; margin-top: 2px; line-height: 1; width: 16px; height: 16px; border: 0; background: transparent; color: var(--navy-800); font-size: 16px; cursor: pointer; }
body.contact-open { overflow: hidden; }
