/* ==========================================================
   Храм Архистратига Михаила, г. Каскелен — стили сайта
   Гамма: белый, золото, небесно-голубой.
   Цвета и размеры меняются в блоке :root ниже
   ========================================================== */

:root {
  --blue: #1d4f8f;          /* небесно-синий (кнопки, ссылки) */
  --blue-2: #2f6db5;
  --blue-ink: #1b2d4b;      /* заголовки */
  --sky: #eaf3fc;           /* светло-голубой фон блоков */
  --sky-2: #d6e7f8;
  --gold: #c19a48;          /* золото */
  --gold-2: #ddb867;
  --gold-soft: #f8f0dc;
  --bg: #ffffff;            /* белый фон */
  --bg-alt: #eaf3fc;
  --card: #ffffff;
  --ink: #1f2838;
  --muted: #5b6678;
  --line: #dbe5f0;
  --wa: #25a35a;
  --ok: #2f6b3c;
  --err: #9b2c2c;

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

  --radius: 18px;
  --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='%23c19a48' 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; }
/* Вторая по важности кнопка на главном экране (Аудио) */
.btn-gold-outline { border-color: var(--gold-2); color: #fff; background: rgb(19 37 74 / .55); backdrop-filter: blur(4px); }
.btn-gold-outline .i { color: var(--gold-2); }
.btn-gold-outline:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold-outline:hover .i { 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(255 255 255 / .94); 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: 1220px) {
  :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: #fff; }
  .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: 168px 1fr; align-items: start; 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: 148px; height: 148px; margin: 20px 0 20px 20px; object-fit: cover; border-radius: 14px; box-shadow: 0 0 0 3px var(--card), 0 0 0 4px var(--gold-soft), var(--shadow); }
.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(5, 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 2px 8px; font-size: .7rem; white-space: nowrap; 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: 92px 1fr; }
  .prayer-cover { width: 76px; height: 76px; margin: 18px 0 0 16px; border-radius: 12px; }
  .prayer-body { padding: 18px 16px 18px 14px; }
  .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; }
}

/* ==========================================================
   Каскелен: новые и изменённые блоки
   ========================================================== */

