:root {
  --navy: #0a2540;
  --deep: #061a2e;
  --blue: #1b6fb5;
  --blue-2: #3d9be0;
  --ice: #eef6fb;
  --ice-2: #dcecf7;
  --red: #d33a2c;
  --text: #11253a;
  --muted: #5a6b7e;
  --line: #e1e8ef;
  --bg: #ffffff;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(10, 37, 64, .06), 0 8px 24px rgba(10, 37, 64, .07);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--navy); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
h1, h2 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 48px); }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: 19px; font-weight: 700; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }
.wrap-wide { max-width: 1040px; margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section.wrap, .section.wrap-narrow { padding-left: 20px; padding-right: 20px; }
.section-pad { padding-top: 40px; padding-bottom: 40px; }
.section-ice { background: var(--ice); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.link-more { font-weight: 700; white-space: nowrap; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 999px; border: 2px solid var(--blue);
  background: var(--blue); color: #fff; font: 700 16px/1.2 var(--font); cursor: pointer; transition: .15s;
}
.btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: var(--navy); }
.btn-light:hover { background: var(--ice-2); border-color: var(--ice-2); color: var(--navy); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.btn-outline { background: transparent; color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

/* ---------- Шапка ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--navy); }
.brand img { width: 48px; height: 48px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.brand b { display: block; font: 700 20px/1.1 var(--display); letter-spacing: .01em; }
.brand small { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.brand:hover { color: var(--navy); }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a { padding: 8px 14px; border-radius: 999px; color: var(--text); font-weight: 600; font-size: 16px; }
.main-nav a:hover { background: var(--ice); color: var(--navy); }
.main-nav a.active { color: var(--blue); background: var(--ice); }
.main-nav .vk-link { display: inline-flex; align-items: center; gap: 6px; background: #0077ff; color: #fff; margin-left: 8px; }
.main-nav .vk-link:hover { background: #0062d1; color: #fff; }
.admin-pill { border: 1px dashed var(--blue); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; content: ''; transition: .2s;
}
.nav-toggle span { top: 21px; }
.nav-toggle span::before { left: 0; top: -7px; }
.nav-toggle span::after { left: 0; top: 7px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 72px; flex-direction: column; align-items: stretch;
    background: #fff; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
  }
  .nav-open .main-nav { display: flex; }
  .main-nav a { padding: 12px 14px; }
  .main-nav .vk-link { margin: 8px 0 0; justify-content: center; }
}

/* ---------- Первый экран ---------- */
.hero { position: relative; color: #fff; background: var(--deep); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(61, 155, 224, .55), transparent 60%),
    radial-gradient(800px 400px at 0% 100%, rgba(27, 111, 181, .45), transparent 60%),
    linear-gradient(160deg, #0d3358 0%, #061a2e 70%);
}
.hero-bg::after {
  content: ''; position: absolute; inset: 0; opacity: .5;
  background-image: radial-gradient(rgba(255, 255, 255, .7) 1px, transparent 1.5px), radial-gradient(rgba(255, 255, 255, .45) 1px, transparent 1.5px);
  background-size: 90px 90px, 140px 140px; background-position: 0 0, 40px 60px;
}
.hero.has-photo .hero-bg { background: linear-gradient(100deg, rgba(6, 26, 46, .92) 0%, rgba(6, 26, 46, .6) 55%, rgba(6, 26, 46, .25) 100%), var(--hero-img) center/cover; }
.hero.has-photo .hero-bg::after { display: none; }
.hero-inner { position: relative; padding: clamp(72px, 12vw, 140px) 20px clamp(96px, 13vw, 160px); max-width: 1200px; }
.hero h1 { color: #fff; font-size: clamp(38px, 7vw, 76px); max-width: 12ch; margin-bottom: 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: 13px; font-weight: 700; color: var(--blue-2); margin: 0 0 18px; }
.hero .eyebrow { color: #9fd3ff; }
.lead { font-size: clamp(17px, 2vw, 20px); max-width: 40em; color: rgba(255, 255, 255, .85); margin: 0 0 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-wave { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 60px; color: #fff; }

/* ---------- Цифры ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: -24px; position: relative; padding-top: 0; }
.stats div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.stats b { display: block; font: 700 clamp(26px, 3.5vw, 36px)/1.1 var(--display); color: var(--blue); }
.stats span { color: var(--muted); font-weight: 600; font-size: 15px; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Карточки ---------- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { display: flex; flex-direction: column; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: .2s; }
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--ice); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-placeholder { width: 100%; height: 100%; display: grid; place-items: end stretch; color: var(--blue); background: linear-gradient(160deg, var(--ice-2), var(--ice)); }
.card-placeholder svg { width: 100%; height: auto; }
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; }
.card-body h3 { margin: 0; font-size: 18px; }
.card-body h3 a { color: var(--navy); }
.card-body h3 a:hover { color: var(--blue); }
.card-body p { margin: 0; color: var(--muted); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; color: var(--muted); font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; background: var(--ice); color: var(--blue); font-weight: 700; font-size: 13px; }
.chip:hover { background: var(--ice-2); }
.chip small { color: var(--muted); font-weight: 600; }
.chip-active { background: var(--navy); color: #fff; }
.chip-active small { color: rgba(255, 255, 255, .7); }
.chip-active:hover { background: var(--navy); color: #fff; }
.chip-warn { background: #fff3cd; color: #8a6100; }

.news-layout { display: grid; grid-template-columns: 1.1fr 2fr; gap: 24px; align-items: start; }
.news-layout .grid-3 { grid-template-columns: repeat(2, 1fr); }
.news-layout .grid-3 .card-body p { display: none; }
.card-big .card-media { aspect-ratio: 4 / 3.2; }
.card-big .card-body h3 { font-size: 24px; }
@media (max-width: 1000px) { .news-layout { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .news-layout .grid-3 { grid-template-columns: 1fr; } .news-layout .grid-3 .card-body p { display: -webkit-box; } }

/* ---------- Традиции, CTA ---------- */
.tradition { display: block; background: #fff; border-radius: var(--radius); padding: 26px; color: var(--text); border: 1px solid var(--line); transition: .2s; }
.tradition:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--text); }
.tradition h3 { margin: 12px 0 6px; }
.tradition p { margin: 0; color: var(--muted); font-size: 15px; }
.t-icon { font-size: 32px; display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--ice); }

.cta { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding: clamp(28px, 5vw, 56px); border-radius: 28px; background: linear-gradient(135deg, var(--blue), var(--navy)); color: #fff; }
.cta h2 { color: #fff; }
.cta p { margin: 0; color: rgba(255, 255, 255, .85); max-width: 36em; }
.cta .btn { background: #fff; border-color: #fff; color: var(--navy); }
.cta .btn-outline { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; flex-shrink: 0; }
@media (max-width: 860px) { .cta { flex-direction: column; align-items: flex-start; } }

.where { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; align-items: center; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16 / 10; background: var(--ice); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 860px) { .where { grid-template-columns: 1fr; } }

/* ---------- Список новостей ---------- */
.page-head { background: var(--ice); padding: 48px 0 32px; }
.page-head h1 { margin-bottom: 20px; }
.search { display: flex; gap: 8px; max-width: 560px; margin-bottom: 20px; }
.search input { flex: 1; min-width: 0; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line); font: inherit; background: #fff; }
.search input:focus { outline: 2px solid var(--blue-2); outline-offset: 1px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips .chip { padding: 7px 14px; font-size: 14px; background: #fff; }
.chips .chip-active { background: var(--navy); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 40px; font-weight: 600; color: var(--muted); }
.pager a { font-weight: 700; }
.empty { color: var(--muted); font-size: 18px; }

/* ---------- Пост ---------- */
.post-head { padding-top: 48px; padding-bottom: 24px; }
.post-head h1 { margin-top: 16px; font-size: clamp(28px, 4.4vw, 42px); }
.edit-link { font-weight: 700; font-size: 15px; }
.post-cover { margin: 8px auto 32px; }
.post-cover img { width: 100%; border-radius: var(--radius); max-height: 640px; object-fit: cover; }
.prose { font-size: 18px; line-height: 1.75; overflow-wrap: break-word; }
.prose p { margin: 0 0 1.1em; }
.prose h2 { font-size: 26px; margin: 1.6em 0 .6em; }
.prose h3 { font-size: 21px; margin: 1.4em 0 .5em; }
.prose img { border-radius: 12px; margin: 1.2em auto; }
.prose iframe, .prose .ql-video { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; margin: 1.2em 0; display: block; }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--blue-2); color: var(--muted); font-style: italic; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose a { text-decoration: underline; text-decoration-color: rgba(27, 111, 181, .35); text-underline-offset: 3px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 16px; display: block; overflow-x: auto; }
.prose td, .prose th { border: 1px solid var(--line); padding: 6px 10px; }
.prose .ql-align-center { text-align: center; }
.prose .ql-align-right, .prose .signature { text-align: right; }
.prose .signature { font-style: italic; color: var(--muted); }
.gallery-title { font-size: 22px; margin-top: 40px; margin-bottom: 0; }
.gallery-title small { color: var(--muted); font: 600 16px var(--font); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 24px; margin-bottom: 24px; }
.gallery a { display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--ice); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
@media (max-width: 620px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 6px; } .gallery a { border-radius: 8px; } }
.post-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 56px; border-top: 1px solid var(--line); margin-top: 32px; }
.notfound { text-align: center; }
.notfound .search { margin: 24px auto; }

/* ---------- Просмотр фото ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(4, 14, 26, .95); display: flex; align-items: center; justify-content: center; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: calc(100vw - 32px); max-height: calc(100vh - 96px); border-radius: 6px; user-select: none; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .1); color: #fff; border: 0; cursor: pointer; border-radius: 50%; width: 52px; height: 52px; font-size: 28px; line-height: 1; }
.lightbox button:hover { background: rgba(255, 255, 255, .22); }
.lightbox button[hidden] { display: none; }
.lb-close { top: 16px; right: 16px; font-size: 22px !important; }
.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 20px; color: rgba(255, 255, 255, .7); font-weight: 600; font-size: 14px; }
@media (max-width: 620px) { .lb-prev, .lb-next { top: auto !important; bottom: 12px; transform: none !important; } }

/* ---------- Подвал ---------- */
.site-footer { background: var(--deep); color: rgba(255, 255, 255, .8); padding: 56px 0 24px; font-size: 15px; }
.site-footer a { color: #9fd3ff; }
.site-footer a:hover { color: #fff; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 15px; text-transform: uppercase; letter-spacing: .08em; }
.site-footer p { margin: 0 0 8px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.brand-light, .brand-light:hover { color: #fff; margin-bottom: 16px; }
.brand-light small { color: rgba(255, 255, 255, .6); }
.muted-light { color: rgba(255, 255, 255, .6); max-width: 30em; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.footer-bottom { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .5); font-size: 14px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

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