/* ============================================================
   Союз ветеранов — архив. Стили.
   ============================================================ */

:root {
    --paper: #f7f4ee;
    --paper-2: #efe9de;
    --card: #ffffff;
    --ink: #1e2227;
    --ink-2: #4a4f57;
    --muted: #7a7f87;
    --line: #ddd5c7;
    --navy: #1c2a3a;
    --navy-2: #2d4157;
    --accent: #8a6420;
    --accent-2: #c9982f;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(20, 24, 30, .06), 0 6px 18px rgba(20, 24, 30, .06);
    --serif: "Georgia", "Times New Roman", "PT Serif", serif;
    --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --wrap: 1200px;
    --text: 760px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 17px/1.6 var(--sans);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy-2); }
a:hover { color: var(--accent); }

h1, h2, h3 {
    font-family: var(--serif);
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
    margin: 0 0 .5em;
}
h1 { font-size: clamp(28px, 4vw, 42px); }
h2 { font-size: clamp(22px, 2.6vw, 28px); }
h3 { font-size: 19px; }

.container { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.container--text { max-width: calc(var(--text) + 40px); }
.container--wide { max-width: 1000px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }

.eyebrow {
    font: 600 13px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
    color: var(--accent-2); margin: 0 0 14px;
}

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border: 0; border-radius: 8px; cursor: pointer;
    background: var(--accent); color: #fff; font: 600 16px/1 var(--sans);
    text-decoration: none;
}
.button:hover { background: #6e4f18; color: #fff; }
.button--ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.button--ghost:hover { background: var(--paper-2); color: var(--navy); }

/* ---------- шапка ---------- */

.site-header { background: var(--navy); color: #fff; position: relative; z-index: 20; }

.site-header__top {
    display: flex; align-items: center; gap: 24px;
    padding-top: 14px; padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.brand__mark { color: var(--accent-2); flex: 0 0 auto; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__title { font: 700 22px/1.1 var(--serif); }
.brand__subtitle { font-size: 13px; color: #c9d1de; }

.header-search { margin-left: auto; display: flex; background: rgba(255,255,255,.1); border-radius: 8px; }
.header-search input {
    width: 240px; background: transparent; border: 0; color: #fff; padding: 9px 12px; font: 15px var(--sans);
}
.header-search input::placeholder { color: #aeb8c8; }
.header-search input:focus { outline: none; }
.header-search:focus-within { box-shadow: 0 0 0 2px var(--accent-2); }
.header-search button { background: transparent; border: 0; color: #fff; padding: 0 12px; cursor: pointer; }

.menu-toggle { display: none; }

.main-nav { background: var(--navy-2); border-top: 1px solid rgba(255,255,255,.08); }
.main-nav__list { list-style: none; display: flex; flex-wrap: wrap; gap: 2px; margin: 0 auto; }
.main-nav__list > li { position: relative; }
.main-nav__list > li > a,
.main-nav summary {
    display: block; padding: 12px 14px; color: #e8edf5; text-decoration: none;
    font: 500 15px/1.2 var(--sans); cursor: pointer; list-style: none; white-space: nowrap;
}
.main-nav summary::-webkit-details-marker { display: none; }
.main-nav summary::after { content: " ▾"; font-size: 11px; opacity: .7; }
.main-nav__list > li > a:hover,
.main-nav summary:hover,
.main-nav details[open] > summary,
.main-nav a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; }

.submenu {
    position: absolute; top: 100%; left: 0; min-width: 280px; max-height: 75vh; overflow: auto;
    background: #fff; color: var(--ink); border-radius: 0 0 var(--radius) var(--radius);
    box-shadow: 0 14px 30px rgba(10, 20, 40, .22); padding: 10px;
}
.submenu--wide { width: min(880px, 92vw); }
.submenu a, .submenu__head {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 7px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; font-size: 15px;
}
.submenu a:hover { background: var(--paper); color: var(--accent); }
.submenu a span { color: var(--muted); font-size: 13px; }
.submenu__all { font-weight: 600; border-bottom: 1px solid var(--line); border-radius: 6px 6px 0 0 !important; margin-bottom: 6px; }
.submenu__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px 12px; }
.submenu__group { display: flex; flex-direction: column; }
.submenu__head { font-weight: 700; color: var(--navy); font-family: var(--serif); }

/* ---------- главная ---------- */

.hero {
    --hero-img: none;
    background:
        linear-gradient(100deg, rgba(20,31,49,.96) 0%, rgba(20,31,49,.86) 45%, rgba(20,31,49,.6) 100%),
        var(--hero-img) center 40% / cover no-repeat,
        #1b2a41;
    color: #fff; padding: 64px 0 68px;
    border-bottom: 4px solid var(--accent-2);
}
.hero__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: center; }
.hero h1 { color: #fff; }
.hero__lead { color: #d7deea; font-size: 19px; max-width: 620px; }
.hero__search { display: flex; gap: 8px; margin-top: 26px; max-width: 560px; }
.hero__search input {
    flex: 1; min-width: 0; padding: 13px 16px; border-radius: 8px; border: 0; font: 16px var(--sans);
}

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.stats > div {
    background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius); padding: 18px 20px;
}
.stats dt { font: 700 34px/1 var(--serif); color: var(--accent-2); }
.stats dd { margin: 6px 0 0; color: #d7deea; font-size: 15px; }

/* ---------- секции ---------- */

.section { padding: 48px 0; }
.section--tint { background: var(--paper-2); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { margin: 0; }
.section-head__link { font-weight: 600; text-decoration: none; white-space: nowrap; }

.page-head { padding: 34px 0 10px; }
.page-head h1 { margin-bottom: 6px; }
.page-head__count { color: var(--muted); margin: 0 0 14px; }

.breadcrumbs { font-size: 14px; margin-bottom: 12px; color: var(--muted); }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--accent); }
.breadcrumbs a + a::before { content: "›"; margin: 0 8px; color: var(--line); }

.chips, .years, .city-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; align-items: center; }
.city-links h3 { width: 100%; margin: 18px 0 4px; }
.years__label { color: var(--muted); font-size: 14px; margin-right: 4px; }
.chip {
    display: inline-flex; gap: 6px; align-items: center;
    padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
    color: var(--ink-2); text-decoration: none; font-size: 14px;
}
.chip span { color: var(--muted); font-size: 12px; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip--active { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip--active:hover { color: #fff; }

/* ---------- карточки ---------- */

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

/* Главная новость — на всю ширину: снимок слева, текст справа. */
.grid--news .card--big {
    grid-column: 1 / -1;
    display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}
.grid--news .card--big .card__image { aspect-ratio: auto; height: 420px; }
.grid--news .card--big .card__image img { position: absolute; inset: 0; object-position: center top; }
.grid--news .card--big .card__body { padding: 30px 34px; justify-content: center; gap: 12px; }
.grid--news .card--big .card__excerpt { -webkit-line-clamp: 7; font-size: 16px; }

.card {
    background: var(--card); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); display: flex; flex-direction: column; min-width: 0;
}
.card__image {
    position: relative; display: block; aspect-ratio: 3 / 2; background: var(--paper-2); overflow: hidden;
}
.card--big .card__image { aspect-ratio: 16 / 9; }
.card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.card:hover .card__image img { transform: scale(1.03); }
.card__image--empty {
    display: flex; align-items: center; justify-content: center; text-decoration: none;
    background: linear-gradient(135deg, var(--navy), var(--navy-2));
}
.card__image--empty span { font: 600 15px var(--serif); color: rgba(255,255,255,.55); letter-spacing: .06em; }
.card__badge {
    position: absolute; right: 10px; bottom: 10px; background: rgba(15,20,30,.72); color: #fff;
    font-size: 12px; padding: 3px 8px; border-radius: 999px;
}
.card__body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; }
.card__meta { display: flex; gap: 10px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.card__section { color: var(--accent); font-weight: 600; }
.card__title { margin: 0; font-size: 18px; }
.card--big .card__title { font-size: 24px; }
.card__title a { color: var(--ink); text-decoration: none; }
.card__title a:hover { color: var(--accent); }
.card__excerpt {
    margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.card__excerpt mark { background: #f6e3a8; color: inherit; padding: 0 1px; }
.card__author { font-size: 13px; color: var(--muted); font-style: italic; }
.card__more { margin: 10px 0 0; }

.tiles { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile {
    display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; background: #fff;
    border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; border-left: 4px solid var(--accent);
}
.tile__name { font: 700 19px var(--serif); color: var(--ink); }
.tile__count { font-size: 14px; color: var(--muted); }
.tile:hover .tile__name { color: var(--accent); }

/* ---------- альбомы ---------- */

.albums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.album {
    position: relative; display: block; border-radius: var(--radius); overflow: hidden;
    aspect-ratio: 4 / 3; background: var(--navy); box-shadow: var(--shadow); text-decoration: none;
}
.album__cover img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform .3s; }
.album:hover .album__cover img { transform: scale(1.04); }
.album__info {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 16px;
    background: linear-gradient(transparent, rgba(10,15,25,.85)); color: #fff; display: flex; flex-direction: column; gap: 4px;
}
.album__title { font: 700 19px/1.25 var(--serif); }
.album__meta { font-size: 13px; color: #d8dde6; }

/* ---------- материал ---------- */

.material { padding: 30px 0 20px; }
.material__head h1 { margin-top: 4px; }
.material__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.material__meta a { color: var(--muted); }
.material__lead { margin: 22px auto; }
.material__lead img { width: 100%; border-radius: var(--radius); max-height: 640px; object-fit: contain; background: var(--paper-2); }
.material__body { font: 19px/1.7 var(--serif); }
.material__body p { margin: 0 0 1.05em; overflow-wrap: anywhere; }
.material__body h2 { margin-top: 1.4em; font-size: 24px; }
.material__videos { margin: 20px auto; }
.video { margin: 0 0 22px; }
.video video { width: 100%; border-radius: var(--radius); background: #000; max-height: 70vh; }
.video figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }

.documents { background: #fff; border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); font-family: var(--sans); font-size: 16px; }
.documents h2 { font-size: 20px; margin: 0 0 8px; }

.gallery { margin: 30px auto; }
.gallery h2 span { color: var(--muted); font-size: 18px; font-weight: 400; }
.gallery__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.gallery__item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 8px; background: var(--paper-2); }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s, opacity .25s; }
.gallery__item:hover img { transform: scale(1.05); opacity: .92; }

.material__foot { font-size: 15px; color: var(--muted); margin-top: 24px; }
.material__origin a { color: var(--muted); }

.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 26px 0 10px; }
.prevnext a {
    display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #fff;
    border-radius: var(--radius); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; font-weight: 600;
}
.prevnext span { font-size: 13px; color: var(--muted); font-weight: 400; }
.prevnext__next { text-align: right; grid-column: 2; }
.prevnext a:hover { color: var(--accent); }

.lightbox {
    position: fixed; inset: 0; z-index: 1000; background: rgba(8, 10, 14, .94);
    display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.lightbox button {
    position: absolute; background: rgba(255,255,255,.1); color: #fff; border: 0; cursor: pointer;
    font-size: 34px; line-height: 1; width: 52px; height: 52px; border-radius: 50%;
}
.lightbox button:hover { background: rgba(255,255,255,.22); }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__counter { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #c7ccd4; font-size: 14px; }

/* ---------- прочее ---------- */

.pagination { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 36px 0 10px; }
.pagination a, .pagination span {
    min-width: 40px; padding: 8px 12px; text-align: center; border-radius: 8px; text-decoration: none;
    background: #fff; border: 1px solid var(--line); color: var(--ink);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination__current { background: var(--navy) !important; border-color: var(--navy) !important; color: #fff !important; }
.pagination__gap { border: 0 !important; background: transparent !important; }

.search-form { display: flex; gap: 8px; max-width: 640px; margin: 10px 0 12px; }
.search-form input { flex: 1; min-width: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font: 16px var(--sans); }

.empty { color: var(--muted); font-style: italic; }
.muted { color: var(--muted); font-size: .9em; }
.material__body .button { font-family: var(--sans); }

.contact-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 26px; margin-bottom: 30px; }
.note { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }

.error-page { text-align: center; padding: 60px 20px; }
.error-page .button { margin: 6px; }

.site-footer { background: var(--navy); color: #cfd6e2; padding: 34px 0; margin-top: 30px; }
.site-footer__inner { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.site-footer__title { font: 700 18px var(--serif); color: #fff; }
.site-footer__muted { font-size: 14px; color: #9fabbd; margin: 6px 0 0; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer__nav a { color: #cfd6e2; text-decoration: none; font-size: 15px; }
.site-footer__nav a:hover { color: #fff; }

/* ---------- управление сайтом ---------- */

.admin-bar { background: #fff7e0; border-bottom: 1px solid #ecd9a6; font-size: 14px; }
.admin-bar__inner { display: flex; gap: 18px; align-items: center; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.admin-bar__inner span { font-weight: 700; color: #7a5a12; }
.admin-bar form { margin-left: auto; }
.admin-bar button { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: underline; }

.flashes { margin-top: 16px; }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 8px; font-size: 15px; }
.flash--ok { background: #e6f3e8; color: #1f5a2a; border: 1px solid #b9dcbf; }
.flash--error { background: #fbe9e9; color: #7f2222; border: 1px solid #efc2c2; }
.flash code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }

.admin-narrow { max-width: 460px; }
.admin-wide { max-width: 980px; }
.admin-hint { color: var(--muted); font-size: 14px; display: block; margin: 2px 0 6px; font-weight: 400; }
.admin-form { display: flex; flex-direction: column; gap: 16px; }
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; }
.admin-form input[type=text], .admin-form input[type=password], .admin-form input[type=date],
.admin-form select, .admin-form textarea {
    font: 16px/1.5 var(--sans); padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
    background: #fff; color: var(--ink); width: 100%;
}
.admin-form textarea { font-family: var(--serif); font-size: 17px; resize: vertical; }
.admin-form input:focus, .admin-form select:focus, .admin-form textarea:focus { outline: 2px solid var(--accent-2); border-color: transparent; }
.admin-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.admin-inline { flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 400 !important; }
.admin-inline--danger { color: var(--accent); }
.admin-actions { display: flex; gap: 10px; }
.admin-delete { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.button--danger { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.button--danger:hover { background: var(--accent); color: #fff; }

.admin-files { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: #fff; }
.admin-files legend { font-weight: 700; padding: 0 6px; }
.admin-files__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.admin-file { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.admin-file__thumb { display: block; aspect-ratio: 4/3; border-radius: 8px; background: var(--paper-2) center/cover no-repeat; }
.admin-file__icon { display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; border-radius: 8px; background: var(--navy); color: #fff; font-weight: 700; letter-spacing: .08em; }
.admin-file__name { color: var(--muted); overflow-wrap: anywhere; }

.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.admin-table th, .admin-table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 15px; }
.admin-table th { background: var(--paper-2); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.site-footer__admin { opacity: .55; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 12px 0; padding: 10px 12px; background: #fff7e0; border: 1px solid #ecd9a6; border-radius: 8px; }
.admin-tools form { margin: 0; }
.admin-tools .button { padding: 8px 14px; font-size: 14px; }
.admin-tag { display: inline-block; margin-left: 8px; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: #fff7e0; border: 1px solid #ecd9a6; color: #7a5a12; }
.admin-subhead { margin-top: 36px; }
.admin-inline-form { display: inline-block; margin-right: 8px; }

@media (max-width: 700px) {
    .admin-row { grid-template-columns: 1fr; }
    .admin-table th:nth-child(4), .admin-table td:nth-child(4) { display: none; }
}

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

@media (max-width: 1080px) {
    .grid--4, .tiles { grid-template-columns: repeat(2, 1fr); }
    .submenu__cols { grid-template-columns: repeat(2, 1fr); }
    .header-search input { width: 180px; }
}

@media (max-width: 900px) {
    .hero__inner { grid-template-columns: 1fr; gap: 30px; }
    .grid--list, .grid--news, .grid--3, .albums { grid-template-columns: repeat(2, 1fr); }
    .grid--news .card--big { grid-template-columns: 1fr; }
    .grid--news .card--big .card__image { height: auto; aspect-ratio: 16 / 9; }
    .grid--news .card--big .card__body { padding: 18px 20px; }

    .header-search { display: none; }
    .menu-toggle {
        display: flex; flex-direction: column; justify-content: center; gap: 5px;
        margin-left: auto; width: 44px; height: 44px; padding: 10px;
        background: rgba(255,255,255,.1); border: 0; border-radius: 8px; cursor: pointer;
    }
    .menu-toggle__bar { display: block; height: 2px; background: #fff; border-radius: 2px; }

    .main-nav { display: none; }
    .main-nav.is-open { display: block; }
    .main-nav__list { flex-direction: column; padding: 6px 12px 14px; }
    .submenu, .submenu--wide {
        position: static; width: auto; min-width: 0; max-height: none; box-shadow: none;
        border-radius: 8px; margin: 2px 0 8px;
    }
    .submenu__cols { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    body { font-size: 16px; }
    .container { padding: 0 16px; }
    .brand__subtitle { display: none; }
    .brand__title { font-size: 19px; }
    .grid--4, .grid--list, .grid--news, .grid--3, .albums, .tiles { grid-template-columns: 1fr; }
    .grid--news .card--big .card__title { font-size: 21px; }
    .hero { padding: 36px 0 40px; }
    .hero__search { flex-direction: column; }
    .stats dt { font-size: 26px; }
    .material__body { font-size: 18px; }
    .prevnext { grid-template-columns: 1fr; }
    .prevnext__next { grid-column: auto; text-align: left; }
    .gallery__grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .section { padding: 34px 0; }
}


/* ============================================================
   Шапка по образцу new.souzveteranov.com: логотип, меню, бегущая строка
   ============================================================ */
.topbar { background: linear-gradient(90deg, #141d28, #2d4157); font-size: 13px; }
.topbar__inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 6px; padding-bottom: 6px; }
.social { display: flex; gap: 14px; }
.social a, .topbar__memory { color: #f3e3c7; text-decoration: none; }
.social a:hover, .topbar__memory:hover { color: #fff; text-decoration: underline; }
.masthead { background: #efe9dc; border-bottom: 1px solid #d8cfbd; }
.masthead__inner { display: flex; align-items: center; gap: 24px; padding-top: 14px; padding-bottom: 14px; }
.site-header { background: transparent; }
.brand, .brand:hover { color: #1c2a3a; }
.brand__logo { width: 96px; height: auto; flex: 0 0 auto; }
.brand__title { font: 700 26px/1.15 var(--serif); color: #1c2a3a; text-shadow: 0 1px 0 rgba(255,255,255,.6); }
.brand__subtitle { font: 600 17px/1.2 var(--serif); color: #1c2a3a; opacity: .85; }
.header-search { background: #fff; border: 1px solid #d8cfbd; }
.header-search input { color: var(--ink); }
.header-search input::placeholder { color: #8a8f96; }
.header-search button { color: #1c2a3a; }
.menu-toggle { background: #1c2a3a !important; }
.main-nav { background: #1c2a3a; border-top: 0; }
.main-nav__list > li > a, .main-nav summary { color: #fff; text-transform: uppercase; font-size: 14px; letter-spacing: .02em; }

.ticker { background: #3a2d1d; color: #fff; overflow: hidden; }
.ticker__inner { display: flex; align-items: center; gap: 18px; padding-top: 10px; padding-bottom: 10px; }
.ticker__label { font: 700 18px var(--sans); text-transform: uppercase; white-space: nowrap; flex: 0 0 auto; }
.ticker__viewport { overflow: hidden; flex: 1; -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker__track { display: inline-flex; gap: 40px; white-space: nowrap; animation: ticker 150s linear infinite; }
.ticker__track a { color: #fff; text-decoration: none; font-size: 15px; }
.ticker__track a:hover { text-decoration: underline; }
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker__track { animation: none; } }

/* ---------- большая карусель на главной ---------- */
.slider { position: relative; height: clamp(360px, 52vw, 560px); overflow: hidden; background: #111; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.5s ease; pointer-events: none; }
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,8,8,.85) 0%, rgba(10,8,8,.55) 50%, rgba(10,8,8,.1) 100%); }
.slide__body { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 64px; color: #fff; }
.slide__meta { color: #f0c987; font-size: 14px; margin: 0 0 8px; letter-spacing: .04em; text-transform: uppercase; }
.slide__title { font-size: clamp(24px, 3.4vw, 40px); max-width: 760px; margin: 0 0 10px; }
.slide__title a { color: #fff; text-decoration: none; }
.slide__excerpt { max-width: 640px; color: #e6e1d8; margin: 0 0 18px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide__body .button { align-self: flex-start; }
.slider__arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; font-size: 30px; cursor: pointer; z-index: 2; }
.slider__arrow:hover { background: rgba(255,255,255,.35); }
.slider__arrow--prev { left: 16px; }
.slider__arrow--next { right: 16px; }
.slider__dots { position: absolute; bottom: 22px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 2; }
.slider__dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; background: transparent; cursor: pointer; padding: 0; }
.slider__dots button.is-active { background: #fff; }

.intro { background: var(--paper-2); padding: 34px 0; }
.intro__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; }
.intro h1 { font-size: clamp(26px, 3vw, 36px); }
.intro .stats > div { background: #fff; border: 1px solid var(--line); }
.intro .stats dt { color: #1c2a3a; }
.intro .stats dd { color: var(--muted); }

/* ---------- ленты-карусели ---------- */
.section-head__tools { display: flex; align-items: center; gap: 8px; }
.carousel__btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 22px; line-height: 1; cursor: pointer; color: var(--ink); }
.carousel__btn:hover { border-color: var(--accent); color: var(--accent); }
.carousel { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 22px) / 4); gap: 22px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 8px; scrollbar-width: thin; }
.carousel__item { scroll-snap-align: start; display: flex; }
.carousel__item .card { width: 100%; }

.memory-banner { padding: 10px 0 30px; }
.memory-banner__link { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.memory-banner img, .memory-book__banner { width: 100%; height: auto; display: block; }
.memory-book__cta { margin: 22px 0; }

/* ---------- реклама ---------- */
.ad { padding: 14px 0; }
.ad .container { position: relative; }
.ad__label { position: absolute; top: 4px; right: 26px; font-size: 11px; color: var(--muted); background: rgba(255,255,255,.8); padding: 1px 6px; border-radius: 4px; z-index: 1; }
.ad__banner { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); }
.ad__banner img { max-width: 100%; max-height: 250px; width: auto; border-radius: 6px; }
.ad__text { font-size: 15px; }
.ad__placeholder { border: 2px dashed #cbbfa8; border-radius: var(--radius); padding: 22px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 4px; background: rgba(255,255,255,.5); }
.ad__placeholder strong { color: #1c2a3a; font-family: var(--serif); font-size: 18px; }
.ad--material .container { max-width: calc(var(--text) + 40px); }
.ad-preview img { max-width: 100%; max-height: 220px; border-radius: 6px; border: 1px solid var(--line); }

.site-footer__brand { display: flex; gap: 16px; align-items: flex-start; }
.site-footer__brand img { background: #efe9dc; border-radius: 8px; padding: 4px; }
.site-footer__social { display: flex; gap: 14px; margin: 8px 0 0; }
.site-footer__social a { color: #f0c987; text-decoration: none; font-size: 14px; }

@media (max-width: 1080px) {
    .carousel { grid-auto-columns: calc((100% - 2 * 22px) / 3); }
}
@media (max-width: 900px) {
    .masthead .header-search { display: none; }
    .brand__title { font-size: 20px; }
    .brand__subtitle { font-size: 14px; }
    .brand__logo { width: 70px; }
    .intro__inner { grid-template-columns: 1fr; }
    .carousel { grid-auto-columns: calc((100% - 22px) / 2); }
    .ticker__label { font-size: 14px; }
}
@media (max-width: 600px) {
    .topbar__memory { display: none; }
    .brand__logo { width: 56px; }
    .brand__title { font-size: 17px; }
    .brand__subtitle { display: block; font-size: 13px; }
    .carousel { grid-auto-columns: 82%; }
    .slide__body { padding-bottom: 54px; }
    .slider__arrow { display: none; }
}


/* ---------- портреты в карточках (26.09) ---------- */
.card__image img { object-position: center 30%; }
.card--person .card__image { background: #2a2320; }
.card__backdrop { position: absolute; inset: -12px; background-size: cover; background-position: center;
    filter: blur(14px) brightness(.75); }
.card--person .card__image img { position: relative; object-fit: contain; object-position: center; }
.card--person:hover .card__image img { transform: none; }

.views { display: inline-flex; align-items: center; gap: 5px; }
.views svg { opacity: .7; }

/* ---------- списки людей: буквы и поиск по фамилии ---------- */
.people-search { display: flex; gap: 10px; margin: 18px 0 12px; max-width: 520px; }
.people-search input { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: #fff; }
.letters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.letters .chip { min-width: 34px; text-align: center; justify-content: center; }

/* ---------- страница «О проекте» ---------- */
.project__lead { font: 600 20px/1.35 var(--serif); color: #1c2a3a; margin: 6px 0 0; }
.project__list { padding-left: 1.2em; }
.project__list li { margin: 6px 0; }
.project__final { font-family: var(--serif); font-size: 1.1em; color: #1c2a3a; }
.project__letter { margin: 18px 0; padding: 20px 24px; background: #fff; border-left: 4px solid #1c2a3a;
    border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); font-style: italic; }
.project__letter-title { font: 700 18px var(--serif); font-style: normal; text-transform: uppercase;
    letter-spacing: .08em; color: #1c2a3a; text-align: center; }
.project__sign { text-align: right; font-style: normal; font-weight: 600; }
.project__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* карточка человека без фото — свеча памяти */
.card--person .card__image--empty { background: linear-gradient(180deg, #efe9dc, #e2d7c2); flex-direction: column; gap: 6px; }
.card--person .card__image--empty span { color: #1c2a3a; opacity: .75; letter-spacing: .12em; text-transform: uppercase; font-size: 13px; }
.card__candle { width: 56px; height: 84px; }

/* ---------- «Архив памяти»: фоны и название (26.09) ---------- */
.topbar { background: #141d28 url("../img/bg-red.jpg") center / cover no-repeat; }
.masthead { background: #dcdcdc url("../img/bg-plaster.png") center / cover repeat; border-bottom: 0; }
.brand__text { display: flex; flex-direction: column; gap: 4px; }
.brand__title { font: 800 40px/1 var(--serif); letter-spacing: .08em; text-transform: uppercase; color: #1c2a3a;
    text-shadow: 1px 1px 0 rgba(255,255,255,.7), 2px 3px 4px rgba(0,0,0,.25); }
.brand__subtitle { font: 600 19px/1.25 var(--serif); color: #1c2a3a; opacity: 1; }
.brand__note { font-size: 13px; color: #4b4b4b; }
@media (max-width: 900px) {
    .brand__title { font-size: 28px; }
    .brand__subtitle { font-size: 15px; }
    .brand__note { font-size: 11.5px; }
}
@media (max-width: 600px) {
    .brand__title { font-size: 22px; letter-spacing: .05em; }
    .brand__subtitle { font-size: 13px; }
    .brand__note { display: none; }
}

/* логотип «Архива памяти» (книга и солнце) */
.brand__logo { width: 130px; height: auto; }
.site-footer__brand img { width: 96px; height: auto; background: #f4efe4; padding: 6px 8px; }
@media (max-width: 900px) { .brand__logo { width: 96px; } }
@media (max-width: 600px) { .brand__logo { width: 72px; } }

/* ============================================================
   Палитра «Архива памяти» (26.09): чернила, бронза и золото
   из логотипа на тёплой бумаге — без цветов государственных флагов.
   Прежние стили: style_before_palette_2026-09-26.css
   ============================================================ */
:root {
    --paper: #f6f1e7;
    --paper-2: #ece4d4;
    --line: #dcd1bc;
    --gold: #c9982f;
    --gold-light: #e9c979;
    --sepia: #3a2d1d;
}
.topbar { background: linear-gradient(90deg, #121a24, #1c2a3a 60%, #22344a); border-bottom: 2px solid var(--gold); }
.social a, .topbar__memory { color: var(--gold-light); }
.masthead { background: #ece4d4 url("../img/bg-plaster.png") center / cover;
    background-blend-mode: multiply; border-bottom: 0; }
.brand__title { color: #1c2a3a; text-shadow: 1px 1px 0 rgba(255,255,255,.75), 2px 3px 5px rgba(28,42,58,.18); }
.brand__subtitle { color: #6e4f18; }
.brand__note { color: #4d4a44; }
.header-search button { color: var(--accent); }
.main-nav { background: #1c2a3a; border-bottom: 1px solid rgba(201,152,47,.35); }
.main-nav__list > li > a:hover, .main-nav summary:hover { background: #2d4157; }
.main-nav [aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); background: transparent; }
.ticker { background: var(--sepia); border-bottom: 1px solid rgba(201,152,47,.4); }
.ticker__label { color: var(--gold-light); }
.ticker__track a { color: #f3ead8; }
.site-footer { background: #141d28; border-top: 3px solid var(--gold); }
.site-footer__social a, .slide__meta { color: var(--gold-light); }
.project__letter-title { color: var(--accent); }
.project__letter { border-left-color: var(--gold); }
.card--person .card__image--empty span { color: #6e4f18; }
.chip--active, .pagination__current { background: #1c2a3a !important; border-color: #1c2a3a !important; }

/* Без коричневого (ассоциация с «коричневой чумой») и без чёрно-красно-белого:
   основа — синие чернила и серо-голубой, золото только тонкими акцентами. */
:root {
    --accent: #2f4d6e;
    --sepia: #2f4d6e;
}
.button, .people-search .button { background: #2f4d6e; }
.button:hover { background: #1c2a3a; }
.ticker { background: #2f4d6e; border-bottom: 1px solid rgba(233,201,121,.45); }
.brand__subtitle { color: #2f4d6e; }
.card--person .card__image--empty span { color: #2f4d6e; }
.topbar { background: linear-gradient(90deg, #1c2a3a, #243750 60%, #2b4260); }
.site-footer { background: #1c2a3a; }
.eyebrow, .intro .eyebrow { color: #8c7431; }

/* ---------- свеча памяти ---------- */
.candle { float: right; width: 220px; margin: 4px 0 18px 28px; text-align: center;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow); }
.candle__media { background: #000; border-radius: 6px; overflow: hidden; aspect-ratio: 4 / 3; }
.candle__video, .candle__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.candle--lit .candle__media { box-shadow: 0 0 18px rgba(233, 201, 121, .55); }
.candle__status { font: 600 15px var(--serif); margin: 10px 0 8px; color: #1c2a3a; }
.candle__form { display: flex; flex-direction: column; gap: 6px; }
.candle__form input { padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; font: inherit; font-size: 13px; }
.candle__btn { background: #2f4d6e; color: #fff; border: 0; border-radius: 6px; padding: 8px 10px; font: 600 14px var(--sans); cursor: pointer; }
.candle__btn:hover { background: #1c2a3a; }
.candle__btn:disabled { opacity: .6; }
.candle__meta { margin: 8px 0 0; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.candle__names { color: #1c2a3a; }
.card__candle-lit { position: absolute; left: 10px; top: 10px; background: rgba(28,42,58,.8); border-radius: 999px;
    padding: 2px 8px; font-size: 15px; box-shadow: 0 0 10px rgba(233,201,121,.7); }
@media (max-width: 700px) { .candle { float: none; width: auto; max-width: 320px; margin: 0 auto 20px; } }

/* портрет и свеча в одной строке */
.person-head { display: flex; gap: 28px; align-items: flex-start; justify-content: center; margin-bottom: 24px; }
.person-head .material__lead { margin: 0; flex: 0 1 460px; }
.person-head .material__lead img { width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.person-head .candle { float: none; margin: 0; flex: 0 0 240px; width: 240px; }
@media (max-width: 700px) {
    .person-head { flex-direction: column; align-items: center; }
    .person-head .candle { width: 100%; max-width: 320px; flex-basis: auto; }
}

/* поиск в браузере (выгруженный сайт) */
.search-hit { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 12px; }
.search-hit h3 { margin: 0 0 4px; font-size: 18px; }
.search-hit__meta { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.search-hit p { margin: 0; }
.search-hit mark { background: #f6e3a8; padding: 0 2px; }
