/* =========================================================================
   Тема «Таёжная». Палитра и структура — со старого сайта irbis95.ru
   (old-site/mirror: встроенный стиль шаблона e01 + templates/e01/main.css).
   Mobile-first; на десктопе (от 1024px) — колонка 1000px, как на старом.
   ========================================================================= */

/* ---------- Шрифты (только локальные файлы) ---------- */
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 700; font-display: swap;
  src: url('../fonts/literata-cyrillic-700-italic.woff2') format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Literata'; font-style: italic; font-weight: 700; font-display: swap;
  src: url('../fonts/literata-latin-700-italic.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Literata'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/literata-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: 'Literata'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../fonts/literata-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+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/source-sans-3-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: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../fonts/source-sans-3-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+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/source-sans-3-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: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../fonts/source-sans-3-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+2000-206F, U+20AC, U+2122, U+2212, U+FEFF, U+FFFD; }

/* ---------- Палитра старого сайта (точные hex) ---------- */
:root {
  --c-blue: #002456;        /* шапка, меню, телефоны, H1/H3, кнопки */
  --c-blue-2: #1a3a67;      /* наведение и активный пункт меню */
  --c-bg: #eef4f6;          /* фон контента */
  --c-text: #251209;        /* текст, H2/H4 */
  --c-link: #c90000;        /* ссылки */
  --c-white: #ffffff;       /* полоса верхнего меню */
  --c-form: #f5f5f5;        /* фон формы заявки (.formzone) */
  --c-field: #666666;       /* рамка поля формы */
  --c-foot-1: #d6d6d6;      /* подвал, градиент */
  --c-foot-2: #eaeaea;
  --muted: rgb(37 18 9 / .76);
  --hair: rgb(0 36 86 / .15);
  --f-head: Literata, Georgia, 'Times New Roman', serif;
  --f-body: 'Source Sans 3', 'Noto Sans', 'Segoe UI', Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --wrap: 1000px;
  --gut: 16px;
  --side: 250px;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--c-bg); color: var(--c-text); font-family: var(--f-body);
  font-size: 17px; line-height: 1.6; overflow-wrap: break-word; }
img, svg, video, iframe { max-width: 100%; }
img { display: block; height: auto; }
figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { font-family: var(--f-head); font-style: italic; font-weight: 700; letter-spacing: -0.01em;
  line-height: 1.15; text-wrap: balance; hyphens: none; }
h1, h3, h5 { color: var(--c-blue); }
h2, h4, h6 { color: var(--c-text); }
p, li { text-wrap: pretty; }
a { color: var(--c-link); text-decoration: underline; text-underline-offset: .16em; text-decoration-thickness: 1px; }
a:hover { text-decoration: none; }
strong, b { font-weight: 600; }
:focus-visible { outline: 2px solid var(--c-link); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--c-blue); color: #fff; padding: 10px 16px; text-decoration: none; }
.skip-link:focus { top: 8px; }
.wp-site-blocks { padding: 0 !important; }
.wp-site-blocks > * + * { margin-block-start: 0 !important; }

