/* ======================================================================
   ХРАМ РОЖДЕСТВА ХРИСТОВА, с. РЫБУШКА — стили сайта (версия для CMS)
   Чистая сборка: все правки встроены по разделам, дубли удалены.
   ----------------------------------------------------------------------
   СОДЕРЖАНИЕ:
   01. Переменные и сбросы        09. Таинства + фото-окно [photo]
   02. Бумага и фон               10. Вопросы и ответы
   03. Типографика и кнопки       11. Истории
   04. Шапка и меню               12. Летопись
   05. Обложка и заставки         13. Подвал
   06. Сетки, карточки, киот      14. Анимации и движение
   07. Слайдер и галереи          15. Адаптивность
   08. Расписание                 16. Летопись: перо в полосе заголовка
                                  17. Заставочные фото страниц
   ====================================================================== */

/* 01. ПЕРЕМЕННЫЕ И СБРОСЫ ------------------------------------------------ */
:root {
  --cream: #FFFFFF;
  --ink: #1C1F24;
  --ink2: #383E46;
  --mut: #5C636B;
  --gold: #93702C;
  --gold-l: #B99549;
  --line: #E0DACC;
  --dark: #23262B;

  --display: 'Old Standard TT', 'Times New Roman', serif;
  --body: 'PT Sans', 'Segoe UI', sans-serif;

  --pad: clamp(20px, 5vw, 48px);
  --maxw: 1200px;
  --ease: cubic-bezier(.22, 1, .36, 1);

  --btn-py: 14px;
  --btn-px: 30px;
  --btn-fs: 13px;
  --btn-ls: .12em;
  --btn-radius: 2px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 92px; }