/* Значок храма — щит с крестом */
.mark { width: 46px; height: 52px; flex: none; filter: drop-shadow(0 3px 6px rgb(29 63 115 / .25)); }
.brand:hover .mark { transform: translateY(-1px); }
.brand-name { font-size: 1.08rem; }
.brand-sub { color: var(--gold); letter-spacing: .14em; }
.nav-item > a:hover, .nav-sub a:hover { background: var(--sky); }
.nav-item > a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); }
@media (max-width: 1220px) {
  .mark { width: 40px; height: 46px; }
  .nav-toggle { border-radius: 16px; border-color: var(--gold-soft); box-shadow: 0 2px 8px rgb(29 63 115 / .08); }
  .site-nav { background: #fff; }
}

/* Кнопки */
.btn-sky { background: var(--blue-2); color: #fff; }
.btn-sky:hover { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.btn-white { background: #fff; color: var(--blue-ink); box-shadow: 0 2px 10px rgb(29 63 115 / .1); }
.btn-white:hover { color: var(--blue); box-shadow: var(--shadow); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: #1e8a4b; color: #fff; box-shadow: var(--shadow); }
.btn-outline { border-color: var(--blue-2); color: var(--blue); background: rgb(255 255 255 / .7); }
.btn-gold { background: var(--gold); }
.btn-gold:hover { background: #ad8738; }
.wa-dot { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--wa); color: #fff; margin-left: -6px; }
.wa-dot .i { width: 18px; height: 18px; }

/* Главный экран: фото сверху, под ним карточка с названием и кнопками */
.hero2 { position: relative; background: linear-gradient(180deg, #fff 0, var(--sky) 100%); padding-bottom: clamp(24px, 4vw, 48px); }
.hero2-photo {
  height: clamp(300px, 58vh, 620px);
  background: var(--sky-2) var(--hero, none) center 40% / cover no-repeat;
  -webkit-mask: linear-gradient(180deg, #000 70%, transparent 100%);
          mask: linear-gradient(180deg, #000 70%, transparent 100%);
}
.hero2-body { margin-top: clamp(-180px, -14vw, -90px); position: relative; }
.hero2-card {
  max-width: 760px; background: rgb(255 255 255 / .9); backdrop-filter: blur(8px);
  border: 1px solid #fff; border-radius: 28px; padding: clamp(22px, 4vw, 40px);
  box-shadow: 0 20px 50px rgb(29 63 115 / .16);
}
.hero2-title { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; margin-bottom: 12px; }
.hero2-addr { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 1.05rem; }
.hero2-addr .i { color: var(--blue-2); }
.hero2-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.hero2-actions .btn { width: 100%; }
@media (max-width: 640px) {
  .hero2-photo { height: 46vh; }
  .hero2-body { margin-top: -70px; }
  .hero2-card { padding: 20px 16px; border-radius: 22px; }
  .hero2-actions { grid-template-columns: 1fr; }
  .hero2 .eyebrow { display: none; }
}

/* Заголовок внутренних страниц */
.page-hero { background: linear-gradient(180deg, var(--sky) 0%, #fff 100%); border-bottom: 0; }
.page-hero::after { opacity: .5; }

/* Голубые секции */
.section-sky, .section-alt { background: var(--sky); }
.section-title { display: flex; align-items: center; gap: 12px; }
.section-title .i { color: var(--gold); width: .9em; height: .9em; }
.center .section-title, .section-title.center { justify-content: center; }

/* Главная: ближайшие службы и объявления */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.panel-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head .section-title { font-size: clamp(1.6rem, 3vw, 2rem); margin: 0; }
.svc-list { display: grid; gap: 10px; }
.svc-day { display: grid; grid-template-columns: 84px 1fr; gap: 14px; padding: 12px; border-radius: 14px; background: var(--sky); }
.svc-day.is-today { background: var(--gold-soft); box-shadow: inset 4px 0 0 var(--gold); }
.svc-date { text-align: center; line-height: 1.1; display: grid; }
.svc-date strong { font: 700 2rem/1 var(--serif); color: var(--blue); }
.svc-date span { font-size: .85rem; font-weight: 600; }
.svc-date em { font-style: normal; font-size: .78rem; color: var(--muted); }
.svc-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; align-content: center; }
.svc-day li b { color: var(--blue); margin-right: 6px; }
.svc-day li small { display: block; color: var(--gold); font-weight: 600; font-size: .85rem; }
.announce { border-left-color: var(--gold); box-shadow: none; padding: 16px 18px; }
.announce h3 { font-size: 1.3rem; }
.panel-card .announce { background: var(--sky); border-color: transparent; border-left-color: var(--gold); }

/* Плитки разделов */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { display: grid; gap: 4px; padding: 22px; border-radius: var(--radius); background: var(--sky); text-decoration: none; color: var(--blue-ink); border: 1px solid var(--line); transition: .2s; }
.tile .i { width: 34px; height: 34px; color: var(--blue-2); margin-bottom: 6px; }
.tile strong { font: 700 1.35rem/1.15 var(--serif); }
.tile span { color: var(--muted); font-size: .92rem; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); background: #fff; }
.tile--gold { background: var(--gold-soft); }
.tile--gold .i { color: var(--gold); }
.tile--wide { margin-top: 24px; grid-template-columns: auto 1fr; align-items: center; column-gap: 16px; }
.tile--wide .i { grid-row: span 2; margin: 0; }

/* Вкладки-якоря на страницах */
.tabs-bar { position: sticky; top: var(--header-h); z-index: 20; background: rgb(255 255 255 / .96); border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-block: 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: var(--sky); color: var(--blue); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.tabs a:hover { background: var(--blue-2); color: #fff; }
.tabs .i { width: 18px; height: 18px; }
[id] { scroll-margin-top: calc(var(--header-h) + 70px); }

/* Расписание — таблица по дням */
.month-head { font-size: 2rem; color: var(--gold); border-bottom: 2px solid var(--gold-soft); padding-bottom: 6px; margin: 28px 0 14px; }
.schedule-table .month-head:first-child { margin-top: 0; }
.sch-day { display: grid; grid-template-columns: 110px 1fr; gap: 18px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-bottom: 10px; }
.sch-day.is-sunday .sch-date strong { color: #b23b3b; }
.sch-day.is-today { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); background: #fffdf7; }
.sch-date { display: grid; text-align: center; line-height: 1.15; align-content: start; }
.sch-date strong { font: 700 2.6rem/1 var(--serif); color: var(--blue); }
.sch-date span { font-weight: 600; }
.sch-date em { font-style: normal; color: var(--muted); font-size: .88rem; }
.sch-day.is-today .sch-date em { color: var(--gold); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.sch-feast { font: 700 1.3rem/1.25 var(--serif); color: var(--blue-ink); margin: 2px 0 8px; }
.sch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sch-list li { display: grid; grid-template-columns: 64px 1fr; gap: 10px; }
.sch-list time { font-weight: 700; color: var(--blue-2); }
@media (max-width: 640px) {
  .sch-day { grid-template-columns: 70px 1fr; gap: 12px; padding: 14px; }
  .sch-date strong { font-size: 2rem; }
  .sch-list li { grid-template-columns: 52px 1fr; }
}

/* Требы: раскрывающийся список */
.acc { display: grid; gap: 10px; }
.acc-item { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.acc-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.acc-item summary::-webkit-details-marker { display: none; }
.acc-item summary::after { display: none; }
.acc-item summary span { display: grid; }
.acc-item summary strong { font-size: 1.08rem; color: var(--blue-ink); }
.acc-item summary small { color: var(--muted); }
.acc-item summary .i { color: var(--gold); transition: transform .2s; }
.acc-item[open] summary .i { transform: rotate(90deg); }
.acc-item[open] { border-color: var(--sky-2); box-shadow: var(--shadow); }
.acc-item[open] summary { background: var(--sky); }
.acc-body { padding: 14px 18px 18px; }
.side-card { border-top-color: var(--blue-2); }
.lavka { display: flex; gap: 20px; align-items: flex-start; }
.lavka-icon { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--gold); box-shadow: var(--shadow); }
.lavka-icon .i { width: 32px; height: 32px; }
.lavka-hours { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--blue); font-size: 1.1rem; }

/* Фото со служб */
.albums { display: grid; gap: 22px; margin-top: 18px; }
.album { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.album time { color: var(--gold); font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .04em; }
.album h3 { margin: 4px 0 6px; }
.album header p { color: var(--muted); }
.album-photos { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.album-photos a { border-radius: 12px; overflow: hidden; cursor: zoom-in; }
.album-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform .4s; }
.album-photos a:hover img { transform: scale(1.05); }
@media (max-width: 760px) { .album-photos { grid-template-columns: repeat(2, 1fr); } .album-photos a:first-child { grid-column: 1 / -1; } }

/* Новости */
.news-card { border-color: var(--line); }
.news-card > a { display: block; cursor: zoom-in; }
.news-body p { color: var(--muted); font-size: .97rem; margin: 0; }
.news-body h3 { font-size: 1.35rem; }

/* Школа */
.facts { display: grid; gap: 14px; }
.fact { display: flex; gap: 14px; padding: 16px 18px; background: var(--sky); border-radius: 16px; }
.fact > .i { width: 28px; height: 28px; color: var(--gold); margin-top: 2px; }
.fact p, .fact ul { margin: 4px 0 0; }
.fact ul { padding-left: 1.1em; }
.gallery a { position: relative; }
.gallery-cap { position: absolute; left: 8px; bottom: 8px; right: 8px; background: rgb(255 255 255 / .9); border-radius: 10px; padding: 4px 10px; font-size: .85rem; color: var(--ink); }

/* Библиотека */
.checks { list-style: none; padding: 0; display: grid; gap: 8px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--gold-soft); color: var(--gold); font-weight: 700; display: grid; place-items: center; font-size: .8rem; }
.search { display: flex; align-items: center; gap: 10px; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 18px; max-width: 520px; margin-bottom: 20px; }
.search input { border: 0; outline: 0; font: 400 1.05rem var(--sans); padding: 10px 0; width: 100%; background: transparent; }
.search:focus-within { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgb(47 109 181 / .15); }
.search .i { color: var(--muted); }
.book-section { margin-bottom: 26px; }
.book-head { font-size: 1.5rem; }
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.books { width: 100%; border-collapse: collapse; font-size: .98rem; }
.books th { text-align: left; background: var(--blue); color: #fff; font-weight: 600; padding: 12px 14px; }
.books td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.books tr:nth-child(even) td { background: #f7fafe; }
.books td:last-child, .books th:last-child { width: 80px; text-align: center; }
@media (max-width: 640px) {
  .books thead { display: none; }
  .books tr { display: grid; padding: 10px 14px; border-top: 1px solid var(--line); }
  .books td { border: 0; padding: 2px 0; background: none !important; text-align: left !important; width: auto !important; }
  .books td:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-size: .88rem; }
}
.link-ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; background: var(--sky); color: var(--blue-2); flex: none !important; }
.link-card span.link-ico { flex: none; }

/* Подвал */
.people { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.site-footer { background: var(--blue-ink); }
.footer-grid { grid-template-columns: 1.4fr 1.2fr 1fr; }
.footer-brand { display: flex !important; align-items: center; gap: 12px; font: 700 1.35rem/1.15 var(--serif); color: #fff !important; margin-bottom: 12px; }
.footer-brand:hover { text-decoration: none !important; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-bottom a { color: #8f9bb5; font-size: .85rem; }
.site-footer p .i { width: 1em; height: 1em; }

/* Нижняя панель на телефоне: «Расписание» по центру выделено золотом */
@media (max-width: 760px) {
  .quickbar { background: #fff; border-top: 2px solid var(--gold-soft); overflow: visible; }
  .quickbar a { color: var(--blue); font-size: .72rem; }
  .quickbar a.qb-wa .i { color: var(--wa); }
  .quickbar a.qb-main {
    margin: -18px 2px 6px; padding: 10px 2px; border-radius: 18px; background: var(--gold); color: #fff;
    box-shadow: 0 0 0 4px #fff, 0 8px 18px rgb(193 154 72 / .4);
  }
  .quickbar a.qb-heart { color: var(--gold); }
  body { padding-bottom: 72px; }
}

@media (max-width: 960px) {
  .home-grid { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .people { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .tile { padding: 16px; }
  .tile strong { font-size: 1.15rem; }
  .people { grid-template-columns: 1fr; }
  .lavka { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* Шапка на компьютере: название сверху, меню отдельной строкой ниже */
@media (min-width: 1221px) {
  :root { --header-h: 132px; }
  .header-row { flex-wrap: wrap; gap: 0 24px; padding-top: 10px; }
  .brand { margin-right: auto; }
  .site-nav { width: 100%; justify-content: space-between; border-top: 1px solid var(--line); padding: 6px 0; }
  .nav-list { gap: 4px; }
  .nav-item > a { white-space: nowrap; font-size: 1rem; padding: 10px 14px; }
  .brand-name br { display: none; }
  .brand-name { font-size: 1.45rem; }
  .mark { width: 50px; height: 56px; }
}
@media (max-width: 1220px) {
  .brand-name br { display: none; }
  .brand-name { font-size: 1rem; max-width: 270px; }
}
.announce h3 { font: 700 1.08rem/1.35 var(--sans); color: var(--blue-ink); }
@media (max-width: 640px) {
  .hero2-photo { height: 34vh; min-height: 220px; }
  .hero2-body { margin-top: -56px; }
  .hero2-title { font-size: 1.75rem; }
  .hero2-addr { font-size: .95rem; margin-bottom: 0; }
  .hero2-actions { gap: 10px; margin-top: 16px; }
  .hero2-actions .btn-lg { min-height: 52px; padding: .7em 1em; }
}
