/* ===== Fonts ===== */
@font-face { font-family: 'Open Sans'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/fonts/OpenSans-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Open Sans'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/fonts/OpenSans-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Open Sans'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('/fonts/OpenSans-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Open Sans'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('/fonts/OpenSans-600-latin.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Slab'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/fonts/RobotoSlab-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Roboto Slab'; font-weight: 400; font-style: normal; font-display: swap;
  src: url('/fonts/RobotoSlab-400-latin.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Slab'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('/fonts/RobotoSlab-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Roboto Slab'; font-weight: 500; font-style: normal; font-display: swap;
  src: url('/fonts/RobotoSlab-500-latin.woff2') format('woff2'); }
@font-face { font-family: 'Roboto Slab'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('/fonts/RobotoSlab-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Roboto Slab'; font-weight: 600; font-style: normal; font-display: swap;
  src: url('/fonts/RobotoSlab-600-latin.woff2') format('woff2'); }

/* ===== Variables ===== */
:root {
  --bg: #f7f4f1;
  --surface: #ffffff;
  --text: #1e2839;
  --muted: #7d8794;
  --accent: #a67c3d;
  --accent-dark: #8a6430;
  --line: #e5dfd6;
  --line-soft: #ece7e0;
  --gold: #c8a35c;
  --ink: #16203a;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: "Open Sans", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  overflow-wrap: break-word;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

h1, h2, h3, h4, .serif {
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 500;
  line-height: 1.32;
}

h1 { font-size: 34px; margin: 0 0 20px; }
h2 { font-size: 27px; margin: 0 0 14px; }
h3 { font-size: 20px; margin: 0 0 10px; }

a { color: var(--accent); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent-dark); }

img { max-width: 100%; display: block; }

/* ===== Header ===== */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 50;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.brand-icon { width: 40px; height: auto; }
.brand-text {
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 600;
  font-size: 13.5px;
  line-height: 1.28;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text);
  display: block;
}
.brand-city {
  display: block;
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  font-size: 9px;
  letter-spacing: .3em;
  color: var(--accent);
  margin-top: 4px;
}

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.menu-toggle span { display: block; width: 24px; height: 2px; background: var(--text); margin: 5px 0; }

.main-nav { display: flex; align-items: center; }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0; }
.main-nav a {
  display: block;
  padding: 9px 9px;
  font-family: "Roboto Slab", Georgia, serif;
  font-weight: 500;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .015em;
  color: var(--text);
  white-space: nowrap;
}
.main-nav a:hover { color: var(--accent); }
.main-nav a.active { color: var(--accent); }
.main-nav .has-sub { position: relative; }
.main-nav .sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  min-width: 220px;
  z-index: 30;
  box-shadow: 0 10px 26px rgba(22, 32, 58, .1);
}
.main-nav .has-sub:hover .sub,
.main-nav .sub-open .sub { display: block; }
.main-nav .sub a { padding: 10px 16px; }
.caret { font-size: 10px; color: var(--muted); display: inline-block; transition: transform .2s; }
.main-nav .sub-open > a .caret { transform: rotate(180deg); }

/* ===== Hero slider ===== */
.hero-slider { position: relative; height: 67vh; min-height: 500px; max-height: 700px; overflow: hidden; background: var(--ink); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; pointer-events: none; }
.slide.active { opacity: 1; pointer-events: auto; }
.slide img { width: 100%; height: 100%; object-fit: cover; }
.slide::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,15,28,.5) 0%, rgba(10,15,28,.25) 50%, rgba(10,15,28,.68) 100%);
}
.slide-caption {
  position: absolute;
  z-index: 2;
  bottom: 18%;
  left: 0; right: 0;
  color: #fff;
  text-align: center;
  padding: 0 24px;
}
.slide-caption .over {
  text-transform: uppercase; letter-spacing: .3em; font-size: 12px; opacity: .85; margin-bottom: 12px;
}
.slide-caption h1, .slide-caption h2 {
  color: #fff;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
  font-size: 46px;
  margin-bottom: 12px;
}
.slide-caption p { font-size: 16.5px; opacity: .95; }

.hero-dots {
  position: absolute;
  z-index: 3;
  bottom: 28px;
  left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.hero-dots button {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.8);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background .2s;
}
.hero-dots button.on { background: #fff; }

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 11px 26px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 15px;
  font-family: "Roboto Slab", Georgia, serif;
  letter-spacing: .02em;
  border-radius: 4px;
  transition: all .18s;
  background: transparent;
  cursor: pointer;
}
.btn:hover { background: var(--accent); color: #fff; }
.btn-solid { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost-light { border-color: rgba(255,255,255,.75); color: #fff; border-radius: 4px; }
.btn-ghost-light:hover { background: rgba(255,255,255,.94); color: var(--text); }

/* ===== Sections ===== */
.section { padding: 58px 0; }
.section-alt { background: var(--surface); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}
.section-head a { font-size: 14.5px; white-space: nowrap; }

.kicker {
  text-transform: uppercase;
  letter-spacing: .25em;
  font-size: 11.5px;
  color: var(--gold);
  margin-bottom: 8px;
  font-family: "Roboto Slab", Georgia, serif;
}

/* ===== Cards ===== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  padding: 24px 24px 20px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover { box-shadow: 0 12px 32px rgba(22,32,58,.09); transform: translateY(-2px); }
.card .date { font-size: 13px; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; }
.card h3 { font-size: 17.5px; }
.card p { font-size: 14.5px; color: #4d5464; margin-top: 8px; }
.card .more { display: inline-block; margin-top: 12px; font-size: 14px; }
.card-img { margin: 0 0 16px -24px; width: calc(100% + 48px); max-width: none; }
.card-img img { width: 100%; height: 190px; object-fit: cover; }

/* ===== Schedule cards ===== */
.schedule-week { color: var(--muted); font-size: 15px; margin-bottom: 22px; }

.sched-carousel-wrap { position: relative; }
.sched-carousel {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.sched-carousel::-webkit-scrollbar { display: none; }
.sched-card {
  flex: 0 0 292px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--gold);
  padding: 20px 22px;
}
.sched-card .d { font-family: "Roboto Slab", Georgia, serif; font-size: 16.5px; font-weight: 500; }
.sched-card .t { font-size: 13.5px; color: var(--muted); margin: 4px 0 10px; min-height: 40px; }
.sched-card ul { list-style: none; }
.sched-card li { font-size: 14px; padding: 3px 0; color: #333a48; border-bottom: 1px dashed var(--line-soft); }
.sched-card li:last-child { border-bottom: none; }

.carousel-nav {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 8px;
}
.carousel-nav button {
  width: 40px; height: 40px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  cursor: pointer;
  transition: all .15s;
}
.carousel-nav button:hover { border-color: var(--gold); color: var(--accent); }

.schedule-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.sched-day {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--gold);
  padding: 20px 22px;
}
.sched-day .d { font-family: "Roboto Slab", Georgia, serif; font-size: 16.5px; font-weight: 500; }
.sched-day .t { font-size: 13.5px; color: var(--muted); margin: 4px 0 10px; }
.sched-day ul { list-style: none; }
.sched-day li { font-size: 14px; padding: 3px 0; color: #333a48; border-bottom: 1px dashed var(--line-soft); }
.sched-day li:last-child { border-bottom: none; }

/* ===== CTA banner ===== */
.cta-banner {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 64px 0;
}
.cta-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cta-banner::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16,24,44,.86) 0%, rgba(16,24,44,.62) 100%); }
.cta-inner { position: relative; z-index: 2; max-width: 640px; }
.cta-inner h2 { color: #fff; font-size: 30px; margin-bottom: 10px; }
.cta-inner p { opacity: .92; margin-bottom: 24px; font-size: 16px; }
.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ===== Gallery ===== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-grid a {
  display: block;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}
.gallery-grid img { width: 100%; height: 200px; object-fit: cover; transition: transform .35s; }
.gallery-grid a:hover img { transform: scale(1.05); }
.gallery-grid figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(10,15,28,.78));
  color: #fff;
  font-size: 12.5px;
  padding: 26px 12px 9px;
  opacity: 0;
  transition: opacity .25s;
}
.gallery-grid a:hover figcaption { opacity: 1; }
/* На сенсорных экранах hover нет — показываем подписи всегда */
@media (hover: none) {
  .gallery-grid figcaption { opacity: 1; }
}

