/*
Theme Name: Домодедовское благочиние — Благовест
Theme URI: https://domblag.ru/
Author: Сергей Сергеевич Лопухов (Sergey Lopukhov)
Description: Тема Домодедовского благочиния: синий, кремовый, золото и бордо, фото собора на главной и колонка новостей. Сохраняет существующие меню, виджеты и контент.
Version: 1.2.0
Requires at least: 5.4
Text Domain: domblag-blagovest
*/

/* Direction contract lives in header.php as the first comment inside <body>. */

:root {
    --navy: #13304f;
    --navy-deep: #0b2138;
    --navy-soft: #e3e9f0;
    --cream: #f7efdf;
    --paper: #fffaf1;
    --sand: #efe2c6;
    --line: #e2d3b3;
    --line-soft: #ece1c9;
    --gold: #c9a24f;
    --gold-light: #e7c77c;
    --gold-deep: #7f5e1c;
    --wine: #8e2b24;
    --wine-deep: #6c1f1a;
    --ink: #262019;
    --muted: #675d51;
    --on-navy: #f6efe1;
    --on-navy-muted: #c9d3de;
    --serif: "PT Serif", Georgia, "Times New Roman", serif;
    --sans: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --radius-lg: 28px;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 44px -18px rgba(19, 48, 79, .28);
    --shadow-soft: 0 10px 28px -14px rgba(38, 32, 25, .22);
    --shadow-banner: 0 4px 14px -10px rgba(38, 32, 25, .16);
    --shadow-banner-hover: 0 8px 20px -12px rgba(38, 32, 25, .2);
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --content: 1200px;

    /* Aliases for templates inherited from domblag-modern. */
    --surface: var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; accent-color: var(--wine); scrollbar-color: #b9a37a var(--cream); }
body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background: var(--cream);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    caret-color: var(--wine);
}
::selection { color: var(--paper); background: var(--wine); }
a { color: var(--wine); text-decoration-thickness: .07em; text-underline-offset: .18em; transition: color .2s ease, background-color .2s ease, border-color .2s ease, transform .3s var(--ease-out), box-shadow .3s var(--ease-out); }
a:hover, a:focus { color: var(--wine-deep); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4 { text-wrap: pretty; } /* Headings fill the line; balance left a wide empty strip on the right. */
.screen-reader-text { clip: rect(0,0,0,0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }
.skip-link:focus { z-index: 100; top: 8px; left: 8px; width: auto; height: auto; padding: 10px 16px; clip: auto; clip-path: none; border-radius: 8px; color: var(--paper); background: var(--navy); }
.container { width: min(calc(100% - 48px), var(--content)); margin-inline: auto; }
.icon { width: 1em; height: 1em; flex: none; }

/* ---------- Buttons & links ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 22px; border: 1px solid var(--wine); border-radius: 999px; color: #fff; background: var(--wine); font-family: var(--sans); font-size: .95rem; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer; }
.button:hover, .button:focus { color: #fff; background: var(--wine-deep); border-color: var(--wine-deep); transform: translateY(-2px); box-shadow: 0 10px 22px -12px rgba(108, 31, 26, .6); }
.button--wine { }
.button--gold { color: var(--navy-deep); border-color: var(--gold); background: var(--gold); }
.button--gold:hover, .button--gold:focus { color: var(--navy-deep); border-color: var(--gold-light); background: var(--gold-light); box-shadow: 0 10px 22px -12px rgba(0, 0, 0, .5); }
.button--light { color: var(--navy); border-color: var(--paper); background: var(--paper); }
.button--light:hover, .button--light:focus { color: var(--wine); border-color: #fff; background: #fff; }
.button--outline-light { color: var(--on-navy); border-color: rgba(246, 239, 225, .55); background: rgba(11, 33, 56, .18); }
.button--outline-light:hover, .button--outline-light:focus { color: var(--navy-deep); border-color: var(--on-navy); background: var(--on-navy); }
.button--outline, .button--ghost { color: var(--navy); border-color: var(--navy); background: transparent; }
.button--outline:hover, .button--outline:focus, .button--ghost:hover, .button--ghost:focus { color: var(--paper); border-color: var(--navy); background: var(--navy); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; color: var(--wine); font-weight: 600; text-decoration: none; }
.link-arrow span { transition: transform .3s var(--ease-out); }
.link-arrow:hover span, .link-arrow:focus span { transform: translateX(4px); }

/* ---------- Utility bar & header ---------- */
.utility-bar { color: var(--on-navy-muted); background: var(--navy-deep); font-size: .8rem; }
.utility-bar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 36px; }
.utility-bar__church { margin: 0; }
.utility-bar__social { display: flex; align-items: center; gap: 6px; }
.social-link { display: inline-grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; transition: color .2s var(--ease-out), background-color .2s var(--ease-out); }
.social-link .social-icon { width: 20px; height: 20px; }
.utility-bar .social-link:hover, .utility-bar .social-link:focus-visible { background: rgba(231, 199, 124, .12); }
/* The same pastel network colours as in the footer. */
.utility-bar .social-link.social-link--vk { color: #9dbcf2; }
.utility-bar .social-link.social-link--telegram { color: #94cfee; }
.utility-bar .social-link.social-link--max { color: #b9a8f0; }
.utility-bar a { color: var(--on-navy); text-decoration: none; }
.utility-bar a:hover, .utility-bar a:focus { color: var(--gold-light); }

.site-header { position: relative; z-index: 12; background: var(--cream); }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 92px; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--navy); text-decoration: none; }
.brand:hover, .brand:focus { color: var(--navy); }
.brand__emblem { width: 58px; height: 58px; flex: none; filter: drop-shadow(0 6px 10px rgba(19, 48, 79, .22)); transition: transform .5s var(--ease-out); }
.brand:hover .brand__emblem { transform: rotate(-6deg); }
.brand__text { display: grid; gap: 3px; }
.brand__name { font-family: var(--serif); font-size: clamp(1.25rem, 1rem + 1vw, 1.7rem); font-weight: 700; line-height: 1.05; letter-spacing: -.01em; }
.brand__sub { color: var(--wine); font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.masthead__actions { display: flex; align-items: center; gap: 14px; }
.masthead__phone { color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; white-space: nowrap; }
.search-toggle { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 50%; color: var(--navy); background: var(--paper); cursor: pointer; transition: border-color .2s ease, color .2s ease, background-color .2s ease; }
.search-toggle:hover, .search-toggle[aria-expanded="true"] { color: var(--wine); border-color: var(--gold); }
.search-toggle svg { width: 19px; height: 19px; }

.primary-nav { position: sticky; top: 0; z-index: 20; background: var(--paper); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); box-shadow: 0 8px 20px -18px rgba(38, 32, 25, .5); }
body.admin-bar .primary-nav { top: 32px; }
.primary-nav-inner { display: flex; align-items: center; gap: 12px; }
.primary-nav .menu { display: flex; flex: 1; flex-wrap: nowrap; align-items: stretch; gap: 2px; margin: 0; padding: 0; list-style: none; }
.primary-nav li { position: relative; }
.primary-nav .menu > li > a { position: relative; display: flex; align-items: center; min-height: 56px; padding: 0 14px; color: var(--navy); font-size: .95rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.primary-nav .menu > li > a::after { position: absolute; right: 14px; bottom: 10px; left: 14px; height: 2px; border-radius: 2px; background: var(--gold); content: ""; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease-out); }
.primary-nav .menu > li > a:hover::after, .primary-nav .menu > li > a:focus-visible::after, .primary-nav .menu > .current-menu-item > a::after, .primary-nav .menu > .current-menu-ancestor > a::after { transform: scaleX(1); }
.primary-nav .menu > li > a:hover, .primary-nav .menu > .current-menu-item > a { color: var(--wine); }
.primary-nav .menu > .menu-item-has-children > a { padding-right: 30px; }
.primary-nav .menu > .menu-item-has-children > a::before { position: absolute; top: 50%; right: 12px; width: 6px; height: 6px; margin-top: -5px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; content: ""; transform: rotate(45deg); }
.primary-nav .sub-menu { position: absolute; top: calc(100% - 4px); left: 0; z-index: 5; display: block; min-width: 250px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow); list-style: none; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .2s ease, transform .3s var(--ease-out), visibility .2s; }
.primary-nav li:hover > .sub-menu, .primary-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.primary-nav .sub-menu a { display: block; padding: 10px 14px; border-radius: 10px; color: var(--ink); font-size: .95rem; text-decoration: none; }
.primary-nav .sub-menu a:hover, .primary-nav .sub-menu a:focus { color: var(--wine); background: var(--cream); }
.primary-nav__cta { display: none; }
.mobile-toggle, .menu-backdrop { display: none; }

.search-panel { padding: 22px 0; border-bottom: 1px solid var(--line); background: var(--sand); }
.search-panel[hidden] { display: none; }
.search-panel form { display: flex; gap: 10px; }
.search-panel input[type="search"] { flex: 1; min-height: 50px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); background: var(--paper); }
.search-panel input::placeholder { color: var(--muted); }

.main { padding: 40px 0 88px; }
.is-news-home .main { padding-top: 0; }
.content-container { width: min(calc(100% - 48px), var(--content)); margin-inline: auto; }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; display: flex; min-height: clamp(540px, 76vh, 760px); flex-direction: column; justify-content: center; overflow: hidden; color: var(--on-navy); background: var(--navy-deep); }
.hero::after { position: absolute; right: -10%; bottom: -1px; left: -10%; z-index: 2; height: 88px; border-radius: 50% 50% 0 0 / 100% 100% 0 0; background: var(--cream); content: ""; }
.hero__photo { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 30% 0; transform-origin: 30% 0; transition: opacity .9s ease-out, transform 2.4s var(--ease-out); }
.hero-loading .hero__photo { opacity: 0; transform: scale(1.04); }
.hero-loading.hero-ready .hero__photo { opacity: 1; transform: none; }
.hero__shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(270deg, rgba(11, 33, 56, .94) 0%, rgba(11, 33, 56, .84) 34%, rgba(11, 33, 56, .35) 60%, rgba(11, 33, 56, .05) 80%), linear-gradient(0deg, rgba(11, 33, 56, .55) 0%, rgba(11, 33, 56, 0) 38%); }
.hero__inner { display: flex; justify-content: flex-end; padding: 72px 0 132px; }
.hero__copy { width: min(100%, 600px); }
.hero__title { margin: 0; color: #fff; font-family: var(--serif); font-size: clamp(2.2rem, 1.3rem + 3vw, 3.6rem); font-weight: 700; line-height: .98; letter-spacing: -.025em; }
.hero__lead { max-width: 540px; margin: 22px 0 32px; color: var(--on-navy); font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); line-height: 1.6; }
.hero__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 540px; }
.news-section { scroll-margin-top: 84px; }
.hero__caption { position: absolute; bottom: 104px; left: 50%; z-index: 1; margin: 0; color: rgba(246, 239, 225, .82); font-size: .8rem; transform: translateX(-50%); text-shadow: 0 1px 8px rgba(0, 0, 0, .45); }

/* ---------- Quick rail ---------- */
.quick-rail { position: relative; z-index: 3; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: -54px; padding: 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow); }
.quick-rail__item { position: relative; display: flex; align-items: center; gap: 14px; min-height: 84px; padding: 14px 18px; border-radius: var(--radius); color: var(--ink); text-decoration: none; }
.quick-rail__item + .quick-rail__item::before { position: absolute; top: 22px; bottom: 22px; left: 0; width: 1px; background: var(--line); content: ""; }
.quick-rail__item:hover, .quick-rail__item:focus-visible { color: var(--ink); background: var(--cream); }
.quick-rail__item:hover::before, .quick-rail__item:hover + .quick-rail__item::before { opacity: 0; }
.quick-rail__icon { display: grid; width: 46px; height: 46px; flex: none; place-items: center; border-radius: 50%; color: var(--gold-deep); background: var(--sand); font-size: 24px; transition: color .2s ease, background-color .2s ease, transform .4s var(--ease-out); }
.quick-rail__item:hover .quick-rail__icon { color: var(--paper); background: var(--navy); transform: translateY(-2px); }
.quick-rail__text { display: grid; gap: 2px; min-width: 0; }
.quick-rail__text strong { color: var(--navy); font-size: .98rem; line-height: 1.2; }
.quick-rail__text small { color: var(--muted); font-size: .82rem; line-height: 1.3; }

/* ---------- News ---------- */
.news-section { padding-top: 44px; }
.news-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.news-section__head h2, .temples__head h2, .about h2, .visit h2 { margin: 0; color: var(--navy); font-family: var(--serif); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); font-weight: 700; line-height: 1.05; letter-spacing: -.02em; }
.news-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.news-column { min-width: 0; }
.news-date { display: block; color: var(--wine); font-size: .8rem; font-weight: 600; letter-spacing: .08em; font-variant-numeric: tabular-nums; text-transform: uppercase; }