/* Кнопка: тёмно-синяя, при наведении наплывает #1a3a67 (как «Наши контакты» на старом сайте) */
.btn, .wpcf7 .wpcf7-submit {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px;
  border: 0; border-radius: 0; color: #fff; text-decoration: none; cursor: pointer;
  font: 600 17px/1.2 var(--f-body);
  background: linear-gradient(var(--c-blue-2), var(--c-blue-2)) left / 0 100% no-repeat, var(--c-blue);
  transition: background-size 450ms var(--ease), transform 120ms var(--ease);
}
.btn:active, .wpcf7 .wpcf7-submit:active { transform: translateY(1px); }
@media (hover: hover) { .btn:hover, .wpcf7 .wpcf7-submit:hover { background-size: 100% 100%; color: #fff; } }

/* ---------- Шапка: логотип слева, телефоны справа ---------- */
.site-header { background: var(--c-bg); position: relative; z-index: 50; }
.site-header__bar { display: flex; align-items: center; gap: 8px; min-height: 76px; }
.brand { display: inline-flex; flex-direction: column; margin-right: auto; color: var(--c-blue); text-decoration: none; line-height: 1; }
.brand__sub { font: 500 17px/1 var(--f-head); margin: 0 0 -2px 3.4em; }
.brand__name { font: italic 700 44px/1 var(--f-head); letter-spacing: -0.015em; }
.brand:hover { text-decoration: none; }
.site-header__phones { display: none; }
.tel { color: var(--c-blue); text-decoration: none; white-space: nowrap; }
.tel:hover { text-decoration: underline; }
.site-header__call { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; color: var(--c-blue); }
.nav-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px;
  background: var(--c-blue); border: 0; color: #fff; font: 600 16px var(--f-body); cursor: pointer; }
.nav-toggle__bars { position: relative; width: 20px; height: 14px; }
.nav-toggle__bars span { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform 200ms var(--ease), opacity 200ms; }
.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 6px; }
.nav-toggle__bars span:nth-child(3) { top: 12px; }
.site-header.is-open .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.is-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Мобильное меню: один список (пункты левого меню), в стиле левого меню старого сайта */
.mobile-nav { display: none; background: var(--c-blue); padding: 8px 0 16px; }
.site-header.is-open .mobile-nav { display: block; }
html:not(.js) .mobile-nav { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list--mobile .nav-link { display: flex; align-items: center; min-height: 48px; padding: 0 12px; color: #fff; text-decoration: none; font-size: 18px; }
.nav-list--mobile .nav-item + .nav-item { border-top: 1px solid rgb(255 255 255 / .12); }
.nav-list--mobile .is-current > .nav-link, .nav-list--mobile .is-current-parent > .nav-link { background: var(--c-blue-2); }
.mobile-nav__phones { display: flex; flex-direction: column; padding: 12px 12px 0; }
.mobile-nav__phones .tel { color: #fff; display: inline-flex; align-items: center; min-height: 44px; font-size: 20px; }
.mobile-nav :focus-visible { outline-color: #fff; outline-offset: -3px; }

/* ---------- Тёмная полоса: баннер + верхнее меню ---------- */
.band { background: var(--c-blue) url('../img/band-trees.webp') repeat-x center top; padding: 8px 0; }
.banner { position: relative; aspect-ratio: 1000 / 280; overflow: hidden; background: var(--c-blue-2); }
.banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 900ms var(--ease); }
.banner__img.is-active { opacity: 1; }
html:not(.js) .banner__img:first-child { opacity: 1; }
.top-nav { display: none; }
@media (max-width: 1023px) { .band__inner { width: 100%; } }

@media (min-width: 1024px) {
  .site-header__bar { min-height: 110px; }
  .brand__sub { font-size: 30px; margin: 0 0 -4px 5em; }
  .brand__name { font-size: 78px; line-height: .95; letter-spacing: -0.02em; }
  .site-header__phones { display: flex; flex-direction: column; align-items: flex-end; font-size: 25px; line-height: 1.2; }
  .site-header__call, .nav-toggle, .mobile-nav, html:not(.js) .mobile-nav { display: none; }

  .band { padding: 10px 0; }
  .banner { aspect-ratio: 1000 / 245; }
  .top-nav { display: block; margin-top: 10px; background: var(--c-white); padding: 5px; }
  .nav-list--top { display: flex; align-items: center; gap: 4px; }
  .nav-list--top .nav-link { display: inline-flex; align-items: center; min-height: 36px; padding: 0 18px; color: var(--c-blue);
    text-decoration: none; font-size: 16px;
    background: linear-gradient(var(--c-blue-2), var(--c-blue-2)) left / 0 100% no-repeat;
    transition: background-size 450ms var(--ease), color 300ms var(--ease); }
  .nav-list--top .nav-link:hover { background-size: 100% 100%; color: #fff; }
  .nav-list--top .is-current > .nav-link, .nav-list--top .is-current-parent > .nav-link { background-color: var(--c-blue); color: #fff; }
  .nav-list--top .nav-item--button { margin-left: auto; }
  .nav-list--top .nav-item--button > .nav-link { background-color: var(--c-blue); color: #fff; }
}

/* ---------- Две колонки: слева сайдбар, справа контент ---------- */
.layout { display: flex; flex-direction: column; padding: 20px 0 48px; }
.site-main { min-width: 0; }
.sidebar { margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.side-nav { display: none; }
.sidebar__club img { width: 139px; }
.sidebar__vk { width: 100%; max-width: 320px; }
@media (min-width: 1024px) {
  .layout { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: 0 20px; align-items: start; padding-top: 10px; }
  .site-main { grid-column: 2; grid-row: 1; }
  .sidebar { grid-column: 1; grid-row: 1; margin-top: 0; align-items: stretch; gap: 32px; }
  .side-nav { display: block; background: var(--c-blue); }
  .nav-list--side .nav-link { display: block; padding: 6px 10px; color: #fff; text-decoration: none; font-size: 15px; line-height: 1.25;
    transition: background-color 200ms var(--ease), padding-left 200ms var(--ease); }
  .nav-list--side .nav-link:hover { background: var(--c-blue-2); padding-left: 15px; }
  .nav-list--side .is-current > .nav-link, .nav-list--side .is-current-parent > .nav-link { background: var(--c-blue-2); padding-left: 15px; }
  .sidebar__club { align-self: center; }
  .side-nav :focus-visible { outline-color: #fff; outline-offset: -3px; }
}

/* ---------- Заголовок страницы ---------- */
.page-head { margin-bottom: 20px; }
.crumbs { font-size: 15px; margin-bottom: 12px; color: var(--c-text); }
.crumbs a { color: var(--c-text); }
.page-head__title { margin: 0; font-size: clamp(1.9rem, 4.6vw, 2.5rem); line-height: 1.1; }
.page-head__lead { margin: 12px 0 0; color: var(--muted); }

/* ---------- Контент ---------- */
.site-main .entry-content, .site-main .entry-content.has-global-padding { padding: 0 !important; }
.entry-content > * { max-width: none; margin-inline: 0; }
.entry-content > * + * { margin-block-start: 1em; }
.entry-content > :where(h2, h3, h4) { margin-block: 1.8em .5em; }
.entry-content > :where(h2, h3, h4) + * { margin-block-start: 0; }
.entry-content > :first-child { margin-top: 0; }
.entry-content h2 { font-size: clamp(1.5rem, 3vw, 1.7rem); color: var(--c-blue); }
.entry-content h3 { font-size: clamp(1.3rem, 2.6vw, 1.45rem); }
.entry-content h4 { font-size: 1.2rem; }
.entry-content ul, .entry-content ol { padding-left: 1.2em; }
.entry-content li + li { margin-top: .3em; }
.entry-content hr { border: 0; border-top: 1px solid var(--hair); margin-block: 2em; }

.wp-block-image img { width: 100%; }
.wp-block-image figcaption, .wp-element-caption { margin-top: 8px; font-size: 15px; color: var(--muted); }
.entry-content > .alignleft, .entry-content > .alignright { float: none; clear: both; margin-inline: 0; }
@media (min-width: 640px) {
  .entry-content > .alignleft { float: left; width: 40%; margin: .35em 24px 12px 0; }
  .entry-content > .alignright { float: right; width: 40%; margin: .35em 0 12px 24px; }
  .entry-content > :where(h2, h3, h4, .wp-block-gallery, .wp-block-table, .request) { clear: both; }
}
.entry-content::after { content: ''; display: block; clear: both; }

.wp-block-table { overflow-x: auto; }
.wp-block-table table { border-collapse: collapse; width: 100%; font-size: 16px; }
.wp-block-table td, .wp-block-table th { border: 0; border-bottom: 1px solid var(--hair); padding: 8px 12px 8px 0; text-align: left; vertical-align: top; }
.wp-block-embed { margin-block: 1.5em; }
.wp-block-embed__wrapper iframe, .video-embed iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; background: #000; }

/* ---------- Галерея: сетка превью + лайтбокс ---------- */
.wp-block-gallery.irbis-gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px !important; margin-block: 1.5em; }
@media (min-width: 768px) { .wp-block-gallery.irbis-gallery { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px !important; } }
.wp-block-gallery.irbis-gallery > figure.wp-block-image { width: auto !important; margin: 0 !important; display: flex; flex-direction: column; justify-content: flex-start !important; }
.wp-block-gallery.irbis-gallery > figure.wp-block-image a { display: block; aspect-ratio: 1; overflow: hidden; background: rgb(0 36 86 / .06); }
.wp-block-gallery.irbis-gallery > figure.wp-block-image img { width: 100%; height: 100% !important; object-fit: cover; transition: transform 800ms var(--ease); }
@media (hover: hover) { .wp-block-gallery.irbis-gallery a:hover img { transform: scale(1.04); } }
/* настоящие подписи (авторство фото и т.п.) видны сразу, под превью; имена файлов не переносились */
.wp-block-gallery.irbis-gallery figcaption.wp-element-caption { position: static !important; display: block; margin: 4px 0 0; padding: 0 !important;
  background: none !important; color: var(--muted) !important; font-size: 14px; line-height: 1.35; text-align: left; max-height: none !important; overflow: visible !important; }

.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgb(0 20 48 / .96); color: #fff; }
.lb::backdrop { background: rgb(0 20 48 / .96); }
.lb[open] { display: grid; grid-template-rows: 1fr auto; }
.lb__stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 56px 8px 8px; touch-action: pan-y; }
.lb__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; }
.lb__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px var(--gut) 16px; font-size: 15px; }
.lb__cap { margin: 0; flex: 1 1 auto; color: rgb(255 255 255 / .85); }
.lb__count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb__btn { display: inline-grid; place-items: center; width: 48px; height: 48px; background: none; border: 0; color: #fff; cursor: pointer; }
.lb__btn:focus-visible { outline-color: #fff; }
.lb__close { position: absolute; top: 4px; right: 4px; z-index: 2; }
.lb__prev, .lb__next { position: absolute; top: 50%; translate: 0 -50%; z-index: 2; }
.lb__prev { left: 0; } .lb__next { right: 0; }
@media (max-width: 767px) { .lb__prev, .lb__next { top: auto; bottom: 8px; translate: none; } }

/* ---------- Заявка (как .formzone старого сайта) ---------- */
.request { background: var(--c-form); padding: 20px; margin-block-start: 2em !important; clear: both; }
.request h2 { margin: 0 0 8px; color: var(--c-blue); }
.request > p { margin: 0; }
.wpcf7 form { display: grid; gap: 16px; margin-top: 16px; }
.wpcf7 form p { max-width: none; margin: 0; }
.wpcf7 form br { display: none; }
.wpcf7 label { display: grid; gap: 4px; font-size: 16px; font-weight: 600; }
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 input[type="text"], .wpcf7 input[type="tel"], .wpcf7 input[type="email"], .wpcf7 textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--c-field); border-radius: 0; background: transparent;
  color: var(--c-text); font: 400 17px/1.4 var(--f-body); }
.wpcf7 textarea { min-height: 130px; resize: vertical; }
.wpcf7 input:focus-visible, .wpcf7 textarea:focus-visible { outline: 2px solid var(--c-blue); outline-offset: 0; border-color: var(--c-blue); }
.wpcf7 input::placeholder, .wpcf7 textarea::placeholder { color: #757575; }
.wpcf7 .wpcf7-acceptance .wpcf7-list-item { margin: 0; }
.wpcf7 .wpcf7-acceptance label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 15px; line-height: 1.45; }
.wpcf7 .wpcf7-acceptance input { width: 22px; height: 22px; margin: 0; flex: 0 0 auto; accent-color: var(--c-blue); }
.wpcf7 .hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wpcf7 fieldset.hidden-fields-container { border: 0; padding: 0; margin: 0; }
.wpcf7 .form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.wpcf7 .wpcf7-submit:disabled, .wpcf7 form.submitting .wpcf7-submit { opacity: .7; cursor: progress; }
.wpcf7 .form-note { margin: 0; font-size: 13px; color: var(--muted); }
.wpcf7 .wpcf7-spinner { display: none; }
.wpcf7 .wpcf7-not-valid-tip { margin-top: 4px; font-size: 15px; font-weight: 600; color: var(--c-link); }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 12px 14px; border: 0; background: #fff; font-size: 16px; }
.wpcf7 form .wpcf7-response-output:empty { display: none; }
.wpcf7 form.sent .wpcf7-response-output { color: var(--c-blue); font-weight: 600; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output { color: var(--c-link); }
.wpcf7 .screen-reader-response { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Подвал (градиент старого сайта) ---------- */
.site-footer { background: linear-gradient(to bottom, var(--c-foot-1), var(--c-foot-2)); color: var(--c-text); padding: 28px 0 20px; font-size: 16px; }
.site-footer a { color: var(--c-blue); }
.site-footer__grid { display: grid; gap: 16px 40px; }
.site-footer__col p { margin: 0 0 10px; }
.site-footer__name { font: italic 700 20px/1.2 var(--f-head); color: var(--c-blue); }
.site-footer__phones a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: 18px; text-decoration: none; }
.site-footer__vk { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.site-footer__bottom { display: flex; flex-wrap: wrap; gap: 6px 32px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgb(37 18 9 / .15); font-size: 15px; }
.site-footer__bottom p { margin: 0; }
@media (min-width: 768px) { .site-footer__grid { grid-template-columns: 1.4fr 1fr; } }

/* ---------- Появление при прокрутке (без JS и при reduced-motion — сразу видно) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .rv { opacity: 0; transform: translateY(16px);
    transition: opacity 450ms var(--ease) var(--d, 0ms), transform 450ms var(--ease) var(--d, 0ms); }
  html.js .rv.is-in { opacity: 1; transform: none; }
}

/* ---------- Верхнее меню: выпадающие подпункты (как на старом сайте) ---------- */
@media (min-width: 1024px) {
  .nav-list--top .nav-item { position: relative; display: flex; align-items: stretch; }
  .nav-list--top .has-sub > .nav-link { padding-right: 6px; }
  .nav-list--top .sub-toggle { display: inline-grid; place-items: center; width: 26px; min-height: 36px; padding: 0; margin-right: 4px;
    background: none; border: 0; color: var(--c-blue); cursor: pointer; }
  .nav-list--top .is-current > .sub-toggle, .nav-list--top .is-current-parent > .sub-toggle { background: var(--c-blue); color: #fff; margin-right: 0; padding-right: 4px; width: 30px; }
  .nav-list--top .sub-toggle .chev { transition: transform 200ms var(--ease); }
  .nav-list--top .sub-toggle[aria-expanded="true"] .chev { transform: rotate(180deg); }
  /* панель вплотную к пункту: top = нижний край полосы меню (5px отступ полосы перекрываем) */
  .nav-list--top .sub-panel { position: absolute; top: 100%; left: 0; z-index: 60; min-width: 220px; padding-top: 5px;
    visibility: hidden; opacity: 0; transform: translateY(-4px);
    transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 0s linear 160ms; }
  .nav-list--top .nav-item.is-open > .sub-panel,
  html:not(.js) .nav-list--top .nav-item:hover > .sub-panel,
  html:not(.js) .nav-list--top .nav-item:focus-within > .sub-panel {
    visibility: visible; opacity: 1; transform: none; transition: opacity 160ms var(--ease), transform 160ms var(--ease), visibility 0s; }
  .nav-list--top .sub-menu { list-style: none; margin: 0; padding: 5px; background: var(--c-white); box-shadow: 0 5px 6px rgb(50 50 50 / .5); }
  .nav-list--top .sub-menu .nav-link { display: flex; min-height: 36px; padding: 0 12px; color: var(--c-blue); white-space: nowrap; }
  .nav-list--top .sub-menu .is-current > .nav-link { background-color: var(--c-blue); color: #fff; }
}
@media (max-width: 1023px) { .sub-toggle, .sub-panel { display: none; } }

/* Узкие экраны (< 360px): логотип чуть меньше, подпись «Меню» — только для экранных чтецов */
@media (max-width: 359px) {
  .brand__name { font-size: 36px; }
  .brand__sub { font-size: 15px; }
  .nav-toggle { min-width: 44px; justify-content: center; }
  .nav-toggle__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Карточки разделов (фотогалерея: фото + подпись-ссылка) ---------- */
.wp-block-gallery.irbis-cards { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px !important; margin-block: 1em; }
.wp-block-gallery.irbis-cards > figure.wp-block-image { width: auto !important; margin: 0 !important; display: flex; flex-direction: column; }
.wp-block-gallery.irbis-cards > figure.wp-block-image > a { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.wp-block-gallery.irbis-cards > figure.wp-block-image img { width: 100%; height: 100% !important; object-fit: cover; transition: transform 800ms var(--ease); }
@media (hover: hover) { .wp-block-gallery.irbis-cards > figure > a:hover img { transform: scale(1.04); } }
.wp-block-gallery.irbis-cards figcaption.wp-element-caption { position: static !important; margin: 8px 0 0; padding: 0 !important; background: none !important;
  font: italic 700 20px/1.2 var(--f-head); max-height: none !important; overflow: visible !important; text-align: left; }
.wp-block-gallery.irbis-cards figcaption a { color: var(--c-link); }

/* Стандартные стили галереи WP делают <a> гибким элементом с нулевой основой — при aspect-ratio высота схлопывается.
   Фиксируем размеры явно (и для фотогалерей, и для карточек). */
.wp-block-gallery.irbis-gallery > figure.wp-block-image > a,
.wp-block-gallery.irbis-cards > figure.wp-block-image > a { flex: 0 0 auto !important; width: 100%; height: auto !important; }
.wp-block-gallery.irbis-gallery > figure.wp-block-image > a > img,
.wp-block-gallery.irbis-cards > figure.wp-block-image > a > img { flex: none !important; display: block; width: 100% !important; height: 100% !important; }
.wp-block-gallery.irbis-gallery figcaption.wp-element-caption,
.wp-block-gallery.irbis-cards figcaption.wp-element-caption { color: var(--muted) !important; text-shadow: none !important; }
.wp-block-gallery.irbis-cards figcaption.wp-element-caption a { color: var(--c-link) !important; }
.wp-block-gallery.irbis-gallery figcaption::before, .wp-block-gallery.irbis-cards figcaption::before { display: none !important; }
.wp-block-gallery.irbis-gallery > figure.wp-block-image::before,
.wp-block-gallery.irbis-cards > figure.wp-block-image::before { display: none !important; content: none !important; }
.wp-block-gallery.irbis-gallery figcaption.wp-element-caption { text-align: left !important; font-size: 14px !important; }
.wp-block-gallery.irbis-cards figcaption.wp-element-caption { text-align: left !important; font: italic 700 20px/1.2 var(--f-head) !important; }
@media (min-width: 1024px) {
  .nav-list--top .sub-menu .nav-item { display: block; }
  .nav-list--top .sub-menu .nav-link { width: 100%; }
  .nav-list--top .sub-menu .nav-link:hover, .nav-list--top .sub-menu .nav-link:focus-visible { color: #fff; background-size: 100% 100%; }
  .nav-list--top .sub-menu :focus-visible { outline-color: var(--c-link); outline-offset: -2px; }
}

/* Подвал в цвет шапки и меню (#002456), вместо серо-бежевого градиента старого сайта */
.site-footer { background: var(--c-blue) url('../img/band-trees.webp') repeat-x center top; color: rgb(255 255 255 / .86); }
.site-footer a { color: #fff; }
.site-footer__name { color: #fff; }
.site-footer__bottom { border-top-color: rgb(255 255 255 / .2); }
.site-footer :focus-visible { outline-color: #fff; }

/* Видео ВКонтакте, вставленное кодом (блок «Произвольный HTML»), — по ширине колонки */
.entry-content iframe[src*="vk.com/video_ext"], .entry-content iframe[src*="vkvideo.ru"] { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }
