/* Введенский храм ст. Динской – ввдхрам.рф
   Причёсано DuoBrain 17.10.2026: шрифты Forum + Lora локально, без Bootstrap/jQuery */

@font-face { font-family: 'Forum'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/forum-cyr.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Forum'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/forum-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/lora-400-cyr.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/lora-400-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/lora-700-cyr.woff2') format('woff2'); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/lora-700-lat.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #fbf9f5;
  --bg-2: #f2eee6;
  --ink: #1f2a36;
  --muted: #5d6874;
  --blue: #1b619d;
  --blue-dark: #154c7c;
  --blue-light: #1b91dc;
  --gold: #b8923a;
  --gold-text: #7f611c;
  --navy: #15212e;
  --line: rgba(31, 42, 54, .12);
  --head: 'Forum', 'Times New Roman', serif;
  --text: 'Lora', Georgia, serif;
  --wrap: 1140px;
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 18px/1.7 var(--text);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; transition: color .2s, background .2s, border-color .2s; }
a:hover { color: var(--blue-dark); }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 400; line-height: 1.2; margin: 0 0 .6em; color: var(--ink); }
h2 { font-size: clamp(32px, 4.2vw, 46px); }
p { margin: 0 0 1.1em; }
section { scroll-margin-top: var(--header-h); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--alt { background: var(--bg-2); }
.center { text-align: center; }
.lead { font-size: 20px; }
.eyebrow { font-family: var(--head); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-text); margin-bottom: 12px; display: block; }
.dark .eyebrow { color: var(--gold); }
.ornament { display: block; width: 72px; height: 1px; margin: 0 auto 28px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 12px 30px; border-radius: 3px;
  font: 400 16px/1.2 var(--head); letter-spacing: .08em; text-transform: uppercase;
  background: var(--blue); color: #fff; border: 1px solid var(--blue); cursor: pointer;
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.btn--ghost { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.7); color: #fff; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn--ghost:hover { background: rgba(255,255,255,.2); border-color: #fff; }
.btn--outline { background: transparent; color: var(--blue); }
.btn--outline:hover { background: var(--blue); color: #fff; }
.link-more { font-family: var(--head); font-size: 17px; letter-spacing: .06em; text-transform: uppercase; border-bottom: 1px solid currentColor; padding-bottom: 2px; }

/* ---------- Шапка ---------- */
.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100; height: var(--header-h);
  transition: background .3s, box-shadow .3s;
}
.header .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.header__logo img { height: 46px; width: auto; transition: filter .3s; filter: brightness(0) invert(1); }
.header.is-solid { background: rgba(251, 249, 245, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 1px 0 var(--line); }
.header.is-solid .header__logo img { filter: none; }
.nav { display: flex; gap: 30px; }
.nav a, .footer__nav a {
  font-family: var(--head); font-size: 15px; letter-spacing: .07em; text-transform: uppercase;
  color: #fff; padding: 6px 0; border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: currentColor; color: #fff; }
.header.is-solid .nav a { color: var(--ink); }
.header.is-solid .nav a:hover { color: var(--blue); }
.header__phone { font-family: var(--head); font-size: 19px; color: #fff; white-space: nowrap; letter-spacing: .02em; }
.header.is-solid .header__phone { color: var(--blue); }
.burger { display: none; width: 44px; height: 44px; border: 0; background: none; padding: 10px; cursor: pointer; }
.burger span { display: block; height: 2px; background: #fff; margin: 6px 0; transition: transform .3s, opacity .3s, background .3s; }
.header.is-solid .burger span, .header.is-open .burger span { background: var(--ink); }
.header.is-open .burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.header.is-open .burger span:nth-child(2) { opacity: 0; }
.header.is-open .burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- Первый экран ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden; }
.hero__img { position: absolute; inset: 0; z-index: -2; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
@media (max-width: 760px) and (orientation: portrait) { .hero__img img { object-position: center 30%; } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,20,32,.55) 0%, rgba(10,20,32,.5) 40%, rgba(10,20,32,.55) 65%, rgba(10,20,32,.75) 100%); }
.hero .wrap { width: 100%; text-align: center; padding-top: var(--header-h); padding-bottom: 80px; }
.hero h1 { color: #fff; font-size: clamp(36px, 5.6vw, 68px); max-width: 980px; margin: 0 auto 14px; text-shadow: 0 2px 24px rgba(0,0,0,.35); }
.hero__sub { text-shadow: 0 1px 14px rgba(0,0,0,.5); font-family: var(--head); font-size: clamp(20px, 2.4vw, 28px); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 40px; opacity: .92; }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.hero__info { display: inline-block; margin-top: 32px; padding: 8px 18px; font-size: 16px; border-radius: 3px; background: rgba(10,20,32,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.hero__info a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.5); }
.hero__down { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); width: 44px; height: 44px; display: grid; place-items: center; color: #fff; opacity: .8; animation: bob 2.4s ease-in-out infinite; }
.hero__down:hover { color: #fff; opacity: 1; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* ---------- О храме ---------- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about__photo img { border-radius: 4px; box-shadow: 0 24px 60px -24px rgba(21,33,46,.45); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.about__text p { color: #2c3846; }

/* ---------- Расписание ---------- */
.rasp__sheet { max-width: 620px; margin: 0 auto; }
.rasp__sheet a { display: block; background: #fff; padding: 10px; border-radius: 4px; box-shadow: 0 20px 50px -22px rgba(21,33,46,.4); }
.rasp__sheet img { width: 100%; }
.rasp__note { max-width: 620px; margin: 22px auto 0; text-align: center; font-size: 16px; color: var(--muted); }
.rasp__note a { white-space: nowrap; }

/* ---------- Освящение (тёмный блок) ---------- */
.dark { position: relative; color: rgba(255,255,255,.88); overflow: hidden; isolation: isolate; }
.dark__bg { position: absolute; inset: 0; z-index: -2; }
.dark__bg img { width: 100%; height: 100%; object-fit: cover; }
.dark::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(13, 22, 33, .84); }
.dark h2 { color: #fff; }
.dark a { color: #fff; }
.story { display: grid; grid-template-columns: 1.35fr 1fr; gap: 64px; align-items: start; }
.story__text p { font-size: 18px; }
.quote {
  margin: 34px 0; padding: 4px 0 4px 28px; border-left: 2px solid var(--gold);
  font-family: var(--head); font-size: clamp(22px, 2.2vw, 27px); line-height: 1.4; color: #fff;
}
.quote cite { display: block; margin-top: 14px; font-family: var(--text); font-style: normal; font-size: 16px; color: rgba(255,255,255,.7); }
.story__figure { margin: 0; position: sticky; top: calc(var(--header-h) + 24px); }
.story__figure img { border-radius: 4px; }
.story__figure figcaption { margin-top: 14px; font-size: 15px; color: rgba(255,255,255,.65); text-align: center; }

/* ---------- Казаки ---------- */
.kaz { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: center; }
.kaz__quote { margin: 0; font-family: var(--head); font-size: clamp(22px, 2.3vw, 28px); line-height: 1.45; color: var(--ink); }
.kaz__quote::before { content: "«"; display: block; font-size: 90px; line-height: .6; color: var(--gold); margin-bottom: 18px; }
.kaz__author { display: flex; align-items: center; gap: 18px; margin-top: 30px; }
.kaz__author img { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; object-position: center 20%; flex: 0 0 auto; }
.kaz__author b { display: block; font-family: var(--head); font-weight: 400; font-size: 22px; }
.kaz__author span { font-size: 15px; color: var(--muted); line-height: 1.4; display: block; }
.kaz__drawing img { max-width: 360px; margin: 0 auto; width: 100%; }

/* ---------- Галерея ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 12px; }
.gallery a { display: block; position: relative; overflow: hidden; border-radius: 3px; aspect-ratio: 3 / 2; background: var(--bg-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.gallery a:hover img { transform: scale(1.05); }
.gallery a::after { content: ""; position: absolute; inset: 0; background: rgba(13,22,33,0); transition: background .3s; }
.gallery a:hover::after { background: rgba(13,22,33,.15); }

/* Лайтбокс */
.lb { position: fixed; inset: 0; z-index: 10000; background: rgba(10, 16, 24, .94); display: none; align-items: center; justify-content: center; padding: 56px 64px; }
.lb.is-open { display: flex; }
.lb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 2px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb button { position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.lb button:hover { background: rgba(255,255,255,.22); }
.lb__close { top: 16px; right: 16px; }
.lb__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb__next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb__count { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.6); font-size: 14px; }

/* ---------- Контакты ---------- */
.contacts { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
.contacts dl { margin: 0 0 30px; }
.contacts dt { font-family: var(--head); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-top: 20px; }
.contacts dd { margin: 4px 0 0; font-size: 20px; }
.contacts dd a.tel { font-family: var(--head); font-size: 30px; letter-spacing: .02em; }
.contacts__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.contacts__map { display: block; border-radius: 4px; overflow: hidden; box-shadow: 0 20px 50px -24px rgba(21,33,46,.45); position: relative; }
.contacts__map img { width: 100%; }
.contacts__map span { position: absolute; right: 12px; bottom: 12px; background: rgba(255,255,255,.92); color: var(--blue); padding: 6px 14px; border-radius: 3px; font-family: var(--head); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Подвал ---------- */
.footer { background: var(--navy); color: rgba(255,255,255,.72); padding: 72px 0 36px; font-size: 16px; }
.footer a { color: rgba(255,255,255,.82); }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; }
.footer__brand img { width: 150px; margin-bottom: 22px; }
.footer__words { font-family: var(--head); font-size: 20px; line-height: 1.5; color: rgba(255,255,255,.8); margin: 0; }
.footer h4 { font-family: var(--head); font-size: 15px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 18px; }
.footer__nav { display: flex; flex-direction: column; gap: 4px; }
.footer__nav a { color: rgba(255,255,255,.82); font-size: 14px; }
.footer__tel { font-family: var(--head); font-size: 26px; color: #fff !important; display: inline-block; margin-bottom: 10px; }
.footer__bottom { margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.5); }
.footer__bottom p { margin: 0 0 10px; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 14px 0; }
.footer__legal a { color: rgba(255,255,255,.62); text-decoration: underline; text-underline-offset: 3px; }
.footer-consent { color: rgba(255,255,255,.5); }
.footer-consent a { color: rgba(255,255,255,.7); text-decoration: underline; }
.footer__made { margin-top: 18px; }

/* Кнопка «наверх» */
.to-top { position: fixed; right: 18px; bottom: 70px; z-index: 90; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(21,33,46,.6); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .3s, background .3s; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.to-top.is-visible { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--blue); }

/* Баннер cookie – тонкий, полупрозрачный */
.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 10px 16px; background: rgba(20, 20, 20, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; font-size: 13px; line-height: 1.4; }
.cookie-bar a { color: #fff; text-decoration: underline; }
.cookie-bar button { flex: 0 0 auto; padding: 6px 18px; cursor: pointer; border: 1px solid rgba(255,255,255,.5); border-radius: 2px; background: transparent; color: #fff; font-size: 13px; font-family: inherit; }
.cookie-bar button:hover { background: rgba(255,255,255,.15); }
.cookie-bar.is-hidden { display: none; }
.cookie-short { display: none; }

/* Появление по скроллу */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__down { animation: none; }
}

/* ---------- Юридические страницы ---------- */
.page-head { background: var(--navy); color: #fff; padding: calc(var(--header-h) + 56px) 0 48px; }
.page-head h1 { color: #fff; font-size: clamp(30px, 4vw, 44px); margin: 0; }
.legal { max-width: 860px; font-size: 17px; }
.legal h2 { font-size: 26px; margin-top: 1.6em; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: .4em; }
.legal__nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .header__phone { display: none; }
}
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  body { font-size: 17px; }
  .section { padding: 72px 0; }
  .burger { display: block; margin-right: -10px; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(251, 249, 245, .98); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    padding: 8px 24px 20px; box-shadow: 0 18px 30px -18px rgba(0,0,0,.25);
    transform: translateY(-12px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .25s, transform .25s, visibility .25s;
  }
  .nav a { color: var(--ink) !important; font-size: 16px; padding: 14px 0; border-bottom: 1px solid var(--line) !important; }
  .nav a:last-child { border-bottom: 0 !important; }
  .header.is-open { background: rgba(251, 249, 245, .98); }
  .header.is-open .header__logo img { filter: none; }
  .header.is-open .nav { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
  .header__logo img { height: 40px; }
  .about, .story, .kaz, .contacts { grid-template-columns: 1fr; gap: 40px; }
  .story__figure { position: static; max-width: 420px; margin: 0 auto; }
  .kaz__drawing img { max-width: 260px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 575px) {
  .wrap { padding: 0 18px; }
  .section { padding: 60px 0; }
  .lead { font-size: 18px; }
  .hero__actions .btn { width: 100%; }
  .hero__info { font-size: 15px; }
  .quote { padding-left: 18px; }
  .contacts dd a.tel { font-size: 26px; }
  .contacts__btns .btn { width: 100%; }
  .footer { padding-top: 56px; }
  .footer__grid { grid-template-columns: 1fr; gap: 36px; }
  .lb { padding: 56px 8px; }
  .lb__prev, .lb__next { top: auto; bottom: 10px; transform: none; }
  .lb__prev { left: calc(50% - 60px); }
  .lb__next { right: calc(50% - 60px); }
  .lb__count { bottom: 70px; }
  .cookie-bar { font-size: 12px; gap: 10px; padding: 8px 12px; text-align: left; justify-content: space-between; }
  .cookie-long { display: none; }
  .cookie-short { display: inline; }
  .to-top { bottom: 84px; }
}
