:root {
  --green: #1a3c2a;
  --green-deep: #0f281c;
  --green-mid: #2a553c;
  --burgundy: #7a1f1f;
  --gold: #c4a35a;
  --parchment: #f3ead7;
  --parchment-dark: #e6d8bc;
  --ink: #1c1814;
  --ink-soft: #4a433b;
  --white: #fffaf2;
  --line: rgba(26, 60, 42, 0.18);
  --shadow: 0 10px 30px rgba(28, 24, 20, 0.08);
  --font-display: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --frame-inset: 0.35rem;
  --frame-outer-width: calc(100% - (var(--frame-inset) * 2));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--ink);
  background: #e8dcc4;
  min-height: 100vh;
  line-height: 1.45;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--green);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--burgundy);
}

.container {
  width: min(1120px, calc(100% - 2rem));
  margin-inline: auto;
}

/* Пергамент на всю ширину экрана; контент остаётся в .container */
.paper-sheet,
.section {
  width: 100%;
  margin: 0;
  background-color: var(--parchment);
  background-image: url("/img/paper-tile.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  padding: 1rem 0;
}

/* Второй вариант пергамента — для чередования блоков */
.section--paper-alt,
.section--tint {
  background-image: url("/img/paper-tile2.png");
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.1vw, 1.7rem);
  font-weight: 700;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  color: var(--green);
  margin: 0 0 0.7rem;
  text-align: center;
  line-height: 1.2;
}

.section-title--burgundy {
  color: var(--burgundy);
}

.about-block .section-title--burgundy,
.history-band__content .section-title {
  text-align: left;
}

.section__actions {
  margin-top: 0.85rem;
  text-align: center;
}

.lead {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 58ch;
  margin: 0 0 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.48rem 0.95rem;
  background: var(--green);
  color: var(--white);
  border: 1px solid var(--green-deep);
  font: 600 0.8rem/1 var(--font-body);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease;
}

.btn:hover {
  background: var(--green-mid);
  color: var(--white);
}

.more {
  font-size: 0.8rem;
  font-weight: 600;
}

.empty,
.muted,
.meta,
.form-note {
  color: var(--ink-soft);
}

/* Header — фон и меню на всю ширину */
.site-header {
  width: 100%;
  margin: 0;
  padding: 0;
  background-color: var(--parchment);
  background-image: url("/img/paper-tile.webp");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  border-bottom: 0;
}

.site-header__top {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1rem, 2.5vw, 1.5rem) 0;
  background: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-header__brand {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  min-width: 0;
  flex: 1 1 auto;
}

.site-header__side {
  flex: 0 0 auto;
  width: min(300px, 34vw);
  min-width: 140px;
  align-self: center;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.site-header__kazachka {
  display: block;
  width: 100%;
  max-height: 190px;
  height: auto;
  object-fit: contain;
  object-position: right center;
}

.site-header__logo {
  width: clamp(52px, 12vw, 168px);
  height: clamp(52px, 12vw, 168px);
  object-fit: contain;
  flex-shrink: 0;
}

.site-header__name {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.8vw, 2.15rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  text-transform: uppercase;
  color: var(--ink);
}

.site-header__aff {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  color: var(--ink-soft);
  max-width: 48rem;
}

.site-header__motto {
  margin: 0.45rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--burgundy);
}

.site-header__navwrap {
  width: var(--frame-outer-width);
  margin: 0 auto;
  background: var(--green);
}

.nav-toggle {
  display: none;
  width: 100%;
  border: 0;
  background: var(--green-deep);
  color: var(--white);
  padding: 0.85rem 1rem;
  font: 600 1rem/1 var(--font-body);
  cursor: pointer;
}

.nav-backdrop {
  display: none;
}

.site-nav__head {
  display: none;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.15rem;
  width: min(1120px, calc(100% - 1rem));
  margin-inline: auto;
}