/* ===== Rector ===== */
.rector-card {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  padding: 30px 34px;
}
.rector-card img { width: 190px; height: 250px; object-fit: cover; object-position: top; flex-shrink: 0; }
.rector-card h2 { margin-bottom: 6px; }
.rector-card .role { color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 14px; font-family: "Roboto Slab", Georgia, serif; }
.rector-card p { font-size: 15px; color: #4d5464; margin-bottom: 14px; }

/* ===== Page layout ===== */
.page-body { padding: 46px 0 60px; }
.breadcrumbs { font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); }

.prose { max-width: 780px; }
.prose p { margin-bottom: 18px; font-size: 16px; }

.lead { font-size: 18px; color: #4d5464; }

.page-photo { margin-top: 30px; max-width: 780px; }
.page-photo img { width: 100%; max-height: 420px; object-fit: cover; border: 1px solid var(--line-soft); }
.page-photo figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; }

.photo-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}
.photo-strip img { width: 100%; height: 170px; object-fit: cover; border: 1px solid var(--line-soft); }

/* ===== Clergy ===== */
.clergy-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.clergy-card {
  display: flex;
  gap: 20px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--gold);
  padding: 20px;
}
.clergy-card img { width: 120px; height: 158px; object-fit: cover; object-position: top; flex-shrink: 0; }
.clergy-card h3 { font-size: 17px; margin-bottom: 2px; }
.clergy-card .role { color: var(--accent); font-size: 13px; margin-bottom: 10px; text-transform: uppercase; letter-spacing: .08em; }
.clergy-card .bio { font-size: 13.5px; color: #4d5464; line-height: 1.6; }

/* ===== Shrines ===== */
.shrine-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.shrine-card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  padding: 26px 24px;
  text-align: center;
  transition: box-shadow .2s, transform .2s;
}
.shrine-card:hover { box-shadow: 0 12px 32px rgba(22,32,58,.09); transform: translateY(-2px); }
.shrine-card .ico { color: var(--gold); margin: 0 auto 14px; width: 54px; }
.shrine-card h3 { font-size: 16.5px; }
.shrine-card p { font-size: 14px; color: #4d5464; margin-top: 8px; }

/* ===== Forms ===== */
.form-block { max-width: 640px; background: var(--surface); border: 1px solid var(--line); padding: 32px 34px; }
.form-row { margin-bottom: 18px; }
.form-row label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.form-row input[type=text], .form-row input[type=tel], .form-row input[type=email], .form-row input[type=password], .form-row textarea, .form-row select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
}
/* Крупный шрифт полей — чтобы iOS не зумил страницу при фокусе */
input[type=text], input[type=tel], input[type=email], input[type=password], input[type=search], input[type=url], input[type=number], textarea, select {
  font-size: 16px !important;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--gold); }
.form-row textarea { min-height: 120px; resize: vertical; }
.form-hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

.radio-row { display: flex; gap: 18px; }
.radio-row label { display: flex; align-items: center; gap: 6px; color: var(--text); font-size: 15px; cursor: pointer; }

.success-note {
  background: #f4f9f1;
  border: 1px solid #cfe3c2;
  color: #3d5a2c;
  padding: 14px 18px;
  margin-bottom: 22px;
  font-size: 15px;
}

/* ===== Contacts ===== */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; align-items: start; }
.contact-info h3 { margin-top: 22px; }
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { margin-bottom: 4px; }

.map-frame { width: 100%; height: 380px; border: 1px solid var(--line); background: var(--line-soft); }

