/* ==========================================================
   Храм Рождества Пресвятой Богородицы — стили сайта
   Цвета и размеры меняются в блоке :root ниже
   ========================================================== */

:root {
  --blue: #1c3461;          /* богородичный синий */
  --blue-2: #2a4c86;
  --blue-ink: #13254a;
  --gold: #b48a3c;          /* приглушённое золото */
  --gold-2: #cfa758;
  --gold-soft: #f1e6cc;
  --bg: #fbf8f2;            /* тёплый светлый фон */
  --bg-alt: #f3ede1;
  --card: #ffffff;
  --ink: #1f2430;
  --muted: #5e6371;
  --line: #e4dccb;
  --ok: #2f6b3c;
  --err: #9b2c2c;

  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(31 36 48 / .06), 0 8px 24px rgb(31 36 48 / .07);
  --shadow-lg: 0 2px 4px rgb(31 36 48 / .08), 0 18px 48px rgb(31 36 48 / .14);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 88px;

  --ornament: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Cg fill='none' stroke='%23b48a3c' stroke-width='1.3'%3E%3Ccircle cx='12' cy='12' r='11'/%3E%3Ccircle cx='36' cy='12' r='11'/%3E%3Ccircle cx='24' cy='12' r='5'/%3E%3C/g%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font: 400 18px/1.65 var(--sans);
  color: var(--ink);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-2); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; color: var(--blue-ink); margin: 0 0 .5em; letter-spacing: .005em; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: var(--blue); color: #fff; padding: 10px 16px; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 860px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: .7em 1.3em; border-radius: 999px;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-lg { min-height: 56px; padding: .85em 1.6em; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-2); color: #fff; box-shadow: var(--shadow); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #a07a31; color: #fff; box-shadow: var(--shadow); }
.btn-outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-ghost { border-color: rgb(255 255 255 / .55); color: #fff; background: rgb(255 255 255 / .08); backdrop-filter: blur(4px); }
.btn-ghost:hover { background: rgb(255 255 255 / .2); color: #fff; }
.link-arrow { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; text-decoration: none; color: var(--blue-2); }
.link-arrow:hover .i { transform: translateX(3px); }
.link-arrow .i { transition: transform .2s; width: 1em; height: 1em; }

/* ---------- Шапка ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(251 248 242 / .92); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--blue-ink); margin-right: auto; }
/* Икона в шапке — в небольшом позолоченном киоте с арочным верхом */
.kiot {
  position: relative; flex: none; display: block;
  width: 58px; aspect-ratio: 175 / 200; padding: 3px;
  border-radius: 30px 30px 6px 6px;
  background: linear-gradient(145deg, #f3dc9c 0%, #b48a3c 38%, #e9cd84 62%, #8f6a26 100%);
  box-shadow: 0 0 0 1px rgb(143 106 38 / .55), 0 6px 14px rgb(28 52 97 / .22), 0 1px 2px rgb(0 0 0 / .2);
  transition: transform .25s ease, box-shadow .25s ease;
}
.kiot img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  border-radius: 27px 27px 4px 4px;
  box-shadow: inset 0 0 0 1px rgb(0 0 0 / .25);
}
.kiot::after { /* лёгкий блик на «позолоте» */
  content: ""; position: absolute; inset: 3px; border-radius: 27px 27px 4px 4px; pointer-events: none;
  background: linear-gradient(160deg, rgb(255 255 255 / .28), transparent 35%);
}
.brand:hover .kiot { transform: translateY(-1px); box-shadow: 0 0 0 1px rgb(143 106 38 / .6), 0 10px 22px rgb(28 52 97 / .28); }
.brand-icon { width: 40px; height: 46px; object-fit: cover; border-radius: 4px; box-shadow: 0 0 0 2px var(--gold-soft), 0 2px 6px rgb(0 0 0 / .15); }
.brand-icon--svg { display: grid; place-items: center; background: var(--blue); color: var(--gold-2); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font: 700 1.12rem/1.05 var(--serif); }
.brand-sub { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-top: 3px; }

.site-nav { display: flex; align-items: center; gap: 18px; }
.nav-list { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-item { position: relative; }
.nav-item > a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav-item > a:hover { background: var(--bg-alt); color: var(--blue); }
.nav-item > a[aria-current="page"] { color: var(--blue); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 8px 8px 0 0; }
.has-sub > a::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg) translateY(-3px); opacity: .6; }
.nav-sub {
  position: absolute; left: 0; top: 100%; min-width: 270px; list-style: none; margin: 0; padding: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: .18s;
}
.has-sub:hover .nav-sub, .has-sub:focus-within .nav-sub { opacity: 1; visibility: visible; transform: none; }
.nav-sub a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .95rem; }
.nav-sub a:hover { background: var(--bg-alt); color: var(--blue); }
.nav-donate { min-height: 42px; padding: .5em 1.1em; font-size: .95rem; }
.nav-toggle { display: none; }