/* 02. БУМАГА И ФОН -------------------------------------------------------- */
body {
  color: var(--ink2);
  font: 400 17px/1.7 var(--body);
  -webkit-font-smoothing: antialiased;
  background-color: #e9dab0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.6' numOctaves='2' stitchTiles='stitch'/%3E%3C/feTurbulence%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E"),
    radial-gradient(1100px 700px at 18% 12%, rgba(255, 250, 229, .50), rgba(255, 250, 229, 0) 62%),
    radial-gradient(900px 650px at 82% 28%, rgba(206, 178, 122, .45), rgba(206, 178, 122, 0) 66%),
    radial-gradient(1200px 900px at 50% 88%, rgba(255, 246, 219, .40), rgba(255, 246, 219, 0) 60%),
    linear-gradient(155deg, #e7d6a8 0%, #e2cd9c 40%, #ead9ae 75%, #e6d3a4 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: .5;
  mix-blend-mode: multiply;
  background:
    radial-gradient(120% 92% at 50% 42%, transparent 58%, rgba(92, 72, 40, .10) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.wrap {
  width: min(100% - 2 * var(--pad), var(--maxw));
  margin-inline: auto;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

section { padding-block: clamp(56px, 8vw, 96px); scroll-margin-top: 92px; }
.band { background: rgba(147, 112, 44, .055); }

.skip { position: absolute; left: -9999px; top: 0; background: var(--dark); color: #fff; padding: 10px 18px; z-index: 2000; }
.skip:focus { left: 0; }

/* 03. ТИПОГРАФИКА И КНОПКИ ------------------------------------------------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.18; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.7rem); }

.sec-label { font: 700 12px/1 var(--body); letter-spacing: .24em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.sec-label.on-dark { color: var(--gold-l); }
.sec-title { font-size: clamp(1.55rem, 3vw, 2.4rem); max-width: 26ch; }
.sec-head-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-bottom: 32px; }
.sec-note { font-size: 14px; color: var(--mut); max-width: 42ch; }
.rule-double { width: 72px; border-top: 4px double var(--gold); opacity: .7; margin: 18px 0 30px; }
.lead { max-width: 62ch; margin-top: 20px; font-size: 1.1rem; color: var(--ink2); }
.cross-mark { font-size: 28px; color: var(--gold); margin-bottom: 16px; }
p { max-width: 68ch; }
p + p { margin-top: 16px; }

a[href^="tel"] { color: var(--gold); text-decoration: none; border-bottom: 1px solid transparent; }
a[href^="tel"]:hover { border-color: var(--gold); }

.more-link a, .link-gold, .return-line a { font-weight: 700; color: var(--gold); text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .3s; }
.more-link a:hover, .link-gold:hover, .return-line a:hover { border-color: var(--gold); }
.return-line { margin-top: 34px; }

.btn {
  display: inline-block;
  padding: var(--btn-py) var(--btn-px);
  font: 700 var(--btn-fs)/1 var(--body);
  letter-spacing: var(--btn-ls);
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--gold);
  border-radius: var(--btn-radius);
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-light { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn-light:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .65); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--ink); border-color: var(--ink); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* 04. ШАПКА И МЕНЮ ---------------------------------------------------------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(251, 250, 246, .96);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header.scrolled { box-shadow: 0 4px 18px rgba(28, 31, 36, .10); }

.header-in { display: flex; align-items: center; gap: 20px; min-height: 72px; padding-block: 10px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; flex: 0 0 auto; }
.brand-name { display: block; font: 700 17px/1.25 var(--display); color: var(--ink); }
.brand-sub { display: block; font-size: 11.5px; letter-spacing: .06em; color: var(--mut); }

/* На мобильных снимаем backdrop-filter с шапки: он держит
   fixed-меню в клетке коробки шапки вместо всего экрана */
@media (max-width: 1080px) {
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* Эмблема прихода: вплотную к кругу, тонкий серый контур */
.brand-emblem {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  box-sizing: border-box;
  border: 1px solid #c9c9c9;
  transform: scale(1.15);
  box-shadow: 0 1px 5px rgba(0, 0, 0, .25);
  flex: none;
}
@media (max-width: 600px) { .brand-emblem { width: 38px; height: 38px; } }

.nav { display: flex; gap: clamp(12px, 1.6vw, 24px); margin-left: auto; }
.nav a {
  position: relative; padding: 10px 0;
  font: 700 11.5px/1 var(--body);
  letter-spacing: .1em; text-transform: uppercase;
  text-decoration: none; color: var(--ink2);
  transition: color .3s; white-space: nowrap;
}
.nav a:hover { color: var(--gold); }
.nav a.is-active { color: var(--gold); }
.nav a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; border-top: 2px solid var(--gold); }

.burger { display: none; flex-direction: column; justify-content: center; gap: 6px; width: 44px; height: 44px; padding: 10px; margin-left: auto; position: relative; z-index: 1001; }
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); transition: transform .35s var(--ease), opacity .35s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Шапка: контейнер и меню — окончательная доводка */
.header-in { max-width: 1800px; margin: 0 auto; padding: 12px 28px; }
.site-header .header-in { max-width: 1800px; padding-left: 28px; padding-right: 28px; }
@media (min-width: 1081px) {
  .nav { margin-left: auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 10px; }
  .nav a { font-size: 15px; letter-spacing: .06em; padding: 8px 2px; white-space: nowrap; }
}

@media (max-width: 1080px) {
  .burger { display: flex; }
  .nav {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 990;
    flex-direction: column; justify-content: flex-start; gap: 2px;
    background: #FBFAF6; padding: 96px var(--pad) 40px;
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateY(-100%); visibility: hidden;
    transition: transform .45s var(--ease), visibility 0s linear .45s;
  }
  .nav.open { transform: none; visibility: visible; transition: transform .45s var(--ease); }
  .nav a { font: 700 20px/1.3 var(--display); letter-spacing: .04em; text-transform: none; color: var(--ink); padding: 13px 4px; border-bottom: 1px solid var(--line); white-space: normal; }
  /* Безопасная центровка: авто-поля держат колонку по центру экрана,
     а на очень низком экране схлопываются в ноль и отпускают прокрутку сверху */
  .nav a:first-child { margin-top: auto; }
  .nav a:last-child { margin-bottom: auto; border-bottom: 0; }
  .nav a.is-active { color: var(--gold); }
  body.nav-open { overflow: hidden; }
}

/* 05. ОБЛОЖКА И ЗАСТАВКИ ----------------------------------------------------- */
.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 88vh;
  padding: 150px 0 90px;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(115deg, #6f6e6a 0%, #7a756b 50%, #93866a 100%);
}

.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; animation: kenburns 28s ease-in-out infinite alternate; }
.hero-media img[src=""], .hero-media img:not([src]) { display: none; }
@keyframes kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.08) translate(-1.5%, 1.5%); }
}
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(35, 38, 43, .45), rgba(35, 38, 43, .72)); }

/* Золотое сияние: бледное облако справа + лёгкая золотинка слева */
.hero-gold {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(90% 120% at 88% 55%,
                    rgba(180, 147, 75, .50) 0%,
                    rgba(180, 147, 75, .22) 45%,
                    rgba(180, 147, 75, 0) 75%),
    linear-gradient(100deg,
                    rgba(180, 147, 75, .12) 0%,
                    rgba(180, 147, 75, .10) 35%,
                    rgba(180, 147, 75, .22) 65%,
                    rgba(180, 147, 75, .38) 100%);
}

