/* =====================================================================
   Церковь «Маяк Надежды» — стили
   Исходный макет: Figma, фрейм «Desktop - 6», 1440 px.
   Шрифты: Rubik (заголовки), Inter (текст).
   ===================================================================== */

:root {
  --ink: #060606;
  --ink-soft: #0d0c0c;
  --peach-a: #fff2e0;
  --peach-b: #ffd4ab;
  --sky: #c2dbfa;
  --grey: #d9d9d9;
  --day-border: rgba(255, 157, 104, 0.5);

  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Rubik", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --bg-shift: 0px; /* смещение фона «Наша история» (задаёт js/main.js) */
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 150px; /* чтобы закреплённое меню не закрывало заголовки при переходе по ссылкам */
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.21;
  color: var(--ink-soft);
  background: #fff;
  overflow-x: hidden;
}

h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 2px solid #1f6feb; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Titles ---------- */
.title {
  font-family: var(--font-head);
  text-align: center;
  color: var(--ink);
}
.title--xl { font-size: 64px; font-weight: 500; line-height: 76px; }
.title--lg { font-size: 36px; font-weight: 400; line-height: 43px; color: #000; }
.title--white { color: #fff; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(6, 6, 6, 0);
  transition: background-color .3s ease, box-shadow .3s ease, backdrop-filter .3s ease;
}
.nav__inner {
  position: relative;
  max-width: 1440px;
  height: 129px;
  margin: 0 auto;
  padding: 0 29px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: height .3s ease;
}
.nav__logo img {
  width: 129px; height: 129px;
  object-fit: cover;
  transition: width .3s ease, height .3s ease;
}

/* при прокрутке: панель со своим фоном и маленький логотип */
.nav.is-scrolled {
  background: rgba(6, 6, 6, .82);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
}
.nav.is-scrolled .nav__inner { height: 72px; }
.nav.is-scrolled .nav__logo img { width: 52px; height: 52px; }

.nav__links {
  display: flex;
  align-items: center;
  gap: 51px;
  font-size: 16px;
  line-height: 19px;
  color: #fff;
}
/* «>» — только пункты меню; ссылки языков (.nav__lang a) оформлены отдельно */
.nav__links > a { transition: opacity .2s ease; }
.nav__links > a:hover { opacity: .7; }

.nav__toggle { display: none; }

/* переключатель языка RU / LV / EN */
.nav__lang { display: inline-flex; align-items: center; gap: 4px; }
.nav__lang a {
  display: inline-block;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  line-height: 17px;
  cursor: pointer;
  opacity: .65;
  transition: opacity .2s ease, border-color .2s ease;
}
.nav__lang a:hover { opacity: 1; }
.nav__lang a.is-active { opacity: 1; border-color: rgba(255, 255, 255, .85); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 1036px;
  overflow: hidden;
  background: #fff;
}
.hero__media { position: absolute; inset: 0; overflow: hidden; }
.hero__media img {
  position: absolute;
  left: -0.23%; top: 0;
  width: 100.45%; height: 104.25%;
  max-width: none;
  object-fit: cover;
}
.hero__title {
  position: absolute;
  left: 48px;
  top: 37%;
  z-index: 2;
  font-family: var(--font-head);
  font-size: 50px;
  font-weight: 500;
  line-height: 1.185;
  text-align: center;
  color: #fff;
}

/* ---------- About ---------- */
.about {
  position: relative;
  z-index: 3;
  margin-top: -128px; /* заголовок «О нас» заходит на нижний край фото */
}
.about__grid {
  width: min(1098px, 100% - 48px);
  margin: 82px auto 0;
  display: grid;
  grid-template-columns: 590px 354px;
  column-gap: 154px;
  align-items: center;
}

.pastors {
  position: relative;
  height: 448px;
  border-radius: 25px;
  overflow: hidden;
  background: linear-gradient(142.79deg, var(--peach-a) 14.644%, var(--peach-b) 85.356%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5);
}
.pastors__layer {
  position: absolute;
  top: 0; left: -6.06%;
  width: 106.11%; height: 100%;
  max-width: none;
  object-fit: cover;
}
.pastors__layer--bg { opacity: .23; }

.pill {
  height: 25px;
  border: 1px solid #000;
  border-radius: 25px;
  font-size: 20px;
  font-weight: 600;
  line-height: 23px;
  color: var(--ink);
  white-space: nowrap;
}
.pill--left {
  position: absolute;
  left: 95px; top: 43px;
  width: max-content;
  min-width: 400px;
  padding: 0 26px;
}
.pill--center {
  width: max-content;
  min-width: 300px;
  max-width: 100%;
  padding: 0 16px;
  margin: 0 auto 39px;
  text-align: center;
}

.about__card {
  min-height: 336px;
  padding: 13px 24px 19px;
  border-radius: 28px;
  background: linear-gradient(136.49deg, var(--peach-a) 14.644%, var(--peach-b) 85.356%);
  box-shadow: 0 5px 9px rgba(0, 0, 0, .5);
}
.about__text { text-align: center; color: var(--ink-soft); }

/* при наведении на карточку она увеличивается примерно до высоты фото пасторов,
   чтобы текст было легче читать */
.about__card { position: relative; transition: scale .3s ease, box-shadow .3s ease; }
@media (hover: hover) and (min-width: 641px) {
  .about__card:hover { scale: 1.2; z-index: 2; box-shadow: 0 10px 22px rgba(0, 0, 0, .45); }
}
@media (hover: hover) and (min-width: 1161px) {
  .about__card:hover { scale: 1.3; }
}

/* ---------- History ---------- */
.history {
  position: relative;
  margin-top: 44px;
  padding: 20px 0 82px;
}

.history__bg {
  position: absolute;
  left: 0; right: 0;
  top: var(--bg-shift);
  height: 908px;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.history__bg-inner {
  position: absolute;
  top: 0; left: -49px; right: -49px;
  height: 1004px;
  filter: blur(7.5px);
  background: linear-gradient(180deg,
    #fff 0%,
    rgba(255, 157, 104, .3) 23.558%,
    #070403 39.423%,
    rgba(255, 217, 194, .58) 62.5%,
    rgba(255, 250, 245, .94) 75.504%,
    #fff 84.836%,
    #fff 100%);
}
.history__bg-inner img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  mix-blend-mode: screen;
}

.history > .title,
.history > .panel { position: relative; z-index: 1; transition: opacity 1s ease, transform 1s ease; }

/* чёткое фото в начале; потом размывается и уходит, проявляется текст */
.history__sharp {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  filter: blur(12px);
  transition: opacity 1.2s ease, filter 1.2s ease;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 90px, #000 calc(var(--sharp-h, 908px) - 200px), transparent var(--sharp-h, 908px));
          mask-image: linear-gradient(180deg, transparent 0, #000 90px, #000 calc(var(--sharp-h, 908px) - 200px), transparent var(--sharp-h, 908px));
}
.history.is-intro .history__sharp { opacity: 1; filter: none; }
.history.is-intro > .title,
.history.is-intro > .panel { opacity: 0; transform: translateY(14px); }

.panel {
  width: min(1246px, 100% - 48px);
  min-height: 216px;
  margin: 44px auto 0;
  border-radius: 28px;
  color: var(--ink-soft);
  filter: drop-shadow(0 5px 9px rgba(31, 77, 140, .08));
}
.panel--plain {
  padding: 24px;
  background: rgba(237, 247, 255, .76);
}
.panel--gradient {
  padding: 12px 24px 12px 48px;
  background: linear-gradient(170.17deg, rgba(237, 247, 255, .76) 14.644%, rgba(194, 219, 250, .76) 85.356%);
}
.panel p + p,
.panel p + .panel__list,
.panel .panel__list + p { margin-top: 24px; }

.panel__list li::before {
  content: "•";
  display: inline-block;
  width: 1.1em;
  margin-right: .35em;
}
.panel__list li { padding-left: 0; }

.history__lead2 { margin-top: 44px; }
/* белая плашка за заголовком: читается на тёмной части фото */
.history__lead2 {
  position: relative;
  z-index: 1;
  width: fit-content;
  max-width: calc(100% - 32px);
  margin-left: auto;
  margin-right: auto;
  padding: 5px 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  -webkit-backdrop-filter: blur(4px);
          backdrop-filter: blur(4px);
}

/* ---------- Meetings ---------- */
.meetings {
  position: relative;
  z-index: 2;
  width: min(1200px, 100% - 48px);
  margin: 0 auto;
}
.meetings__grid {
  margin-top: 82px;
  display: grid;
  grid-template-columns: 622px 578px;
  column-gap: 0;
  align-items: start;
}
.slot__text h3 { white-space: nowrap; }

.schedule { display: grid; row-gap: 55px; }

.slot { display: flex; align-items: center; gap: 32px; }

.day {
  flex: none;
  width: 102px; height: 102px;
  display: grid;
  place-items: center;
  background: var(--grey);
  border: 7px solid var(--day-border);
  border-radius: 25px;
  font-family: var(--font-head);
  font-size: 36px;
  line-height: 1.185;
  color: var(--ink-soft);
}
.day--plain { border: 0; }

.slot__text h3 {
  font-family: var(--font-head);
  font-size: 36px;
  font-weight: 400;
  line-height: 43px;
  color: var(--ink-soft);
}
.slot__time {
  padding-left: 49px;
  font-size: 20px;
  line-height: 24px;
  color: #000;
}
.slot--sunday h3 { margin-left: -12px; }

.shofar {
  position: relative;
  margin-top: 8px;
  min-height: 565px;
  padding: 142px 24px 23px;
  border: 7px solid var(--sky);
  border-radius: 25px;
}
.shofar__head {
  position: absolute;
  left: -7px; top: -7px;
}
.shofar__text {
  text-align: center;
  font-weight: 500;
  color: #000;
}
.shofar__text p + p { margin-top: 24px; }

.shofar__yt {
  display: flex;
  align-items: center;
  gap: 33px;
  margin: 38px 0 0 59px;
  font-family: var(--font-head);
  font-size: 36px;
  line-height: 43px;
  color: #000;
  width: max-content;
}
/* SVG экспортирован вместе с обводкой: 86×64, видимая часть 82×60 */
.shofar__yt img { width: 86px; height: auto; margin: -2px; }

/* ---------- Warm gradient wrapper ---------- */
.warm {
  position: relative;
  padding-top: 82px;
  overflow-x: clip;
  background: linear-gradient(180deg,
    #fff 12.03%,
    #ff9d68 56.7%,
    #92bdff 96.75%);
  background-color: #92bdff;
}

/* ---------- Broadcast ---------- */
.broadcast {
  width: min(1081px, 100% - 48px);
  margin: 0 auto;
  padding-bottom: 80px;
}
.broadcast__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  margin-top: 81px;
  border-radius: 25px;
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}
.broadcast__poster { position: absolute; inset: 0; display: block; }
.broadcast__poster img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.broadcast__media iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.broadcast__media.has-video .broadcast__poster { display: none; }

/* Подпись над видео: «Прямой эфир» / «Последняя трансляция · дата».
   Отступы подобраны так, чтобы расстояние от заголовка до видео не изменилось. */
.broadcast__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 100%;
  height: 27px;
  margin: 28px auto 0;
  padding: 0 16px;
  border: 1px solid #000;
  border-radius: 25px;
  font-size: 16px;
  font-weight: 600;
  line-height: 19px;
  color: var(--ink);
  white-space: nowrap;
}
.broadcast__status[hidden] { display: none; }
.broadcast__status + .broadcast__media { margin-top: 26px; }
.broadcast__status[hidden] + .broadcast__media { margin-top: 81px; }
.broadcast__status.is-live { border-color: #d21f1f; color: #d21f1f; }
.broadcast__status.is-live::before {
  content: "";
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #d21f1f;
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .broadcast__status.is-live::before { animation: none; } }

.broadcast__note {
  display: block;
  margin-top: 34px;
  text-align: center;
  color: #000;
  transition: color .2s ease;
}
.broadcast__note:hover,
.broadcast__note:focus-visible { color: #2f6fe0; text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Ministries ---------- */
.ministries {
  width: min(1201px, 100% - 48px);
  margin: 0 auto;
  padding-bottom: 98px;
}
.ministries__grid {
  margin-top: 100px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 20px;
  row-gap: 81px;
}
.ministry__photo {
  position: relative;
  height: 272px;
  border-radius: 25px;
  overflow: hidden;
  background: var(--grey);
}
.ministry__photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  max-width: none;
  object-fit: cover;
}
/* точные кадрирования из макета */
.ministry__photo img.crop-youth    { object-position: 50% 40%; } /* молодёжь и сцена в центре кадра */
.ministry__photo img.crop-golden   { object-position: 50% 62%; } /* все шесть человек за столом */
.ministry__photo img.crop-praise   { inset: auto; left: -15.51%; top: -7.25%;  width: 130.71%; height: 134.3%;  object-fit: fill; }
.ministry__photo img.crop-social   { object-position: bottom; }
.ministry__photo img.crop-recovery { inset: auto; left: -0.05%;  top: -35.43%; width: 110.96%; height: 176.12%; object-fit: fill; }

.ministry__name {
  margin-top: 40px;
  text-align: center;
  font-size: 24px;
  line-height: 30px;
  color: var(--ink-soft);
}

/* ---------- Contacts ---------- */
.contacts {
  width: min(1222px, 100% - 48px);
  margin: 0 auto;
  padding-bottom: 74px;
}
.contacts__grid {
  margin-top: 89px;
  display: grid;
  grid-template-columns: 413px 422px 387px;
  grid-template-rows: repeat(3, auto);
  row-gap: 24px;
  align-items: center;
}
.c-fb    { grid-column: 1; grid-row: 1; }
.c-phone { grid-column: 2; grid-row: 1; }
.c-yt    { grid-column: 1; grid-row: 2; }
.c-mail  { grid-column: 2; grid-row: 2; }
.c-ig    { grid-column: 1; grid-row: 3; }
.c-addr  { grid-column: 2; grid-row: 3; }

.contact {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 76px;
  width: max-content;
  max-width: 100%;
  transition: opacity .2s ease;
}
.contact:hover { opacity: .75; }

.contact__icon {
  position: relative;
  flex: none;
  width: 72px; height: 72px;
  display: grid;
  place-items: center;
}
.contact--lg .contact__icon { width: 76px; height: 76px; }
.contact--lg { gap: 26px; }

.contact__circle { position: absolute; inset: 0; width: 100%; height: 100%; }
.contact__glyph { position: relative; max-width: none; }
.contact__glyph--phone { rotate: 46.82deg; transform: skewX(-3.25deg); }
/* значок Facebook экспортирован с полями (75×72): ставим его от левого края круга */
.contact__glyph--fb { position: absolute; left: 27px; top: 0; }
/* значок почты экспортирован с полем справа (94×40): текст идёт сразу за ним */
.c-mail { gap: 0; }
.c-mail .contact__icon { width: 101px; padding-left: 7px; }

.contact__text {
  font-size: 24px;
  line-height: 29px;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}
.c-mail .contact__text, .c-addr .contact__text { color: var(--ink); }

.contacts__map {
  grid-column: 3;
  grid-row: 1 / 4;
  display: block;
  position: relative;
  width: 387px; height: 321px;
  border-radius: 25px;
  overflow: hidden;
  background: var(--grey);
  /* слои Leaflet (z-index до 1000) остаются внутри карты и не перекрывают меню */
  isolation: isolate;
  z-index: 0;
}
.contacts__map-fallback { position: absolute; inset: 0; display: block; }
.contacts__map-fallback img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}

/* Интерактивная карта Leaflet — в стиле сайта */
.contacts__map.leaflet-container {
  font-family: var(--font-body);
  background: var(--grey);
  border-radius: 25px;
}
.contacts__map .leaflet-bar {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
.contacts__map .leaflet-bar a {
  width: 36px; height: 36px;
  line-height: 36px;
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  background: var(--peach-a);
  border-bottom-color: rgba(6, 6, 6, .12);
}
.contacts__map .leaflet-bar a:hover,
.contacts__map .leaflet-bar a:focus-visible { background: var(--peach-b); color: var(--ink); }
.contacts__map .leaflet-bar a.leaflet-disabled { color: rgba(6, 6, 6, .3); background: var(--peach-a); }
.contacts__map .leaflet-control-zoom { margin: 14px 0 0 14px; }
.contacts__map .leaflet-control-attribution {
  font-size: 10px;
  line-height: 14px;
  padding: 1px 8px 1px 6px;
  border-top-left-radius: 8px;
  background: rgba(255, 242, 224, .85);
  color: var(--ink-soft);
}
.contacts__map .leaflet-control-attribution a { color: var(--ink); }
.contacts__map .leaflet-popup-content-wrapper {
  border-radius: 14px;
  background: var(--peach-a);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.contacts__map .leaflet-popup-tip { background: var(--peach-a); }
.contacts__map .leaflet-popup-content { margin: 12px 18px; font-size: 14px; line-height: 20px; }
.contacts__map .leaflet-popup-content strong { font-family: var(--font-head); font-weight: 500; font-size: 16px; }
.contacts__map .leaflet-container a.leaflet-popup-close-button { color: var(--ink-soft); }

/* ---------- Contact form ---------- */
.cform {
  width: min(780px, 100%);
  margin: 80px auto 0;
  padding: 32px 36px 36px;
  border-radius: 28px;
  background: linear-gradient(136.49deg, var(--peach-a) 14.644%, var(--peach-b) 85.356%);
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .5));
  color: var(--ink);
}
.cform__title { font-family: var(--font-head); font-size: 36px; font-weight: 400; line-height: 43px; text-align: center; }
.cform__lead { margin: 8px 0 24px; text-align: center; font-size: 18px; line-height: 22px; }
.cform__row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.field { display: block; min-width: 0; }
.field__label { display: block; margin: 0 0 6px 4px; font-size: 16px; font-weight: 600; line-height: 19px; }
.field input, .field textarea {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0, 0, 0, .55);
  border-radius: 16px;
  background: rgba(255, 255, 255, .75);
  font: inherit;
  font-size: 18px;
  line-height: 24px;
  color: var(--ink);
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(6, 6, 6, .45); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.cform__actions { display: flex; align-items: center; gap: 20px; margin-top: 22px; flex-wrap: wrap; }
.cform__btn {
  padding: 12px 40px;
  border: 0;
  border-radius: 25px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-head);
  font-size: 20px;
  line-height: 24px;
  cursor: pointer;
  transition: opacity .2s ease;
}
.cform__btn:hover { opacity: .8; }
.cform__btn:disabled { opacity: .5; cursor: default; }
.cform__status { flex: 1 1 220px; min-width: 0; font-size: 16px; line-height: 20px; }
.cform__status.is-ok { color: #14602b; font-weight: 600; }
.cform__status.is-error { color: #a11a1a; font-weight: 600; }

/* ---------- Donate ---------- */
.donate {
  position: relative;
  width: min(1275px, 100%);
  margin: 0 auto;
  padding-bottom: 11px;
}
.donate__title, .donate__sub, .donate__grid, .donate__thanks { position: relative; z-index: 1; }

/* Белое свечение за подзаголовком и карточками. Растягивается по блоку .donate__body,
   поэтому на телефоне (карточки друг под другом) сопровождает обе карточки.
   Края уходят в прозрачность плавно, оранжево-голубой градиент .warm остаётся видимым.
   Ширина и выступы сверху/снизу заданы переменными — меньше на планшете и телефоне. */
.donate__body {
  --glow-out-x: 180px;   /* насколько свечение шире блока с каждой стороны */
  --glow-out-top: 130px; /* выше подзаголовка — мягко захватывает и заголовок */
  --glow-out-bottom: 110px;
  position: relative;
  z-index: 0; /* ниже заголовка (z-index: 1): свечение не ложится поверх текста */
}
.donate__body::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(-1 * var(--glow-out-top));
  bottom: calc(-1 * var(--glow-out-bottom));
  left: calc(-1 * var(--glow-out-x));
  right: calc(-1 * var(--glow-out-x));
  pointer-events: none;
  background: radial-gradient(closest-side,
    rgba(255, 255, 255, .96) 0%,
    rgba(255, 255, 255, .93) 36%,
    rgba(255, 255, 255, .8) 54%,
    rgba(255, 255, 255, .56) 69%,
    rgba(255, 255, 255, .3) 81%,
    rgba(255, 255, 255, .11) 91%,
    rgba(255, 255, 255, 0) 100%);
}
/* Подзаголовок — как заголовки второго уровня сайта (.title--lg) */
.donate__sub { margin-top: 14px; }

/* Две равноправные карточки рядом; на телефоне — друг под другом */
.donate__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 440px));
  justify-content: center;
  gap: 40px;
  margin-top: 64px;
  padding: 0 24px;
}
.req {
  display: flex;
  flex-direction: column;
  padding: 32px 32px 30px;
  border-radius: 28px;
  background: linear-gradient(136.49deg, var(--peach-a) 14.644%, var(--peach-b) 85.356%);
  filter: drop-shadow(0 5px 9px rgba(0, 0, 0, .35));
  color: var(--ink);
}
.req__name {
  font-family: var(--font-head);
  font-size: 28px; font-weight: 500; line-height: 34px;
  text-align: center;
}
.req__list { margin: 24px 0 28px; flex: 1; }
.req__row + .req__row { margin-top: 16px; padding-top: 16px; border-top: 1px solid rgba(6, 6, 6, .12); }
.req__row dt {
  font-size: 13px; font-weight: 600; line-height: 16px;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(6, 6, 6, .55);
}
.req__row dd {
  margin: 4px 0 0;
  font-size: 20px; font-weight: 500; line-height: 26px;
  overflow-wrap: anywhere;
}
/* IBAN группами по 4 знака; одно нажатие выделяет его целиком */
.req__iban {
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
  -webkit-user-select: all;
  user-select: all;
}
.req__copy {
  align-self: center;
  display: inline-grid;
  justify-items: center;
  min-width: 260px;
  max-width: 100%;
  padding-left: 28px; padding-right: 28px;
}
/* обе надписи в одной ячейке: ширина кнопки не меняется при «Скопировано!» */
.req__copy-text, .req__copy-done { grid-area: 1 / 1; transition: opacity .2s ease; }
.req__copy-done { opacity: 0; }
.req__copy.is-copied { background: #14602b; opacity: 1; }
.req__copy.is-copied .req__copy-text { opacity: 0; }
.req__copy.is-copied .req__copy-done { opacity: 1; }

/* Завершающий блок: разделитель и благодарность */
.donate__thanks {
  width: min(640px, 100% - 48px);
  margin: 64px auto 0;
  padding: 40px 0 111px;
  border-top: 1px solid rgba(6, 6, 6, .25);
  text-align: center;
  color: var(--ink);
}
.donate__thanks-title { font-family: var(--font-head); font-size: 28px; font-weight: 500; line-height: 34px; }
.donate__thanks-text { margin-top: 12px; font-size: 20px; line-height: 28px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--ink-soft);
  /* Нижний отступ 48 px (на ≤640 px — 10 px). Раньше он был нужен, чтобы свечение
     раздела пожертвований помещалось внутри градиента .warm; теперь свечение
     привязано к карточкам (.donate__body::before) и заканчивается выше подвала. */
  padding: 34px 0 48px;
}
.footer__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 132px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  font-size: 16px;
  line-height: 19px;
  text-align: center;
  color: var(--ink-soft);
}
.footer__inner p:nth-child(1) { width: 280px; }