@media (max-width: 1080px) {
  :root { --header-h: 72px; }
  .kiot { width: 46px; border-radius: 24px 24px 5px 5px; }
  .kiot img, .kiot::after { border-radius: 21px 21px 3px 3px; }
  .nav-toggle {
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
    border: 1px solid var(--line); background: var(--card); color: var(--blue); cursor: pointer;
  }
  .nav-toggle .i { width: 26px; height: 26px; }
  .nav-toggle-close, .nav-open .nav-toggle-open { display: none; }
  .nav-open .nav-toggle-close { display: block; }
  .site-header { backdrop-filter: none; background: var(--bg); }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0; z-index: 49; overflow-y: auto; overscroll-behavior: contain;
    flex-direction: column; align-items: stretch; gap: 16px; padding: 16px var(--gutter) 120px;
    background: var(--bg); opacity: 0; transform: translateY(-10px); visibility: hidden;
    transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
  }
  .nav-open .site-nav { opacity: 1; transform: none; visibility: visible; transition: opacity .2s ease, transform .2s ease; }
  .nav-list { flex-direction: column; }
  .nav-item > a { font-size: 1.15rem; padding: 14px 8px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-item > a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--gold); padding-left: 16px; }
  .has-sub > a::after { display: none; }
  .nav-sub { position: static; opacity: 1; visibility: inherit; transform: none; box-shadow: none; border: 0; background: transparent; padding: 4px 0 8px 16px; min-width: 0; }
  .nav-sub a { font-size: 1.02rem; color: var(--muted); }
  .nav-donate { min-height: 54px; font-size: 1.05rem; }
  body.nav-open { overflow: hidden; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 1rem; }
  .brand-icon { width: 34px; height: 40px; }
  .kiot { width: 42px; }
}

/* ---------- Главный экран ---------- */
.hero {
  position: relative; isolation: isolate; color: #fff;
  min-height: min(82vh, 760px); display: flex; align-items: flex-end;
  background: var(--blue-ink) var(--hero, none) center 35% / cover no-repeat;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgb(19 37 74 / .15) 0%, rgb(19 37 74 / .35) 45%, rgb(15 28 56 / .92) 100%),
    radial-gradient(120% 80% at 0% 100%, rgb(19 37 74 / .55), transparent 60%);
}
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 24px;
  background: var(--ornament) center / 48px 24px repeat-x; opacity: .7;
}
.hero-inner { padding-block: 120px 72px; }
.hero-title { color: #fff; font-size: clamp(2.6rem, 7vw, 5rem); line-height: 1; margin-bottom: 18px; text-shadow: 0 2px 24px rgb(0 0 0 / .35); }
.hero-sub { font-size: 1.15rem; display: flex; align-items: center; gap: 8px; opacity: .95; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-actions.center { justify-content: center; }
.eyebrow { font: 700 .78rem/1.3 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
.eyebrow-light { color: var(--gold-2); }

.page-hero {
  position: relative; padding: clamp(44px, 7vw, 84px) 0 clamp(36px, 5vw, 56px);
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
  border-bottom: 1px solid var(--line);
}
.page-hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 18px; background: var(--ornament) center / 36px 18px repeat-x; opacity: .35; }
.page-hero h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); margin-bottom: 8px; }
.page-hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 760px; margin: 0; }