.news-slider { position: relative; overflow: hidden; border-radius: var(--radius-lg); background: var(--navy-deep); box-shadow: var(--shadow); }
.news-slider__viewport { display: grid; }
.news-slide { position: relative; grid-area: 1 / 1; display: grid; opacity: 0; visibility: hidden; transition: opacity .7s var(--ease-out), visibility 0s linear .7s; }
.news-slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity .7s var(--ease-out), visibility 0s; }
.news-slide__media { position: relative; grid-area: 1 / 1; display: block; overflow: hidden; aspect-ratio: 16 / 11; background: var(--navy); }
.news-slide__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.05); transition: transform 7.5s linear; }
.news-slide.is-active .news-slide__media img { transform: none; }
.news-slide__media::after { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 33, 56, 0) 32%, rgba(11, 33, 56, .74) 60%, rgba(11, 33, 56, .97) 88%, var(--navy-deep) 100%); content: ""; }
.news-slide__body { position: relative; z-index: 1; grid-area: 1 / 1; align-self: end; padding: 0 36px 88px; }
.news-slide .news-date { color: var(--gold-light); }
.news-slide__title { display: -webkit-box; max-width: 32ch; margin: 10px 0 10px; overflow: hidden; font-family: var(--serif); font-size: clamp(1.35rem, 1.05rem + .9vw, 1.8rem); font-weight: 700; line-height: 1.14; letter-spacing: -.01em; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.news-slide__title a { color: #fff; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1px; text-underline-offset: .13em; transition: text-decoration-color .25s ease; }
.news-slide__title a:hover, .news-slide__title a:focus { color: #fff; text-decoration-color: var(--gold); }
.news-slide__excerpt { display: -webkit-box; max-width: 62ch; margin: 0; overflow: hidden; color: var(--on-navy-muted); font-size: .98rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.news-slider__bar { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; display: flex; align-items: center; gap: 20px; padding: 12px 24px 16px 36px; border-top: 1px solid rgba(231, 199, 124, .18); }
.news-slider__dots { display: flex; flex: 1; gap: 8px; }
.news-slider__dot { position: relative; flex: 1; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.news-slider__dot::before, .news-slider__dot span { position: absolute; top: 50%; right: 0; left: 0; height: 3px; margin-top: -1.5px; border-radius: 3px; content: ""; }
.news-slider__dot::before { background: rgba(246, 239, 225, .22); transition: background-color .2s ease; }
.news-slider__dot:hover::before { background: rgba(246, 239, 225, .45); }
.news-slider__dot span { background: var(--gold); transform: scaleX(0); transform-origin: left; }
.news-slider__dot.is-active span { animation: slider-progress var(--slider-interval, 7s) linear forwards; }
.news-slider.is-paused .news-slider__dot.is-active span { animation-play-state: paused; }
.news-slider.is-stopped .news-slider__dot.is-active span { animation: none; transform: none; }
@keyframes slider-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.news-slider__count { flex: none; margin: 0; color: var(--on-navy-muted); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.news-slider__controls { display: flex; flex: none; gap: 8px; }
.news-slider__controls .round-button { width: 44px; height: 44px; font-size: 18px; }
[data-slider-toggle] .icon--play, .news-slider.is-stopped [data-slider-toggle] .icon--pause { display: none; }
.news-slider.is-stopped [data-slider-toggle] .icon--play { display: block; }
.news-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 32px; }
.news-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--paper); box-shadow: var(--shadow-soft); transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .2s ease; }
.news-card:hover, .news-card:focus-within { border-color: var(--line); box-shadow: var(--shadow); transform: translateY(-3px); }
.news-card__media { display: block; overflow: hidden; aspect-ratio: 3 / 2; background: var(--sand); }
.news-card__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 24px 24px; }
.news-card__title { display: -webkit-box; margin: 0; overflow: hidden; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.25; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.news-card__title a::after { position: absolute; inset: 0; z-index: 1; content: ""; }
.news-card__title a:focus-visible { outline: none; }
.news-card:has(.news-card__title a:focus-visible) { outline: 3px solid var(--gold); outline-offset: 3px; }
.news-card__excerpt { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: .95rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

/* Shared image crop and title links for cards and feed rows. */
.news-card__media img, .news-row__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.news-card:hover .news-card__media img, .news-row:hover .news-row__media img { transform: scale(1.04); }
.news-card__title a, .news-row__title a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--gold), var(--gold)); background-position: 0 100%; background-repeat: no-repeat; background-size: 0 1.5px; transition: background-size .45s var(--ease-out), color .2s ease; }
.news-card:hover .news-card__title a, .news-row__title a:hover, .news-row__title a:focus { color: var(--wine); background-size: 100% 1.5px; }

.news-feed { margin: 40px 0 0; padding: 0; border-top: 2px solid var(--navy); list-style: none; }
.news-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 168px; gap: 24px; align-items: start; padding: 22px 0; border-bottom: 1px solid var(--line); }
.news-row__date { display: grid; justify-items: center; padding-top: 2px; color: var(--navy); line-height: 1; text-align: center; }
.news-row__date strong { font-family: var(--serif); font-size: 2.2rem; font-weight: 700; font-variant-numeric: lining-nums tabular-nums; }
.news-row__date span { margin-top: 6px; color: var(--wine); font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.news-row__title { margin: 0 0 8px; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.25; }
.news-row__excerpt { display: -webkit-box; margin: 0; overflow: hidden; color: var(--muted); font-size: .95rem; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.news-row__media { display: block; overflow: hidden; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); background: var(--sand); }
.news-column__more { width: 100%; margin-top: 28px; }

.post-card__placeholder { display: block; width: 100%; height: 100%; min-height: 100%; background: linear-gradient(135deg, var(--sand), #e4d3ae); }

.news-aside { display: grid; gap: 20px; min-width: 0; }
.news-aside > * { min-width: 0; }
.aside-today { display: flex; align-items: center; gap: 6px; padding: 10px 20px 10px 9px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--paper); text-decoration: none; }
.aside-today:hover, .aside-today:focus { color: var(--ink); border-color: var(--gold); box-shadow: var(--shadow-soft); }
.sidebar-widget.widget_domblag_banner_list { padding: 0; border: 0; background: none; }
.sidebar-widget.widget_domblag_memorial { padding: 0; border: 0; background: none; box-shadow: none; }
/* Inside the widget the card is the widget itself, so the date row drops its own frame, as in the announcements list. */
.sidebar-widget.widget_domblag_today .aside-today { margin: 0 -8px 0 -11px; padding: 2px 8px 2px 0; border: 0; border-radius: var(--radius-sm); background: none; transition: background-color .2s ease; }
.sidebar-widget.widget_domblag_today .aside-today:hover, .sidebar-widget.widget_domblag_today .aside-today:focus { background: var(--cream); box-shadow: none; }
.sidebar-widget.widget_domblag_banner_list .widget-title { margin-bottom: 12px; }
/* Without a title the widget has no card: corners are rounded on every carousel and banner by the widget's own setting (banners.css). */
.sidebar-widget.widget_domblag_event_banner { display: grid; gap: 20px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.db-aside-banner { display: block; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow-banner); transition: transform .3s var(--ease-out), box-shadow .3s ease; }
.db-aside-banner:hover, .db-aside-banner:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow-banner-hover); }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__track { border: 1px solid var(--line-soft); border-radius: var(--radius-lg); box-shadow: var(--shadow-banner); }
body .db-banner { box-shadow: var(--shadow-banner); }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel { transition: transform .3s var(--ease-out); }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__track { transition: box-shadow .3s ease; }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel:hover, .widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel:focus-within { transform: translateY(-2px); }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel:hover .db-carousel__track, .widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel:focus-within .db-carousel__track { box-shadow: var(--shadow-banner-hover); }
@media (prefers-reduced-motion: reduce) { .db-aside-banner, .widget_domblag_banner_carousel .db-carousel { transition: none; transform: none !important; } }
.sidebar-widget .db-banner-list a.db-banner:hover, .sidebar-widget .db-banner-list a.db-banner:focus-visible { box-shadow: var(--shadow-banner-hover); }
.db-aside-banner img { display: block; width: 100%; height: auto; }
.sidebar-widget.widget_domblag_banner_carousel:not(:has(> .widget-title)) { padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__nav { position: absolute; right: 10px; bottom: 10px; left: 10px; margin: 0; pointer-events: none; }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__nav > * { pointer-events: auto; }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__dots { padding: 1px 5px; border-radius: 999px; background: rgba(255, 250, 240, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__arrow { width: 30px; height: 30px; border-color: transparent; background: rgba(255, 250, 240, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__nav > * { opacity: 0; transition: opacity .25s ease; }
/* Touch screens: no arrows or dots over the banner, it is swiped with a finger (banners.js turns the swipe into a crossfade). */
@media (hover: none) { .widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__nav { display: none; } }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel:hover .db-carousel__nav > *, .widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel:focus-within .db-carousel__nav > * { opacity: 1; }
.widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__arrow:hover, .widget_domblag_banner_carousel:not(:has(> .widget-title)) .db-carousel__arrow:focus-visible { border-color: var(--navy); background: var(--navy); }
.sidebar-widget .db-banner img { border-radius: 0; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) { overflow: hidden; padding: 0; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) > .widget-title { display: flex; align-items: center; gap: 14px; margin: 0; padding: 18px 20px 14px; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) > .widget-title::after { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), rgba(201, 162, 79, 0)); content: ""; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) .db-banner { background: none; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) .db-banner__image { border-block: 1px solid var(--line-soft); background: #fff; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) .db-banner__caption { gap: 6px; padding: 14px 20px 18px; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) .db-banner__title { color: var(--navy); font-family: var(--serif); font-size: 1.05rem; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) .db-banner__more { color: var(--wine); font-size: .9rem; font-weight: 600; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) .db-banner__more span { display: inline-block; transition: transform .3s var(--ease-out); }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) a.db-banner:hover .db-banner__title, .sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) a.db-banner:focus-visible .db-banner__title { color: var(--wine); }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) a.db-banner:hover .db-banner__more span, .sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) a.db-banner:focus-visible .db-banner__more span { transform: translateX(4px); }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) .db-carousel__nav { margin: 0; padding: 0 20px 16px; }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) a.db-banner:focus-visible { outline-offset: -3px; }
.sidebar-widget .db-banner-list .db-banner { border: 1px solid var(--line-soft); transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), border-color .2s ease; }
.sidebar-widget .db-banner-list a.db-banner:hover, .sidebar-widget .db-banner-list a.db-banner:focus-visible { border-color: var(--gold); transform: translateY(-3px); }
.sidebar-widget.widget_domblag_banner_carousel:has(> .widget-title) .db-carousel__track, .sidebar-widget .db-carousel__slide .db-banner { border-radius: 0; }
.date-star { position: relative; display: grid; width: 84px; height: 84px; flex: none; align-content: center; justify-items: center; isolation: isolate; font-variant-numeric: lining-nums; }
.date-star::before, .date-star::after { position: absolute; inset: 11px; z-index: -1; content: ""; }
.date-star::before { inset: 17px; }
.date-star::before { border: 1px solid rgba(231, 199, 124, .7); border-radius: 3px; background: var(--wine); box-shadow: 0 6px 12px -6px rgba(38, 32, 25, .45); }
.date-star::after { border: 2px solid var(--gold); border-radius: 4px; background: linear-gradient(160deg, #1d4368, var(--navy-deep)); box-shadow: 0 8px 16px -8px rgba(11, 33, 56, .7), inset 0 0 0 2px rgba(11, 33, 56, .55); transform: rotate(45deg); }
.date-star__day { color: var(--gold-light); font-family: var(--serif); font-size: 1.55rem; font-weight: 700; line-height: 1; }
.date-star__month { margin-top: 2px; color: var(--on-navy); font-family: var(--serif); font-size: .6rem; line-height: 1; }
.date-star--lg { width: 132px; height: 132px; }
/* Undated announcement (plugin «Объявления благочиния»): the kind icon on a navy tile instead of the date. */
.db-kind-tile { display: grid; width: 64px; height: 64px; flex: none; margin: 10px; place-items: center; border-radius: 16px; color: var(--gold-light); background: var(--navy); box-shadow: 0 8px 18px -10px rgba(11, 33, 56, .6); }
.db-kind-tile .db-kind-icon { width: 30px; height: 30px; }
.db-kind-tile--lg { width: 112px; height: 112px; margin: 10px; border-radius: 24px; }
.db-kind-tile--lg .db-kind-icon { width: 50px; height: 50px; }
.date-star--lg::before, .date-star--lg::after { inset: 17px; }
.date-star--lg::before { inset: 27px; }
.date-star--lg .date-star__day { font-size: 2.5rem; }
.date-star--lg .date-star__month { margin-top: 3px; font-size: .95rem; }
.aside-today:hover .date-star::after { border-color: var(--gold-light); }

/* Announcements (plugin «Объявления благочиния»): sidebar list, /anonsy/ list, announcement page. */
.sidebar-widget.widget_domblag_events > .widget-title { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.sidebar-widget.widget_domblag_events > .widget-title::after { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), rgba(201, 162, 79, 0)); content: ""; }
.sidebar-widget .db-events { margin: 0; padding: 0; list-style: none; }
.db-events__item + .db-events__item { border-top: 1px solid var(--line-soft); }
.db-events__link:hover .date-star::after, .db-events__link:focus-visible .date-star::after { border-color: var(--gold-light); }
.db-events__link { display: flex; align-items: center; gap: 6px; margin: 0 -8px 0 -11px; padding: 2px 8px 2px 0; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; transition: background-color .2s ease; }
.db-events__link:hover, .db-events__link:focus-visible { color: var(--ink); background: var(--cream); }
.db-events__text { display: grid; gap: 3px; min-width: 0; }
.db-events__title { color: var(--navy); font-family: var(--serif); font-size: 1rem; font-weight: 700; line-height: 1.25; transition: color .2s ease; }
.db-events__link:hover .db-events__title, .db-events__link:focus-visible .db-events__title { color: var(--wine); }
.db-events__meta { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.sidebar-widget .db-events__all { display: inline-block; margin-top: 2px; color: var(--wine); font-size: .9rem; font-weight: 600; text-decoration: none; }
.sidebar-widget .db-events__all:hover, .sidebar-widget .db-events__all:focus-visible { color: var(--wine-deep); }
.event-list { display: grid; gap: 18px; align-content: start; }
.event-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 18px 22px 18px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--paper); }
.event-card__meta { margin: 0 0 10px; color: var(--muted); }
.event-card__summary { display: -webkit-box; overflow: hidden; margin: -4px 0 10px; color: var(--ink); -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; }
.event-card__poster { display: block; width: 110px; }
.event-card__poster img { display: block; width: 100%; height: auto; border: 1px solid var(--line); }
.event__past { display: inline-flex; align-items: center; gap: 10px; margin: 18px 0 0; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--cream); font-size: .93rem; }
.event__past::before { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); content: ""; }
.event__lead { max-width: 62ch; margin: 14px 0 0; color: var(--ink); font-size: 1.12rem; line-height: 1.55; text-wrap: pretty; }
.event__status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 18px; }
.event__status .event__past { margin: 0; }
.event__report { color: var(--wine); font-weight: 600; text-decoration: none; }
.event__report:hover, .event__report:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
.event__body { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 32px; align-items: start; margin-top: 26px; }
.event__body--no-poster { grid-template-columns: auto minmax(0, 1fr); }
.event__poster { position: relative; display: block; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: zoom-in; }
.event__poster img { display: block; width: 100%; height: auto; transition: transform .6s var(--ease-out); }
.event__poster:hover img, .event__poster:focus-visible img { transform: scale(1.02); }
.event__zoom { position: absolute; right: 10px; bottom: 10px; display: grid; width: 38px; height: 38px; place-items: center; border-radius: 50%; color: var(--navy); background: rgba(255, 250, 241, .9); box-shadow: 0 4px 12px rgba(19, 48, 79, .2); }
.event__zoom svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.event__facts { display: grid; margin: 0; }
.event__facts > div { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.event__facts > div:first-child { padding-top: 0; }
.event__facts dt { color: var(--wine); font-size: .74rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.event__facts dd { margin: 4px 0 0; color: var(--ink); font-family: var(--serif); font-size: 1.15rem; line-height: 1.3; }
.event__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.lightbox { max-width: min(92vw, 900px); max-height: 92vh; padding: 0; overflow: visible; border: 0; background: transparent; }
.lightbox::backdrop { background: rgba(11, 33, 56, .84); }
.lightbox img { display: block; width: auto; max-width: 100%; height: auto; max-height: 92vh; margin: auto; }
.lightbox__close { position: absolute; top: -16px; right: -16px; display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--navy); background: var(--paper); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); cursor: pointer; }
.lightbox__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.aside-today__text { display: grid; gap: 2px; }
.aside-today__text strong { color: var(--navy); font-size: 1rem; }
.aside-today__text > span { color: var(--wine); font-size: .9rem; font-weight: 600; }
.aside-today__feast { display: -webkit-box; overflow: hidden; color: var(--muted); font-family: var(--serif); font-size: .85rem; font-style: normal; line-height: 1.3; -webkit-box-orient: vertical; -webkit-line-clamp: 3; text-wrap: balance; }
.aside-today__feast.is-red { color: var(--wine); }
.aside-today__feast + span { margin-top: 3px; }
/* Title of the today widget, when set: like «Ближайшие богослужения», with a gold line. */
.sidebar-widget.widget_domblag_today > .widget-title { margin-bottom: 12px; }
.sidebar-widget.widget_domblag_today > .widget-title::after { display: block; height: 1px; margin-top: 10px; background: linear-gradient(90deg, var(--gold), rgba(201, 162, 79, 0)); content: ""; }

/* ---------- Temples ---------- */
.temples { position: relative; margin-top: 96px; padding: 80px 0 88px; overflow: hidden; color: var(--on-navy); background: var(--navy); border-radius: 0; }
.temples::before { position: absolute; top: -220px; left: 50%; width: 900px; height: 440px; border: 1px solid rgba(201, 162, 79, .22); border-radius: 50%; content: ""; transform: translateX(-50%); pointer-events: none; }
.temples__head { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 36px; }
.temples__head h2 { color: #fff; }
.temples__head p { max-width: 52ch; margin: 14px 0 0; color: var(--on-navy-muted); }
.temples__controls { display: flex; align-items: center; gap: 10px; }
.round-button { display: inline-grid; width: 48px; height: 48px; place-items: center; padding: 0; border: 1px solid rgba(246, 239, 225, .4); border-radius: 50%; color: var(--on-navy); background: transparent; font-size: 20px; cursor: pointer; transition: background-color .2s ease, color .2s ease, opacity .2s ease; }
.round-button:hover:not(:disabled), .round-button:focus-visible { color: var(--navy-deep); background: var(--on-navy); }
.round-button:disabled { cursor: default; opacity: .35; }
.temples__viewport { overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-padding-inline: max(24px, calc((100vw - var(--content)) / 2)); scrollbar-width: none; }
.temples__viewport::-webkit-scrollbar { display: none; }
.temples__viewport:focus-visible { outline-offset: -3px; }
.temples__track { display: flex; gap: 20px; width: max-content; margin: 0; padding: 4px max(24px, calc((100vw - var(--content)) / 2)) 8px; list-style: none; }
.temple-card { width: clamp(220px, 22vw, 272px); flex: none; scroll-snap-align: start; }
.temple-card a { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; border-radius: var(--radius-lg) var(--radius-lg) var(--radius) var(--radius); color: #fff; background: var(--navy-deep); text-decoration: none; }
.temple-card a::before { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(11, 33, 56, 0) 42%, rgba(11, 33, 56, .92) 100%); content: ""; }
.temple-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease-out); }
.temple-card a:hover img, .temple-card a:focus-visible img { transform: scale(1.05); }
.temple-card__body { position: absolute; right: 0; bottom: 0; left: 0; z-index: 2; display: grid; gap: 6px; padding: 20px; }
.temple-card__year { justify-self: start; padding: 3px 10px; border: 1px solid rgba(231, 199, 124, .7); border-radius: 999px; color: var(--gold-light); font-size: .78rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.temple-card strong { font-family: var(--serif); font-size: 1.18rem; line-height: 1.2; overflow-wrap: break-word; hyphens: auto; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 88px); align-items: start; padding-top: 96px; }
.about__text p { max-width: 58ch; margin: 22px 0 0; color: var(--muted); font-size: 1.05rem; }
.about__text .link-arrow { margin-top: 26px; }
.about__index { margin: 0; padding: 0; border-top: 2px solid var(--navy); list-style: none; }
.about__index a { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 6px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 22px; }
.about__index a > span { display: grid; gap: 2px; }
.about__index strong { color: var(--navy); font-family: var(--serif); font-size: 1.22rem; font-weight: 700; line-height: 1.2; transition: color .2s ease; }
.about__index small { color: var(--muted); font-size: .9rem; }
.about__index .icon { color: var(--gold-deep); transition: transform .35s var(--ease-out); }
.about__index a:hover strong, .about__index a:focus strong { color: var(--wine); }
.about__index a:hover .icon, .about__index a:focus .icon { transform: translateX(6px); }