/* =====================================================================
   Responsive
   ===================================================================== */

/* ---- Narrow desktop / laptop ---- */
@media (max-width: 1280px) {
  .meetings__grid {
    grid-template-columns: 1fr;
    row-gap: 56px;
    justify-items: center;
  }
  .schedule { width: min(560px, 100%); }
  .shofar { width: min(578px, 100%); margin-top: 0; }

  .ministries__grid { column-gap: 16px; }

  .contacts__grid {
    grid-template-columns: 1fr 1fr;
    column-gap: 24px;
    justify-items: start;
  }
  .contacts__map {
    grid-column: 1 / -1;
    grid-row: 4;
    width: min(387px, 100%);
    margin-top: 24px;
    justify-self: center;
  }
}

@media (max-width: 1160px) {
  .about__grid {
    grid-template-columns: 1fr;
    row-gap: 40px;
    justify-items: center;
    width: min(590px, 100% - 48px);
  }
  .pastors { width: 100%; }
  .about__card { width: min(354px, 100%); }

  .donate__grid { gap: 24px; }
  .req { padding: 28px 24px 26px; }

  .footer__inner { padding: 0 48px; flex-wrap: wrap; justify-content: center; gap: 24px 64px; }
}

/* ---- Tablet ---- */
@media (max-width: 900px) {
  .nav__inner { height: 96px; padding: 0 20px 0 12px; }
  .nav__logo img { width: 80px; height: 80px; }
  .nav.is-scrolled .nav__inner { height: 64px; }
  .nav.is-scrolled .nav__logo img { width: 46px; height: 46px; }

  .nav__toggle {
    display: grid;
    place-items: center;
    width: 48px; height: 48px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: rgba(6, 6, 6, .45);
    cursor: pointer;
  }
  .nav__bars,
  .nav__bars::before,
  .nav__bars::after {
    display: block;
    width: 22px; height: 2px;
    border-radius: 2px;
    background: #fff;
    transition: transform .25s ease, opacity .2s ease;
  }
  .nav__bars { position: relative; }
  .nav__bars::before, .nav__bars::after { content: ""; position: absolute; left: 0; }
  .nav__bars::before { top: -7px; }
  .nav__bars::after  { top: 7px; }

  .nav.is-open .nav__bars { background: transparent; }
  .nav.is-open .nav__bars::before { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__bars::after  { transform: translateY(-7px) rotate(-45deg); }

  .nav__links {
    position: absolute;
    top: calc(100% + 4px); right: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 200px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(6, 6, 6, .9);
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.is-open .nav__links { opacity: 1; visibility: visible; transform: none; }
  .nav__links > a { display: block; width: 100%; padding: 10px 14px; border-radius: 10px; }
  .nav__links > a:hover { background: rgba(255, 255, 255, .12); opacity: 1; }
  .nav__lang { padding: 6px 10px 8px; }

  .hero { height: clamp(560px, 100vw, 760px); }
  .hero__media img { left: 0; top: 0; width: 100%; height: 100%; }
  .hero__title { left: 5vw; top: 36%; font-size: 44px; }

  .title--xl { font-size: 52px; line-height: 62px; }
  .about { margin-top: -96px; }
  .about__grid { margin-top: 56px; }

  .ministries__grid { grid-template-columns: repeat(2, 1fr); row-gap: 56px; margin-top: 56px; }
  .ministry__photo { height: min(272px, 52vw); }

  .meetings__grid, .broadcast__media { margin-top: 56px; }
  .broadcast__status { margin-top: 14px; }
  .broadcast__status + .broadcast__media { margin-top: 15px; }
  .broadcast__status[hidden] + .broadcast__media { margin-top: 56px; }

  .contacts__grid { margin-top: 56px; }
  .cform { margin-top: 56px; }
  .donate__grid { margin-top: 48px; }
  .donate__body { --glow-out-x: 110px; --glow-out-top: 110px; --glow-out-bottom: 90px; }
}

/* ---- Пожертвования: карточки друг под другом ---- */
@media (max-width: 760px) {
  .donate__grid { grid-template-columns: minmax(0, 440px); gap: 28px; }
}

/* ---- Phone ---- */
@media (max-width: 640px) {
  .footer { padding-bottom: 10px; }
  body { font-size: 17px; }

  .title--xl { font-size: 40px; line-height: 48px; }
  .title--lg { font-size: 26px; line-height: 32px; padding: 0 16px; }

  .hero { height: clamp(520px, 125vw, 640px); }
  .hero__title { font-size: 38px; left: 24px; top: 34%; }

  .about { margin-top: -72px; }
  .about__grid { margin-top: 40px; width: calc(100% - 32px); }
  .pastors { height: min(448px, 112vw); }
  .pill--left {
    left: 50%; top: 20px;
    transform: translateX(-50%);
    width: min(400px, calc(100% - 24px));
    min-width: 0;
    padding: 0 10px;
    text-align: center;
    font-size: 16px;
  }
  .pill--center { font-size: 18px; min-width: 0; }
  .about__card { min-height: 0; padding: 16px 20px 28px; }

  .history { padding-bottom: 56px; }
  .panel { width: calc(100% - 32px); margin-top: 28px; min-height: 0; }
  .panel--plain { padding: 20px 18px; }
  .panel--gradient { padding: 18px 18px 18px 22px; }
  .history__lead2 { margin-top: 36px; }
  .history__lead2 { padding: 4px 16px; border-radius: 14px; }
  .panel__list li { display: flex; }
  .panel__list li::before { flex: none; }

  .meetings, .broadcast, .ministries, .contacts { width: calc(100% - 32px); }

  .schedule { row-gap: 28px; }
  .slot { gap: 16px; }
  .day { width: 76px; height: 76px; border-width: 5px; border-radius: 20px; font-size: 26px; }
  .slot__text h3 { font-size: 24px; line-height: 30px; white-space: normal; }
  .slot__time { padding-left: 0; font-size: 18px; line-height: 22px; }
  .slot--sunday h3 { margin-left: 0; }

  .shofar { padding: 100px 18px 28px; border-width: 5px; min-height: 0; }
  .shofar__head { left: -5px; top: -5px; }
  .shofar__yt { margin: 28px auto 0; gap: 18px; font-size: 26px; line-height: 32px; }
  .shofar__yt img { width: 60px; }

  .broadcast { padding-bottom: 56px; }
  .broadcast__note { padding: 0; font-size: 16px; }

  .ministries { padding-bottom: 64px; }
  .ministries__grid { grid-template-columns: 1fr; row-gap: 36px; margin-top: 40px; }
  .ministry__photo { height: min(272px, 68vw); }
  .ministry__name { margin-top: 16px; font-size: 22px; }

  .contacts { padding-bottom: 56px; }
  .contacts__grid { grid-template-columns: 1fr; row-gap: 22px; margin-top: 40px; }
  .c-fb, .c-phone, .c-yt, .c-mail, .c-ig, .c-addr { grid-column: 1; grid-row: auto; }
  .contacts__map { grid-row: auto; height: auto; aspect-ratio: 387 / 321; }
  .contact { gap: 20px; }
  .contact__text { font-size: 20px; }

  .cform { margin-top: 40px; padding: 24px 18px 28px; }
  .cform__title { font-size: 26px; line-height: 32px; }
  .cform__row { grid-template-columns: 1fr; gap: 16px; }
  .cform__btn { width: 100%; }

  .donate__sub { margin-top: 10px; }
  /* Карточки друг под другом: вместо эллипса — вытянутое свечение («капсула»),
     ровное вдоль обеих карточек, мягко гаснущее к краям экрана, вверху и внизу */
  .donate__body { --glow-out-x: 110px; --glow-out-top: 150px; --glow-out-bottom: 120px; }
  .donate__body::before {
    background: linear-gradient(90deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, .5) 13%,
      rgba(255, 255, 255, .88) 30%,
      rgba(255, 255, 255, .88) 70%,
      rgba(255, 255, 255, .5) 87%,
      rgba(255, 255, 255, 0) 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  }
  .donate__grid { margin-top: 36px; padding: 0 16px; gap: 24px; }
  .req { padding: 24px 18px 22px; border-radius: 24px; }
  .req__name { font-size: 24px; line-height: 30px; }
  .req__list { margin: 18px 0 22px; }
  .req__row + .req__row { margin-top: 12px; padding-top: 12px; }
  .req__row dd { font-size: 18px; line-height: 24px; }
  .req__copy { align-self: stretch; min-width: 0; }
  .donate__thanks { width: calc(100% - 32px); margin-top: 44px; padding: 28px 0 72px; }
  .donate__thanks-title { font-size: 24px; line-height: 30px; }
  .donate__thanks-text { font-size: 17px; line-height: 24px; }
  /* IBAN в одну строку и на узких телефонах */
  .req__row .req__iban { font-size: clamp(15px, 4.8vw, 18px); letter-spacing: .01em; }

  .footer__inner { flex-direction: column; align-items: center; padding: 0 20px; gap: 18px; }
  .footer__inner p:nth-child(1) { width: auto; max-width: 280px; }
  .footer br { display: none; }
}

/* ---- Узкие телефоны (≤360 px): заголовок и кнопки раздела пожертвований помещаются по ширине ---- */
@media (max-width: 360px) {
  .donate__title { font-size: 34px; line-height: 42px; }
  .req__copy { padding-left: 14px; padding-right: 14px; font-size: 18px; }
}

/* ---------- Служения: окно с библейским местом (js/verses.js) ---------- */
.ministry[data-verse] .ministry__photo,
.ministry[data-verse] .ministry__name { cursor: pointer; }
.ministry[data-verse] .ministry__photo img { transition: transform .5s ease; }
@media (hover: hover) {
  .ministry[data-verse]:has(.ministry__photo:hover, .ministry__name:hover) .ministry__photo img { transform: scale(1.03); }
}
.ministry[data-verse] .ministry__photo:focus-visible,
.ministry[data-verse] .ministry__name:focus-visible { outline-offset: 4px; border-radius: 25px; }

.verse-pop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(6, 6, 6, .32);
  -webkit-backdrop-filter: blur(3px);
          backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .3s ease;
}
.verse-pop[hidden] { display: none; }
.verse-pop.is-open { opacity: 1; }

.verse-pop__card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(520px, 100%);
  max-height: min(78vh, 680px);
  padding: 26px 28px 20px;
  border-radius: 28px;
  background: linear-gradient(136.49deg, var(--peach-a) 14.644%, var(--peach-b) 85.356%);
  box-shadow: 0 18px 48px rgba(0, 0, 0, .35), 0 5px 9px rgba(0, 0, 0, .25);
  color: var(--ink);
  opacity: 0;
  transform: translateY(18px) scale(.96);
  transition: opacity .32s ease, transform .42s cubic-bezier(.2, .9, .25, 1.15);
}
.verse-pop.is-open .verse-pop__card { opacity: 1; transform: none; }