/* Храм справа: виден целиком, левый край в тонком тумане */
.hero-church {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 30%;
  opacity: .96;
  background-image:
    linear-gradient(to right, rgba(139, 130, 115, .80) 0%, rgba(139, 130, 115, 0) 14%),
    url('hero-church.jpg');
  background-size: auto, contain;
  background-position: center, right center;
  background-repeat: no-repeat, no-repeat;
  -webkit-mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 26%, rgba(0,0,0,1) 88%, rgba(0,0,0,0) 100%);
  mask-image: linear-gradient(to right, rgba(0,0,0,0) 0%, rgba(0,0,0,1) 26%, rgba(0,0,0,1) 88%, rgba(0,0,0,0) 100%);
  z-index: 2;
  pointer-events: none;
}

/* Икона слева: компактная, у левого края с прежним отступом */
.hero-icon {
  position: absolute;
  left: 4%;
  top: 22%;
  width: clamp(120px, 17vw, 238px);
  height: auto;
  aspect-ratio: 340 / 452;
  background-color: rgba(0, 0, 0, .18);
  background-image: url('icon-nativity.jpg');
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 251, 240, .5);
  box-shadow: 0 0 0 4px rgba(180, 147, 75, .25), 0 12px 32px rgba(0, 0, 0, .35);
  z-index: 4;
}

/* Текстовый блок обложки: строго по центру, заголовок в две строки */
.hero-content { position: relative; z-index: 3; color: #fff; }
.hero-label { font: 700 12px/1.7 var(--body); letter-spacing: .26em; text-transform: uppercase; color: rgba(255, 255, 255, .85); margin-bottom: 18px; max-width: 44ch; margin-inline: auto; }
.hero-content h1 { color: #fff; font-size: clamp(36px, 5vw, 76px); letter-spacing: -0.03em; word-spacing: -0.15em; max-width: 16ch; margin-inline: auto; }
.hero-sub { max-width: 56ch; margin: 20px auto 0; font-size: 1.08rem; color: rgba(255, 255, 255, .92); }
.hero-meta { margin: 24px auto 0; font: italic 400 14px/1.8 var(--display); color: rgba(255, 255, 255, .8); max-width: 64ch; }
.hero-meta span { color: var(--gold-l); padding: 0 10px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; margin-top: 32px; }

/* Средние экраны и половинное окно: икона по центру над текстом */
@media (max-width: 1199px) {
  .hero-icon { position: static; transform: none; margin: 84px auto 26px; width: min(300px, 36vw); }
}

/* Телефоны: икона поднята в верхнее поле, храм — бледный силуэт у подножия */
@media (max-width: 900px) {
  .hero { padding-top: 110px; }
  .hero-icon { width: min(280px, 62vw); margin: 12px auto 22px; }
  .hero-church {
    display: block;
    width: 100%;
    opacity: .22;
    background-position: center 88%;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%, #000 88%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 55%, #000 88%, transparent 100%);
  }
}

.scroll-hint { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); }
.scroll-hint i { display: block; width: 1px; height: 52px; background: linear-gradient(var(--gold-l), transparent); animation: hint 2.4s var(--ease) infinite; }
@keyframes hint {
  0% { transform: scaleY(0); transform-origin: top; }
  55% { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

.page-hero { padding: 150px 0 54px; background: rgba(147, 112, 44, .07); border-bottom: 1px solid var(--line); }

/* 06. СЕТКИ, КАРТОЧКИ, КИОТ ----------------------------------------------------- */
.about-grid, .rector-grid, .kosma-grid, .patron-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(34px, 5vw, 70px); align-items: start; }
.rector-grid { grid-template-columns: .8fr 1.2fr; align-items: center; }

.facts { background: var(--cream); border: 1px solid var(--line); padding: 28px 28px 20px; }
.facts h3 { font-size: 1.25rem; margin-bottom: 16px; }
.facts dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; }
.facts dt { font: 700 11px/1.7 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.facts dd { font-size: 15px; color: var(--ink2); }

.arch-frame { background: var(--cream); border: 1px solid var(--line); padding: 12px; border-radius: 999px 999px 12px 12px; box-shadow: 0 14px 40px rgba(28, 31, 36, .10); max-width: 460px; }
.arch-frame img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 999px 999px 6px 6px; }
.arch-frame figcaption { padding-top: 12px; text-align: center; font: italic 400 14px/1.4 var(--display); color: var(--mut); }
.arch-small { max-width: 320px; margin-left: auto; }

/* Киот священномученика Космы: серебряная рамка, прямоугольное окно */
.kosma-side { position: sticky; top: 100px; display: grid; gap: 24px; }
.kosma-side .arch-frame {
  aspect-ratio: 1 / 2;
  max-width: 460px;
  margin: 0 auto;
  padding: 0;
  background: #f4f1ea;
  border: 1px solid #bfc4cb;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 4px rgba(191, 196, 203, .28),
    0 12px 28px rgba(0, 0, 0, .20),
    0 2px 6px rgba(0, 0, 0, .10);
}
.kosma-side .arch-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center center;
  padding: 0;
  border-radius: 9px;
  box-sizing: border-box;
}