/* ---------- Секции ---------- */
.section { padding-block: clamp(48px, 7vw, 88px); }
.section-tight { padding-block: clamp(32px, 5vw, 56px); }
.section-alt { background: var(--bg-alt); }
.section-title { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.lead-text { font-size: 1.08rem; color: var(--muted); max-width: 820px; margin-bottom: 28px; }

/* Объявления */
.announce-list { display: grid; gap: 14px; }
.announce {
  display: flex; gap: 16px; padding: 20px 24px; background: var(--card);
  border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: var(--radius); box-shadow: var(--shadow);
}
.announce h3 { font-size: 1.45rem; margin-bottom: 6px; }
.announce p:last-child { margin-bottom: 0; }
.announce-mark { color: var(--gold); padding-top: 4px; }
.announce-mark .i { width: 28px; height: 28px; }

/* Анонс расписания */
.schedule-teaser { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.schedule-teaser-sheets { display: flex; justify-content: center; gap: 0; min-height: 320px; }
.sheet {
  width: min(46%, 260px); background: #fff; padding: 8px; border-radius: 6px; box-shadow: var(--shadow-lg);
  transform: rotate(var(--r, 0deg)); transition: transform .3s;
}
.sheet + .sheet { margin-left: -6%; margin-top: 28px; }
.sheet:hover { transform: rotate(0) scale(1.03); z-index: 2; }
.sheet img { border-radius: 2px; }
.sheet-empty { width: 280px; aspect-ratio: 3/4; display: grid; place-content: center; gap: 10px; text-align: center; color: var(--muted); }
.sheet-empty .i { width: 48px; height: 48px; margin: auto; color: var(--gold); }

/* Новости */
.news-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.news-card { background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; border: 1px solid var(--line); }
.news-card img { aspect-ratio: 16/10; object-fit: cover; width: 100%; }
.news-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-body time { font-size: .85rem; font-weight: 700; color: var(--gold); letter-spacing: .04em; text-transform: uppercase; }
.news-body h3 { font-size: 1.3rem; margin: 0; }
.news-body h3 a { color: inherit; text-decoration: none; }
.news-body h3 a::after { content: ""; position: absolute; inset: 0; }
.news-card { position: relative; }
.news-card:hover { box-shadow: var(--shadow-lg); }
.news-body .link-arrow { margin-top: auto; font-size: .9rem; }
.news-card--lead h3 { font-size: 1.55rem; }

/* О храме */
.about { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.about-photo { margin: 0; position: relative; }
.about-photo img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.about-photo figcaption {
  position: absolute; left: 16px; bottom: 16px; background: rgb(255 255 255 / .92); padding: 6px 14px;
  border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--blue);
}
.about-photo:not(:has(img)) { min-height: 280px; background: var(--bg-alt); border-radius: var(--radius); }

/* Люди */
.people { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 12px; }
.person { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; text-align: center; box-shadow: var(--shadow); }
.person-photo {
  width: 132px; height: 132px; margin: 0 auto 16px; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--bg-alt); color: var(--gold);
  box-shadow: 0 0 0 4px var(--card), 0 0 0 5px var(--gold-soft);
}
.person-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.person-photo .i { width: 44px; height: 44px; }
.person-role { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; }
.person-name { font-size: 1.3rem; margin-bottom: 8px; }
.person-text { font-size: .95rem; color: var(--muted); }

/* Пожертвования (главная) */
.donate-band {
  display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center;
  background: linear-gradient(135deg, var(--blue-ink), var(--blue-2)); color: #e9eef8;
  border-radius: calc(var(--radius) * 1.5); padding: clamp(28px, 5vw, 56px); position: relative; overflow: hidden;
}
.donate-band::before { content: ""; position: absolute; inset: auto 0 0 0; height: 24px; background: var(--ornament) center / 48px 24px repeat-x; opacity: .35; }
.donate-band .section-title { color: #fff; }
.donate-band .eyebrow { color: var(--gold-2); }
.donate-band .link-arrow { color: #fff; }
.donate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 0; }
.qr-card { display: block; width: 210px; border-radius: 16px; overflow: hidden; box-shadow: 0 16px 40px rgb(0 0 0 / .35); transform: rotate(2deg); transition: transform .3s; }
.qr-card:hover { transform: rotate(0) scale(1.03); }

/* Контакты */
.contact-band, .contact-page { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 56px); align-items: stretch; }
.contact-list { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 18px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .i { width: 26px; height: 26px; color: var(--gold); margin-top: 3px; }
.contact-list--big { font-size: 1.08rem; }
.map-links { display: flex; flex-wrap: wrap; gap: 12px; }
.map-frame { position: relative; min-height: 360px; border-radius: var(--radius); overflow: hidden; background: #e9e4d8 var(--ornament) center / 48px 24px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.map-frame--tall { min-height: 460px; }
.map-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-load { position: absolute; inset: 0; margin: auto; width: max-content; height: 56px; padding: 0 24px; border-radius: 999px; border: 0; background: var(--card); color: var(--blue); font: 600 1rem var(--sans); box-shadow: var(--shadow-lg); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }

/* Расписание */
.hint { display: flex; justify-content: center; align-items: flex-start; gap: 8px; color: var(--muted); font-size: .95rem; text-align: left; max-width: 640px; margin: 0 auto 16px; }
.hint .i { margin-top: 3px; }
.schedule-sheets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 24px; margin: 8px 0 24px; }
.schedule-item { margin: 0; scroll-margin-top: calc(var(--header-h) + 70px); }
.schedule-item figcaption { text-align: center; color: var(--muted); font-size: .9rem; font-weight: 600; margin-top: 8px; }
.sheet-tabs {
  position: sticky; top: var(--header-h); z-index: 5; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 0; margin-bottom: 8px; background: var(--bg);
}
.sheet-tab {
  min-height: 44px; padding: 8px 20px; border-radius: 999px; border: 1.5px solid var(--blue); background: var(--card);
  color: var(--blue); font: 600 1rem var(--sans); cursor: pointer;
}
.sheet-tab.is-active { background: var(--blue); color: #fff; }
.sheet-pager { display: none; }
@media (max-width: 760px) {
  /* На телефоне листы идут лентой: листаются пальцем и кнопками */
  .schedule-sheets.is-multi {
    display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    margin-inline: calc(var(--gutter) * -1); padding: 0 var(--gutter) 6px; scroll-padding-inline: var(--gutter);
    scrollbar-width: none;
  }
  .schedule-sheets.is-multi::-webkit-scrollbar { display: none; }
  .schedule-sheets.is-multi .schedule-item { flex: 0 0 100%; scroll-snap-align: start; }
  .sheet-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 32px; }
  .sheet-pager .btn { min-height: 48px; padding: .6em 1em; font-size: .95rem; }
  .sheet-pager .btn:disabled { opacity: .35; cursor: default; transform: none; }
  .sheet-pager span { font-weight: 700; color: var(--blue); white-space: nowrap; }
}
.schedule-sheet { display: block; background: #fff; padding: 10px; border-radius: var(--radius-sm); box-shadow: var(--shadow); border: 1px solid var(--line); cursor: zoom-in; transition: box-shadow .2s, transform .2s; }
.schedule-sheet:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.schedule-sheet img { width: 100%; }
.note { background: var(--gold-soft); border-left: 5px solid var(--gold); padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 24px; font-size: 1.05rem; }
.empty { text-align: center; padding: 56px 24px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); margin-bottom: 40px; }
.empty .i { width: 48px; height: 48px; color: var(--gold); margin: 0 auto 12px; }
.info-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.info-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.info-card h2 { font-size: 1.45rem; display: flex; gap: 10px; align-items: center; }
.info-card h2 .i { color: var(--gold); }

/* Требы */
.two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.two-col--wide { grid-template-columns: 1.4fr 1fr; }
.treby-list { counter-reset: t; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.treby-list li { counter-increment: t; position: relative; padding: 14px 16px 14px 56px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); }
.treby-list li::before { content: counter(t); position: absolute; left: 14px; top: 12px; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--blue); color: #fff; font: 700 .85rem var(--sans); }
.treby-list strong { display: block; }
.treby-list span { font-size: .88rem; color: var(--muted); }
.side-card { background: var(--card); border: 1px solid var(--line); border-top: 5px solid var(--gold); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); position: sticky; top: calc(var(--header-h) + 20px); }
.side-card h2 { font-size: 1.7rem; }
.steps { padding-left: 1.3em; display: grid; gap: 10px; margin-bottom: 22px; }
.steps li::marker { color: var(--gold); font-weight: 700; }

/* История */
.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; border-left: 2px solid var(--gold-soft); }
.timeline li { position: relative; padding: 0 0 28px 8px; }
.timeline li::before { content: ""; position: absolute; left: -36px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 3px solid var(--gold); }
.timeline-year { font: 700 1.6rem/1 var(--serif); color: var(--blue); display: block; margin-bottom: 6px; }
.timeline p { margin: 0; }
.photo-stack { display: grid; gap: 16px; position: sticky; top: calc(var(--header-h) + 20px); }
.photo-stack img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; cursor: zoom-in; }
.cta-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.cta-tile { display: flex; flex-direction: column; gap: 6px; padding: 26px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--blue-ink); box-shadow: var(--shadow); transition: .2s; }
.cta-tile strong { font: 700 1.5rem/1.15 var(--serif); }
.cta-tile .i { color: var(--gold); margin-top: 8px; }
.cta-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Архипастырские богослужения */
.year-head { font-size: 2.2rem; color: var(--gold); border-bottom: 1px solid var(--line); padding-bottom: 6px; margin-top: 32px; }
.event-list { display: grid; gap: 14px; }
.event { display: grid; grid-template-columns: 92px 1fr; gap: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.event time { text-align: center; color: var(--muted); font-size: .85rem; line-height: 1.2; padding-top: 4px; }
.event time span { display: block; font: 700 2.4rem/1 var(--serif); color: var(--blue); }
.event h3 { font-size: 1.3rem; }
.event-video, .event-photo { border-radius: var(--radius-sm); margin: 6px 0 12px; width: 100%; background: #000; }

/* Галерея */
.gallery { columns: 3 280px; column-gap: 16px; }
.gallery a { display: block; margin-bottom: 16px; break-inside: avoid; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; }
.gallery img { width: 100%; transition: transform .4s; }
.gallery a:hover img { transform: scale(1.04); }

/* Прихожанам */
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 24px; }
.chips a { padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--blue); }
.chips a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.anchor-alias { position: relative; top: -20px; display: block; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.info-item { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.info-item:not(:has(img)) { grid-template-columns: 1fr; }
.info-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; }
.info-item h3 { font-size: 1.25rem; margin-bottom: 6px; }
.info-item p { font-size: .95rem; color: var(--muted); margin-bottom: 8px; }
.info-item .link-arrow { font-size: .9rem; }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 14px; }
.link-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: .2s; }
.link-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.link-card img { width: 56px; height: 56px; object-fit: contain; border-radius: 8px; background: #fff; }
.link-card span { flex: 1; display: flex; flex-direction: column; }
.link-card small { color: var(--muted); }
.link-card > .i { color: var(--gold); }

/* Аудио */
.radio-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 18px; }
.radio { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.radio-head { display: flex; gap: 14px; align-items: center; }
.radio-head img { width: 64px; height: 64px; object-fit: cover; border-radius: 12px; }
.radio-icon { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; background: var(--blue); color: var(--gold-2); }
.radio h3 { font-size: 1.25rem; margin: 0 0 2px; }
.radio p { font-size: .9rem; color: var(--muted); margin: 0; }
audio { width: 100%; height: 44px; }
.prayer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 20px; }
.prayer { display: grid; grid-template-columns: 150px 1fr; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.prayer:not(:has(.prayer-cover)) { grid-template-columns: 1fr; }
.prayer-cover { width: 100%; height: 100%; object-fit: cover; }
.prayer-body { padding: 20px; }
.tracks { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.track-title { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: .98rem; margin-bottom: 4px; }
.track-title small { color: var(--muted); font-weight: 500; }

/* Календарь (виджет Православие.ру) */
.calendar-widget { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 40px); box-shadow: var(--shadow); margin-bottom: 20px; overflow-wrap: anywhere; }
.calendar-widget img { display: inline-block; max-width: 100%; height: auto; }
.cal-h { font-size: 1.6rem; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.cal-day { font: 700 1.4rem/1.3 var(--serif); color: var(--blue); }
.cal-block a { color: var(--blue-2); }
.cal-icon { text-align: center; }

/* Пожертвовать */
.donate-main { display: grid; grid-template-columns: 1.3fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: start; }
.qr-panel { display: grid; grid-template-columns: minmax(0, 300px) 1fr; gap: 28px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.qr-panel img { border-radius: 12px; width: 100%; box-shadow: var(--shadow); }
.qr-help h2 { font-size: 1.7rem; }
.req { margin: 16px 0 20px; display: grid; gap: 10px; }
.req div { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.req dt { font-weight: 700; color: var(--muted); font-size: .9rem; }
.req dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .98rem; overflow-wrap: anywhere; }
.copy { border: 1px solid var(--line); background: var(--bg); color: var(--blue); width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; cursor: pointer; flex: none; }
.copy:hover { background: var(--blue); color: #fff; }
.copied { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--blue-ink); color: #fff; padding: 10px 18px; border-radius: 999px; z-index: 200; font-weight: 600; box-shadow: var(--shadow-lg); }
.story { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.story-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.story-photos img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/5; object-fit: cover; width: 100%; cursor: zoom-in; }

/* Формы */
.form { display: grid; gap: 16px; background: var(--card); padding: clamp(20px, 4vw, 36px); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.form input, .form select, .form textarea {
  font: 400 1.05rem/1.4 var(--sans); padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--blue-2); outline: none; box-shadow: 0 0 0 4px rgb(42 76 134 / .15); }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 16px; }
.alert p { margin: 0; }
.alert-ok { background: #e7f2e8; color: var(--ok); border: 1px solid #bcd9c0; }
.alert-err { background: #f8e8e8; color: var(--err); border: 1px solid #e6c1c1; }

/* ---------- Подвал ---------- */
.site-footer { background: var(--blue-ink); color: #c9d2e4; margin-top: 0; position: relative; padding-bottom: 8px; }
.site-footer .ornament { height: 24px; background: var(--ornament) center / 48px 24px repeat-x; opacity: .5; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1.2fr 1fr .8fr; gap: 32px; padding-block: 48px 32px; }
.footer-title { font: 700 1.5rem/1.15 var(--serif); color: #fff; }
.footer-head { font-weight: 700; color: var(--gold-2); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; }
.site-footer a { color: #e6ebf5; text-decoration: none; display: inline-flex; gap: 8px; align-items: flex-start; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .muted { color: #9fabc4; }
.footer-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.social { display: flex; gap: 10px; }
.social a { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgb(255 255 255 / .25); display: grid; place-items: center; }
.social a:hover { background: var(--gold); border-color: var(--gold); text-decoration: none; }
.social .i { width: 22px; height: 22px; }
.footer-bottom { border-top: 1px solid rgb(255 255 255 / .1); padding-block: 16px; font-size: .85rem; color: #8f9bb5; }

/* Кнопка «Наверх» — синий круг с золотым кольцом, появляется при прокрутке */
.to-top {
  position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: 28px; z-index: 55;
  width: 56px; height: 56px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center; color: var(--gold-2);
  background: radial-gradient(circle at 30% 25%, var(--blue-2), var(--blue-ink) 70%);
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold), 0 10px 26px rgb(19 37 74 / .35);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.9);
  transition: opacity .3s ease, transform .3s ease, visibility 0s .3s, box-shadow .2s, color .2s;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: none; transition: opacity .3s ease, transform .3s ease, box-shadow .2s, color .2s; }
.to-top svg { width: 24px; height: 24px; transition: transform .25s ease; }
.to-top:hover { color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold-2), 0 14px 32px rgb(19 37 74 / .45); }
.to-top:hover svg { transform: translateY(-3px); }
.to-top:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 6px; }
.to-top-label {
  position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%) translateX(6px);
  background: var(--blue-ink); color: #fff; font: 600 .85rem var(--sans); padding: 6px 12px; border-radius: 999px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: .2s; box-shadow: var(--shadow);
}
.to-top:hover .to-top-label { opacity: 1; transform: translateY(-50%); }
/* Ход прокрутки — тонкое золотое кольцо вокруг кнопки */
.to-top::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  background: conic-gradient(var(--gold-2) calc(var(--p, 0) * 1turn), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 4px));
  opacity: .9;
}

/* Мобильная панель быстрых действий */
.quickbar { display: none; }
@media (max-width: 760px) {
  .quickbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: rgb(255 255 255 / .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -6px 20px rgb(0 0 0 / .06);
  }
  .quickbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px 8px; font-size: .74rem; font-weight: 600; color: var(--blue); text-decoration: none; }
  .quickbar .i { width: 24px; height: 24px; }
  .quickbar a:last-child { color: var(--gold); }
  body { padding-bottom: 68px; }
  .to-top { width: 48px; height: 48px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .to-top svg { width: 22px; height: 22px; }
  .to-top-label { display: none; }
}

/* Лайтбокс */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgb(10 16 30 / .92); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: 96vw; max-height: 90vh; width: auto; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 50px rgb(0 0 0 / .5); background: #fff; }
.lightbox-close, .lightbox-nav { position: fixed; border: 0; background: rgb(255 255 255 / .15); color: #fff; width: 52px; height: 52px; border-radius: 50%; cursor: pointer; display: grid; place-items: center; font-size: 2rem; line-height: 1; }
.lightbox-close { top: 14px; right: 14px; }
.lightbox-close .i { width: 26px; height: 26px; }
.lightbox-nav.prev { left: 14px; top: 50%; }
.lightbox-nav.next { right: 14px; top: 50%; }
.lightbox-nav[hidden] { display: none; }
.lightbox-count { position: fixed; bottom: 12px; left: 0; right: 0; text-align: center; color: #fff; margin: 0; font-size: .9rem; }
.lightbox-close:hover, .lightbox-nav:hover { background: rgb(255 255 255 / .3); }

/* ---------- Адаптивность ---------- */
@media (max-width: 960px) {
  .schedule-teaser, .about, .contact-band, .contact-page, .two-col, .two-col--wide, .donate-main, .story { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .news-card--lead { grid-column: 1 / -1; }
  .people { grid-template-columns: 1fr 1fr; }
  .info-row, .cta-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .side-card, .photo-stack { position: static; }
  .photo-stack { grid-template-columns: repeat(3, 1fr); }
  .donate-band { grid-template-columns: 1fr; }
  .qr-card { width: 180px; justify-self: start; }
  .about-photo img { aspect-ratio: 16/10; }
}
@media (max-width: 640px) {
  body { font-size: 17px; }
  .hero { min-height: 78vh; }
  .hero-inner { padding-block: 96px 48px; }
  .hero-actions .btn { width: 100%; }
  .news-grid, .people, .treby-list, .form-row, .footer-grid { grid-template-columns: 1fr; }
  .people { gap: 14px; }
  .person { display: grid; grid-template-columns: 88px 1fr; text-align: left; gap: 0 16px; align-items: center; }
  .person-photo { width: 88px; height: 88px; margin: 0; grid-row: span 3; }
  .person-name { font-size: 1.2rem; margin-bottom: 2px; }
  .person-text { grid-column: 2; margin: 4px 0 0; }
  .people--detailed .person-text { grid-column: 1 / -1; margin-top: 12px; }
  .event { grid-template-columns: 1fr; gap: 6px; }
  .event time { text-align: left; display: flex; gap: 8px; align-items: baseline; }
  .event time span { font-size: 1.6rem; }
  .qr-panel { grid-template-columns: 1fr; }
  .qr-panel img { max-width: 300px; margin: auto; }
  .prayer { grid-template-columns: 1fr; }
  .prayer-cover { height: 140px; }
  .photo-stack { grid-template-columns: 1fr; }
  .schedule-teaser-sheets { min-height: 0; }
  .map-frame { min-height: 300px; }
  .info-item { grid-template-columns: 72px 1fr; }
  .info-item img { width: 72px; height: 72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .quickbar, .hint, .info-row { display: none !important; }
  .schedule-sheet { box-shadow: none; border: 0; padding: 0; page-break-inside: avoid; }
  body { background: #fff; }
}