.verse-pop__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 38px; height: 38px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(6, 6, 6, .35);
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.verse-pop__close:hover { background: rgba(255, 255, 255, .9); transform: rotate(90deg); }

.verse-pop__title {
  padding: 0 40px;
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 500;
  line-height: 36px;
  text-align: center;
}
/* книга, глава и стихи — в «пилюле», как подписи в разделе «О нас» */
.verse-pop__ref {
  align-self: center;
  margin: 12px 0 18px;
  padding: 2px 18px;
  border: 1px solid #000;
  border-radius: 25px;
  font-size: 17px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: .01em;
  text-align: center;
}
.verse-pop__text {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 2px 4px 4px;
  font-size: 18px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.verse-pop__text p + p { margin-top: 6px; }
.verse-pop__num {
  margin-right: 2px;
  font-size: .68em;
  font-weight: 600;
  color: #b4521f;
  vertical-align: super;
  line-height: 0;
}
.verse-pop__src {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(6, 6, 6, .15);
  font-size: 13px;
  line-height: 16px;
  text-align: right;
  font-style: italic;
  color: rgba(6, 6, 6, .6);
}

@media (max-width: 640px) {
  .verse-pop__card { padding: 22px 18px 16px; border-radius: 24px; max-height: 82vh; }
  .verse-pop__title { font-size: 24px; line-height: 30px; }
  .verse-pop__ref { font-size: 15px; margin: 10px 0 14px; }
  .verse-pop__text { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .verse-pop, .verse-pop__card { transition: none; }
}