.site-nav a {
  display: block;
  padding: 0.85rem 0.75rem;
  color: var(--white);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.site-nav a:hover,
.site-nav a.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Hero */
.hero {
  position: relative;
  width: var(--frame-outer-width);
  margin: 0 auto;
  height: min(48vh, 430px);
  min-height: 0;
  background: var(--green-deep);
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
  display: block;
  animation: heroIn 1.1s ease both;
}

.hero__caption {
  position: absolute;
  left: 50%;
  bottom: 2px;
  transform: translateX(-50%);
  background: rgba(110, 22, 22, 0.78);
  color: var(--white);
  padding: 0.65rem 1.45rem;
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  letter-spacing: 0.03em;
  white-space: nowrap;
  max-width: calc(100% - 2rem);
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

.hero__caption::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(236, 176, 176, 0.92);
  pointer-events: none;
}

@keyframes heroIn {
  from { transform: scale(1.04); opacity: 0.7; }
  to { transform: scale(1); opacity: 1; }
}

.about-block__grid,
.ataman-block__grid,
.contacts-page__grid {
  display: grid;
  gap: 1.15rem;
  align-items: start;
}

@media (min-width: 860px) {
  .about-block__grid,
  .ataman-block__grid,
  .contacts-page__grid {
    grid-template-columns: 1.25fr 0.75fr;
  }
  .ataman-block__grid {
    grid-template-columns: 200px 1fr;
    align-items: start;
  }
}

.about-block__photo img,
.ataman-block__photo,
.page-cover {
  width: 100%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.about-block__photo img {
  max-height: 220px;
  object-position: center 42%;
}

.ataman-block__photo {
  aspect-ratio: 3 / 4;
  max-height: 260px;
  object-position: center top;
}

.ataman-block__name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 0 0 0.45rem;
  color: var(--burgundy);
  line-height: 1.25;
}

.ataman-block p {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.news-grid,
.sections-grid,
.gallery-grid,
.video-grid,
.useful-grid {
  display: grid;
  gap: 0.85rem;
}

.news-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  max-width: 920px;
  margin-inline: auto;
}

.news-card {
  background: rgba(255, 250, 242, 0.55);
  border: 1px solid var(--line);
  overflow: hidden;
}

.news-card:hover {
  border-color: #bba580;
}

.news-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  max-height: 140px;
}

.news-card__body {
  padding: 0.5rem 0.65rem 0.65rem;
}

.news-card time {
  color: var(--ink-soft);
  font-size: 0.75rem;
  line-height: 1.2;
}

.news-card h2,
.news-card h3 {
  font-family: var(--font-display);
  font-size: 0.98rem;
  margin: 0.25rem 0 0.4rem;
  line-height: 1.2;
  font-weight: 700;
}

.news-card h2 a,
.news-card h3 a {
  color: var(--green);
  text-decoration: none;
}

.news-card .more {
  color: var(--burgundy);
}

@media (max-width: 760px) {
  .news-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }
}

.section--sections-framed {
  /* устаревший класс — блоки переведены на section--framed-panel */
  background: #ffffff;
  background-image: none;
  padding: 0.35rem;
}

.sections-strip {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid #c4b08a;
  background: #ebe4d4;
  padding: 0.75rem 0;
}

.sections-strip__inner {
  width: min(1400px, calc(100% - 1.5rem));
  margin-inline: auto;
}

.sections-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.45rem;
}

.section-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: #2b241c;
  background: rgba(253, 250, 243, 0.55);
  border: 1px solid #8f7a55;
  padding: 0.28rem 0.28rem 0.35rem;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.section-card:hover {
  border-color: #6e5a38;
  color: var(--burgundy);
}

.section-card__photo {
  display: block;
  overflow: hidden;
  border: 1px solid #4a3a28;
  aspect-ratio: 16 / 10;
  max-height: 88px;
}

.section-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.section-card--close img {
  transform: scale(1.65);
  object-position: center 42%;
}

.section-card--top img {
  object-position: center 18%;
}

.section-card--upper img {
  object-position: center top;
}

.section-card--youth img {
  transform: scale(1.2);
  object-position: center 70%;
}

.section-card span {
  display: block;
  padding: 0.35rem 0.1rem 0.05rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(0.72rem, 0.95vw, 0.86rem);
  font-weight: 700;
  line-height: 1.15;
}