/* ---------- Visit ---------- */
.visit { padding-top: 96px; }
.visit__card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; border-radius: var(--radius-lg); color: var(--on-navy); background: var(--navy-deep); box-shadow: var(--shadow); }
.visit__info { padding: clamp(32px, 5vw, 56px); }
.visit h2 { color: #fff; }
.visit__address { max-width: 36ch; margin: 18px 0 20px; color: var(--on-navy); font-size: 1.1rem; }
.visit__contacts { display: grid; gap: 6px; margin: 0 0 30px; padding: 0; list-style: none; }
.visit__contacts a { color: var(--gold-light); font-size: 1.12rem; font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.visit__contacts a:hover, .visit__contacts a:focus { color: #fff; text-decoration: underline; }
.visit__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.visit__map { position: relative; min-height: 360px; background: var(--sand); }
.visit__map .site-map { position: absolute; inset: 0; }
.site-map { position: relative; min-height: 320px; overflow: hidden; background: var(--sand); }
.site-map__loader { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: .9rem; }
.site-map__spinner { width: 42px; height: 42px; border: 3px solid rgba(201, 162, 79, .25); border-top-color: var(--gold); border-radius: 50%; animation: site-map-spin .9s linear infinite; }
.site-map.is-live .site-map__loader { display: none; }
@keyframes site-map-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .footer-social__link::after { transition: none; } .site-map__spinner { animation-duration: 2.4s; } }
@media (prefers-reduced-motion: reduce) { .db-sheet--slider .db-sheet__slide :is(.db-sheet__date, .db-sheet__body) > *, .db-line--slider .db-line__list li > a { transform: none !important; } }
.site-map__canvas, .site-map iframe { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; border: 0; }
.site-map__marker-pin img { filter: drop-shadow(0 6px 10px rgba(11, 33, 56, .35)); }
.site-map__marker { position: relative; width: 0; height: 0; }
.site-map__marker-pin { position: absolute; bottom: 0; left: 0; display: block; padding: 0; border: 0; background: none; cursor: pointer; transform: translateX(-50%); transition: transform .25s var(--ease-out); }
.site-map__marker-pin:hover, .site-map__marker-pin:focus-visible { transform: translateX(-50%) translateY(-3px); }
.site-map__marker-pin { width: 48px; height: 60px; }
.site-map__marker-pin img { display: block; width: 48px; max-width: none; height: 60px; }
.site-map__card { position: absolute; bottom: 72px; left: 0; display: none; width: min(300px, 76vw); padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); background: var(--paper); box-shadow: 0 18px 40px rgba(11, 33, 56, .28); font: 400 .88rem/1.45 var(--sans); transform: translateX(-50%); }
.site-map__card::after { position: absolute; bottom: -8px; left: 50%; width: 14px; height: 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); content: ""; transform: translateX(-50%) rotate(45deg); }
.site-map__marker.is-open .site-map__card { display: grid; gap: 4px; }
.site-map__card strong { padding-right: 22px; color: var(--navy); font-family: var(--serif); font-size: 1.02rem; line-height: 1.25; }
.site-map__card span { color: var(--muted); }
.site-map__card-kicker { color: var(--wine); font-size: .68rem; font-style: normal; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.site-map__card-contacts { display: grid; gap: 1px; margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.site-map__card-contacts a { color: var(--navy); font-weight: 600; text-decoration: none; }
.site-map__card-contacts a:last-child:not(:first-child) { font-weight: 400; }
.site-map__card-contacts a:hover { color: var(--wine); }
.site-map__card-link { justify-self: center; color: var(--wine); font-size: .84rem; font-weight: 600; text-decoration: none; }
.site-map__card-link:hover { color: var(--wine-deep); }
.site-map__card-route { min-height: 40px; margin-top: 8px; padding: 8px 18px; font-size: .88rem; }
.site-map__card-close { position: absolute; top: 8px; right: 8px; display: grid; width: 28px; height: 28px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--muted); background: transparent; cursor: pointer; }
.site-map__card-close:hover { color: var(--navy); background: var(--cream); }
.site-map__card-close svg, .site-map__controls svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
/* Yandex attribution stays visible (API terms): terms link under the logo; their own «Открыть Яндекс Карты» button is hidden, the card has «Открыть на карте». */
.site-map .ymaps3--map-copyrights { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.site-map .ymaps3--map-copyrights__logo { order: -1; }
.site-map .ymaps3--control-button:has(.ymaps3--open-maps-button) { display: none; }
.site-map__controls { position: absolute; top: 14px; right: 14px; z-index: 3; display: grid; gap: 8px; }
.site-map__controls button { display: grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-light); background: var(--navy); box-shadow: 0 6px 16px rgba(11, 33, 56, .25); cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.site-map__controls button:hover, .site-map__controls button:focus-visible { color: var(--navy); background: var(--gold-light); }
.site-map__controls svg { width: 18px; height: 18px; }
.site-map:fullscreen { border-radius: 0; }
.site-map__balloon { max-width: 240px; color: #1d2733; font: 400 14px/1.45 var(--sans); }
.site-map__balloon strong { display: block; margin-bottom: 4px; color: var(--navy); font-family: var(--serif); font-size: 16px; line-height: 1.25; }
.site-map__balloon a { color: var(--wine); font-weight: 600; }

/* ---------- Inner pages (inherited structure) ---------- */
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 48px 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.section-heading h1, .section-heading h2 { margin: 0; color: var(--navy); font-family: var(--serif); font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem); font-weight: 700; line-height: 1.08; letter-spacing: -.015em; }
.section-heading p { margin: 6px 0 0; color: var(--muted); }
.content-container > .section-heading:first-child { margin-top: 0; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.post-list { display: grid; gap: 18px; }
.post-card { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; padding: 18px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--paper); box-shadow: 0 6px 18px -12px rgba(38, 32, 25, .2); }
.post-card__thumb { overflow: hidden; border-radius: var(--radius-sm); background: var(--sand); aspect-ratio: 1.35; }
.post-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.post-card:hover .post-card__thumb img { transform: scale(1.04); }
.post-card__meta { color: var(--wine); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.post-card__title { margin: 6px 0 9px; color: var(--ink); font-family: var(--serif); font-size: 1.25rem; font-weight: 700; line-height: 1.18; }
.post-card__title a { color: inherit; text-decoration: none; }
.post-card__title a:hover, .post-card__title a:focus { color: var(--wine); }
.post-card__excerpt { margin: 0 0 12px; color: var(--muted); }
.post-card--announcement { border-color: var(--line); background: var(--cream); }
/* The poster in full height, not cropped. */
.post-card--announcement .post-card__thumb { align-self: start; aspect-ratio: auto; }
.post-card--announcement .post-card__thumb img { height: auto; object-fit: contain; }
/* «Подробнее» at the bottom of the card, level with the poster's lower edge. */
.post-card--announcement .post-card__content { display: flex; flex-direction: column; align-items: flex-start; }
.post-card--announcement .read-more { margin-top: auto; }
.post-card__badge { display: inline-block; margin: 0 10px 4px 0; padding: 3px 10px; border-radius: 999px; color: #fff; background: var(--wine); font-size: .7rem; letter-spacing: .1em; vertical-align: 1px; }
.read-more { font-size: .88rem; font-weight: 600; text-decoration: none; }
.entry { padding: clamp(20px, 2.6vw, 34px) clamp(20px, 3.4vw, 44px) clamp(24px, 3.4vw, 44px); border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: var(--paper); box-shadow: 0 6px 18px -12px rgba(38, 32, 25, .2); }
.entry-header h1 { margin: 0; color: var(--navy); font-family: var(--serif); font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.15rem); font-weight: 700; line-height: 1.08; letter-spacing: -.015em; }
.entry-header h1 + .entry-meta { margin-top: 10px; }
.entry-meta { color: var(--wine); font-size: .82rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.entry-featured img { width: 100%; margin-top: 20px; aspect-ratio: 45 / 28; object-fit: cover; border-radius: var(--radius); }
.entry-content { margin-top: 24px; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { color: var(--navy); font-family: var(--serif); line-height: 1.2; }
.entry-content h2 { font-size: 1.45rem; }
.entry-content h3 { font-size: 1.22rem; }
.entry-content h4 { font-size: 1.06rem; }
.entry-content a { overflow-wrap: anywhere; }
.page-id-97 .entry-content .school-page { max-width: 68ch; }
.school-page__intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; padding-bottom: 24px; border-bottom: 1px solid var(--line-soft); }
.school-page__lead { max-width: 48ch; margin: 0; color: var(--ink); font-family: var(--serif); font-size: clamp(1.16rem, 1.05rem + .35vw, 1.38rem); line-height: 1.4; }
.school-page__founded { display: block; margin-top: 10px; color: var(--muted); font-family: var(--sans); font-size: .9rem; }
.school-page__week { display: grid; gap: 3px; width: 220px; padding: 16px 18px; border-radius: 14px; color: var(--on-navy); background: var(--navy); }
.school-page__week > * { margin: 0; }
.school-page__week-label { display: block; margin-bottom: 6px; color: var(--gold-light); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.school-page__week strong { display: block; color: inherit; font-family: var(--serif); font-size: 1.55rem; line-height: 1.15; }
.school-page__week span:last-child { display: block; color: var(--on-navy-muted); font-size: .82rem; white-space: nowrap; }
.school-page { container-type: inline-size; }
.school-page__hero { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; align-items: center; padding-bottom: 26px; border-bottom: 1px solid var(--line-soft); }
.school-page__logo { display: grid; margin: 0; padding: 14px 14px 0; place-items: end center; border-radius: 75px 75px 14px 14px; background: radial-gradient(circle at 50% 35%, rgba(255, 233, 150, .55), transparent 70%), var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.school-page__logo img { display: block; width: 100%; height: auto; }
.school-page__hero-text { display: grid; gap: 10px; }
.school-page__kicker { color: var(--wine); font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.school-page__hero .school-page__lead { max-width: none; font-size: clamp(1.05rem, 1rem + .25vw, 1.2rem); line-height: 1.55; }
.school-page__hero .school-page__lead::first-letter { float: left; margin: .06em .12em 0 0; color: var(--wine); font-size: 3.2em; font-weight: 700; line-height: .82; text-shadow: 2px 2px 0 rgba(201, 162, 79, .45); }
.school-page__cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 24px 0 0; padding: 0; list-style: none; }
.school-page__card { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 20px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--paper); }
.school-page__card-icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 50%; color: var(--wine); background: rgba(201, 162, 79, .18); box-shadow: inset 0 0 0 1px rgba(201, 162, 79, .45); }
.school-page__card-icon .icon { width: 24px; height: 24px; stroke-width: 2; }
.school-page__card small { display: block; margin-bottom: 3px; color: var(--wine); font-size: .76rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.school-page__card strong { display: block; color: var(--navy); font-family: var(--serif); font-size: 1.05rem; line-height: 1.3; }
.school-page__cta { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: center; margin-top: 24px; overflow: hidden; padding: 24px 26px; border-radius: var(--radius); color: var(--on-navy); background: var(--navy); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.school-page__cta::before { position: absolute; top: 0; left: 0; width: 5px; height: 100%; background: linear-gradient(var(--gold-light), var(--gold-deep)); content: ""; }
.school-page__cta:hover, .school-page__cta:focus-visible { box-shadow: 0 14px 30px rgba(18, 35, 66, .28); transform: translateY(-2px); }
.school-page__cta:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.school-page__cta-text { position: relative; display: grid; gap: 4px; min-width: 0; }
.school-page__cta-label { color: var(--gold-light); font-size: .76rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.school-page__cta strong { color: #fff; font-family: var(--serif); font-size: 1.45rem; line-height: 1.2; }
.school-page__cta-url { color: var(--on-navy-muted); font-size: .9rem; overflow-wrap: anywhere; }
.school-page__cta-button { position: relative; display: inline-flex; min-height: 54px; align-items: center; gap: 10px; padding: 12px 26px; border-radius: 999px; color: var(--navy); background: linear-gradient(180deg, var(--gold-light), var(--gold)); font-size: 1.08rem; font-weight: 700; white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, .22); }
.school-page__cta-button .icon { display: block; width: 18px; height: 18px; }
.school-page__cta:hover .school-page__cta-button { background: linear-gradient(180deg, #fff3cf, var(--gold-light)); }
.school-page__facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 30px; margin: 8px 0 0; }
.school-page__fact { padding: 17px 0 14px; border-bottom: 1px solid var(--line-soft); }
.school-page__fact dt { margin-bottom: 5px; color: var(--wine); font-size: .82rem; font-weight: 700; }
.school-page__fact dd { margin: 0; color: var(--ink); }
.school-page__contacts { margin-top: 28px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--cream); }
.school-page__contacts h2 { margin: 0 0 12px; font-size: 1.35rem; }
.school-page__address { margin: 0 0 20px; color: var(--muted); font-size: .95rem; font-style: normal; line-height: 1.5; }
.school-page__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
.school-page__link { display: inline-flex; min-width: 0; min-height: 54px; align-items: center; justify-content: flex-start; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); color: var(--navy); font-size: .92rem; font-weight: 600; line-height: 1.3; text-align: left; text-decoration: none; }
.school-page__link-label { min-width: 0; overflow-wrap: anywhere; }
.school-page__link--nowrap .school-page__link-label { font-size: inherit; }
.school-page__action-icon { display: inline-flex; flex: none; }
.school-page__action-icon .icon, .school-page__action-icon .social-icon { display: block; width: 18px; height: 18px; }
.school-page__link:hover, .school-page__link:focus-visible { color: var(--wine); }
.school-page__link--primary { color: var(--wine); font-size: 1rem; font-weight: 700; }
.school-page__link--primary:hover, .school-page__link--primary:focus-visible { color: var(--wine-deep); }
.school-page__archive { margin-top: 24px; border-top: 1px solid var(--line-soft); }
.school-page__archive summary { min-height: 48px; padding: 14px 2px 8px; color: var(--navy); font-weight: 650; cursor: pointer; }
.school-page__archive summary:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.school-page__archive figure { margin: 14px 0 0; }
.school-page__archive figcaption { color: var(--muted); font-size: .88rem; }
.entry-content img { margin: 1.5rem auto; border-radius: 10px; }
.entry-content iframe { width: 100%; min-height: 380px; border: 0; }
.entry-content iframe[src*="youtube.com/embed/"] { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
.entry-content .wp-block-embed { margin: 28px 0; }
.entry-content .wp-block-embed iframe { display: block; height: auto; min-height: 0; aspect-ratio: 16 / 9; border-radius: 10px; }
.entry-content blockquote { margin: 24px 0; padding: 18px 22px; border-radius: var(--radius-sm); background: var(--cream); color: var(--navy); font-family: var(--serif); font-size: 1.18rem; box-shadow: inset 1px 0 0 var(--gold); }
/* Block styles registered in functions.php («Врезка», «Цитата благочиния», «Кнопка сайта»), same in assets/editor.css. */
.entry-content .is-style-domblag-callout { padding: 18px 22px; border-left: 3px solid var(--gold); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--cream); }
.entry-content .wp-block-quote.is-style-domblag-quote { padding: 26px 30px; border-radius: var(--radius); color: var(--on-navy); background: var(--navy); box-shadow: none; }
.entry-content .wp-block-quote.is-style-domblag-quote cite { color: var(--gold-light); }
.entry-content .wp-block-button.is-style-domblag-button .wp-block-button__link { padding: 13px 26px; border-radius: 999px; color: #fff; background: var(--wine); font-size: 1rem; font-weight: 600; text-decoration: none; }
.entry-content .wp-block-button.is-style-domblag-button .wp-block-button__link:hover { background: var(--wine-deep); }
.entry-content .wp-block-gallery.has-nested-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 32px 0 0; }
.entry-content .wp-block-gallery.has-nested-images.columns-1 { grid-template-columns: minmax(0, 1fr); }
.entry-content .wp-block-gallery.has-nested-images.columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.entry-content .wp-block-gallery.has-nested-images:is(.columns-4, .columns-5, .columns-6, .columns-7, .columns-8) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image { width: auto !important; margin: 0 !important; overflow: hidden; border-radius: var(--radius-sm); background: var(--sand); }
.entry-content .wp-block-gallery.has-nested-images:not(.columns-1) figure.wp-block-image { aspect-ratio: 4 / 3; }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image img { margin: 0; border-radius: 0; transition: transform .5s var(--ease-out); }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image a:hover img, .entry-content .wp-block-gallery.has-nested-images figure.wp-block-image a:focus-visible img { transform: scale(1.04); }
/* A gallery with captions (photos of the places of a saint's life, with the author and licence): the photo on top, the caption below it. */
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image.wp-block-image:has(figcaption) { display: block; aspect-ratio: auto; border: 1px solid var(--line-soft); background: var(--paper); }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption)::before { display: none; }
/* :not(#individual-image) matches the weight of the core «is-cropped» rule that stretches the link and the photo to the whole figure. */
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):has(figcaption) > a { display: block; flex: none; height: auto; overflow: hidden; background: var(--sand); }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image):has(figcaption) img { flex: none; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.entry-content .wp-block-gallery.has-nested-images figure.wp-block-image figcaption { position: static; max-height: none; margin: 0; padding: 8px 10px 10px; overflow: visible; color: var(--ink); background: none; font-size: .78rem; line-height: 1.4; text-align: left; text-shadow: none; }
.entry-content .wp-block-gallery figcaption .photo-credit { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; }
.entry-content .wp-block-gallery figcaption .photo-credit a { color: inherit; }
.entry-content .source-note { margin-top: 1.4em; color: var(--muted); font-size: .85rem; }
.entry-content .source-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.entry-content .wp-block-gallery.has-nested-images:not(.columns-1):has(figcaption) { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
/* After a floated portrait the photos and their heading start under it, across the whole width. */
.entry--split .entry-content > .wp-block-gallery, .entry--split .entry-content > :is(h2, h3):has(+ .wp-block-gallery) { clear: both; }
.entry-content > :is(h2, h3):has(+ .wp-block-gallery) { margin-top: 36px; }
.entry--split .entry-content > :is(h2, h3):has(+ .wp-block-gallery) + .wp-block-gallery { margin-top: 14px; }

.calendar__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.calendar__head h1 { margin: 0; }
.calendar-nav { display: flex; align-items: center; gap: 8px; }
.calendar-nav .round-button { width: 44px; height: 44px; border-color: var(--line); color: var(--navy); }
.calendar-nav .round-button:hover, .calendar-nav .round-button:focus-visible { border-color: var(--navy); color: #fff; background: var(--navy); }
.calendar-nav .round-button .icon { width: 20px; height: 20px; }
.calendar-nav__today { display: inline-flex; min-height: 44px; align-items: center; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; color: var(--wine); font-size: .92rem; font-weight: 600; text-decoration: none; }
.calendar-nav__today:hover, .calendar-nav__today:focus-visible { border-color: var(--gold); color: var(--wine); }
.calendar-day { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 26px; padding: clamp(22px, 3vw, 32px); border-radius: var(--radius); color: var(--on-navy); background: var(--navy); box-shadow: var(--shadow-soft); }
.calendar-day--icon { grid-template-columns: minmax(0, 1fr) auto; }
.calendar-day--icon > :not(.calendar-day__icon) { grid-column: 1; }
.calendar-day__date { display: flex; align-items: center; gap: 20px; }
.calendar-day__text { display: grid; gap: 4px; }
.calendar-day__text strong { color: #fff; font-family: var(--serif); font-size: clamp(1.3rem, 1.1rem + .8vw, 1.7rem); line-height: 1.15; }
.calendar-day__text > span { color: var(--on-navy-muted); }
.calendar-day__old { color: var(--gold-light) !important; font-size: .92rem; }
.calendar-day__holiday { margin: 0; color: var(--gold-light); font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.3; }
.calendar-day__marks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.calendar-mark { padding: 7px 13px; border: 1px solid rgba(231, 199, 124, .38); border-radius: 999px; color: var(--on-navy); font-size: .88rem; line-height: 1.3; }
.calendar-mark--post { border-color: rgba(231, 199, 124, .7); color: var(--gold-light); }
.calendar-day__icon { grid-column: 2; grid-row: 1 / span 4; align-self: start; margin: 0; text-align: center; }
.calendar-day__icon img { display: block; width: 128px; height: auto; border: 3px solid var(--gold); border-radius: 10px; box-shadow: 0 12px 26px -12px rgba(0, 0, 0, .6); }
.calendar-day__icon figcaption { margin-top: 8px; color: var(--on-navy-muted); font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; }
.calendar-block { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.calendar-block h2 { margin: 0 0 14px; color: var(--navy); font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.calendar-saints p { max-width: 72ch; margin: 0 0 14px; line-height: 1.7; }
.calendar-saints p:last-child { margin-bottom: 0; }
.calendar-saints a, .calendar-readings a, .calendar-feofan a { color: var(--navy); text-decoration: underline; text-decoration-color: rgba(201, 162, 79, .55); text-underline-offset: 3px; }
.calendar-saints a:hover, .calendar-readings a:hover, .calendar-feofan a:hover { color: var(--wine); text-decoration-color: var(--wine); }
.calendar-saints .dd-feast, .calendar-saints .dd-feast a { color: var(--wine); font-family: var(--serif); font-size: 1.12rem; font-weight: 700; }
.calendar-readings { max-width: 72ch; margin: 0; line-height: 1.7; }
.calendar-feofan summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; cursor: pointer; list-style: none; }
.calendar-feofan summary::-webkit-details-marker { display: none; }
.calendar-feofan summary h2 { margin: 0; }
.calendar-feofan summary h2::after { display: inline-block; width: 9px; height: 9px; margin: 0 0 5px 12px; border-right: 2px solid var(--gold-deep); border-bottom: 2px solid var(--gold-deep); content: ""; transform: rotate(45deg); transition: transform .25s var(--ease-out); vertical-align: middle; }
.calendar-feofan[open] summary h2::after { margin-bottom: -2px; transform: rotate(-135deg); }
.calendar-feofan summary > span { color: var(--muted); font-size: .92rem; }
.calendar-feofan__text { max-width: 72ch; margin-top: 16px; line-height: 1.75; }
.calendar-feofan__text p { margin: 0 0 14px; }
.calendar-empty { margin-top: 24px; padding: 18px 20px; border-radius: var(--radius-sm); background: var(--cream); }
.calendar-source { margin: 30px 0 0; color: var(--muted); font-size: .85rem; }
.calendar-source a { color: var(--muted); }
/* Contacts page: the dark card repeats the calendar's day card, sections reuse .calendar-block. */
.contacts__lead { margin: 8px 0 0; color: var(--muted); font-size: 1.02rem; }
.contacts-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); margin-top: 26px; overflow: hidden; border-radius: var(--radius); color: var(--on-navy); background: var(--navy); box-shadow: var(--shadow-soft); }
.contacts-card__info { display: grid; align-content: start; gap: 26px; padding: clamp(22px, 3vw, 32px); }
.contacts-card__list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.contacts-card__list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; align-items: start; }
.contacts-card__list li > span:last-child { display: grid; gap: 3px; padding-top: 1px; }
.contacts-card__icon { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(231, 199, 124, .38); border-radius: 50%; color: var(--gold-light); font-size: 18px; }
.contacts-card__label { color: var(--on-navy-muted); font-size: .74rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.contacts-card__value { color: #fff; font-size: 1.02rem; line-height: 1.45; }
a.contacts-card__value { width: fit-content; color: var(--gold-light); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
a.contacts-card__value:hover, a.contacts-card__value:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
/* Phone with its note: «+7 (495) 790-47-33 · Канцелярия» (contacts, footer, home). */
.contacts-card__phone, .footer-contacts .footer-contacts__phone, .visit__contacts li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.contacts-card__phone small, .footer-contacts__phone small, .visit__contacts small { color: var(--on-navy-muted); font-size: .86rem; }
.contacts-card__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.contacts-card__social { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 22px; border-top: 1px solid rgba(231, 199, 124, .22); }
.contacts-card__social a { display: inline-flex; min-height: 40px; align-items: center; gap: 8px; padding: 6px 15px 6px 11px; border: 1px solid rgba(231, 199, 124, .32); border-radius: 999px; color: var(--on-navy); font-size: .86rem; font-weight: 600; text-decoration: none; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.contacts-card__social .social-icon { width: 18px; height: 18px; color: var(--gold-light); transition: color .2s ease; }
.contacts-card__social a:hover, .contacts-card__social a:focus-visible { color: var(--navy-deep); border-color: var(--gold-light); background: var(--gold-light); }
.contacts-card__social a:hover .social-icon, .contacts-card__social a:focus-visible .social-icon { color: var(--navy-deep); }
.contacts-card__map { position: relative; min-height: 440px; background: var(--sand); }
.contacts-card__map .site-map { position: absolute; inset: 0; min-height: 0; }
.contacts { container-type: inline-size; }
@container (max-width: 700px) {
    .contacts-card { grid-template-columns: minmax(0, 1fr); }
    .contacts-card__map { order: -1; min-height: 300px; }
}
.contacts-block__note { max-width: 62ch; margin: -6px 0 18px; color: var(--muted); font-size: .95rem; }
.contacts-form .entry-content { margin-top: 0; }
.wpcf7 .cf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.wpcf7 .cf-field { display: grid; gap: 7px; }
.wpcf7 .cf-field--wide { grid-column: 1 / -1; }
.wpcf7 .cf-field__label { color: var(--navy); font-size: .9rem; font-weight: 600; }
.wpcf7 .cf-field__label abbr { color: var(--wine); text-decoration: none; }
.wpcf7 :is(input[type="text"], input[type="email"], textarea) { width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); background: #fff; line-height: 1.4; transition: border-color .2s ease, box-shadow .2s ease; }
.wpcf7 textarea { display: block; min-height: 160px; resize: vertical; }
.wpcf7 :is(input[type="text"], input[type="email"], textarea):hover { border-color: var(--gold); }
.wpcf7 :is(input[type="text"], input[type="email"], textarea):focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 79, .18); outline: none; }
.wpcf7 .wpcf7-not-valid { border-color: var(--wine); }
.wpcf7 .wpcf7-not-valid-tip { margin-top: 6px; color: var(--wine); font-size: .85rem; }
.wpcf7 .cf-consent { margin-top: 18px; color: var(--muted); font-size: .9rem; line-height: 1.5; }
.wpcf7 .cf-consent .wpcf7-list-item { margin: 0; }
.wpcf7 .cf-consent label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; cursor: pointer; }
.wpcf7 .cf-consent input[type="checkbox"] { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--wine); cursor: pointer; }
.wpcf7 .cf-consent a { color: var(--navy); text-decoration: underline; text-decoration-color: rgba(201, 162, 79, .6); text-underline-offset: 3px; }
.wpcf7 .cf-consent a:hover { color: var(--wine); }
.wpcf7 .wpcf7-submit:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.wpcf7 .cf-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 20px; }
.wpcf7 .cf-submit small { color: var(--muted); font-size: .85rem; }
.wpcf7 .wpcf7-spinner { margin: 0; }
.wpcf7 form .wpcf7-response-output { margin: 18px 0 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--cream); font-size: .95rem; }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--gold); }
.wpcf7 form:is(.invalid, .unaccepted, .failed, .aborted, .spam) .wpcf7-response-output { border-color: var(--wine); color: var(--wine); }
.contacts-details { margin: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--cream); }
.contacts-details > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; align-items: center; padding: 11px 12px 11px 18px; border-bottom: 1px solid var(--line-soft); }
.contacts-details > div:last-child { border-bottom: 0; }
.contacts-details dt { color: var(--muted); font-size: .88rem; }
.contacts-details dd { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 34px; margin: 0; }
.contacts-details__value { color: var(--navy); font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.contacts-details__purpose { grid-template-columns: minmax(0, 1fr) !important; gap: 6px !important; }
.contacts-details__purpose dd { align-items: flex-start; }
.contacts-details__purpose .contacts-details__value { font-weight: 500; line-height: 1.5; }
.contacts-copy { flex: none; min-height: 34px; padding: 5px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--wine); background: var(--paper); font-size: .8rem; font-weight: 600; cursor: pointer; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.contacts-copy:hover, .contacts-copy:focus-visible { border-color: var(--gold); }
.contacts-copy.is-copied { color: #fff; border-color: var(--navy); background: var(--navy); }
.pagination { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: center; width: 100%; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.pagination__side { display: flex; }
.pagination__side--next { justify-content: flex-end; }
.pagination .nav-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.pagination .page-numbers { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); background: var(--paper); font-size: .93rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1; text-decoration: none; transition: border-color .15s, color .15s, background-color .15s; }
.pagination .page-numbers:hover, .pagination .page-numbers:focus-visible { border-color: var(--gold); color: var(--wine); }
.pagination .page-numbers.current { color: #fff; border-color: var(--navy); background: var(--navy); }
.pagination .page-numbers.dots { min-width: 24px; padding-inline: 2px; border-color: transparent; color: var(--muted); background: transparent; }
.pagination .prev, .pagination .next { padding-inline: 20px; }

.sidebar { display: grid; gap: 20px; }
.sidebar .widget_nav_menu { display: none; }
.sidebar-widget { padding: 20px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--paper); }
.sidebar-widget img { margin-inline: auto; border-radius: var(--radius-sm); }
.widget-title { margin: 0 0 14px; color: var(--navy); font-family: var(--serif); font-size: 1.35rem; font-weight: 700; line-height: 1.2; }
.sidebar ul, .footer ul { margin: 0; padding-left: 18px; }
.sidebar li, .footer li { margin-bottom: 7px; }
.sidebar a, .footer a { color: inherit; }

/* ---------- Footer ---------- */
.footer { color: var(--on-navy); background: var(--navy-deep); }
.footer-main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr) minmax(0, 1.1fr) minmax(240px, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding: clamp(52px, 6vw, 76px) 0 48px; }
.footer-main > section { min-width: 0; }
.footer .sidebar-widget { padding: 0; border: 0; border-radius: 0; background: transparent; }
.footer h2, .footer .widget-title { margin: 0 0 18px; color: var(--gold-light); font-family: var(--serif); font-size: 1.3rem; font-weight: 700; line-height: 1.15; }
.footer p { max-width: 36ch; margin: 0 0 16px; color: var(--on-navy-muted); line-height: 1.6; }
.footer a { color: var(--on-navy); text-decoration: none; }
.footer a:hover, .footer a:focus { color: var(--gold-light); }
.footer ul { padding-left: 0; list-style: none; }
.footer li { margin: 0; }
.footer li + li { margin-top: 9px; }
.footer li ul { margin: 8px 0 0 14px; }
.footer-contacts { display: grid; gap: 14px; }
.footer .footer-contacts li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; margin: 0; color: var(--on-navy-muted); line-height: 1.5; }
.footer-contacts .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--gold-light); }
.footer-contacts span { display: grid; gap: 4px; }
.footer-contacts a { font-variant-numeric: tabular-nums; }
/* Bottom line: copyright with the privacy policy under it on the left, the site's credit on the right; stacked on phones. */
.footer-bottom { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 40px; padding: 20px 0 24px; border-top: 1px solid rgba(246, 239, 225, .14); color: var(--on-navy-muted); font-size: .84rem; line-height: 1.5; }
.footer-bottom__legal { display: grid; gap: 4px; }
.footer .footer-bottom__link { justify-self: start; color: var(--on-navy-muted); font-size: .8rem; text-decoration: underline; text-decoration-color: rgba(231, 199, 124, .35); text-underline-offset: 3px; }
.footer .footer-bottom__link:hover, .footer .footer-bottom__link:focus-visible { color: var(--gold-light); }
.footer .footer-bottom__credit { flex: none; max-width: none; margin: 0; color: var(--on-navy-muted); line-height: 1.5; text-align: right; }
.footer .footer-bottom__credit a { white-space: nowrap; color: var(--on-navy); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(231, 199, 124, .45); text-underline-offset: 3px; transition: color .2s var(--ease-out), text-decoration-color .2s var(--ease-out); }
.footer .footer-bottom__credit a:hover, .footer .footer-bottom__credit a:focus-visible { color: var(--gold-light); text-decoration-color: var(--gold-light); }
@media (max-width: 760px) { .footer-bottom { flex-direction: column; align-items: flex-start; } .footer .footer-bottom__credit { flex: initial; max-width: 100%; text-align: left; } }
/* Social links: long pills one under another, icon in the network's pastel colour, an arrow at the end. */
.footer-social { display: grid; gap: 8px; max-width: 300px; margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(231, 199, 124, .22); }
.footer-social__link { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 8px 18px 8px 12px; border: 1px solid rgba(231, 199, 124, .32); border-radius: 999px; color: var(--on-navy); font-size: .92rem; font-weight: 600; line-height: 1.2; transition: color .2s var(--ease-out), background-color .2s var(--ease-out), border-color .2s var(--ease-out); }
.footer-social__link::after { margin-left: auto; color: rgba(246, 239, 225, .45); font-size: .95rem; content: "↗"; transition: color .2s var(--ease-out), transform .25s var(--ease-out); }
.footer .footer-social__link:hover::after, .footer .footer-social__link:focus-visible::after { color: var(--navy-deep); transform: translate(2px, -2px); }
.footer .footer-social__link:hover, .footer .footer-social__link:focus-visible { color: var(--navy-deep); border-color: var(--social-color, var(--gold-light)); background: var(--social-color, var(--gold-light)); }
.footer-social__icon { display: inline-grid; flex: none; width: 24px; height: 24px; place-items: center; color: var(--social-color, var(--gold-light)); transition: color .2s var(--ease-out); }
/* Network colours close to the official ones, softened to the site's pastel palette so they sit calmly on navy. */
.footer-social__link--vk { --social-color: #9dbcf2; }
.footer-social__link--telegram { --social-color: #94cfee; }
.footer-social__link--max { --social-color: #b9a8f0; }
.footer-social__icon .social-icon { width: 24px; height: 24px; }
.footer-social__link:hover .footer-social__icon, .footer-social__link:focus-visible .footer-social__icon { color: var(--navy-deep); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .masthead__phone { display: none; }
    .primary-nav .menu > li > a { padding-inline: 10px; font-size: .9rem; }
    .primary-nav .menu > li > a::after { right: 10px; left: 10px; }
    .primary-nav .menu > .menu-item-has-children > a { padding-right: 26px; }
    .quick-rail__item { gap: 10px; padding-inline: 12px; }
    .quick-rail__icon { width: 40px; height: 40px; font-size: 21px; }
}

/* Five in a row need about 1250px; below that the quick links become tiles. */
@media (max-width: 1249px) {
    /* Tiles instead of a rail: three on the first row, the last two share the second row half and half. */
    .quick-rail { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 8px; }
    .quick-rail__item { grid-column: span 2; border: 1px solid var(--line-soft); background: var(--cream); }
    .quick-rail__item::before { display: none; }
    .quick-rail__item:hover, .quick-rail__item:focus-visible { border-color: var(--gold); background: var(--sand); }
    .quick-rail__icon { background: var(--paper); }
}

@media (max-width: 1024px) {
    .news-layout, .content-layout { grid-template-columns: minmax(0, 1fr) 290px; gap: 28px; }
    .news-row { grid-template-columns: 64px minmax(0, 1fr) 132px; gap: 18px; }
    .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .about { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .contacts-details > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
    .wpcf7 .cf-grid { grid-template-columns: minmax(0, 1fr); }
    .utility-bar__church { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .masthead { min-height: 76px; }
    .masthead__cta { display: none; }
    .brand__emblem { width: 48px; height: 48px; }
    .primary-nav-inner { min-height: 60px; }
    .mobile-toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px 0 44px; border: 1px solid var(--line); border-radius: 999px; color: var(--navy); background: var(--paper); font-weight: 600; cursor: pointer; }
    .mobile-toggle::before, .mobile-toggle::after { position: absolute; left: 16px; width: 18px; height: 2px; border-radius: 2px; background: currentColor; content: ""; transition: transform .25s ease, box-shadow .25s ease, opacity .2s ease; }
    .mobile-toggle::before { box-shadow: 0 -5px currentColor, 0 5px currentColor; }
    .mobile-toggle::after { opacity: 0; }
    .primary-nav.is-open .mobile-toggle::before { box-shadow: none; transform: rotate(45deg); }
    .primary-nav.is-open .mobile-toggle::after { opacity: 1; transform: rotate(-45deg); }
    .primary-nav__cta { display: inline-flex; align-items: center; min-height: 44px; margin-left: auto; padding: 0 18px; border-radius: 999px; color: #fff; background: var(--wine); font-weight: 600; text-decoration: none; }
    .primary-nav__cta:hover, .primary-nav__cta:focus { color: #fff; background: var(--wine-deep); }
    .primary-nav .menu { position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; display: flex; width: min(86vw, 360px); flex-direction: column; gap: 2px; margin: 0; padding: 24px 18px 32px; overflow-y: auto; background: var(--paper); box-shadow: 16px 0 40px -12px rgba(11, 33, 56, .35); transform: translateX(-105%); transition: transform .35s var(--ease-out), visibility .35s; visibility: hidden; }
    .primary-nav.is-open .menu { transform: none; visibility: visible; }
    .menu-backdrop { position: fixed; inset: 0; z-index: 25; display: block; padding: 0; border: 0; background: rgba(11, 33, 56, .4); opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s; }
    .primary-nav.is-open .menu-backdrop { opacity: 1; visibility: visible; }
    .primary-nav.is-open .mobile-toggle { position: fixed; top: 14px; left: min(calc(86vw - 64px), 296px); z-index: 31; width: 48px; padding: 0; font-size: 0; }
    .primary-nav.is-open .mobile-toggle::before, .primary-nav.is-open .mobile-toggle::after { left: 14px; }
    .primary-nav .menu > li > a { min-height: 50px; padding: 0 14px; border-radius: 12px; font-size: 1.02rem; white-space: normal; }
    .primary-nav .menu > li > a::after, .primary-nav .menu > .menu-item-has-children > a::before { display: none; }
    .primary-nav .menu > li > a:hover, .primary-nav .menu > .current-menu-item > a { background: var(--cream); }
    .primary-nav .sub-menu { position: static; min-width: 0; padding: 0 0 6px 14px; border: 0; background: transparent; box-shadow: none; opacity: 1; visibility: visible; transform: none; }
    .primary-nav .sub-menu a { padding: 9px 14px; }
    body.admin-bar .primary-nav .menu { top: 46px; }

    .news-layout, .content-layout { grid-template-columns: minmax(0, 1fr); }
    .news-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-aside .sidebar { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .news-aside .sidebar .widget_domblag_banner_list { grid-column: 1 / -1; }
    .db-banner-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sidebar { order: 2; }
    .visit__card { grid-template-columns: 1fr; }
    .visit__map { min-height: 320px; }
}

@media (min-width: 701px) and (max-width: 1249px) {
    .quick-rail__item:nth-last-child(-n+2):nth-child(3n+1), .quick-rail__item:nth-last-child(-n+2):nth-child(3n+1) + .quick-rail__item { grid-column: span 3; }
}

@media (max-width: 700px) {
    .pagination { gap: 8px; margin-top: 32px; padding-top: 22px; }
    .pagination .nav-links { gap: 6px; }
    .pagination .prev, .pagination .next { padding-inline: 14px; }
    .pagination__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .school-page__intro { grid-template-columns: 1fr; gap: 16px; }
    .school-page__week { width: 100%; }
    .school-page__hero { grid-template-columns: 1fr; gap: 18px; }
    .school-page__logo { width: 140px; justify-self: center; }
    .school-page__cta { grid-template-columns: 1fr; padding: 20px; }
    .school-page__cta-button { justify-content: center; width: 100%; }
    .school-page__facts { grid-template-columns: 1fr; }
    .school-page__contacts { padding: 18px; }
    .school-page__links { grid-template-columns: 1fr; }
    .event__body, .event__body--no-poster { grid-template-columns: 1fr; gap: 22px; }
    .event__poster { max-width: 360px; }
    .event-card { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 16px 16px 16px 8px; }
    .event-card__poster { display: none; }
    .lightbox__close { top: 8px; right: 8px; }
    body { font-size: 16px; }
    .entry-content .wp-block-gallery.has-nested-images:not(.columns-1) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
    .entry-content .wp-block-gallery.has-nested-images:not(.columns-1):has(figcaption) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .container, .content-container { width: min(calc(100% - 32px), var(--content)); }
    .utility-bar { display: none; }
    .brand { gap: 10px; }
    .brand__name { font-size: 1.14rem; }
    .brand__sub { font-size: .66rem; letter-spacing: .12em; }
    .search-toggle { width: 44px; height: 44px; }

    .hero { min-height: 0; justify-content: flex-end; }
    .hero__photo { position: relative; z-index: 0; height: 250px; object-position: 22% 40%; }
    .hero__shade { top: 170px; background: linear-gradient(180deg, rgba(11, 33, 56, 0) 0, var(--navy-deep) 80px); }
    .hero__inner { position: relative; z-index: 1; padding: 22px 0 96px; }
    .hero__title { font-size: 2rem; }
    .hero__lead { margin: 16px 0 24px; font-size: 1rem; }
    .hero__actions { display: grid; grid-template-columns: 1fr; }
    .hero__caption { display: none; }
    .hero::after { height: 48px; }

    /* Two tiles per row; an odd last tile takes the whole row. */
    .quick-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: -36px; padding: 6px; border-radius: 22px; }
    .quick-rail__item { grid-column: auto; gap: 10px; min-height: 60px; padding: 10px 12px; border-radius: 16px; }
    .quick-rail__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
    .quick-rail__icon { width: 36px; height: 36px; font-size: 19px; }
    .quick-rail__text strong { font-size: .92rem; }
    .quick-rail__text small { display: none; }
    .quick-rail__item:last-child:nth-child(odd) small { display: block; }

    .news-section { padding-top: 32px; }
    .news-section__head { margin-bottom: 20px; }
    .news-section__head .link-arrow { display: none; }
    .news-slider { border-radius: 22px; }
    .news-slide { grid-template-rows: auto 1fr; }
    .news-slide__media { aspect-ratio: 16 / 10; }
    .news-slide__media::after { display: none; }
    .news-slide__body { grid-area: 2 / 1; align-self: start; padding: 18px 20px 12px; }
    .news-slide__title { font-size: 1.3rem; }
    .news-slide__excerpt { -webkit-line-clamp: 3; font-size: .92rem; }
    .news-slider__bar { position: static; flex-wrap: wrap; gap: 0 12px; padding: 4px 16px 14px 20px; }
    .news-slider__dots { flex-basis: 100%; }
    .news-slider__controls { margin-left: auto; }
    .news-pair { grid-template-columns: 1fr; gap: 18px; margin-top: 24px; }
    .news-card { border-radius: 22px; }
    .news-card__body { padding: 16px 18px 20px; }
    .news-feed { margin-top: 32px; }
    .news-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 18px 0; }
    .news-row__media { display: none; }
    .news-row__date { display: flex; align-items: baseline; gap: 6px; padding: 0; }
    .news-row__date strong { font-family: var(--sans); font-size: .8rem; font-weight: 600; color: var(--wine); }
    .news-row__date span { margin: 0; font-size: .8rem; letter-spacing: .08em; }
    .news-row__title { font-size: 1.1rem; }
    .news-aside, .news-aside .sidebar { grid-template-columns: 1fr; }
    .db-banner-list { display: flex; gap: 12px; margin-inline: -16px; padding: 4px 16px 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
    .db-banner-list::-webkit-scrollbar { display: none; }
    .db-banner-list .db-banner { flex: 0 0 64%; scroll-snap-align: start; }

    .temples { margin-top: 64px; padding: 56px 0 60px; border-radius: 0; }
    .temples__head { flex-direction: column; align-items: flex-start; gap: 20px; }
    .temples__controls .round-button { display: none; }
    .temples__track { gap: 14px; padding-inline: 16px; }
    .temples__viewport { scroll-padding-inline: 16px; }
    .temple-card { width: 70vw; max-width: 280px; }

    .about, .visit { padding-top: 64px; }
    .visit__info { padding: 28px 22px; }
    .visit__actions { display: grid; }

    .section-heading { flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 28px; }
    .post-card { grid-template-columns: 100px minmax(0, 1fr); gap: 14px; padding: 12px; }
    .post-card__thumb { aspect-ratio: 1; }
    .post-card--announcement .post-card__thumb { aspect-ratio: auto; }
    .post-card__title { font-size: 1.14rem; }
    .post-card__excerpt { display: none; }
    .entry { padding: 20px 16px; border-radius: var(--radius); }
    .calendar__head { flex-wrap: wrap; }
    .date-star--lg { width: 108px; height: 108px; }
    .date-star--lg::before, .date-star--lg::after { inset: 14px; }
    .date-star--lg::before { inset: 22px; }
    .date-star--lg .date-star__day { font-size: 2rem; }
    .date-star--lg .date-star__month { font-size: .8rem; }
    .calendar-day--icon { grid-template-columns: minmax(0, 1fr); }
    .calendar-day__icon { grid-column: 1; grid-row: auto; justify-self: start; }
    .calendar-day__icon img { width: 110px; }
    .entry-content iframe:not(.wp-block-embed iframe) { min-height: 230px; }
    .footer-main { grid-template-columns: 1fr; gap: 28px; padding-top: 44px; }
}

/* ---------- Motion ---------- */
/* Появление при прокрутке: класс .reveal ставит assets/theme.js, без JS всё видно сразу. */
.reveal { opacity: 0; }
.reveal.is-visible { opacity: 1; animation: reveal-in .6s var(--ease-out) var(--reveal-delay, 0s) both; }
@keyframes reveal-in { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }


/* Переходы между страницами: шапка и меню остаются на месте, содержимое мягко сменяется. */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
.primary-nav { view-transition-name: primary-nav; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }

/* Огонёк свечи на кнопках поминовения. */
.flame { position: relative; display: inline-block; width: 8px; height: 13px; flex: none; margin-right: 2px; transform-origin: 50% 100%; animation: flame-flicker 2.8s ease-in-out infinite alternate; }
.flame::before { position: absolute; left: 0; bottom: 1px; width: 8px; height: 8px; border-radius: 0 50% 50% 50%; background: radial-gradient(circle at 62% 62%, #fff6d8 0 20%, var(--gold-light) 48%, var(--gold) 100%); box-shadow: 0 0 7px 1px rgba(231, 199, 124, .5); content: ""; transform: scaleY(1.3) rotate(45deg); }
.primary-nav__cta .flame { margin-right: 8px; }
@keyframes flame-flicker {
    0% { transform: scale(1, 1) rotate(-2deg); opacity: .95; }
    30% { transform: scale(.94, 1.06) rotate(1.5deg); opacity: 1; }
    55% { transform: scale(1.03, .95) rotate(-1deg); opacity: .88; }
    80% { transform: scale(.97, 1.04) rotate(2deg); opacity: 1; }
    100% { transform: scale(1, .98) rotate(-1.5deg); opacity: .93; }
}

/* Ромб даты делает четверть оборота при наведении. */
.date-star::after { transition: transform .6s var(--ease-out), border-color .2s; }
.aside-today:hover .date-star::after, .aside-today:focus-visible .date-star::after, .db-events__link:hover .date-star::after, .db-events__link:focus-visible .date-star::after { transform: rotate(135deg); }

/* Счётчики: цифры одной ширины, чтобы текст не дёргался. */
.count-up { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
    .hero__photo, .news-slide__media img { transform: none; }
    .news-slider__dot.is-active span { animation: none; transform: none; }
    .reveal { opacity: 1; }
    .flame { animation: none; }
    @view-transition { navigation: none; }
}

.aside-memorial { position: relative; overflow: hidden; padding: 28px 26px 26px; border-radius: var(--radius-lg); color: var(--on-navy); background: var(--wine); box-shadow: 0 18px 40px -20px rgba(108, 31, 26, .7); }
.aside-memorial::before { position: absolute; top: -60px; right: -60px; width: 180px; height: 180px; border: 1px solid rgba(231, 199, 124, .45); border-radius: 50%; box-shadow: 0 0 0 18px rgba(231, 199, 124, .08); content: ""; }
.aside-memorial h2 { margin: 0 0 10px; color: #fff; font-family: var(--serif); font-size: 1.7rem; line-height: 1.1; }
.aside-memorial p { margin: 0 0 22px; color: #f3dfd5; }
.aside-memorial .button { width: 100%; }
.sidebar .aside-memorial .button--light { color: var(--navy); }
.sidebar .aside-memorial .button--light:hover, .sidebar .aside-memorial .button--light:focus { color: var(--wine); }

/* Announcements widget views (plugin «Объявления благочиния»): sheet, posters, line. */
.db-sheet__kicker { position: absolute; top: 26px; left: 198px; z-index: 2; margin: 0; line-height: 1.2; color: var(--wine); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }

.db-sheet { position: relative; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-lg); background: linear-gradient(to right, var(--navy) 168px, var(--paper) 168px); box-shadow: var(--shadow-soft); }
.db-sheet__viewport { display: grid; }
.db-sheet__slide { display: grid; grid-area: 1 / 1; grid-template-columns: 168px minmax(0, 1fr); }
/* Slide change: the slide boxes switch instantly (the navy date panel never fades), only the text moves:
   the old text fades out in place, then the new one rises in, date first, then title, meta, buttons. */
.db-sheet--slider .db-sheet__slide { visibility: hidden; transition: visibility 0s linear .3s; }
.db-sheet--slider .db-sheet__slide.is-active { z-index: 1; visibility: visible; transition: none; }
.db-sheet--slider .db-sheet__slide :is(.db-sheet__date, .db-sheet__body) > * { opacity: 0; transform: translateY(10px); transition: opacity .22s ease, transform 0s linear .25s; }
.db-sheet--slider .db-sheet__slide.is-active :is(.db-sheet__date, .db-sheet__body) > * { opacity: 1; transform: none; transition: opacity .5s var(--ease-out) .24s, transform .6s var(--ease-out) .24s; }
.db-sheet--slider .db-sheet__slide.is-active :is(.db-sheet__date, .db-sheet__body) > :nth-child(2) { transition-delay: .29s; }
.db-sheet--slider .db-sheet__slide.is-active :is(.db-sheet__date, .db-sheet__body) > :nth-child(3) { transition-delay: .34s; }
.db-sheet--slider .db-sheet__slide.is-active :is(.db-sheet__date, .db-sheet__body) > :nth-child(n+4) { transition-delay: .39s; }
.db-sheet__date { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 26px 14px; color: var(--on-navy); background: var(--navy); text-align: center; }
.db-sheet__weekday { color: var(--gold-light); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.db-sheet__day { font-family: var(--serif); font-size: 4.2rem; font-weight: 700; line-height: .95; font-variant-numeric: lining-nums; }
.db-sheet__month { font-family: var(--serif); font-size: 1.05rem; }
.db-sheet__date--kind { gap: 12px; }
.db-sheet__date--kind .db-kind-icon { width: 46px; height: 46px; color: var(--gold-light); }
.db-sheet__time { margin-top: 12px; padding: 5px 14px; border: 1px solid rgba(231, 199, 124, .45); border-radius: 999px; color: var(--gold-light); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-sheet__body { display: flex; flex-direction: column; gap: 10px; padding: 56px 30px 24px; }
.db-sheet__title { margin: 0; font-family: var(--serif); font-size: clamp(1.25rem, 1.6vw, 1.5rem); line-height: 1.25; text-wrap: pretty; }
.db-sheet__title a { color: var(--navy); text-decoration: none; }
.db-sheet__title a:hover { color: var(--wine); }
.db-sheet__meta { margin: 0; color: var(--muted); }
.db-sheet__summary { display: -webkit-box; overflow: hidden; margin: 0; max-width: 60ch; color: var(--ink); -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }
.db-sheet__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.db-sheet__all, .db-posters__all { justify-self: start; color: var(--wine); font-weight: 600; text-decoration: none; }
.db-sheet__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-left: 168px; padding: 0 22px 20px 30px; }
.db-sheet__controls { display: flex; align-items: center; gap: 8px; }
.db-sheet__count { margin: 0 6px 0 0; color: var(--muted); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.db-sheet__button { display: inline-grid; width: 40px; height: 40px; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--navy); background: transparent; cursor: pointer; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.db-sheet__button:hover, .db-sheet__button:focus-visible { border-color: var(--navy); color: #fff; background: var(--navy); }
.db-sheet__button .icon { width: 18px; height: 18px; }
.db-sheet [data-slider-toggle] .icon--play, .db-sheet.is-stopped [data-slider-toggle] .icon--pause { display: none; }
.db-sheet.is-stopped [data-slider-toggle] .icon--play { display: block; }
.db-sheet__all span, .db-posters__all span { display: inline-block; transition: transform .3s var(--ease-out); }
.db-sheet__all:hover span, .db-posters__all:hover span { transform: translateX(4px); }

.db-posters__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.db-posters__head h3 { margin: 0; color: var(--navy); font-family: var(--serif); font-size: 1.5rem; }
.db-posters__list { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, calc((100% - 36px) / 3)); gap: 18px; overflow-x: auto; margin: 0; padding: 0 0 6px; list-style: none; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.db-poster { scroll-snap-align: start; }
.db-poster__link { display: grid; gap: 8px; height: 100%; padding: 10px 10px 16px; border: 1px solid var(--line-soft); border-radius: var(--radius); color: var(--ink); background: var(--paper); text-decoration: none; transition: box-shadow .25s var(--ease-out), transform .25s var(--ease-out); }
.db-poster__link:hover { box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.db-poster__media { position: relative; display: block; overflow: hidden; aspect-ratio: 3 / 4; border-radius: var(--radius-sm); background: var(--navy); }
.db-poster__media img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.db-poster__placeholder { display: block; height: 100%; background: radial-gradient(circle at 50% 38%, rgba(231, 199, 124, .28), transparent 60%), var(--navy); }
.db-poster__chip { position: absolute; bottom: 10px; left: 10px; padding: 6px 12px; border-radius: 999px; color: var(--navy-deep); background: var(--gold-light); font-size: .8rem; font-weight: 600; font-variant-numeric: tabular-nums; box-shadow: 0 6px 14px -6px rgba(11, 33, 56, .5); }
.db-poster__title { padding: 4px 6px 0; color: var(--navy); font-family: var(--serif); font-size: 1.08rem; font-weight: 700; line-height: 1.3; }
.db-poster__link:hover .db-poster__title { color: var(--wine); }
.db-poster__where { padding: 0 6px; color: var(--muted); font-size: .88rem; line-height: 1.4; }
.db-poster__summary { display: -webkit-box; overflow: hidden; padding: 0 6px; color: var(--ink); font-size: .9rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; }

.db-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 12px 14px 12px 12px; border-radius: 999px; color: var(--on-navy); background: var(--navy-deep); box-shadow: var(--shadow-soft); }
.db-line__badge { display: inline-flex; align-items: center; padding: 8px 14px; border-radius: 999px; color: var(--navy-deep); background: var(--gold-light); font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.db-line__list { display: grid; min-width: 0; margin: 0; padding: 0; list-style: none; }
.db-line__list li { grid-area: 1 / 1; }
.db-line--slider .db-line__list li { visibility: hidden; transition: visibility 0s linear .25s; }
.db-line--slider .db-line__list li.is-active { visibility: visible; transition: none; }
.db-line--slider .db-line__list li > a { opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform 0s linear .22s; }
.db-line--slider .db-line__list li.is-active > a { opacity: 1; transform: none; transition: opacity .45s var(--ease-out) .2s, transform .5s var(--ease-out) .2s; }
.db-line__end { display: flex; align-items: center; gap: 6px; }
.db-line__button { display: inline-grid; width: 34px; height: 34px; place-items: center; padding: 0; border: 0; border-radius: 50%; color: var(--on-navy); background: transparent; cursor: pointer; }
.db-line__button:hover, .db-line__button:focus-visible { color: var(--navy-deep); background: var(--gold-light); }
.db-line__button .icon { width: 18px; height: 18px; }
.db-line__count { min-width: 28px; color: var(--on-navy-muted); font-size: .84rem; font-weight: 600; font-variant-numeric: tabular-nums; text-align: center; }
.db-line__all { margin-left: 6px; }
.db-line__list a { display: flex; gap: 12px; align-items: baseline; min-width: 0; color: var(--on-navy); text-decoration: none; }
.db-line__when { flex: none; color: var(--gold-light); font-weight: 600; font-variant-numeric: tabular-nums; }
.db-line__list li { min-width: 0; }
.db-line__title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-line__list a:hover .db-line__title { text-decoration: underline; text-underline-offset: 3px; }
.db-line__all { padding: 8px 14px; border: 1px solid rgba(231, 199, 124, .4); border-radius: 999px; color: var(--gold-light); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.db-line__all:hover { color: var(--navy-deep); background: var(--gold-light); }

@media (max-width: 700px) {
    .db-sheet { border-radius: var(--radius); background: var(--paper); }
    .db-sheet__slide { grid-template-columns: 1fr; }
    .db-sheet__foot { margin-left: 0; padding: 0 16px 16px 20px; }
    .db-sheet__date { flex-direction: row; flex-wrap: wrap; gap: 4px 10px; justify-content: flex-start; padding: 14px 20px; text-align: left; }
    .db-sheet__day { font-size: 2.2rem; }
    .db-sheet__weekday { order: 3; width: auto; }
    .db-sheet__weekday--lead { order: 0; align-self: baseline; }  /* «с 12 октября», «до 25 декабря»: the preposition before the date */
    .db-sheet__time { order: 4; margin: 0 0 0 auto; }
    .db-sheet__body { padding: 20px 20px 24px; }
    .db-sheet__kicker { position: static; padding: 16px 20px 12px; }
    .db-sheet__actions .button { flex: 1 1 auto; }
    .db-posters__list { grid-auto-columns: 78%; }
    .db-line { grid-template-columns: 1fr; gap: 10px; padding: 16px; border-radius: var(--radius); }
    .db-line__badge { justify-self: start; }
    .db-line__list a { flex-direction: column; gap: 2px; }
    .db-line__title { white-space: normal; }
    .db-line__end { justify-self: start; }
    .db-line__all { margin-left: 0; }
    .db-line--slider .db-line__all { margin-left: 8px; }
}

.home-slot { display: grid; gap: 24px; margin-top: 32px; }
.single-slot { display: grid; gap: 16px; margin-bottom: 20px; }
.home-slot .widget-title { margin: 0 0 12px; color: var(--navy); font-family: var(--serif); font-size: 1.5rem; }

/* Memorial notes page: the form beside the church shop card, sections below reuse the contacts page. */
.memorial-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 22px; align-items: start; margin-top: 26px; }
.memorial-form { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--paper); box-shadow: var(--shadow-soft); }
.memorial-form h2 { margin: 0 0 18px; color: var(--navy); font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.memorial-form fieldset { margin: 0 0 18px; padding: 0; border: 0; min-width: 0; }
.memorial-label { display: block; margin-bottom: 7px; padding: 0; color: var(--navy); font-size: .9rem; font-weight: 600; }
.memorial-label small { color: var(--muted); font-weight: 400; }
.memorial-kind__switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 999px; background: var(--cream); }
.memorial-kind label { position: relative; }
.memorial-kind input, .memorial-options input { position: absolute; opacity: 0; pointer-events: none; }
.memorial-kind span { display: grid; min-height: 44px; place-items: center; border-radius: 999px; color: var(--navy); font-weight: 600; cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.memorial-kind input:checked + span { color: #fff; background: var(--navy); }
.memorial-kind input:focus-visible + span, .memorial-options input:focus-visible ~ .memorial-options__name { outline: 3px solid var(--gold); outline-offset: 3px; }
.memorial-options { display: grid; gap: 6px; }
.memorial-options label { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; cursor: pointer; transition: border-color .2s ease, background-color .2s ease; }
.memorial-options label:hover { border-color: var(--gold); }
.memorial-options label:has(input:checked) { border-color: var(--wine); background: #fdf5f2; box-shadow: inset 3px 0 0 var(--wine); }
.memorial-options__name { color: var(--ink); }
.memorial-options__sum { color: var(--wine); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.memorial-field { display: block; margin-bottom: 16px; }
.memorial-form :is(input[type="text"], input[type="tel"], input[type="email"], input[type="number"], textarea) { width: 100%; min-height: 50px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); background: #fff; line-height: 1.4; transition: border-color .2s ease, box-shadow .2s ease; }
.memorial-form textarea { display: block; resize: vertical; }
.memorial-form :is(input, textarea):hover { border-color: var(--gold); }
.memorial-form :is(input, textarea):focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201, 162, 79, .18); outline: none; }
.memorial-form .is-invalid { border-color: var(--wine) !important; }
.memorial-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.memorial-field--wide { grid-column: 1 / -1; }
.memorial-pay { display: flex; flex-wrap: wrap; align-items: end; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.memorial-sum { width: 170px; margin: 0; }
.memorial-sum__box { position: relative; display: block; }
.memorial-sum__box input { padding-right: 36px !important; font-size: 1.1rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.memorial-sum__box > span { position: absolute; top: 50%; right: 16px; color: var(--muted); transform: translateY(-50%); }
.memorial-pay .button { flex: 1; min-height: 50px; }
.memorial-note { margin: 12px 0 0; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.memorial-message { margin: 14px 0 0; padding: 12px 16px; border: 1px solid var(--wine); border-radius: var(--radius-sm); color: var(--wine); background: var(--cream); font-size: .95rem; }
.memorial-done { padding: 8px 0; outline: none; }
.memorial-done h3 { margin: 0 0 8px; color: var(--wine); font-family: var(--serif); font-size: 1.4rem; }
.memorial-shop { display: block; margin: 0; position: sticky; top: 24px; }
.memorial-text { margin-top: 0; max-width: 72ch; }
@container (max-width: 760px) {
    .memorial-grid { grid-template-columns: minmax(0, 1fr); }
    .memorial-shop { position: static; }
}
@media (max-width: 520px) {
    .memorial-row { grid-template-columns: minmax(0, 1fr); }
    .memorial-sum, .memorial-pay .button { width: 100%; flex: auto; }
}

/* «О благочинии»: the text, figures from the records in one row, the dean's card on navy, tabs with the lists. */
.about-cover { position: relative; margin: 26px 0 0; padding-bottom: 18px; }
.about-cover__frame { overflow: hidden; aspect-ratio: 16 / 8; border-radius: var(--radius); background: var(--navy); box-shadow: var(--shadow); }
.about-cover__frame img { width: 100%; height: 100%; object-fit: cover; transform-origin: 50% 40%; }
.about-cover__frame::after { position: absolute; inset: 0 0 18px; border-radius: var(--radius); background: linear-gradient(to top, rgba(11, 33, 56, .72), rgba(11, 33, 56, 0) 55%); content: ""; pointer-events: none; }
.about-cover__caption { position: absolute; left: clamp(18px, 3vw, 30px); bottom: clamp(34px, 4vw, 44px); display: grid; gap: 2px; max-width: 70%; color: #fff; font-family: var(--serif); font-size: clamp(1.05rem, .9rem + .6vw, 1.4rem); font-weight: 700; line-height: 1.2; text-shadow: 0 2px 12px rgba(0, 0, 0, .35); }
.about-cover__caption span { color: var(--gold-light); font-family: var(--sans); font-size: .72rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.about-cover__seal { position: absolute; right: clamp(14px, 3vw, 28px); bottom: 0; width: clamp(96px, 16vw, 128px); height: auto; filter: drop-shadow(0 10px 18px rgba(11, 33, 56, .35)); }
.about-cover__seal-bg { fill: var(--navy); stroke: var(--gold); stroke-width: 1.5; }
.about-cover__seal-inner { fill: none; stroke: rgba(231, 199, 124, .55); stroke-width: 1; }
.about-cover__seal-ring { fill: var(--gold-light); font-family: var(--sans); font-size: 8.4px; font-weight: 600; letter-spacing: .5px; }
.about-cover__seal-cross { fill: var(--gold-light); }
@media (prefers-reduced-motion: no-preference) {
    .about-cover__seal text.about-cover__seal-ring { transform-origin: 60px 60px; animation: about-seal-turn 40s linear infinite; }
    @supports (animation-timeline: view()) {
        .about-cover__frame img { animation: about-cover-zoom linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
    }
}
@keyframes about-seal-turn { to { transform: rotate(360deg); } }
@keyframes about-cover-zoom { from { transform: scale(1.14) translateY(-3%); } to { transform: scale(1) translateY(3%); } }
.about-text { margin-top: 22px; }
.about-text .entry-content { max-width: 72ch; margin-top: 0; }
.about-figures { display: flex; flex-wrap: wrap; margin: 26px 0 0; padding: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--paper); list-style: none; }
.about-figures li { display: flex; flex: 1 1 auto; margin: -1px 0 0 -1px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.about-figures li > a { flex: 1; }
.about-figures li > a, .about-figures li:not(:has(> a)) { display: flex; flex-direction: column; gap: 4px; padding: 16px 16px 14px; }
.about-figures li > a { color: inherit; text-decoration: none; transition: background-color .2s ease; }
.about-figures li > a:hover, .about-figures li > a:focus-visible { background: rgba(239, 226, 198, .45); }
.about-figures li > a:hover .about-figures__label { color: var(--wine); }
.about-figures__num { color: var(--wine); font-family: var(--serif); font-size: clamp(1.6rem, 1.2rem + 1vw, 2rem); font-weight: 700; line-height: 1.05; font-variant-numeric: tabular-nums; }
.about-figures__label { color: var(--navy); font-size: .92rem; font-weight: 600; line-height: 1.25; white-space: nowrap; transition: color .2s ease; }
.about-dean { display: grid; gap: 22px; margin-top: 30px; padding: clamp(20px, 3vw, 30px); border-radius: var(--radius); color: var(--on-navy); background: var(--navy) radial-gradient(120% 140% at 100% 0%, rgba(201, 162, 79, .2), transparent 55%); box-shadow: var(--shadow-soft); }
.about-dean__head { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: clamp(18px, 3vw, 28px); align-items: start; }
.about-dean__photo { display: block; overflow: hidden; border: 1px solid rgba(231, 199, 124, .45); border-radius: var(--radius-sm); background: var(--navy-deep); box-shadow: 0 0 0 5px rgba(231, 199, 124, .08); }
.about-dean__photo img { width: 100%; height: auto; }
.about-dean__body { display: grid; align-content: start; gap: 12px; }
.about-dean__kicker { margin: 0; color: var(--gold-light); font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.about-dean__name { margin: 0; font-family: var(--serif); font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem); line-height: 1.15; }
.about-dean__name a { color: #fff; text-decoration: none; }
.about-dean__name a:hover { color: var(--gold-light); }
.about-dean__name span { display: block; margin-bottom: 2px; color: var(--on-navy-muted); font-family: var(--sans); font-size: .95rem; font-weight: 500; }
.about-dean__roles { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; color: var(--on-navy); font-size: .95rem; line-height: 1.45; }
.about-dean__roles li { position: relative; padding-left: 16px; }
.about-dean__roles li::before { position: absolute; top: .62em; left: 0; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); content: ""; }
.about-dean__foot { display: grid; gap: 18px; }
.about-dean__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; }
.about-dean__facts > div { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto auto; column-gap: 14px; align-items: center; padding: 16px 18px; border: 1px solid rgba(231, 199, 124, .22); border-radius: var(--radius-sm); background: rgba(255, 255, 255, .04); }
.about-dean__icon { grid-row: 1 / 4; display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(231, 199, 124, .45); border-radius: 50%; color: var(--gold-light); }
.about-dean__icon .icon { width: 20px; height: 20px; }
.about-dean__facts dt { color: var(--on-navy-muted); font-size: .7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.about-dean__facts dd { margin: 2px 0 0; color: #fff; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.about-dean__facts dd.about-dean__note { margin: 2px 0 0; color: var(--gold-light); font-family: var(--sans); font-size: .82rem; font-weight: 500; }
.about-lists { margin-top: 34px; }
.about-list { margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--paper); list-style: none; }
.about-list li + li { border-top: 1px solid var(--line-soft); }
.about-list a { display: grid; grid-template-columns: 56px minmax(0, 1fr) 18px; gap: 14px; align-items: center; padding: 10px 16px 10px 10px; color: var(--navy); text-decoration: none; transition: background-color .2s ease; }
.about-list a:hover, .about-list a:focus-visible { background: var(--cream); }
.about-list a:hover .about-list__title { color: var(--wine); }
.about-list__photo { width: 56px; height: 56px; overflow: hidden; border-radius: 10px; background: var(--sand); }
.about-list__photo img { width: 100%; height: 100%; object-fit: cover; }
.about-list--people .about-list__photo img { object-position: 50% 15%; }
.about-list__text { display: grid; gap: 1px; min-width: 0; }
.about-list__title { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; transition: color .2s ease; }
.about-list__meta { color: var(--muted); font-size: .86rem; line-height: 1.35; }
.about-list .icon { width: 18px; height: 18px; color: var(--gold-deep); }
.about-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 20px; padding: 5px; border-radius: 999px; background: var(--sand); scroll-margin-top: 90px; }
.about-tabs__tab { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border: 0; border-radius: 999px; color: var(--navy); background: transparent; font-weight: 600; cursor: pointer; transition: color .2s ease, background-color .2s ease; }
.about-tabs__tab span { padding: 1px 8px; border-radius: 999px; background: rgba(19, 48, 79, .1); font-size: .8rem; }
.about-tabs__tab[aria-selected="true"] { color: #fff; background: var(--navy); }
.about-tabs__tab[aria-selected="true"] span { background: rgba(255, 255, 255, .18); }
@container (max-width: 820px) { .about-dean__facts dd { white-space: normal; } }
@container (max-width: 640px) {
    .about-cover__frame { aspect-ratio: 4 / 3; }
    .about-cover__caption { max-width: calc(100% - 140px); }
    .about-dean__head { grid-template-columns: minmax(0, 1fr); }
    .about-dean__photo { width: min(220px, 70%); }
    .about-dean__facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) { .about-tabs__tab { flex-direction: column; gap: 2px; font-size: .88rem; line-height: 1.2; border-radius: 10px; } .about-tabs { border-radius: var(--radius-sm); } }

/* «Полезные ссылки» (/nastoyatelyam/): link cards grouped by the editor's headings. */
.links-group { margin-top: 30px; }
.links-group h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: var(--navy); font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.links-group h2::after { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); content: ""; }
.links-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.links-list li { display: grid; min-width: 0; }
.links-list li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.links-list a { display: grid; grid-template-columns: 44px minmax(0, 1fr) 18px; gap: 14px; align-items: center; padding: 16px 16px 16px 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); color: var(--navy); background: var(--paper); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.links-list a:hover, .links-list a:focus-visible { border-color: var(--gold); box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.links-list__icon { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid rgba(201, 162, 79, .5); border-radius: 50%; color: var(--gold-deep); background: var(--cream); transition: color .2s ease, background-color .2s ease; }
.links-list__icon .icon { width: 20px; height: 20px; }
.links-list__icon .social-icon { width: 22px; height: 22px; }
.links-list a:hover .links-list__icon { color: #fff; background: var(--navy); }
.links-list__text { display: grid; gap: 3px; min-width: 0; }
.links-list__name { font-weight: 600; line-height: 1.3; overflow-wrap: break-word; text-wrap: pretty; transition: color .2s ease; }
.links-list a:hover .links-list__name { color: var(--wine); }
.links-list__host { color: var(--gold-deep); font-size: .82rem; font-weight: 600; letter-spacing: .02em; }
.links-list > li > a > .icon { width: 18px; height: 18px; align-self: start; color: var(--muted); transition: color .2s ease, transform .2s ease; }
.links-list a:hover > .icon { color: var(--gold-deep); transform: translate(2px, -2px); }
.links-updated { margin: 28px 0 0; padding-top: 16px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .86rem; }
@container (max-width: 640px) { .links-list { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .links-list a, .links-list a > .icon { transition: none; } .links-list a:hover { transform: none; } }

/* «Таинства и богослужения»: question-and-answer texts and the list of the category at the end. */
.entry-meta a { color: inherit; text-decoration: none; }
.entry-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.category-tainstva-i-bogoslugeniya .entry-content { max-width: 70ch; }
.category-tainstva-i-bogoslugeniya .entry-content > h2 { display: flex; align-items: center; gap: 14px; margin: 34px 0 18px; color: var(--wine); font-size: .82rem; font-family: var(--sans); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.category-tainstva-i-bogoslugeniya .entry-content > h2:first-child { margin-top: 0; }
.category-tainstva-i-bogoslugeniya .entry-content > h2::before { flex: none; width: 10px; height: 10px; border: 1px solid var(--gold); background: var(--cream); transform: rotate(45deg); content: ""; }
.category-tainstva-i-bogoslugeniya .entry-content > h2::after { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); content: ""; }
.category-tainstva-i-bogoslugeniya .entry-content > h3 { margin: 30px 0 10px; padding-left: 16px; border-left: 3px solid var(--gold); font-size: 1.2rem; line-height: 1.3; }
.category-tainstva-i-bogoslugeniya .entry-content > h2 + h3 { margin-top: 0; }
.category-tainstva-i-bogoslugeniya .entry-content > h3 + p { margin-top: 0; }
.category-tainstva-i-bogoslugeniya .entry-content blockquote { font-size: 1.08rem; line-height: 1.55; }
.category-tainstva-i-bogoslugeniya .entry-content blockquote p { margin: 0; }
.category-tainstva-i-bogoslugeniya .entry-content ul { display: grid; gap: 8px; padding-left: 0; list-style: none; }
.category-tainstva-i-bogoslugeniya .entry-content li { position: relative; padding-left: 22px; }
.category-tainstva-i-bogoslugeniya .entry-content li::before { position: absolute; top: .62em; left: 3px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); content: ""; }
.category-tainstva-i-bogoslugeniya .entry-content li ul { margin: 10px 0 4px; padding: 14px 18px; border-radius: var(--radius-sm); background: var(--cream); }
.category-tainstva-i-bogoslugeniya .entry-content li li::before { width: 5px; height: 5px; background: var(--gold-deep); }
.category-tainstva-i-bogoslugeniya .entry-content > p > strong:first-child { color: var(--navy); }
.sacraments-nav { margin-top: 40px; padding-top: 26px; border-top: 1px solid var(--line-soft); }
.sacraments-nav h2 { margin: 0 0 14px; font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.sacraments-nav h2 a { color: var(--navy); text-decoration: none; }
.sacraments-nav h2 a:hover { color: var(--wine); }
.sacraments-nav ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.sacraments-nav li a { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 12px 8px 8px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); color: var(--navy); background: var(--paper); font-weight: 600; line-height: 1.25; text-decoration: none; transition: border-color .2s ease, background-color .2s ease; }
.sacraments-nav li a:hover, .sacraments-nav li a:focus-visible { border-color: var(--gold); background: var(--cream); }
.sacraments-nav a[aria-current="page"] { border-color: var(--navy); color: #fff; background: var(--navy); }
.sacraments-nav__photo { width: 48px; height: 48px; overflow: hidden; border-radius: 8px; background: var(--sand); }
.sacraments-nav__photo img { width: 100%; height: 100%; margin: 0; object-fit: cover; border-radius: 0; }
.sacraments-nav__title { min-width: 0; overflow-wrap: break-word; }
@media (max-width: 900px) { .sacraments-nav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .sacraments-nav ul { grid-template-columns: minmax(0, 1fr); } }

/* Reference sections (archive.php + template-parts/section-card.php): heading with a lead, cards by kind. */
.section-hero { position: relative; margin: 0 0 28px; padding: clamp(24px, 3.4vw, 38px) clamp(22px, 3.4vw, 40px); overflow: hidden; border-radius: var(--radius); color: var(--on-navy); background: var(--navy) radial-gradient(90% 140% at 100% 0%, rgba(201, 162, 79, .22), transparent 60%); box-shadow: var(--shadow-soft); }
.section-hero::after { position: absolute; top: 50%; right: clamp(-20px, 1.5vw, 28px); width: 112px; height: 112px; background: rgba(231, 199, 124, .09); transform: translateY(-50%); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-24 -24 48 48'%3E%3Cpath d='M-1.6 -22h3.2v44h-3.2z M-6 -17h12v2.6h-12z M-11 -8.5h22v3.2h-22z M-8.8 5.4l16.8 5.2 -0.8 2.5 -16.8 -5.2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-24 -24 48 48'%3E%3Cpath d='M-1.6 -22h3.2v44h-3.2z M-6 -17h12v2.6h-12z M-11 -8.5h22v3.2h-22z M-8.8 5.4l16.8 5.2 -0.8 2.5 -16.8 -5.2z'/%3E%3C/svg%3E") center / contain no-repeat; content: ""; pointer-events: none; }
.section-hero { padding-right: clamp(22px, 9vw, 140px); }
.section-hero > * { position: relative; z-index: 1; }
.section-hero__kicker { margin: 0 0 8px; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.section-hero__kicker a { color: var(--gold-light); text-decoration: none; }
.section-hero__kicker a:hover { text-decoration: underline; text-underline-offset: 3px; }
.section-hero h1 { margin: 0; color: #fff; font-family: var(--serif); font-size: clamp(1.7rem, 1.3rem + 1.1vw, 2.3rem); line-height: 1.08; letter-spacing: -.015em; }
.section-hero__lead { margin: 12px 0 0; color: var(--on-navy); font-size: 1.04rem; line-height: 1.55; }
.section-hero__prayer { margin: 18px 0 0; padding-left: 16px; border-left: 2px solid var(--gold); color: var(--gold-light); font-family: var(--serif); font-size: 1.05rem; font-style: italic; line-height: 1.5; }
.section-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.section-cards > li { display: grid; min-width: 0; }
.section-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); color: var(--navy); background: var(--paper); text-decoration: none; box-shadow: 0 6px 18px -14px rgba(38, 32, 25, .25); transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.section-card:hover, .section-card:focus-visible { border-color: var(--gold); box-shadow: var(--shadow-soft); transform: translateY(-3px); }
.section-card__photo { position: relative; display: block; overflow: hidden; background: var(--sand); aspect-ratio: 4 / 3; }
.section-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.section-card:hover .section-card__photo img { transform: scale(1.05); }
.section-card__empty { display: grid; width: 100%; height: 100%; place-items: center; background: var(--navy) radial-gradient(80% 80% at 50% 30%, rgba(201, 162, 79, .2), transparent 70%); }
.section-card__empty svg { width: 30%; max-width: 70px; fill: var(--gold-light); opacity: .75; }
.section-card__number { position: absolute; bottom: 10px; left: 10px; display: grid; min-width: 40px; height: 40px; padding: 0 8px; place-items: center; border-radius: 999px; color: var(--navy); background: rgba(255, 250, 241, .94); font-family: var(--serif); font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; box-shadow: 0 4px 12px -4px rgba(11, 33, 56, .35); }
.section-card__body { display: flex; flex: 1; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.section-card__title { font-family: var(--serif); font-size: 1.14rem; font-weight: 700; line-height: 1.25; overflow-wrap: break-word; text-wrap: pretty; transition: color .2s ease; }
.section-card:hover .section-card__title { color: var(--wine); }
.section-card__note { color: var(--gold-deep); font-size: .84rem; font-weight: 600; letter-spacing: .03em; }
.section-card__text { color: var(--muted); font-size: .92rem; line-height: 1.5; }
.section-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; color: var(--wine); font-size: .9rem; font-weight: 600; }
.section-card__more .icon { width: 16px; height: 16px; transition: transform .2s ease; }
.section-card:hover .section-card__more .icon { transform: translateX(3px); }
/* Portraits: the new martyrs. The departed clergy: a register of wide cards, portrait in a gold frame on the left. */
.section-card--saints .section-card__photo { aspect-ratio: 4 / 5; }
.section-card--saints .section-card__photo img { object-position: 50% 18%; }
.section-list--memory .section-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section-card--memory { flex-direction: row; align-items: center; gap: 18px; padding: 14px; }
.section-card--memory .section-card__photo { flex: none; width: 96px; aspect-ratio: 4 / 5; border-radius: 10px; }
.section-card--memory .section-card__photo::after { position: absolute; inset: 5px; border: 1px solid rgba(231, 199, 124, .6); border-radius: 7px; content: ""; pointer-events: none; }
.section-card--memory .section-card__photo img { object-position: 50% 18%; filter: grayscale(.3) sepia(.15); transition: transform .8s var(--ease-out), filter .4s ease; }
.section-card--memory:hover .section-card__photo img { filter: none; }
.section-card--memory .section-card__empty svg { width: 42%; }
.section-card--memory .section-card__body { gap: 4px; padding: 0; }
.section-card--memory .section-card__title { font-size: 1.08rem; }
.section-card--memory .section-card__text { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: .88rem; }
/* «Святыни»: calm cards of one height — the whole icon on a quiet field (the files are 200–250 px wide, so it is
   never blown up or cropped), a small badge of the kind, the name in up to three lines and the church at the foot. */
.section-card--shrines { position: relative; }
.section-card--shrines .section-card__photo { aspect-ratio: 1; background: linear-gradient(180deg, var(--cream), var(--sand)); border-bottom: 1px solid var(--line-soft); }
.section-card--shrines .section-card__photo img { position: absolute; inset: 18px; width: calc(100% - 36px); height: calc(100% - 36px); object-fit: contain; filter: drop-shadow(0 8px 12px rgba(38, 32, 25, .3)); }
.section-card--shrines:hover .section-card__photo img { transform: scale(1.03); }
.section-card__kicker { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 4px 10px; border-radius: 999px; color: var(--navy); background: rgba(255, 250, 241, .94); font-size: .7rem; font-weight: 600; letter-spacing: .02em; max-width: calc(100% - 24px); box-shadow: 0 2px 8px -3px rgba(38, 32, 25, .3); }
.section-card--shrines .section-card__body { gap: 8px; padding: 16px 18px 18px; }
.section-card--shrines .section-card__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; font-size: 1.02rem; line-height: 1.3; }
.section-card--shrines .section-card__note { display: flex; align-items: baseline; gap: 7px; margin-top: auto; color: var(--muted); font-size: .82rem; font-weight: 400; letter-spacing: 0; line-height: 1.4; }
.section-card--shrines .section-card__note::before { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); content: ""; transform: translateY(-1px); }
.section-card--shrines .section-card__note span { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.section-list__count { margin: 22px 0 0; padding-top: 14px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .86rem; }
@media (max-width: 1100px) { .section-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .section-list--memory .section-cards { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
    .section-cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .section-list--saints .section-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .section-list--memory .section-cards { grid-template-columns: minmax(0, 1fr); }
    .section-card--memory .section-card__photo { width: 80px; }
    .section-list--saints .section-card__body { padding: 12px; }
    .section-list--shrines .section-cards { grid-template-columns: minmax(0, 1fr); }
    .section-card--shrines { flex-direction: row; }
    .section-card--shrines .section-card__photo { flex: none; width: 112px; aspect-ratio: 4 / 5; border-right: 1px solid var(--line-soft); border-bottom: 0; }
    .section-card--shrines .section-card__photo img { inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); }
    .section-card--shrines .section-card__kicker { top: auto; right: auto; bottom: 8px; left: 8px; max-width: 96px; padding: 2px 8px; font-size: .64rem; line-height: 1.3; }
    .section-list--shrines .section-card__body { justify-content: center; padding: 12px 14px; }
    .section-list--saints .section-card__title, .section-list--shrines .section-card__title { font-size: .96rem; }
    .section-list--saints .section-card__text { display: none; }
    .section-hero { padding-right: clamp(22px, 3.4vw, 40px); }
    .section-hero::after { width: 96px; height: 96px; opacity: .6; }
}
@media (prefers-reduced-motion: reduce) { .section-card, .section-card__photo img { transition: none; } .section-card:hover, .section-card--shrines:hover .section-card__photo img { transform: none; } }

/* «Духовное образование»: programs from the «Заголовок 2» headings, the quote of a program is its enrollment block. */
.education-nav ol { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; counter-reset: none; }
.education-nav li { display: grid; min-width: 0; }
.education-nav a { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); color: var(--navy); background: var(--paper); font-weight: 600; line-height: 1.3; text-decoration: none; overflow-wrap: break-word; text-wrap: pretty; transition: border-color .2s ease, box-shadow .2s ease; }
.education-nav a:hover, .education-nav a:focus-visible { border-color: var(--gold); box-shadow: var(--shadow-soft); color: var(--wine); }
.education-nav__icon, .education-program__icon { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid rgba(201, 162, 79, .5); border-radius: 50%; color: var(--gold-deep); background: var(--cream); }
.education-nav__icon .icon { width: 19px; height: 19px; }
.education-program { margin-top: 26px; padding: 28px 30px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--paper); scroll-margin-top: 110px; }
.education-program__head { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line-soft); }
.education-program__icon { width: 52px; height: 52px; color: #fff; border-color: var(--navy); background: var(--navy); }
.education-program__icon .icon { width: 24px; height: 24px; }
.education-program h2 { margin: 0; color: var(--navy); font-family: var(--serif); font-size: 1.36rem; line-height: 1.25; text-wrap: pretty; }
.education-program__body > :first-child { margin-top: 0; }
.education-program__body > :last-child { margin-bottom: 0; }
.education-program__body ul { display: grid; gap: 8px; padding: 16px 20px; border-radius: var(--radius-sm); background: var(--cream); list-style: none; }
.education-program__body li { position: relative; padding-left: 22px; }
.education-program__body li::before { position: absolute; top: .62em; left: 3px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); content: ""; }
.education-program__body p + ul { margin-top: -4px; }
.education-enroll { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 14px; margin-top: 20px; padding: 18px 20px; border-left: 3px solid var(--gold); border-radius: var(--radius-sm); background: var(--navy-soft); color: var(--navy); }
.education-enroll__icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--gold-deep); background: var(--paper); }
.education-enroll__icon .icon { width: 20px; height: 20px; }
.education-enroll__text p { margin: 0; line-height: 1.5; }
.education-enroll__text p + p { margin-top: 8px; }
.education-enroll__text a { color: var(--wine); font-weight: 700; white-space: nowrap; text-decoration: none; border-bottom: 1px solid rgba(142, 43, 36, .35); }
.education-enroll__text a:hover { border-bottom-color: currentColor; }
.education-gallery { margin-top: 34px; }
.education-gallery h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; color: var(--navy); font-family: var(--serif); font-size: 1.3rem; }
.education-gallery h2::after { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); content: ""; }
.education-gallery .gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.education-gallery .gallery br { display: none; }
.education-gallery .gallery-item { width: auto !important; margin: 0; overflow: hidden; border-radius: var(--radius-sm); background: var(--sand); aspect-ratio: 4 / 3; }
.education-gallery .gallery-item a, .education-gallery .gallery-icon { display: block; height: 100%; }
.education-gallery .gallery-item img { width: 100%; height: 100%; margin: 0; border: 0 !important; object-fit: cover; transition: transform .5s var(--ease-out); }
.education-gallery .gallery-item a:hover img, .education-gallery .gallery-item a:focus-visible img { transform: scale(1.04); }
@container (max-width: 640px) {
    .education-nav ol { grid-template-columns: minmax(0, 1fr); }
    .education-program { padding: 20px 18px; }
    .education-program__head { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
    .education-program__icon { width: 44px; height: 44px; }
    .education-program h2 { font-size: 1.16rem; }
    .education-enroll { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .education-enroll__icon { display: none; }
    .education-gallery .gallery { gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .education-gallery .gallery-item img { transition: none; } }

/* Search: churches and clergy found. */
.search-again { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); transition: border-color .2s ease, box-shadow .2s ease; }
.search-again:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 79, .2); }
.search-again__icon { flex: none; width: 19px; height: 19px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search-again input[type="search"] { flex: 1; min-width: 0; min-height: 44px; padding: 0 4px; border: 0; color: var(--ink); background: transparent; font-size: 1.02rem; outline: none; -webkit-appearance: none; appearance: none; }
.search-again input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-again input::placeholder { color: var(--muted); }
.search-again .button { min-height: 44px; padding: 9px 24px; }
.search-again .button:hover, .search-again .button:focus { transform: none; box-shadow: none; }
.search-layout { font-size: .95rem; }
.search-group { padding: 22px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface, #fff); }
.search-group__title { margin: 8px 0 12px; color: var(--navy); font-family: var(--serif); font-size: 1.3rem; }
.search-group .search-group__title { margin-top: 0; }
.search-group__list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.search-group__list li { display: grid; gap: 2px; }
.search-group__list a { font-weight: 600; }
.search-group__list span { color: var(--muted); font-size: .92rem; }

/* «Вечная память», новомученики, святыни: the whole photo in a frame floated inside the text (single.php, entry--split), the text wraps it. */
.entry--split .entry-body { display: flow-root; }
.entry-portrait { position: relative; float: left; width: 260px; margin: 6px clamp(22px, 3vw, 36px) 18px 0; }
.entry--split .entry-content > :is(ul, ol, blockquote) { overflow: hidden; }
.entry-portrait__frame { position: relative; display: block; width: 100%; padding: 10px; border: 0; border-radius: var(--radius); background: linear-gradient(145deg, var(--gold-light), var(--gold) 45%, var(--gold-deep)); box-shadow: var(--shadow); cursor: zoom-in; transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out); }
.entry-portrait__frame::after { position: absolute; inset: 5px; border: 1px solid rgba(255, 250, 241, .55); border-radius: calc(var(--radius) - 5px); content: ""; pointer-events: none; }
.entry-portrait__frame img { display: block; width: 100%; height: auto; border-radius: 10px; background: var(--paper); }
.entry-portrait__frame:hover, .entry-portrait__frame:focus-visible { transform: translateY(-3px); box-shadow: 0 26px 50px -20px rgba(19, 48, 79, .45); }
.entry--split .entry-header::after { display: block; width: 64px; height: 1px; margin-top: 18px; background: linear-gradient(90deg, var(--gold), transparent); content: ""; }
.entry--split .entry-content { margin-top: 20px; }
.entry--split .entry-content > p:first-child { color: var(--navy); }
/* Святыни и новомученики: an icon case — warm gold frame on a cream mat. */
.entry--shrines .entry-portrait__frame, .entry--saints .entry-portrait__frame { padding: 12px; }
.entry--shrines .entry-portrait__frame img, .entry--saints .entry-portrait__frame img { border-radius: 6px; box-shadow: 0 0 0 4px var(--cream); }
.entry--shrines .entry-portrait::before, .entry--saints .entry-portrait::before { position: absolute; inset: -14px -14px 24px; z-index: -1; border-radius: 50% 50% var(--radius) var(--radius); background: radial-gradient(closest-side, rgba(231, 199, 124, .38), transparent); content: ""; }
/* Вечная память: a quiet dark mount and a plaque with the years. */
.entry--memory .entry-portrait__frame { background: linear-gradient(160deg, var(--navy), var(--navy-deep)); }
.entry--memory .entry-portrait__frame::after { border-color: rgba(231, 199, 124, .5); }
.entry-portrait__plaque { display: grid; justify-items: center; gap: 2px; margin: -18px 18px 0; padding: 26px 14px 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--cream); text-align: center; }
.entry-portrait__plaque svg { width: 22px; height: 22px; margin-bottom: 4px; fill: var(--gold-deep); }
.entry-portrait__plaque span { color: var(--wine); font-size: .74rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.entry-portrait__plaque strong { color: var(--navy); font-family: var(--serif); font-size: 1.3rem; font-variant-numeric: lining-nums; }
@media (max-width: 1100px) { .entry-portrait { width: 210px; } }
@media (max-width: 700px) {
    .entry-portrait { float: none; width: min(78vw, 300px); margin: 0 auto 22px; }
    .entry--split .entry-header { text-align: center; }
    .entry--split .entry-header::after { margin-inline: auto; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
}
@media (prefers-reduced-motion: reduce) { .entry-portrait__frame { transition: none; } .entry-portrait__frame:hover { transform: none; } }

/* «Воскресная школа» (/voskresnaya-shkola/): page markup in the editor content, like the gymnasium page; Orthodox
   touches — a red initial and a Gospel verse between gold rules. */
.sunday-school { container-type: inline-size; }
.sunday-school__intro { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 24px; align-items: center; padding-bottom: 26px; border-bottom: 1px solid var(--line-soft); }
.sunday-school__lead { margin: 0; color: var(--ink); font-family: var(--serif); font-size: clamp(1.14rem, 1.04rem + .35vw, 1.34rem); line-height: 1.5; }
.sunday-school__lead::first-letter { float: left; margin: .06em .12em 0 0; color: var(--wine); font-size: 3.4em; font-weight: 700; line-height: .82; text-shadow: 2px 2px 0 rgba(201, 162, 79, .45); }
.sunday-school__who { position: relative; display: grid; gap: 4px; overflow: hidden; padding: 18px 20px; border-radius: 14px; color: var(--on-navy); background: var(--navy); }
.sunday-school__who::after { position: absolute; right: -10px; bottom: -14px; width: 84px; height: 84px; background: currentColor; opacity: .09; content: ""; -webkit-mask: var(--sunday-cross) center / contain no-repeat; mask: var(--sunday-cross) center / contain no-repeat; }
.sunday-school__who-label { color: var(--gold-light); font-size: .76rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sunday-school__who strong { font-family: var(--serif); font-size: 1.4rem; line-height: 1.15; }
.sunday-school__who span:last-child { color: var(--on-navy-muted); font-size: .84rem; }
.sunday-school { --sunday-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 2.5v19M9.6 5.2h4.8M6.8 9.4h10.4M8.6 15.6l6.8 2.4'/%3E%3C/svg%3E"); }
.sunday-school__verse { margin: 30px 0 0; text-align: center; }
.sunday-school__ornament { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; color: var(--gold-deep); }
.sunday-school__ornament::before, .sunday-school__ornament::after { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); content: ""; }
.sunday-school__ornament::after { background: linear-gradient(90deg, var(--gold), transparent); }
.sunday-school__ornament .icon { width: 24px; height: 24px; }
.sunday-school__verse blockquote { margin: 0 auto; padding: 0; max-width: 46ch; border: 0; background: none; box-shadow: none; color: var(--navy); font-family: var(--serif); font-size: 1.2rem; font-style: italic; line-height: 1.5; }
.sunday-school__verse blockquote p { margin: 0; }
.sunday-school__verse figcaption { margin-top: 8px; color: var(--wine); font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sunday-school h2 { display: flex; align-items: center; gap: 14px; margin: 34px 0 16px; color: var(--navy); font-family: var(--serif); font-size: 1.3rem; }
.sunday-school h2::after { flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); content: ""; }
.sunday-school__subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.sunday-school__subject { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--paper); }
.sunday-school__subject-icon { display: grid; flex: none; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: var(--gold-light); background: var(--navy); }
.sunday-school__subject-icon .icon { width: 22px; height: 22px; }
.sunday-school__subject strong { color: var(--navy); font-family: var(--serif); font-size: 1.12rem; line-height: 1.25; }
.sunday-school__extra { margin: 0; color: var(--ink); }
.sunday-school__tags { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; padding: 0; list-style: none; }
.sunday-school__tags li { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); color: var(--navy); background: var(--paper); font-family: var(--serif); font-size: 1.12rem; font-weight: 700; line-height: 1.25; }
.sunday-school__tag-icon { display: grid; flex: none; width: 44px; height: 44px; place-items: center; border-radius: 50%; color: var(--gold-deep); background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.sunday-school__tag-icon .icon { width: 22px; height: 22px; }
.sunday-school__contact { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream); }
.sunday-school__contact-icon { display: grid; width: 56px; height: 56px; place-items: center; border-radius: 50%; color: var(--gold-light); background: var(--navy); }
.sunday-school__contact-icon .icon { width: 26px; height: 26px; }
.sunday-school__contact-who { display: grid; gap: 2px; min-width: 0; }
.sunday-school__contact-who span { color: var(--wine); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.sunday-school__contact-who strong { color: var(--navy); font-family: var(--serif); font-size: 1.3rem; line-height: 1.2; }
.sunday-school__call.button { gap: 10px; min-height: 54px; padding: 12px 24px; font-size: 1.1rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sunday-school__call .icon { width: 20px; height: 20px; }
.sunday-school__place { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; margin-top: 18px; }
.sunday-school__place > .icon, .sunday-school__place-icon .icon { width: 20px; height: 20px; margin-top: 2px; color: var(--gold-deep); }
.sunday-school__place address { color: var(--ink); font-style: normal; line-height: 1.5; }
.sunday-school__route { color: var(--wine); font-weight: 600; white-space: nowrap; text-decoration: none; }
.sunday-school__route:hover { text-decoration: underline; }
.sunday-school__map { position: relative; height: 360px; margin-top: 16px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--sand); }
.sunday-school__map .site-map { position: absolute; inset: 0; min-height: 0; }
@container (max-width: 640px) {
    .sunday-school__intro { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .sunday-school__subjects, .sunday-school__tags { grid-template-columns: minmax(0, 1fr); }
    .sunday-school__contact { grid-template-columns: 48px minmax(0, 1fr); padding: 18px; }
    .sunday-school__contact-icon { width: 48px; height: 48px; }
    .sunday-school__call.button { grid-column: 1 / -1; width: 100%; }
    .sunday-school__place { grid-template-columns: 22px minmax(0, 1fr); }
    .sunday-school__route { grid-column: 2; }
    .sunday-school__map { height: 300px; }
}

/* «Новомученики и исповедники Домодедовской земли»: compact portrait cards, the calendar of memory, the «Житийная справка»
   of a record and the other saints under the life (archive.php, single.php, template-parts/martyr-*.php). */
.section-list--martyrs { container-type: inline-size; }
.martyr-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.martyr-cards > li { display: flex; }
.martyr-card { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; width: 100%; padding: 12px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); color: var(--ink); background: var(--paper); text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.martyr-card:hover, .martyr-card:focus-visible { border-color: var(--gold); box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.martyr-card:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
.martyr-card__photo { position: relative; display: block; align-self: start; aspect-ratio: 3 / 4; overflow: hidden; padding: 4px; border-radius: 48px 48px 8px 8px; background: linear-gradient(150deg, var(--gold-light), var(--gold) 50%, var(--gold-deep)); }
.martyr-card__photo img, .martyr-card__empty { display: block; width: 100%; height: 100%; border-radius: 44px 44px 5px 5px; object-fit: cover; object-position: 50% 15%; background: var(--cream); }
.martyr-card__empty { display: grid; place-items: center; }
.martyr-card__empty svg { width: 34px; height: 34px; fill: var(--gold-deep); opacity: .55; }
.martyr-card__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding-top: 2px; }
.martyr-card__rank { color: var(--wine); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.martyr-card__name { color: var(--navy); font-family: var(--serif); font-size: 1.14rem; font-weight: 700; line-height: 1.22; overflow-wrap: break-word; }
.martyr-card:hover .martyr-card__name { color: var(--wine); }
.martyr-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 4px; }
.martyr-card__years { color: var(--gold-deep); font-family: var(--serif); font-size: .98rem; font-weight: 700; font-variant-numeric: lining-nums; }
.martyr-card__day { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; color: var(--navy); background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); font-size: .8rem; font-weight: 600; white-space: nowrap; }
.martyr-card__day .icon { width: 14px; height: 14px; color: var(--wine); }
.martyr-card__place { display: flex; align-items: flex-start; gap: 6px; margin-top: auto; padding-top: 8px; color: var(--muted); font-size: .84rem; line-height: 1.35; }
.martyr-card__place .icon { flex: none; width: 16px; height: 16px; color: var(--gold-deep); }
@container (max-width: 560px) {
    .martyr-cards { grid-template-columns: minmax(0, 1fr); }
}
/* «Календарь памяти»: twelve small months, the days of memory as wine seals, the chosen day's saints in the panel below. */
.memory-year { margin-top: 26px; padding: clamp(18px, 2.6vw, 28px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream) radial-gradient(120% 80% at 0% 0%, rgba(201, 162, 79, .1), transparent 55%); }
.memory-year__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 18px; }
.memory-year__head h2 { margin: 0; color: var(--navy); font-family: var(--serif); font-size: 1.35rem; }
.memory-year__head h2 span { margin-left: 4px; color: var(--gold); font-weight: 400; }
.memory-year__legend { display: flex; gap: 16px; margin: 0; padding: 0; color: var(--muted); font-size: .82rem; list-style: none; }
.memory-year__legend li { display: inline-flex; align-items: center; gap: 6px; }
.memory-year__mark { width: 14px; height: 14px; border-radius: 50%; }
.memory-year__mark--memory { background: var(--wine); box-shadow: 0 0 0 2px rgba(142, 43, 36, .18); }
.memory-year__mark--today { box-shadow: inset 0 0 0 2px var(--gold); }
.memory-year__months { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.memory-month { padding: 12px 12px 10px; border: 1px solid var(--line-soft); border-radius: 14px; background: var(--paper); }
.memory-month.is-current { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(201, 162, 79, .35); }
.memory-month__name { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; color: var(--navy); font-family: var(--serif); font-size: .98rem; }
.memory-month__name span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; color: #fff; background: var(--wine); font-family: var(--sans); font-size: .7rem; font-weight: 700; }
.memory-month.is-quiet .memory-month__name { color: var(--muted); }
.memory-month__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; text-align: center; }
.memory-month__weekday { color: var(--muted); font-size: .62rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.memory-month__weekday.is-sunday, .memory-month__day.is-sunday { color: var(--wine); }
.memory-month__day { display: grid; place-items: center; aspect-ratio: 1; border-radius: 50%; color: var(--ink); font-size: .76rem; font-variant-numeric: tabular-nums; line-height: 1; }
.memory-month.is-quiet .memory-month__day { opacity: .55; }
.memory-month__day.is-today { box-shadow: inset 0 0 0 2px var(--gold); font-weight: 700; opacity: 1; }
a.memory-month__day.is-memory { position: relative; color: #fff; background: radial-gradient(circle at 35% 30%, #b8453c, var(--wine) 70%); box-shadow: 0 2px 6px rgba(142, 43, 36, .35); font-weight: 700; text-decoration: none; transition: transform .2s var(--ease-out, ease), box-shadow .2s; }
a.memory-month__day.is-memory:hover, a.memory-month__day.is-memory:focus-visible { transform: scale(1.18); box-shadow: 0 4px 12px rgba(142, 43, 36, .45); outline: none; }
a.memory-month__day.is-memory.is-today { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--gold); }
a.memory-month__day.is-selected { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--wine); }
.memory-year__panels { display: grid; gap: 10px; margin-top: 16px; }
.memory-panel { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 16px; align-items: center; padding: 14px 16px; border-radius: 14px; color: var(--on-navy); background: var(--navy) radial-gradient(90% 140% at 100% 0%, rgba(201, 162, 79, .2), transparent 60%); }
.memory-panel__date { display: grid; justify-items: center; padding: 8px 0; border: 1px solid rgba(231, 199, 124, .3); border-radius: 12px; color: var(--on-navy-muted); font-size: .76rem; line-height: 1.15; }
.memory-panel__date strong { color: var(--gold-light); font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.memory-panel__saints { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.memory-panel__saints small { display: block; color: var(--gold-light); font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.memory-panel__saints a { color: #fff; font-family: var(--serif); font-size: 1.08rem; font-weight: 700; text-decoration: none; }
.memory-panel__saints a:hover { text-decoration: underline; text-underline-offset: 3px; }
.memory-panel__saints span { display: block; color: var(--on-navy-muted); font-size: .84rem; }
.memory-year.is-enhanced .memory-panel { display: none; }
.memory-year.is-enhanced .memory-panel.is-selected { display: grid; animation: memory-panel-in .35s var(--ease-out, ease); }
@keyframes memory-panel-in { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 700px) {
    .memory-year__months { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .memory-month { padding: 10px 8px 8px; }
    .memory-month__day { font-size: .7rem; }
    .memory-panel { grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { a.memory-month__day.is-memory, .memory-year.is-enhanced .memory-panel.is-selected { transition: none; animation: none; } }
/* «Ближайший день памяти»: a calendar leaf on the right of the martyrs heading in place of the cross; today's in gold with a lampada. */
.section-hero--martyrs { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: center; column-gap: clamp(20px, 3vw, 36px); padding-right: clamp(22px, 3.4vw, 40px); }
.section-hero--martyrs::after { display: none; }
.section-hero--martyrs > * { grid-column: 1; }
.section-hero--martyrs > .martyr-days { grid-column: 2; grid-row: 1 / span 5; }
.martyr-days { margin: 0; }
.martyr-days__title { margin: 0 0 10px; color: var(--gold-light); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.martyr-day { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 16px 18px; border: 1px solid rgba(231, 199, 124, .25); border-radius: 16px; background: linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025)); text-align: center; }
.martyr-day::before { position: absolute; top: 9px; left: 50%; width: 40px; height: 6px; background: radial-gradient(circle, rgba(231, 199, 124, .55) 2.4px, transparent 2.9px) 0 0 / 13.3px 6px repeat-x; transform: translateX(-50%); content: ""; }
.martyr-day__when { display: inline-flex; align-items: center; gap: 5px; color: var(--on-navy-muted); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.martyr-day__when .icon { width: 16px; height: 16px; }
.martyr-day__date { display: grid; justify-items: center; color: var(--on-navy); font-size: .95rem; line-height: 1.1; }
.martyr-day__date strong { color: var(--gold-light); font-family: var(--serif); font-size: 3.2rem; font-weight: 700; line-height: 1; }
.martyr-day__saint { display: block; width: 100%; margin-top: 8px; padding-top: 10px; border-top: 1px dashed rgba(231, 199, 124, .3); color: #fff; font-family: var(--serif); font-size: 1.02rem; font-weight: 700; line-height: 1.25; text-decoration: none; }
.martyr-day__saint:hover { color: var(--gold-light); text-decoration: underline; text-underline-offset: 3px; }
.martyr-day__saint small { display: block; margin-bottom: 3px; color: var(--on-navy-muted); font-family: var(--sans); font-size: .76rem; font-weight: 500; }
.martyr-day--today { border-color: transparent; background: linear-gradient(160deg, #f3dc9f, var(--gold) 70%); box-shadow: 0 12px 30px rgba(201, 162, 79, .35), 0 0 0 1px rgba(255, 236, 190, .6) inset; }
.martyr-day--today::before { background-image: radial-gradient(circle, rgba(19, 48, 79, .45) 2.4px, transparent 2.9px); }
.martyr-day--today .martyr-day__when { color: var(--wine); }
.martyr-day--today .martyr-day__when .icon { animation: martyr-lampada 2.6s ease-in-out infinite; transform-origin: 50% 90%; }
.martyr-day--today .martyr-day__date, .martyr-day--today .martyr-day__date strong, .martyr-day--today .martyr-day__saint { color: var(--navy); }
.martyr-day--today .martyr-day__saint { border-top-color: rgba(19, 48, 79, .25); }
.martyr-day--today .martyr-day__saint:hover { color: var(--wine); }
.martyr-day--today .martyr-day__saint small { color: rgba(19, 48, 79, .7); }
@keyframes martyr-lampada { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .75; transform: scale(.94) rotate(-2deg); } 70% { opacity: .95; transform: scale(1.03) rotate(1.5deg); } }
@media (max-width: 700px) {
    .section-hero--martyrs { grid-template-columns: minmax(0, 1fr); }
    .section-hero--martyrs > .martyr-days { grid-column: 1; grid-row: auto; margin-top: 20px; }
    .martyr-day { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "date when" "date saint"; align-items: center; column-gap: 16px; padding: 20px 16px 14px; text-align: left; }
    .martyr-days__title { text-align: left; }
    .martyr-day__when { grid-area: when; }
    .martyr-day__date { grid-area: date; padding-right: 16px; border-right: 1px dashed rgba(231, 199, 124, .3); }
    .martyr-day--today .martyr-day__date { border-right-color: rgba(19, 48, 79, .25); }
    .martyr-day__saint { grid-area: saint; margin-top: 4px; padding-top: 0; border-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .martyr-day--today .martyr-day__when .icon { animation: none; } }
@container (max-width: 560px) {
}

.entry--martyrs .entry-portrait { width: 230px; }
.entry--martyrs .entry-portrait__frame { padding: 9px; border-radius: 118px 118px var(--radius) var(--radius); }
.entry--martyrs .entry-portrait__frame::after { border-radius: 113px 113px calc(var(--radius) - 5px) calc(var(--radius) - 5px); }
.entry--martyrs .entry-portrait__frame img { border-radius: 109px 109px 10px 10px; box-shadow: 0 0 0 3px var(--cream); }
.entry--martyrs .entry-portrait::before { position: absolute; inset: -14px -14px 24px; z-index: -1; border-radius: 50% 50% var(--radius) var(--radius); background: radial-gradient(closest-side, rgba(231, 199, 124, .35), transparent); content: ""; }
.entry-portrait__plaque--martyr span { letter-spacing: .1em; }
.martyr-facts { display: grid; gap: 12px; margin-top: 18px; }
.martyr-facts__list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.martyr-facts__list > div { display: grid; gap: 3px; padding: 11px 16px; border-left: 1px solid var(--line-soft); }
.martyr-facts__list > div:first-child { border-left: 0; }
.martyr-facts__list .martyr-facts__repose { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); border-left: 0; }
.martyr-facts__list dt { color: var(--wine); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.martyr-facts__list dd { margin: 0; color: var(--navy); font-size: .95rem; line-height: 1.4; }
.martyr-facts__list > div:first-child dd { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; white-space: nowrap; font-variant-numeric: lining-nums; }
.martyr-facts__memory dd { display: grid; gap: 2px; }
.martyr-facts__memory strong { font-weight: 700; }
.martyr-facts__bond { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: var(--radius-sm); color: var(--on-navy); background: var(--navy); }
.martyr-facts__bond-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: var(--navy); background: var(--gold-light); }
.martyr-facts__bond-icon .icon { width: 22px; height: 22px; }
.martyr-facts__label { display: block; margin-bottom: 3px; color: var(--gold-light); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.martyr-facts__bond p { margin: 0; color: var(--on-navy); font-size: .95rem; line-height: 1.5; }
.martyr-facts__church { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; color: var(--gold-light); font-weight: 600; text-decoration: none; }
.martyr-facts__church:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.martyr-facts__church .icon { width: 16px; height: 16px; }
.martyrs-nav { clear: both; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.martyrs-nav__prayer { margin: 0 0 18px; color: var(--navy); font-family: var(--serif); font-size: 1.08rem; font-style: italic; text-align: center; }
.martyrs-nav__prayer::before, .martyrs-nav__prayer::after { color: var(--gold); content: " ☩ "; font-style: normal; }
.martyrs-nav__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.martyrs-nav__head h2 { margin: 0; color: var(--navy); font-family: var(--serif); font-size: 1.12rem; }
.martyrs-nav__head a { display: inline-flex; align-items: center; gap: 4px; color: var(--wine); font-size: .88rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.martyrs-nav__head .icon { width: 15px; height: 15px; }
.martyrs-nav__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.martyrs-nav__list a { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; align-items: center; height: 100%; padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: var(--radius-sm); background: var(--paper); text-decoration: none; transition: border-color .2s ease; }
.martyrs-nav__list a:hover { border-color: var(--gold); }
.martyrs-nav__photo { display: block; width: 48px; height: 60px; overflow: hidden; border-radius: 24px 24px 6px 6px; background: var(--cream); box-shadow: 0 0 0 2px var(--gold-light); }
.martyrs-nav__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%; }
.martyrs-nav__text { display: grid; gap: 1px; min-width: 0; }
.martyrs-nav__text small { color: var(--wine); font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.martyrs-nav__text strong { color: var(--navy); font-family: var(--serif); font-size: .98rem; line-height: 1.2; }
.martyrs-nav__text span { color: var(--muted); font-size: .8rem; }
@media (max-width: 1100px) { .entry--martyrs .entry-portrait { width: 190px; } }
@media (max-width: 700px) {
    .entry--martyrs .entry-portrait { width: min(62vw, 230px); }
}
@media (max-width: 560px) {
    .martyr-facts__list { grid-template-columns: minmax(0, 1fr); }
    .martyr-facts__list > div { border-left: 0; border-top: 1px solid var(--line-soft); }
    .martyr-facts__list > div:first-child { border-top: 0; }
}