.req-table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin-top: 10px; }
.req-table td { border: 1px solid var(--line-soft); padding: 8px 12px; }
.req-table td:first-child { width: 220px; color: var(--muted); background: #fbf9f5; }

.qr { width: 150px; border: 1px solid var(--line-soft); padding: 8px; background: #fff; }

/* ===== Q&A ===== */
.qa-item { border: 1px solid var(--line-soft); background: var(--surface); padding: 22px 26px; margin-bottom: 18px; }
.qa-item .q { font-family: "Roboto Slab", Georgia, serif; font-size: 17px; font-weight: 500; margin-bottom: 4px; }
.qa-item .meta { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.qa-item .a { border-top: 1px dashed var(--line); padding-top: 12px; font-size: 15.5px; }
.qa-item .a .who { color: var(--accent); font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; display: block; margin-bottom: 6px; font-family: "Roboto Slab", Georgia, serif; }

/* ===== News list ===== */
.news-item { display: flex; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--line-soft); }
.news-item:first-child { padding-top: 0; }
.news-item img { width: 230px; height: 155px; object-fit: cover; flex-shrink: 0; }
.news-item .date { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.news-item h3 { font-size: 18.5px; margin-bottom: 6px; }
.news-item p { color: #4d5464; font-size: 15px; }

.article { max-width: 780px; }
.article img.main { margin: 26px 0; width: 100%; max-height: 440px; object-fit: cover; }
.article .date { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ===== Footer ===== */
.site-footer { background: #16203a; color: #c3c9d6; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; padding: 46px 24px 30px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; font-weight: 500; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: #a7aec0; font-size: 14.5px; }
.site-footer a:hover { color: #e7ddc9; }
.site-footer p { font-size: 14.5px; }
.footer-bottom {
  border-top: 1px solid #2b3652;
  padding: 16px 24px;
  font-size: 13px;
  color: #8a91a3;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ===== Admin ===== */
.admin-wrap { padding: 40px 0 70px; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.admin-nav a { padding: 10px 16px; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; }
.admin-nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.admin-title { font-size: 20px; }
.admin-head-actions { display: flex; align-items: center; gap: 10px; }

.admin-search { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.admin-search input[type=search], .admin-search input[type=text] { flex: 1 1 180px; min-width: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-bottom: 36px; }
.stat { background: var(--surface); border: 1px solid var(--line-soft); padding: 20px; text-align: center; }
.stat .n { font-family: "Roboto Slab", Georgia, serif; font-size: 32px; color: var(--accent); }
.stat .l { font-size: 13.5px; color: var(--muted); }

.admin-list { border: 1px solid var(--line-soft); background: var(--surface); }
.admin-list-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); align-items: center; flex-wrap: wrap; }
.admin-list-row > div:first-child { flex: 1 1 220px; min-width: 0; }
.admin-list-row:last-child { border-bottom: none; }
.admin-list-row .meta { font-size: 13px; color: var(--muted); }
.admin-list-actions { display: flex; gap: 8px; white-space: nowrap; flex-wrap: wrap; }
.admin-list-actions a, .admin-list-actions button { font-size: 13.5px; padding: 8px 14px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.admin-list-actions a:hover, .admin-list-actions button:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { font-size: 13.5px; padding: 8px 14px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; }
.btn-danger:hover { border-color: #b23c3c !important; color: #b23c3c !important; }
.badge { display: inline-block; font-size: 11.5px; padding: 2px 9px; border-radius: 10px; letter-spacing: .04em; }
.badge-new { background: #fdeeee; color: #a33; }
.badge-ok { background: #eef4e8; color: #4d742a; }

.admin-form { max-width: 720px; }
.admin-form textarea { min-height: 200px; }

.day-block { border: 1px solid var(--line-soft); background: var(--surface); padding: 18px; margin-bottom: 14px; }
.day-block textarea { min-height: 90px; }
.day-row { display: grid; grid-template-columns: 240px 1fr; gap: 12px; }
.day-events-label { font-size: 13px; color: var(--muted); margin: 10px 0 6px; }

.note-item { border: 1px solid var(--line-soft); background: var(--surface); padding: 16px 20px; margin-bottom: 12px; }
.note-item.archived { opacity: .55; }
.note-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 8px; flex-wrap: wrap; }
.note-type { font-weight: 600; font-size: 14px; }
.note-type.health { color: #3f7a2e; }
.note-type.repose { color: #6a4b8a; }
.note-names { font-size: 15.5px; margin-bottom: 6px; }
.note-meta { font-size: 13px; color: var(--muted); }

/* ===== 404 ===== */
.nf { text-align: center; padding: 90px 20px 70px; }
.nf h1 { font-size: 60px; color: var(--gold); }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .card-grid { grid-template-columns: 1fr; }
  .schedule-days { grid-template-columns: 1fr; }
  .shrine-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .clergy-list { grid-template-columns: 1fr; }
  .photo-strip { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .rector-card { flex-direction: column; }
  .rector-card img { width: 100%; height: auto; max-height: 340px; }
  .hero-slider { height: 70vh; min-height: 440px; }
  .slide-caption h1, .slide-caption h2 { font-size: 30px; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }

  .header-row { min-height: 74px; padding: 8px 0; }
  .brand-icon { width: 38px; }
  .brand-text { font-size: 12px; }
  .menu-toggle { display: block; }
  .main-nav { display: none; flex-basis: 100%; }
  body.menu-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; }
  .main-nav a { padding: 11px 0; font-size: 14px; }
  .main-nav .sub {
    position: static;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 18px;
  }
  .news-item { flex-direction: column; }
  .news-item img { width: 100%; height: 200px; }
}

@media (max-width: 560px) {
  h1 { font-size: 26px; }
  .section { padding: 40px 0; }
  .clergy-card { flex-direction: column; }
  .clergy-card img { width: 100%; height: auto; max-height: 260px; }
  .day-row { grid-template-columns: 1fr; }
  .gallery-grid img { height: 150px; }
  .slide-caption h1, .slide-caption h2 { font-size: 25px; }
  .slide-caption .over { letter-spacing: .18em; font-size: 10.5px; }
  .req-table td:first-child { width: 130px; }
  .form-block { padding: 24px 20px; }
  .admin-title { font-size: 17px; }
  .btn { padding: 12px 22px; }
  .stat .n { font-size: 26px; }
}

/* ===== Архивные разделы (импорт со старого сайта) ===== */
.lead-intro { color: #4d5464; font-size: 17px; max-width: 780px; margin-bottom: 26px; }

.article-wide { max-width: 900px; }
.article-html { font-size: 16px; color: #2b3242; line-height: 1.7; }
.article-html p { margin-bottom: 16px; }
.article-html img { max-width: 100%; height: auto; border-radius: 8px; }
.article-html img[style*="float:left"], .article-html img[style*="float: left"] { margin: 6px 20px 12px 0; }
.article-html img[style*="float:right"], .article-html img[style*="float: right"] { margin: 6px 0 12px 20px; }
.article-html img.news-img-left { float: left; margin: 6px 20px 12px 0; max-width: 40%; }
.article-html img.news-img-right { float: right; margin: 6px 0 12px 20px; max-width: 40%; }
.article-html::after { content: ""; display: table; clear: both; }
.article-html table { border-collapse: collapse; margin: 20px auto; }
.article-html td { padding: 6px; vertical-align: top; }
.article-html iframe { max-width: 100%; border-radius: 8px; }
.article-html h1, .article-html h2, .article-html h3 { font-family: 'Roboto Slab', serif; margin: 28px 0 12px; }
.article-html a { color: var(--accent-dark, #8a6d3b); text-decoration: underline; }
.article-html ul, .article-html ol { margin: 0 0 16px 22px; }
.article-html strong { color: #1e2839; }

@media (max-width: 720px) {
  .article-html img[style*="float:left"], .article-html img[style*="float: right"],
  .article-html img.news-img-left, .article-html img.news-img-right { float: none; display: block; margin: 14px auto; max-width: 100%; }
}

/* Списки разделов */
.cat-list { display: grid; grid-template-columns: 1fr; gap: 18px; max-width: 900px; }
.cat-card { display: flex; gap: 20px; padding: 18px; border: 1px solid var(--line-soft); border-radius: 12px; background: #fff; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.cat-card:hover { box-shadow: 0 10px 26px rgba(30,40,57,.1); transform: translateY(-2px); }
.cat-card-img { width: 200px; height: 140px; flex-shrink: 0; border-radius: 8px; overflow: hidden; background: #eef0f4; }
.cat-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-card-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #c9b98f; }
.cat-card-title { font-family: 'Roboto Slab', serif; font-size: 19px; color: var(--ink); margin-bottom: 6px; }
.cat-card-date { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.cat-card p { color: #4d5464; font-size: 14.5px; margin-bottom: 6px; }
.cat-card .more { font-size: 13.5px; color: #b08d4f; }
@media (max-width: 720px) {
  .cat-card { flex-direction: column; }
  .cat-card-img { width: 100%; height: 180px; }
}

/* О Вере и Церкви */
.vera-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; max-width: 900px; }
.vera-card { border: 1px solid var(--line-soft); border-radius: 12px; padding: 24px 20px; background: #fff; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.vera-card:hover { box-shadow: 0 10px 26px rgba(30,40,57,.1); transform: translateY(-2px); }
.vera-card .ico { width: 44px; height: 44px; color: #b08d4f; margin-bottom: 14px; }
.vera-card h3 { font-family: 'Roboto Slab', serif; font-size: 19px; margin-bottom: 8px; color: var(--ink); }
.vera-card p { font-size: 14px; color: #4d5464; }

/* Медиа */
.media-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; max-width: 1000px; }
.media-card { border: 1px solid var(--line-soft); border-radius: 12px; overflow: hidden; background: #fff; }
.media-frame { display: block; background: #000; aspect-ratio: 16/9; }
.media-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.media-frame img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.media-body { padding: 16px 18px 18px; }
.media-body h3 { font-family: 'Roboto Slab', serif; font-size: 17px; margin-bottom: 6px; }
.media-body h3 a { color: var(--ink); text-decoration: none; }
.media-body h3 a:hover { color: #b08d4f; }
.media-body p { font-size: 14px; color: #4d5464; }
.section-title { font-family: 'Roboto Slab', serif; font-size: 26px; margin: 44px 0 18px; }

/* Пагинация новостей */
.pagination { display: flex; align-items: center; gap: 18px; justify-content: center; margin: 34px 0 10px; }
.pagination .pg-btn { padding: 10px 18px; border: 1px solid var(--line-soft); border-radius: 8px; text-decoration: none; color: var(--ink); font-size: 14.5px; background: #fff; }
.pagination .pg-btn:hover { border-color: #b08d4f; color: #b08d4f; }
.pagination .pg-info { font-size: 13.5px; color: var(--muted); }

/* Лайтбокс */
.lb { position: fixed; inset: 0; background: rgba(10,14,22,.92); display: none; align-items: center; justify-content: center; z-index: 300; cursor: zoom-out; }
.lb.open { display: flex; }
.lb img { max-width: 92vw; max-height: 88vh; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lb .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); color: #fff; border: 0; font-size: 34px; width: 56px; height: 56px; border-radius: 50%; cursor: pointer; }
.lb .lb-prev { left: 16px; }
.lb .lb-next { right: 16px; }
.lb .lb-close { position: absolute; top: 14px; right: 18px; background: none; border: 0; color: #fff; font-size: 30px; cursor: pointer; }

/* Админка: поиск и большие формы */
.admin-search { display: flex; gap: 12px; margin-bottom: 14px; }
.admin-form textarea[rows="22"] { min-height: 420px; }

/* TinyMCE */
.tox-tinymce { border-radius: 8px; }
.admin-form .tox-tinymce { margin-top: 6px; }

.admin-thumb{width:64px;height:48px;object-fit:cover;border-radius:6px;flex:none;border:1px solid var(--line)}