@media (max-width: 980px) {
  .sections-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .section-card__photo {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .sections-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.section--framed-panel {
  background: #ffffff;
  background-image: none;
  padding: var(--frame-inset);
}

.framed-panel {
  --frame-line: #c4b08a;
  --frame-fill: #ebe4d4;
  width: 100%;
  box-sizing: border-box;
  border: 2px solid var(--frame-line);
  background: var(--frame-fill);
  padding: 0.85rem 0.95rem;
}

.framed-panel__inner {
  width: min(1080px, 100%);
  margin-inline: auto;
}

.framed-panel__inner--wide {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.framed-panel .section-title {
  margin-bottom: 0.65rem;
}

.framed-panel .traditions {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.traditions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.65rem 0.75rem;
}

.tradition-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 0;
  max-width: none;
  min-width: 120px;
  text-align: left;
  text-decoration: none;
  color: var(--ink);
  padding: 0.1rem 0.2rem;
  transition: color 0.2s ease;
}

.tradition-item:hover {
  color: var(--burgundy);
}

.tradition-item__icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  object-fit: contain;
}

.tradition-item__mark {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: var(--gold);
  font-size: 1rem;
}

.tradition-item__label {
  font-family: var(--font-display);
  font-size: clamp(0.82rem, 1.05vw, 0.95rem);
  font-weight: 600;
  line-height: 1.2;
  color: inherit;
}

@media (max-width: 760px) {
  .traditions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 0.65rem;
  }

  .tradition-item {
    max-width: none;
    min-width: 0;
  }
}

.history-band {
  position: relative;
}

.history-band__grid {
  display: grid;
  gap: 1rem;
  align-items: center;
}

.history-band__photo {
  margin: 0;
}

.history-band__photo img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  border: 1px solid var(--line);
  display: block;
}

.history-band__content {
  text-align: left;
}

.history-band__content .section-title {
  text-align: left;
  margin-bottom: 0.55rem;
}

.history-band__content .lead {
  margin: 0 0 0.75rem;
  max-width: none;
  font-size: 0.92rem;
}

@media (min-width: 800px) {
  .history-band__grid {
    grid-template-columns: 0.92fr 1.08fr;
    gap: 1.15rem;
  }

  .history-band__photo img {
    max-height: 200px;
    min-height: 170px;
  }
}

.gallery-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.55rem;
}

.gallery-grid--home {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
}

.gallery-grid--home .gallery-item--album {
  position: relative;
}

.gallery-grid--home .gallery-item__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.28rem 0.4rem 0.32rem;
  background: rgba(26, 24, 20, 0.72);
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.2;
}

.gallery-grid--home .gallery-item__kicker {
  color: rgba(255, 248, 240, 0.8);
}

@media (max-width: 900px) {
  .gallery-grid--home {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .gallery-grid--home {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.gallery-item {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ddd;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.04);
}

.gallery-item figcaption {
  padding: 0.45rem 0.6rem;
  font-size: 0.86rem;
  background: rgba(255, 250, 242, 0.9);
}

.gallery-item__link {
  display: block;
  cursor: zoom-in;
}

a.gallery-item--album {
  display: block;
  text-decoration: none;
  color: inherit;
}

.gallery-item__placeholder {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(122, 31, 31, 0.18), rgba(26, 60, 42, 0.12)),
    #ddd;
}

.gallery-item__caption {
  display: block;
  padding: 0.45rem 0.6rem;
  font-size: 0.86rem;
  background: rgba(255, 250, 242, 0.9);
}

.gallery-item__kicker {
  display: block;
  margin-bottom: 0.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--burgundy);
}

.gallery-back {
  margin: 0 0 0.35rem;
}

.gallery-back a {
  color: var(--burgundy);
  text-decoration: none;
}

.gallery-back a:hover {
  text-decoration: underline;
}

body.lightbox-open {
  overflow: hidden;
}

.lightbox {
  border: 0;
  padding: 0;
  width: min(1100px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.5rem);
  max-height: calc(100vh - 1.5rem);
  background: transparent;
  color: var(--white);
}

.lightbox::backdrop {
  background: rgba(15, 40, 28, 0.88);
}

.lightbox__frame {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto 1fr auto;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 1rem;
  background: rgba(12, 28, 20, 0.55);
  border: 1px solid rgba(196, 163, 90, 0.35);
}

.lightbox__figure {
  grid-column: 2;
  grid-row: 1 / 3;
  margin: 0;
  min-width: 0;
  text-align: center;
}

