/*
Theme Name: Западные луга
Theme URI: https://zapadny2.ru/
Description: Лёгкая тема сайта ТСН «Западные луга», микрорайон Западный-2. Без jQuery, один CSS-файл, системные и Google-шрифты.
Version: 0.4.2
Requires at least: 6.4
Requires PHP: 8.0
Text Domain: zapadny2
*/

/* ---------- Шрифты (локально, SIL OFL; без Google Fonts) ---------- */
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/golos-text-cyrillic-400-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/golos-text-latin-400-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/golos-text-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/golos-text-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/golos-text-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Golos Text'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/golos-text-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/unbounded-cyrillic-500-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/unbounded-latin-500-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/unbounded-cyrillic-600-normal.woff2') format('woff2'); unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/unbounded-latin-600-normal.woff2') format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ---------- Токены ---------- */
:root {
	--ground: #F2F5F7;
	--surface: #FFFFFF;
	--ink: #14202A;
	--ink-2: #39464F;
	--muted: #4B5A64;
	--line: #DCE3E8;
	--line-2: #ECF0F3;
	--line-3: #C6D2DA;
	--accent: #086A99;
	--accent-dark: #075A82;
	--accent-tint: #E3F1F8;
	--logo-blue: #0B7FB5;
	--alert-bg: #FFF1D6;
	--alert-line: #F0D79C;
	--alert-ink: #5A3A00;
	--alert-icon: #E0A21B;
	--pdf: #B4432F;
	--footer: #10202B;
	--band: #0A4F70;
	--band-2: #0E5A80;
	--radius: 20px;
	--wrap: 1200px;
	--font: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--font-display: 'Unbounded', var(--font);
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--alert-icon); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; margin: 0; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; width: auto; height: auto; clip: auto; padding: 12px 16px; background: var(--surface); border-radius: 12px; }

/* ---------- Шапка ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand__mark { width: 66px; height: 48px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.brand__sub { margin-top: 3px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.brand:hover .brand__name { color: var(--accent-dark); }
.main-nav { order: 2; margin-left: auto; }
.header-actions { order: 3; }
.main-nav .nav-search { display: none; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.main-nav a { display: block; padding: 12px 11px; border-radius: 10px; text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink); }
.main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a, .main-nav .current-cat > a { background: var(--accent-tint); color: var(--accent-dark); font-weight: 600; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.icon-btn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ink); }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 12px; border: 0; background: var(--accent); color: #FFFFFF; text-decoration: none; font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.btn:hover { background: var(--accent-dark); color: #FFFFFF; }
.btn--ghost { background: var(--surface); color: var(--accent-dark); border: 1px solid var(--line-3); }
.btn--ghost:hover { background: var(--accent-tint); color: var(--accent-dark); }
.menu-toggle { display: none; }

@media (max-width: 860px) {
	.brand__mark { width: 55px; height: 40px; }
	.brand__name { font-size: 16px; }
	.brand__sub { font-size: 12px; }
	.site-header__in { gap: 10px 12px; }
	.menu-toggle { display: inline-flex; }
	.header-actions .btn { display: none; }
	.wrap { padding-left: 16px; padding-right: 16px; }
	.brand { margin-right: auto; }
	.header-search { display: none; }
	.main-nav { order: 4; margin-left: 0; width: 100%; display: none; }
	.main-nav .nav-search { display: block; padding: 14px 4px; font-size: 17px; font-weight: 600; color: var(--ink); text-decoration: none; }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; gap: 0; }
	.main-nav a { padding: 14px 4px; border-bottom: 1px solid var(--line-2); border-radius: 0; font-size: 17px; font-weight: 600; }
}

/* ---------- Срочное объявление ---------- */
.alert { background: var(--alert-bg); border-bottom: 1px solid var(--alert-line); }
.alert__in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding-top: 14px; padding-bottom: 14px; }
.alert__icon { width: 36px; height: 36px; border-radius: 10px; background: var(--alert-icon); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alert p { margin: 0; flex: 1 1 220px; font-size: 15px; line-height: 1.45; color: var(--alert-ink); }
.alert a { font-weight: 600; font-size: 15px; color: var(--alert-ink); padding: 10px 0; }

/* ---------- Первый экран ---------- */
.hero { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 40px; }
.hero__text { display: flex; flex-direction: column; gap: 24px; }
.hero h1 { font-size: clamp(28px, 3.4vw, 42px); line-height: 1.15; letter-spacing: -0.02em; }
.hero h1 abbr { text-decoration: none; }
.hero__lead { margin: 10px 0 0; font-size: 18px; line-height: 1.5; color: var(--muted); }
.hero__img { width: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; object-position: 25% 50%; border-radius: 28px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.tile { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--line-3); color: var(--ink); }
.tile__icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-tint); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--accent-dark); }
.tile__title { display: block; font-weight: 600; font-size: 16px; }
.tile__sub { display: block; font-size: 14px; color: var(--muted); margin-top: 4px; }
@media (max-width: 600px) {
	.hero { padding-top: 28px; gap: 16px; }
	.hero__img { aspect-ratio: 16 / 10; border-radius: 20px; }
	.tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.tile { flex-direction: column; gap: 10px; padding: 14px; }
	.tile__sub { display: none; }
}