.fact-card { background: var(--cream); border: 1px solid var(--line); padding: 24px 26px 16px; }
.fact-card h3 { font-size: 1.15rem; margin-bottom: 12px; }
.fact-card dl { display: grid; gap: 8px; }
.fact-card dt { font: 700 11px/1.6 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.fact-card dd { font-size: 14.5px; color: var(--ink2); margin-bottom: 6px; }

.dropcap { float: left; font: 700 60px/0.85 var(--display); color: var(--gold); padding: 6px 10px 0 0; }

blockquote { margin: 26px 0; padding-left: 24px; border-left: 3px solid var(--gold); font: italic 400 19px/1.55 var(--display); color: var(--ink2); }
blockquote cite { display: block; margin-top: 10px; font: 400 13px/1.4 var(--body); font-style: normal; color: var(--mut); }

.tease-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.tease { display: grid; text-decoration: none; background: var(--cream); border: 1px solid var(--line); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.tease:hover { transform: translateY(-6px); box-shadow: 0 14px 32px rgba(28, 31, 36, .12); }
.tease img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tease-body { display: grid; gap: 6px; padding: 20px 22px 24px; }
.tease-title { font: 700 1.2rem/1.3 var(--display); color: var(--ink); }
.tease-note { font-size: 14px; color: var(--ink2); }

.info-card { background: var(--cream); border: 1px solid var(--line); padding: 24px 26px; }
.info-card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.info-card p { font-size: 14.5px; color: var(--ink2); }

.patron { background: var(--dark); color: #DDD8CC; }
.patron .sec-title { color: #fff; }
.patron p { color: rgba(221, 216, 204, .88); }
.patron-dates { font: italic 400 17px/1.6 var(--display); color: var(--gold-l); }
.patron .arch-frame { background: transparent; border-color: rgba(255, 255, 255, .25); box-shadow: none; }

/* 07. СЛАЙДЕР И ГАЛЕРЕИ ----------------------------------------------------------- */
.hslider { position: relative; }
.hs-track { display: flex; gap: 18px; padding: 6px 0 24px; overflow-x: auto; scroll-snap-type: x mandatory; cursor: grab; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.hs-track::-webkit-scrollbar { display: none; }
.hs-track.grabbing { cursor: grabbing; scroll-snap-type: none; }
.hs-item { flex: 0 0 clamp(240px, 62vw, 400px); scroll-snap-align: start; overflow: hidden; background: var(--cream); border: 1px solid var(--line); padding: 10px 10px 0; transition: box-shadow .4s var(--ease); }
.hs-item:hover { box-shadow: 0 14px 32px rgba(28, 31, 36, .14); }
.hs-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .7s var(--ease); }
.hs-item figcaption { padding: 10px 2px 12px; font: italic 400 14px/1.45 var(--display); color: var(--ink2); }
@media (pointer: fine) {
  .hs-item { cursor: zoom-in; }
  .hs-item:hover img, .hs-item:focus-within img { transform: scale(1.2); }
}
.hs-prev, .hs-next { position: absolute; top: 40%; z-index: 3; width: 48px; height: 48px; border-radius: 50%; background: var(--cream); border: 1px solid var(--line); color: var(--ink); font-size: 24px; line-height: 1; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(28, 31, 36, .12); transition: background .3s, color .3s, border-color .3s; }
.hs-prev { left: -8px; }
.hs-next { right: -8px; }
.hs-prev:hover, .hs-next:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.hs-bar { height: 2px; background: var(--line); margin-top: 4px; }
.hs-bar i { display: block; height: 100%; width: 20%; background: var(--gold); transition: width .2s; }
.gal-title { font: 700 1.3rem/1.3 var(--display); color: var(--ink); margin: 26px 0 12px; }

/* 08. РАСПИСАНИЕ ------------------------------------------------------------------- */
.month-head { font-family: var(--display); font-weight: 700; font-size: clamp(1.3rem, 2.6vw, 2rem); color: var(--ink); margin: 6px 0 18px; }
.month-slot { min-height: 32vh; }
.month-content { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 20px; }
.month-content p { margin-bottom: 10px; max-width: none; color: var(--ink2); }
.month-content ul { list-style: disc; padding-left: 24px; margin-bottom: 14px; }
.month-content ol { list-style: decimal; padding-left: 24px; margin-bottom: 14px; }
.month-content table { width: 100%; min-width: 600px; border-collapse: collapse; margin-bottom: 16px; }
.month-content th, .month-content td { border: 1px solid var(--line); padding: 10px 12px; font-size: 15px; text-align: left; vertical-align: top; }
.month-content th { background: rgba(147, 112, 44, .08); font-weight: 700; color: var(--ink); }
.month-content h3, .month-content h4 { margin: 18px 0 10px; }

/* Одиночное фото в содержимом: две трети ширины, отступы */
.month-content > img {
  display: block;
  width: 66%;
  max-width: 100%;
  height: auto;
  margin: 30px 0 34px;
  border-radius: 6px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
}

/* Стрелка-подсказка горизонтальной прокрутки таблицы */
.xhint {
  position: fixed; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(28, 31, 36, .55); color: #fff;
  font-size: 18px; line-height: 1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  pointer-events: none; z-index: 60;
  transition: opacity .3s;
}
.xhint span { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.xhint.off { opacity: 0; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.steps li { position: relative; background: var(--cream); border: 1px solid var(--line); padding: 26px; }
.step-num { position: absolute; top: -16px; left: 22px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: #fff; font: 700 16px/1 var(--display); }
.steps h3 { font-size: 1.15rem; margin-bottom: 8px; }
.steps p { font-size: 14.5px; color: var(--ink2); }

/* 09. ТАИНСТВА И ФОТО-ОКНО ----------------------------------------------------------- */
.sac-list { display: grid; gap: clamp(40px, 6vw, 72px); }
.sac-row { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 4vw, 60px); align-items: center; }
.sac-row:nth-of-type(even) .sac-photo { order: 2; }
.sac-photo { overflow: hidden; border: 1px solid var(--line); background: var(--cream); padding: 10px; }
.sac-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .8s var(--ease); }
.sac-row:hover .sac-photo img { transform: scale(1.06); }
.sac-num { font: 700 22px/1 var(--display); color: var(--gold); display: block; margin-bottom: 10px; }
.sac-text h3 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 14px; }
.sac-text p { color: var(--ink2); font-size: 15.5px; }
.prac { margin-top: 16px; padding: 12px 18px; background: var(--cream); border-left: 3px solid var(--gold); font-size: 14.5px; color: var(--mut); }

/* Фото-окно [photo] в содержимом страниц: фото слева, текст справа, без цифр */
.month-content .sac-list { gap: 0; }
.month-content .sac-row { display: grid; grid-template-columns: minmax(0, 62fr) minmax(0, 38fr); gap: 30px; align-items: start; margin: 36px 0; }
.month-content .sac-row.photo-right { direction: ltr; }
.month-content .sac-row:nth-of-type(even) .sac-photo { order: 0; }
.month-content .sac-photo { margin: 0; border: 0; background: none; padding: 0; overflow: visible; }
.month-content .sac-photo img { width: 100%; height: auto; display: block; aspect-ratio: auto; border-radius: 6px; box-shadow: 0 10px 26px rgba(0, 0, 0, .18); transform: none; }
.month-content .sac-text { padding-top: 4px; }
.month-content .sac-text h3 { margin: 0 0 12px; font-size: 1.6em; }
.month-content .sac-text .sac-num { display: none; }
.month-content .sac-text .prac { margin-top: 16px; }
@media (max-width: 900px) {
  .month-content .sac-row { grid-template-columns: 1fr; gap: 18px; margin: 26px 0; }
}

/* 10. ВОПРОСЫ И ОТВЕТЫ ---------------------------------------------------------------- */
.qa-list { max-width: 860px; margin-inline: auto; border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: baseline; padding: 20px 6px; font: 700 1.05rem/1.45 var(--display); color: var(--ink); transition: padding .3s var(--ease), color .3s; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary::marker { content: ""; }
.qa summary::before { content: "+"; flex: 0 0 auto; color: var(--gold); font: 700 22px/1 var(--display); transition: transform .35s var(--ease); }
.qa summary:hover { padding-left: 14px; color: var(--gold); }
.qa[open] summary { color: var(--gold); }
.qa[open] summary::before { transform: rotate(45deg); }
.qa-a { padding: 0 6px 22px 40px; }
.qa-a p { max-width: 64ch; color: var(--ink2); font-size: 15.5px; }

/* 11. ИСТОРИИ ---------------------------------------------------------------------------- */
.story-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; }
.story { background: var(--cream); border: 1px solid var(--line); display: grid; }
.story img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.story-body { padding: 20px 22px 24px; display: grid; gap: 10px; align-content: start; }
.story h3 { font-size: 1.15rem; }
.story p { font-size: 14.5px; color: var(--ink2); }
.story-src { font-size: 12.5px; color: var(--mut); font-style: italic; }

/* 12. ЛЕТОПИСЬ ------------------------------------------------------------------------------ */
.tl { position: relative; max-width: 780px; margin-inline: auto; padding-left: 34px; }
.tl::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 1px; background: linear-gradient(var(--gold), var(--line)); }
.tl-item { position: relative; padding: 0 0 40px 26px; }
.tl-item::before { content: ""; position: absolute; left: -33px; top: 8px; width: 11px; height: 11px; border-radius: 50%; background: #FBFAF6; border: 2px solid var(--gold); }
.tl-year { font: 700 24px/1 var(--display); color: var(--gold); }
.tl-item h3 { font-size: 1.25rem; margin: 8px 0; }
.tl-item p:last-child { color: var(--ink2); font-size: 15.5px; }
.source-note { margin-top: 10px; font-size: 13px; color: var(--mut); text-align: center; }
.return-sec { text-align: center; }
.return-in p { margin-inline: auto; margin-bottom: 24px; font: italic 400 19px/1.6 var(--display); color: var(--ink2); }

/* 13. ПОДВАЛ ---------------------------------------------------------------------------------- */
.site-footer { background: var(--dark); color: #C9C4B8; padding-top: 52px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; padding-bottom: 38px; }
.site-footer h3 { color: #fff; font-size: 1.15rem; margin-bottom: 14px; }
.site-footer p { font-size: 14.5px; line-height: 1.75; }
.site-footer a { color: var(--gold-l); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-nav { display: grid; gap: 8px; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1px solid rgba(255, 255, 255, .14); padding-block: 18px; font-size: 12.5px; letter-spacing: .08em; color: rgba(201, 196, 184, .75); }

/* Мини-эмблема в строке подвала: справа от «с. Рыбушка» */
.foot-emblem {
  width: 65px; height: 65px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: -14px;
  margin: 0 0 0 12px;
  opacity: 1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .2);
}

/* 14. АНИМАЦИИ И ДВИЖЕНИЕ ------------------------------------------------------------------------ */
.rv { opacity: 0; transform: translateY(33px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in, .rv.rv-in { opacity: 1; transform: none; }

.tease-grid .rv:nth-child(2), .story-grid .rv:nth-child(2), .sac-list .rv:nth-child(2) { transition-delay: .10s; }
.tease-grid .rv:nth-child(3), .story-grid .rv:nth-child(3), .sac-list .rv:nth-child(3) { transition-delay: .20s; }
.tease-grid .rv:nth-child(4) { transition-delay: .30s; }

main { transition: opacity .25s ease, transform .25s ease; }
body.page-leave main { opacity: 0; transform: translateY(-10px); }
body.page-enter main { animation: pageIn .55s var(--ease) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

body.no-reveal .rv, .no-reveal .rv { opacity: 1 !important; transform: none !important; transition: none !important; }
body.no-pagefade main { transition: none !important; }
body.no-pagefade.page-leave main { opacity: 1; transform: none; }
body.no-pagefade.page-enter main { animation: none !important; }
body.no-kenburns .hero-media img { animation: none !important; }
body.no-zoom .hs-item:hover img, body.no-zoom .hs-item:focus-within img, body.no-zoom .sac-row:hover .sac-photo img { transform: none !important; }

body.anim-fast .rv { transition-duration: .45s; }
body.anim-fast.page-enter main { animation-duration: .3s; }
body.anim-fast main { transition-duration: .15s; }
body.anim-slow .rv { transition-duration: 1.6s; }
body.anim-slow.page-enter main { animation-duration: 1s; }
body.anim-slow main { transition-duration: .45s; }

/* 15. АДАПТИВНОСТЬ ---------------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .about-grid, .rector-grid, .kosma-grid, .patron-grid { grid-template-columns: 1fr; }
  .kosma-side { position: static; }
  .arch-frame, .arch-small { margin-inline: auto; }
  .sac-row, .sac-row:nth-of-type(even) .sac-photo { grid-template-columns: 1fr; order: 0; }
  .hs-prev, .hs-next { display: none; }
}

@media (max-width: 700px) {
  .facts dl { grid-template-columns: 1fr; gap: 2px 0; }
  .facts dt { margin-top: 10px; }
  .qa-a { padding-left: 6px; }
  .month-content th, .month-content td { padding: 8px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv { opacity: 1; transform: none; }
  body.page-enter main { animation: none; }
}

/* 16. ЛЕТОПИСЬ: ПЕРО В ПОЛОСЕ ЗАГОЛОВКА ---------------------------------------------------------------- */
.page-hero { position: relative; overflow: hidden; }
.page-hero .wrap { position: relative; z-index: 2; }

.hist-quill {
  position: absolute;
  top: 30px; right: 5px; bottom: 6px;
  width: 40%;
  margin: 0;
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.55) 18%, #000 38%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.55) 18%, #000 38%);
}
.hist-quill img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 35% 0%;
  transform: translateY(10%) scale(1.08);
  transform-origin: center top;
  display: block;
  opacity: .95;
}
.hist-quill::before {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(211, 189, 142, .90) 0%, rgba(211, 189, 142, 0) 8%),
    linear-gradient(to top,    rgba(211, 189, 142, .97) 0%, rgba(211, 189, 142, 0) 18%),
    linear-gradient(to left,   rgba(211, 189, 142, .95) 0%, rgba(211, 189, 142, 0) 14%),
    linear-gradient(to right,  rgba(211, 189, 142, .92) 0%, rgba(211, 189, 142, 0) 24%);
}
.hist-quill::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background: linear-gradient(to right,
              rgba(211, 189, 142, .96) 0%,
              rgba(211, 189, 142, .80) 40%,
              rgba(211, 189, 142, 0) 72%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 58%, transparent 76%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 20%, #000 58%, transparent 76%);
}
@media (max-width: 900px) {
  .hist-quill { position: static; width: 100%; margin: 14px 0 0; }
  .hist-quill img { height: 300px; transform: none; }
}

/* Тёплый ореол вокруг букв заставки: тёмный текст читается поверх фото */
.page-hero h1, .page-hero .lead {
  text-shadow:
    0 0 14px rgba(233, 218, 176, .9),
    0 0 30px rgba(233, 218, 176, .65),
    0 1px 0  rgba(233, 218, 176, .8);
}

/* 17. ЗАСТАВОЧНЫЕ ФОТО СТРАНИЦ -----------------------------------------------------------------------
   Фото в правой части полосы заставки: «Расписание» (sched-icons) и
   «Таинства» (page-photo). Общий строй — как у пера летописи (раздел 16),
   но золотой туман ужат к левому срезу, чтобы лики и книги не тонули в сиянии. */

/* Расписание: свеча между ликами */
.sched-icons {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 6%, #000 18%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 6%, #000 18%);
}
.sched-icons::before {
  background:
    linear-gradient(to bottom, rgba(211, 189, 142, .90) 0%, rgba(211, 189, 142, 0) 8%),
    linear-gradient(to top,    rgba(211, 189, 142, .97) 0%, rgba(211, 189, 142, 0) 18%),
    linear-gradient(to left,   rgba(211, 189, 142, .95) 0%, rgba(211, 189, 142, 0) 14%),
    linear-gradient(to right,  rgba(211, 189, 142, .92) 0%, rgba(211, 189, 142, 0) 8%);
}
.sched-icons::after {
  background: linear-gradient(to right,
              rgba(211, 189, 142, .95) 0%,
              rgba(211, 189, 142, .60) 8%,
              rgba(211, 189, 142, 0) 22%);
}
.sched-icons img {
  object-position: center 42%;
  transform: none;
  opacity: .92;
}

/* Таинства: потир и просфора; кадр опущен, верх Евангелия виден целиком */
.page-photo {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 6%, #000 18%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 6%, #000 18%);
}
.page-photo::before {
  background:
    linear-gradient(to top,    rgba(211, 189, 142, .97) 0%, rgba(211, 189, 142, 0) 18%),
    linear-gradient(to left,   rgba(211, 189, 142, .95) 0%, rgba(211, 189, 142, 0) 14%),
    linear-gradient(to right,  rgba(211, 189, 142, .92) 0%, rgba(211, 189, 142, 0) 8%);
}
.page-photo::after {
  background: linear-gradient(to right,
              rgba(211, 189, 142, .95) 0%,
              rgba(211, 189, 142, .60) 8%,
              rgba(211, 189, 142, 0) 22%);
}
.page-photo img {
  object-position: center 20%;
  transform: translateY(4%) scale(1.09);
  opacity: .92;
}

/* Таинства: Евангелие видно целиком, кадр в тон заставкам «Истории» и «Расписания» */
.page-photo img {
  object-position: center top;   /* верх кадра = верх фото: книга видна от торца */
  transform: none;               /* без сдвига и приближения: ничего не обрезается */
  opacity: .92;
  filter: brightness(.86);       /* чуть темнее: в один тон с прочими заставками */
}

/* Таинства: окончательно — рисунок сдвинут ВНИЗ и затемнён ещё на ступень */
.page-photo img {
  object-position: center top;
  transform: translateY(7%) scale(1.14);   /* сдвиг вниз: верх Евангелия выходит на свет */
  transform-origin: center top;
  opacity: .92;
  filter: brightness(.80);                 /* темнее: в один тон с «Историей» и «Расписанием» */
}
/* Тонкая верхняя дымка: кромка сдвинутого кадра тает в полосе, как малый отступ */
.page-photo::before {
  background:
    linear-gradient(to bottom, rgba(211, 189, 142, .95) 0%, rgba(211, 189, 142, 0) 12%),
    linear-gradient(to top,    rgba(211, 189, 142, .97) 0%, rgba(211, 189, 142, 0) 18%),
    linear-gradient(to left,   rgba(211, 189, 142, .95) 0%, rgba(211, 189, 142, 0) 14%),
    linear-gradient(to right,  rgba(211, 189, 142, .92) 0%, rgba(211, 189, 142, 0) 8%);
}

/* Ответы священника: кадило, книга и икона — в общем золотом строю заставок */
.answers-photo {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 6%, #000 18%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 6%, #000 18%);
}
.answers-photo::before {
  background:
    linear-gradient(to bottom, rgba(211, 189, 142, .95) 0%, rgba(211, 189, 142, 0) 12%),
    linear-gradient(to top,    rgba(211, 189, 142, .97) 0%, rgba(211, 189, 142, 0) 18%),
    linear-gradient(to left,   rgba(211, 189, 142, .95) 0%, rgba(211, 189, 142, 0) 14%),
    linear-gradient(to right,  rgba(211, 189, 142, .92) 0%, rgba(211, 189, 142, 0) 8%);
}
.answers-photo::after {
  background: linear-gradient(to right,
              rgba(211, 189, 142, .95) 0%,
              rgba(211, 189, 142, .60) 8%,
              rgba(211, 189, 142, 0) 22%);
}
.answers-photo img {
  object-position: 52% top;              /* окно держит середину: книгу и икону */
  transform: translateY(5%) scale(1.12); /* лёгкий сдвиг вниз: верх киота на свету */
  transform-origin: center top;
  opacity: .92;
  filter: brightness(.88);               /* в тон прочим заставкам, но не темнее книги */
}

/* Настоятель: крест и панагия на Евангелии — в золотом строю заставок */
.rector-photo {
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 6%, #000 18%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.6) 6%, #000 18%);
}
.rector-photo::before {
  background:
    linear-gradient(to bottom, rgba(211, 189, 142, .95) 0%, rgba(211, 189, 142, 0) 12%),
    linear-gradient(to top,    rgba(211, 189, 142, .97) 0%, rgba(211, 189, 142, 0) 18%),
    linear-gradient(to left,   rgba(211, 189, 142, .95) 0%, rgba(211, 189, 142, 0) 14%),
    linear-gradient(to right,  rgba(211, 189, 142, .92) 0%, rgba(211, 189, 142, 0) 8%);
}
.rector-photo::after {
  background: linear-gradient(to right,
              rgba(211, 189, 142, .95) 0%,
              rgba(211, 189, 142, .60) 8%,
              rgba(211, 189, 142, 0) 22%);
}
.rector-photo img {
  object-position: 72% center;    /* окно держит крест и книгу, угол с пометкой уходит за обрез */
  transform: none;
  opacity: .92;
  filter: brightness(.95) contrast(.98);   /* тон уже ваш: лишь капля света и плотности */
}


/* Расписание: тёмный и полновесный текст в таблице из docx */
.month-content table.docx-table,
.month-content table.docx-table th,
.month-content table.docx-table td,
.month-content table.docx-table th *,
.month-content table.docx-table td * {
  font-family: "Old Standard TT", "Times New Roman", serif !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  color: #000 !important;                    /* чистая чернь: темнее не бывает */
  -webkit-text-stroke: .4px currentColor;    /* волосяная обводка: штрих полнеет */
  text-shadow: 0 0 .6px currentColor;        /* тень-дублёр: вторая краска по букве */
  line-height: 1.5 !important;
  letter-spacing: .01em !important;
  opacity: 1 !important;
  -webkit-font-smoothing: subpixel-antialiased;
}

/* Шапка таблицы крупнее и теплее */
.month-content table.docx-table th {
  font-size: 18px !important;
  background: rgba(233, 220, 185, .65) !important;
}

/* Светлая подложка клеток: зерно бумаги не дрожит под буквами */
.month-content table.docx-table td {
  background: rgba(255, 253, 246, .55) !important;
}

.tease{
  align-content: start;
}