.lightbox__img {
  max-width: 100%;
  max-height: min(78vh, 820px);
  width: auto;
  height: auto;
  margin-inline: auto;
  object-fit: contain;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.lightbox__caption {
  margin-top: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: #f3ead7;
}

.lightbox__close,
.lightbox__nav {
  border: 1px solid rgba(243, 234, 215, 0.35);
  background: var(--green);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  line-height: 1;
}

.lightbox__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.6rem;
}

.lightbox__nav {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.8rem;
  align-self: center;
}

.lightbox__nav--prev {
  grid-column: 1;
  grid-row: 2;
}

.lightbox__nav--next {
  grid-column: 3;
  grid-row: 2;
}

.lightbox__counter {
  grid-column: 1 / -1;
  margin: 0;
  text-align: center;
  font-size: 0.92rem;
  color: rgba(243, 234, 215, 0.85);
}

@media (max-width: 700px) {
  .lightbox__frame {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto auto;
    padding: 2.5rem 0.75rem 0.75rem;
  }

  .lightbox__figure {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .lightbox__nav--prev {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .lightbox__nav--next {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  .lightbox__counter {
    grid-row: 3;
  }

  .lightbox__img {
    max-height: 62vh;
  }
}

.video-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.video-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: rgba(255, 250, 242, 0.75);
  border: 1px solid var(--line);
}

.video-card__cover {
  position: relative;
  background: var(--green-deep);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.9;
}

.video-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.video-card__title {
  display: block;
  padding: 0.9rem 1rem 1.1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
}

.useful-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
}

@media (max-width: 900px) {
  .useful-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .useful-grid {
    grid-template-columns: 1fr;
  }
}

.useful-grid h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--burgundy);
  margin: 0 0 0.4rem;
  line-height: 1.2;
}

.useful-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.useful-list li {
  margin: 0.22rem 0;
  font-size: 0.88rem;
  line-height: 1.3;
}

.useful-list a::before {
  content: "▸ ";
  color: var(--green-mid);
}

.doc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.doc-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--line);
}

.prose .content-body {
  font-size: 1rem;
}

.prose .content-body h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--burgundy);
  margin: 1.35rem 0 0.65rem;
  line-height: 1.15;
}

.mosaic {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin: 0 0 1.35rem;
}

.tile {
  margin: 0;
  border: 1px solid rgba(122, 31, 31, 0.22);
  background: rgba(255, 250, 242, 0.72);
  box-shadow: 0 8px 18px rgba(28, 24, 20, 0.06);
  min-width: 0;
}

.tile--photo {
  padding: 0;
  display: block;
  width: 100%;
  position: relative;
  text-align: left;
  overflow: hidden;
}

.tile--photo img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.tile--photo img.is-top {
  object-position: center top;
}

@media (min-width: 760px) {
  .mosaic {
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 42px;
  }

  .tile--photo,
  .tile--text {
    height: 100%;
  }

  .tile--photo img {
    height: 100%;
  }

  .mosaic--family .t1 { grid-column: 1 / 8; grid-row: 1 / 7; }
  .mosaic--family .t2 { grid-column: 8 / 13; grid-row: 1 / 4; }
  .mosaic--family .t3 { grid-column: 8 / 13; grid-row: 4 / 7; }
  .mosaic--family .t4 { grid-column: 4 / 13; grid-row: 7 / 12; }
  .mosaic--family .t5 { grid-column: 1 / 4; grid-row: 7 / 12; }

  .mosaic--bread .t1 { grid-column: 1 / 5; grid-row: 1 / 5; }
  .mosaic--bread .t2 { grid-column: 5 / 13; grid-row: 1 / 7; }
  .mosaic--bread .t3 { grid-column: 1 / 5; grid-row: 5 / 10; }
  .mosaic--bread .t4 { grid-column: 5 / 13; grid-row: 7 / 11; }

  .mosaic--banner .t1 { grid-column: 1 / 7; grid-row: 1 / 7; }
  .mosaic--banner .t2 { grid-column: 7 / 13; grid-row: 1 / 4; }
  .mosaic--banner .t3 { grid-column: 7 / 13; grid-row: 4 / 9; }
  .mosaic--banner .t4 { grid-column: 1 / 7; grid-row: 7 / 11; }

  .mosaic--youth .t1 { grid-column: 1 / 8; grid-row: 1 / 8; }
  .mosaic--youth .t2 { grid-column: 8 / 13; grid-row: 1 / 8; }

  .mosaic--youth-photos .t1 { grid-column: 1 / 7; grid-row: 1 / 8; }
  .mosaic--youth-photos .t2 { grid-column: 7 / 13; grid-row: 1 / 8; }
}