/* ---------- Секции, списки ---------- */
.section { padding-top: 32px; padding-bottom: 56px; }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section__head h2 { font-size: 30px; }
.section__head a { font-weight: 600; font-size: 15px; padding: 10px 0; }
.columns { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.columns__main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.columns__side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-3); background: var(--surface); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.chip[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card--pad { padding: 24px; }
.card h2 { font-size: 18px; margin-bottom: 12px; }
.featured { display: flex; flex-direction: column; gap: 12px; padding: 28px; text-decoration: none; color: var(--ink); }
.featured__title { font-family: var(--font-display); font-weight: 500; font-size: 24px; line-height: 1.25; }
.featured__excerpt { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 14px; color: var(--muted); }
.badge { font-size: 13px; font-weight: 600; padding: 6px 10px; border-radius: 999px; background: var(--accent-tint); color: var(--accent-dark); }
.badge--important { background: var(--alert-bg); color: var(--alert-ink); }
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.list > li + li { border-top: 1px solid var(--line-2); }
.list-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding: 18px 24px; text-decoration: none; color: var(--ink); }
.list-row:hover { background: #F8FAFB; color: var(--ink); }
.list-row__date { width: 96px; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.list-row__body { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.list-row__title { font-weight: 600; font-size: 17px; line-height: 1.35; }
.list-row__cat { font-size: 13px; font-weight: 600; color: var(--accent-dark); }
.year-title { font-size: 20px; margin: 8px 0 12px; }
.pdf { flex-shrink: 0; font-size: 11px; font-weight: 600; color: #FFFFFF; background: var(--pdf); border-radius: 6px; padding: 4px 6px; line-height: 1.2; }
.doc-link { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; text-decoration: none; color: var(--ink); }
.doc-link__title { font-weight: 500; font-size: 15px; line-height: 1.35; }
.doc-link__meta { display: block; font-size: 13px; color: var(--muted); }
.useful { background: var(--accent-tint); border-radius: var(--radius); padding: 24px; }
.useful h2 { font-size: 18px; margin-bottom: 4px; }
.useful ul { list-style: none; margin: 0; padding: 0; }
.useful a { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid #C9DDE8; text-decoration: none; color: var(--ink); font-weight: 500; font-size: 15px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.pagination .page-numbers.current { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 600; }
.pagination .page-numbers.dots { background: none; border: 0; }

/* ---------- Контакты ---------- */
.contacts { background: var(--band); color: #FFFFFF; }
.contacts .wrap { padding-top: 56px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 28px; }
.contacts h2 { font-size: 30px; }
.contacts__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1040px) { .contacts__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .contacts__grid { grid-template-columns: 1fr; } }
.contact { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); border-radius: 18px; padding: 22px; display: flex; flex-direction: column; gap: 6px; min-width: 0; align-self: stretch; }
.contact__label { font-size: 14px; color: #CFE3EE; }
.contact__value { font-weight: 600; font-size: 18px; line-height: 1.35; }
.contact a { color: #FFFFFF; font-size: 16px; padding: 4px 0; overflow-wrap: anywhere; }
.contact__phone { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.contact__phone small { font-size: 13px; color: #CFE3EE; }
.contact__addr { font-size: 15px; line-height: 1.45; color: #E6F0F5; margin-top: 6px; }
.map-stub { border-radius: var(--radius); background: var(--band-2); min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; color: #E3EEF4; }
.map-stub iframe { width: 100%; height: 420px; border: 0; border-radius: 16px; }
.map-stub .btn { background: #FFFFFF; color: var(--accent-dark); }

/* ---------- Галерея ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.gallery-grid a { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; }
.gallery-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 18px; }

/* ---------- Страница записи ---------- */
.page-main { padding-top: 40px; padding-bottom: 64px; }
.crumbs { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.entry-title { font-size: clamp(28px, 3.6vw, 40px); line-height: 1.15; letter-spacing: -0.02em; max-width: 760px; margin: 12px 0 20px; }
.entry-lead { margin: 0 0 24px; padding: 20px 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; font-size: 17px; line-height: 1.55; max-width: 720px; }
.entry-content { font-size: 18px; line-height: 1.7; max-width: 720px; color: #25303A; }
.entry-content h2 { font-size: 22px; margin: 32px 0 12px; }
.entry-content h3 { font-size: 19px; margin: 28px 0 10px; }
.entry-content img { border-radius: 16px; }
.entry-content figure { margin: 24px 0; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.entry-content td, .entry-content th { border: 1px solid var(--line); padding: 8px 10px; }
.entry-content .wp-block-file { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; font-size: 16px; }
.entry-content .wp-block-file__button { margin-left: auto; }
.ask { background: var(--band); color: #FFFFFF; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.ask h2 { font-size: 18px; }
.ask p { margin: 0; font-size: 15px; color: #CFE3EE; }
.ask a { color: #FFFFFF; font-weight: 600; font-size: 18px; padding: 6px 0; }

/* ---------- Поиск, 404 ---------- */
.search-field { position: relative; display: flex; align-items: center; max-width: 760px; }
.search-field svg { position: absolute; left: 14px; color: var(--muted); }
.search-field input { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line-3); padding: 0 120px 0 44px; font: inherit; font-size: 17px; background: var(--surface); }
.search-field .btn { position: absolute; right: 4px; height: 44px; }
.empty { padding: 32px; background: var(--surface); border: 1px dashed var(--line-3); border-radius: var(--radius); }
.big-404 { font-family: var(--font-display); font-weight: 600; font-size: 72px; line-height: 1; color: var(--line-3); }

/* ---------- Подвал ---------- */
.site-footer { background: var(--footer); color: #C6D2DA; font-size: 15px; }
.site-footer__grid { padding-top: 48px; padding-bottom: 40px; display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.site-footer__brand { display: flex; align-items: center; gap: 12px; color: #FFFFFF; text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 17px; line-height: 1.2; }
.site-footer__brand small { display: block; margin-top: 3px; font-family: var(--font); font-weight: 400; font-size: 13px; color: #C6D2DA; }
.site-footer__brand img { flex: none; }
.site-footer p { margin: 14px 0 0; font-size: 14px; line-height: 1.55; max-width: 380px; }
.site-footer__req { color: #9FB2BE; }
.site-footer h2 { margin: 4px 0 12px; font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9FB2BE; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.site-footer__col a { color: #FFFFFF; text-decoration: none; display: inline-block; padding: 5px 0; }
.site-footer__col a:hover { text-decoration: underline; text-underline-offset: 3px; }
.site-footer__col small { display: block; margin-top: -2px; font-size: 12.5px; color: #9FB2BE; }
.site-footer__bar { border-top: 1px solid rgba(255,255,255,0.1); }
.site-footer__bar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 18px; padding-bottom: 18px; font-size: 13.5px; color: #9FB2BE; }
.site-footer__up { color: #FFFFFF; text-decoration: none; }
.site-footer__up:hover { text-decoration: underline; }
@media (max-width: 1040px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .site-footer__grid { gap: 28px 20px; } .site-footer__col:last-child { grid-column: 1 / -1; } }

@media print {
	.site-header, .alert, .site-footer, .contacts, .columns__side { display: none; }
	body { background: #FFFFFF; }
}

/* ---------- Галереи в текстах ---------- */
/* Галереи: обычная [gallery], блок «Галерея» и плиточная Jetpack выглядят одинаково */
.entry-content .gallery,
.entry-content .wp-block-gallery,
.entry-content .tiled-gallery__gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(min(240px, calc(50% - 5px)), 1fr)); gap: 10px; margin: 24px 0 32px; padding: 0; }
.entry-content .wp-block-jetpack-tiled-gallery { margin: 0; }
.entry-content .gallery br { display: none; }
.entry-content .gallery-item, .entry-content .gallery .gallery-icon,
.entry-content .wp-block-gallery > figure, .entry-content .tiled-gallery__item { margin: 0 !important; width: auto !important; max-width: none !important; flex: none !important; }
.entry-content .tiled-gallery__row, .entry-content .tiled-gallery__col { display: contents; }
.entry-content .gallery a, .entry-content .wp-block-gallery a, .entry-content .tiled-gallery__item a { display: block; overflow: hidden; border-radius: 14px; background: var(--line-2); }
.entry-content .gallery img, .entry-content .wp-block-gallery img, .entry-content .tiled-gallery__gallery img { display: block; width: 100% !important; height: auto !important; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; border: 0 !important; margin: 0; transition: transform .35s ease, filter .35s ease; }
.entry-content .gallery a:hover img, .entry-content .wp-block-gallery a:hover img, .entry-content .tiled-gallery__item a:hover img,
.entry-content .gallery a:focus-visible img, .entry-content .wp-block-gallery a:focus-visible img, .entry-content .tiled-gallery__item a:focus-visible img { transform: scale(1.04); filter: brightness(1.05); }
@media (prefers-reduced-motion: reduce) { .entry-content .gallery img, .entry-content .wp-block-gallery img, .entry-content .tiled-gallery__gallery img { transition: none; } }
.entry-content .gallery-caption, .entry-content .wp-element-caption { font-size: 14px; color: var(--muted); }
.entry-content a[href$=".jpg"], .entry-content a[href$=".jpeg"], .entry-content a[href$=".png"], .entry-content a[href$=".webp"] { cursor: zoom-in; }
.map-stub--inline { margin: 16px 0; color: #E3EEF4; font-size: 15px; }

/* ---------- Просмотр фото ---------- */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(12,18,14,0.94); display: flex; align-items: center; justify-content: center; padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: min(100%, 1200px); max-height: 82vh; object-fit: contain; border-radius: 12px; }
.lightbox__count { position: absolute; top: 24px; left: 24px; color: #FFFFFF; font-size: 15px; }
.lightbox__btn { position: absolute; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.14); color: #FFFFFF; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 28px; line-height: 1; }
.lightbox__close { top: 16px; right: 16px; border-radius: 12px; }
.lightbox__prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------- Раскрывающиеся блоки и колонки (бывший Shortcodes Ultimate) ---------- */
.entry-content .spoiler { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; margin: 10px 0; overflow: hidden; }
.entry-content .spoiler summary { min-height: 56px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; font-weight: 600; font-size: 17px; list-style: none; }
.entry-content .spoiler summary::-webkit-details-marker { display: none; }
.entry-content .spoiler summary::after { content: '+'; font-size: 24px; line-height: 1; color: var(--accent-dark); }
.entry-content .spoiler[open] summary::after { content: '−'; }
.entry-content .spoiler__body { padding: 0 20px 16px; }
.entry-content .su-row { display: flex; flex-wrap: wrap; gap: 0 24px; }
.entry-content .su-col { flex: 1 1 320px; min-width: 0; }
.entry-content .quote { margin: 20px 0; padding: 16px 20px; border-radius: 16px; background: var(--accent-tint); font-size: 17px; }
.entry-content .quote cite { display: block; margin-top: 8px; font-size: 14px; color: var(--muted); font-style: normal; }

/* Встраивания своих записей — как карточка-ссылка */
.entry-content blockquote.wp-embedded-content { position: static !important; clip: auto !important; height: auto !important; width: auto !important; margin: 16px 0; padding: 16px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; font-weight: 600; }

/* 0.3.2: длинные строки из Word (ряды пробелов, подчёркиваний) не должны раздвигать экран */
.entry-content, .entry-title, .entry-lead, .card, .list-row { overflow-wrap: break-word; }
.entry-content .wp-caption, .entry-content figure[style*="width"], .entry-content div[style*="width"] { max-width: 100% !important; }
.entry-content img, .entry-content video, .entry-content iframe { max-width: 100%; height: auto; }
.entry-content .wp-caption img { width: 100%; }
/* кнопки «Скачать» у файлов — в цвете темы */
.entry-content .wp-block-file a:not(.wp-block-file__button) { overflow-wrap: anywhere; }
.entry-content .wp-block-file__button, .entry-content .wp-block-file .wp-element-button { background: var(--accent); color: #FFFFFF; border-radius: 999px; padding: 10px 18px; font-size: 15px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.entry-content .wp-block-file__button:hover { background: var(--accent-dark); color: #FFFFFF; }
.entry-content .wp-block-file { flex-wrap: wrap; }
.entry-content .wp-block-file a:not(.wp-block-file__button) { flex: 1 1 180px; min-width: 0; }
@media (max-width: 768px) { .entry-content .wp-block-file__embed { display: none; } }

/* 0.3.4: на страницах (не в новостях) фото — на всю ширину, текст — в колонке для чтения */
.page-main .entry-content { max-width: none; }
.page-main .entry-content > :is(p, ul, ol, h2, h3, h4, h5, blockquote, table, hr, .wp-block-file, .spoiler, .su-row, .quote, .wp-block-embed, .wp-block-buttons) { max-width: 760px; }
.page-main .entry-content > :is(h2, h3) { margin-top: 40px; }
.page-main .entry-content > :is(.has-text-align-center, hr, .wp-block-separator) { max-width: none; }
.entry-content .wp-block-separator { border: 0; border-top: 1px solid var(--line-3); margin: 12px 0 20px; opacity: 1; }
.entry-content .wp-block-spacer { height: 16px !important; }
.entry-content p:empty { display: none; }

/* 0.3.5: файлы — карточкой, как «Свежие документы» на главной */
.file-card { display: flex; align-items: center; gap: 12px; margin: 12px 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.file-card__open { display: flex; align-items: flex-start; gap: 12px; flex: 1 1 auto; min-width: 0; text-decoration: none; color: var(--ink); }
.file-card__open:hover .file-card__title { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 3px; }
.file-card__title { display: block; font-weight: 600; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.file-card__meta { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
.file-card .pdf { margin-top: 2px; }
.pdf--other { background: var(--accent); }
.file-card__dl { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-3); color: var(--accent-dark); font-size: 14px; font-weight: 600; text-decoration: none; background: #FFFFFF; }
.file-card__dl:hover { background: var(--accent-tint); border-color: var(--accent); }
@media (max-width: 480px) { .file-card__dl span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .file-card__dl { padding: 8px 10px; } }
.entry-content .wp-block-gallery:not(:has(img)) { display: none; }
.entry-content .wp-block-image a { cursor: zoom-in; }

/* 0.3.6: страница «ТСН «Западные луга»» */
.tsn > .wrap:first-child { padding-top: 32px; }
.tsn-head { display: flex; align-items: center; gap: 28px; padding: 8px 0 40px; }
.tsn-head__mark { width: 132px; height: 96px; flex: none; }
.tsn-head .entry-title { margin: 0 0 10px; font-size: clamp(26px, 3vw, 36px); max-width: 820px; }
.tsn-head__lead { margin: 0; font-size: 17px; line-height: 1.55; color: var(--ink-2); max-width: 760px; }
.tsn-head__req { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tsn-head__req li { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.tsn-head__req span { color: var(--muted); margin-right: 4px; }
.tsn-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; align-items: start; padding-top: 48px; padding-bottom: 24px; }
.tsn-docs h2, .tsn-map h2 { font-size: 26px; margin-bottom: 16px; }
.tsn-links { position: sticky; top: 24px; }
.tsn-map { padding-top: 24px; padding-bottom: 64px; }
.tsn-map__addr { margin: -6px 0 16px; color: var(--muted); font-size: 15px; }
@media (max-width: 900px) {
	.tsn-body { grid-template-columns: 1fr; }
	.tsn-links { position: static; }
}
@media (max-width: 600px) {
	.tsn-head { flex-direction: column; align-items: flex-start; gap: 16px; padding-bottom: 28px; }
	.tsn-head__mark { width: 88px; height: 64px; }
	.tsn-head__lead { font-size: 16px; }
}
.useful a { align-items: center; }
.useful a svg { flex: none; color: var(--accent-dark); }

/* 0.3.6: компактнее на телефоне */
.doc-group .list-row { flex-wrap: nowrap; align-items: flex-start; }
.doc-group .list-row .pdf { margin-top: 3px; }
.doc-group .list-row__body { flex: 1 1 auto; min-width: 0; }
@media (max-width: 600px) {
	.list-row { padding: 14px 16px; gap: 4px 12px; }
	.list-row > svg { display: none; }
	.list-row__date { width: auto; font-size: 13px; }
	.list-row__title { font-size: 16px; }
	.doc-group .list-row { padding: 14px 16px !important; }
	.alert__in { gap: 8px 12px; padding-top: 10px; padding-bottom: 10px; }
	.alert__icon { width: 28px; height: 28px; border-radius: 8px; }
	.alert__icon svg { width: 16px; height: 16px; }
	.alert p { font-size: 14px; flex-basis: calc(100% - 44px); }
	.alert a { font-size: 14px; padding: 4px 0 4px 40px; }
}
/* архив по годам — плашками */
.year-chips { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.year-chips a { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 9px 12px; border-radius: 12px; background: var(--ground); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; }
.year-chips a span { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.year-chips a:hover { border-color: var(--accent); background: var(--accent-tint); }
.year-chips a[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: #FFFFFF; }
.year-chips a[aria-current="page"] span { color: #D7EAF4; }
.gallery-grid__ph { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.gallery-grid__ph img { width: 96px; height: auto; aspect-ratio: auto; border-radius: 0; opacity: .55; object-fit: contain; }
/* старые колонки через float в тексте не должны «вытекать» в подвал */
.entry-content { display: flow-root; }
@media (max-width: 600px) { .entry-content [style*="float"] { float: none !important; width: auto !important; text-align: left !important; margin-bottom: 12px; } }

/* 0.3.7: ссылки на тёмном фоне при наведении остаются светлыми */
.site-footer a:hover, .site-footer a:focus-visible,
.contacts a:hover, .contacts a:focus-visible,
.ask a:hover, .ask a:focus-visible { color: #FFFFFF; }
.site-footer__brand:hover span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.site-footer__brand:hover small { text-decoration: none; }
.alert a:hover { color: var(--alert-ink); text-decoration-thickness: 2px; }

/* 0.3.7: боковая колонка едет вместе со страницей (только когда стоит сбоку) */
@media (min-width: 1000px) {
	.columns__side { position: sticky; top: var(--side-top, 24px); align-self: flex-start; }
}

/* 0.3.8: длинные галереи — по 12 фото и кнопка */
.entry-content .z2-collapsed:not(.is-open) .z2-more { display: none !important; }
.gallery-more { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin: -16px 0 32px; border: 1px dashed var(--line-3); border-radius: 14px; background: var(--surface); color: var(--accent-dark); font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; }
.gallery-more:hover { background: var(--accent-tint); border-color: var(--accent); }
.gallery-more[hidden] { display: none; }
/* пока фото грузится — мягкое мерцание вместо серого квадрата */
.entry-content .gallery a, .entry-content .wp-block-gallery a, .entry-content .tiled-gallery__item a { background: linear-gradient(100deg, var(--line-2) 30%, #F7F9FA 50%, var(--line-2) 70%) 0 0 / 300% 100%; animation: z2-shimmer 1.6s ease-in-out infinite; }
.entry-content a.is-loaded { animation: none; background: var(--line-2); }
@keyframes z2-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) { .entry-content .gallery a, .entry-content .wp-block-gallery a, .entry-content .tiled-gallery__item a { animation: none; } }
/* подписи — поверх фото, сетка остаётся ровной */
.entry-content .gallery-item, .entry-content .wp-block-gallery > figure { position: relative; }
.entry-content .gallery-caption, .entry-content .wp-block-gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 !important; padding: 22px 10px 8px !important; border-radius: 0 0 14px 14px; background: linear-gradient(transparent, rgba(10, 20, 28, .72)) !important; color: #FFFFFF !important; font-size: 13px; line-height: 1.3; text-align: left; pointer-events: none; }

/* 0.3.8: хлебные крошки на телефоне — в одну строку, длинный заголовок с многоточием */
@media (max-width: 600px) {
	.crumbs { flex-wrap: nowrap; white-space: nowrap; }
	.crumbs > :last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
	.crumbs > a { flex: none; }
}

/* 0.3.8: широкие таблицы — тень у края показывает, что их можно листать */
.entry-content table {
	background:
		linear-gradient(to right, var(--ground) 30%, rgba(242,245,247,0)) left center / 40px 100% no-repeat local,
		linear-gradient(to left, var(--ground) 30%, rgba(242,245,247,0)) right center / 40px 100% no-repeat local,
		radial-gradient(farthest-side at 0 50%, rgba(20,32,42,.22), rgba(20,32,42,0)) left center / 14px 100% no-repeat scroll,
		radial-gradient(farthest-side at 100% 50%, rgba(20,32,42,.22), rgba(20,32,42,0)) right center / 14px 100% no-repeat scroll;
}
.table-hint { margin: 16px 0 -8px; font-size: 13px; color: var(--muted); }
@media (min-width: 801px) { .table-hint { display: none; } }

/* 0.3.8: страница «Фото» — только альбомы */
.albums-lead { margin: -4px 0 28px; font-size: 17px; color: var(--ink-2); max-width: 760px; }
.albums .gallery-grid a span { display: block; }
.albums .gallery-grid small { display: block; margin-top: 2px; font-weight: 400; font-size: 14px; color: var(--muted); }

/* 0.4.0: подвал — правовые ссылки; плашка о cookie */
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer__legal a, .site-footer__bar a { color: #C6D2DA; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(198,210,218,.4); }
.site-footer__legal a:hover { color: #FFFFFF; }
.site-footer__up { text-decoration: none !important; color: #FFFFFF !important; }
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 60; max-width: 880px; margin: 0 auto; display: flex; align-items: center; gap: 14px 20px; padding: 16px 18px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-3); border-radius: 18px; box-shadow: 0 10px 30px rgba(20, 32, 42, .18); }
.cookie-bar[hidden] { display: none; }
.cookie-bar__text { margin: 0; font-size: 14.5px; line-height: 1.5; flex: 1 1 auto; }
.cookie-bar__text a { color: var(--accent-dark); }
.cookie-bar__actions { display: flex; gap: 8px; flex: none; }
.cookie-bar .btn { min-height: 42px; padding: 8px 18px; font-size: 15px; }
@media (max-width: 640px) {
	.cookie-bar { flex-direction: column; align-items: stretch; left: 8px; right: 8px; bottom: 8px; padding: 14px; }
	.cookie-bar__actions .btn { flex: 1 1 0; }
}