.youth-note {
  margin: 0 0 0.7rem;
}

.history-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.7rem;
  margin: 0 0 1.5rem;
}

.history-card {
  margin: 0;
  border: 1px solid rgba(122, 31, 31, 0.22);
  background: rgba(255, 250, 242, 0.72);
  box-shadow: 0 8px 18px rgba(28, 24, 20, 0.06);
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.history-card__photo {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 100%;
}

.history-card img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: cover;
}

.history-card figcaption {
  padding: 0.75rem 0.9rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

@media (min-width: 760px) {
  .history-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .history-card:nth-child(5n + 1),
  .history-card:nth-child(5n + 2) {
    grid-column: span 3;
  }

  .history-card:nth-child(5n + 3),
  .history-card:nth-child(5n + 4),
  .history-card:nth-child(5n + 5) {
    grid-column: span 2;
  }

  .history-card:nth-child(5n + 1) img,
  .history-card:nth-child(5n + 2) img {
    height: 280px;
  }
}

.tile--text {
  padding: 0.95rem 1rem 1.05rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.tile--text p {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  line-height: 1.45;
}

.tile--text p:last-child {
  margin-bottom: 0;
}

.page-cover {
  margin: 0 0 1rem;
  max-height: 360px;
}

.ataman-page {
  display: grid;
  gap: 1.25rem;
  align-items: start;
}

.ataman-page__photo {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #f7f1e6;
  border: 1px solid var(--line);
}

@media (min-width: 860px) {
  .ataman-page {
    grid-template-columns: 1fr 1fr;
  }
}

.ya-form {
  background: rgba(255, 250, 242, 0.8);
  border: 1px solid var(--line);
  padding: 0.5rem;
}

.site-footer {
  background: var(--green-deep);
  color: #e8efe9;
  padding: 1.1rem 0 1.15rem;
  margin-top: 0;
}

.site-footer a {
  color: #f5efe2;
}

.site-footer p {
  margin: 0.2rem 0;
  font-size: 0.88rem;
  line-height: 1.35;
}

.site-footer__grid {
  display: grid;
  gap: 1rem 1.5rem;
  align-items: start;
}

@media (min-width: 800px) {
  .site-footer__grid {
    grid-template-columns: 1fr 0.9fr 1.15fr;
  }
}

.site-footer__title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
  color: var(--gold);
  line-height: 1.2;
}

.site-footer__map iframe {
  width: 100%;
  height: 130px;
  min-height: 0;
  border: 0;
  background: #2a4034;
  display: block;
}

@media (max-width: 650px) {
  .site-header__side {
    display: none;
  }
}

@media (max-width: 550px) {
  .site-header__brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.75rem;
  }

  .site-header__logo {
    width: clamp(72px, 22vw, 110px);
    height: clamp(72px, 22vw, 110px);
  }

  .site-header__aff {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: block;
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(15, 20, 16, 0.55);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s ease, visibility 0.28s ease;
  }

  .nav-backdrop.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 100;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    background: var(--green-deep);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .site-nav.is-open {
    transform: translateX(0);
  }

  .site-nav__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    background: var(--green);
  }

  .site-nav__title {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }

  .site-nav__close {
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--white);
    font-size: 2.1rem;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
  }

  .site-nav__close:hover,
  .site-nav__close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
  }

  .site-nav ul {
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0.5rem 0 2rem;
    gap: 0;
  }

  .site-nav a {
    padding: 1.05rem 1.25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.nav-open {
    overflow: hidden;
  }

  .site-header__navwrap,
  .hero {
    width: var(--frame-outer-width);
    margin-left: auto;
    margin-right: auto;
  }

  .hero {
    height: 28vh;
  }

  .hero__img {
    height: 100%;
    object-position: center 40%;
  }

  .hero__caption {
    padding: 0.45rem 0.85rem;
    font-size: 0.92rem;
    max-width: calc(100% - 1rem);
  }

  .hero__caption::after {
    inset: 3px;
  }

  .site-header__kazachka {
    max-height: 120px;
  }

  .site-header__side {
    width: min(150px, 36vw);
    min-width: 100px;
  }
}
