/* ========================================
   1. ПОДКЛЮЧЕНИЕ ШРИФТОВ
   ======================================== */

/* ---------- Старославянский (только index.html) ---------- */
@font-face {
  font-family: "Oglavie";
  src: url("../fonts/oglavieunicode.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- Roboto Condensed ---------- */
@font-face {
  font-family: "Roboto Condensed";
  src: url("../fonts/RobotoCondensed-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("../fonts/RobotoCondensed-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("../fonts/RobotoCondensed-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("../fonts/RobotoCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Roboto Condensed";
  src: url("../fonts/RobotoCondensed-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ---------- PT Serif ---------- */
@font-face {
  font-family: "PT Serif";
  src: url("../fonts/PT_Serif-Web-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("../fonts/PT_Serif-Web-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("../fonts/PT_Serif-Web-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("../fonts/PT_Serif-Web-BoldItalic.ttf") format("truetype");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

/* ========================================
   2. ПЕРЕМЕННЫЕ
   ======================================== */
:root {
  --home-bg: #ffffff;
  --btn-bg: #2b2b2b;
  --btn-bg-hover: #444;
  --btn-color: #ffffff;
  --page-bg: #f5f5f5;
  --gap: 12px;
  --radius: 16px;
  --menu-bg: #f5efa5;
  --panel-bg: #faf6c8;
  --panel-border: #d9cb6a;
  --heading-red: #fe0000;
}

/* ========================================
   3. СБРОС
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ========================================
   4. БАЗА
   ======================================== */
html,
body {
  height: 100%;
}

/* Заголовки — Roboto Condensed */
h1, h2, h3, h4, h5, h6 {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
}

/* Основной текст — PT Serif */
body,
button,
input,
textarea,
select {
  font-family: "PT Serif", Georgia, serif;
}

/* ========================================
   5. ГЛАВНАЯ СТРАНИЦА
   ======================================== */
.page-home {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 5vmin;
  overflow: hidden;

  background-image: url("../images/bg.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-color: #f5efa5;
}

.home-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.home-logo-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2vmin;
  max-width: 100%;
  max-height: 100%;
}

.home-img {
  display: block;
  max-width: 45vmin;
  max-height: 60vh;
  width: auto;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
}

.home-address {
  font-family: "Oglavie", Georgia, serif;
  font-weight: normal;
  color: #9c5b3f;
  font-size: clamp(1.1rem, 2.2vmin, 1.75rem);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.85),
    0 0 30px rgba(255, 255, 255, 0.9);
}

@media (min-width: 901px) {
  .home-address {
    font-size: clamp(1.75rem, 3.2vw, 3.25rem);
  }
}

@media (max-width: 900px) {
  .page-home {
    background-attachment: scroll;
  }
}

/* ========================================
   6. СТРАНИЦА МЕНЮ — десктопная сетка 3×2
   ======================================== */
.page-menu {
  background: var(--menu-bg);
  min-height: 100dvh;
}

.menu-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 3vmin;
  padding: 4vmin;
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
}

.btn-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  overflow: hidden;
  text-decoration: none;
  background-image: url("../images/btn.jpg");
  background-size: cover;
  background-position: center;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-tile:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.btn-tile:active {
  transform: scale(0.99);
}

.btn-tile h1 {
  color: var(--heading-red);
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  text-align: center;
  font-size: clamp(1.5rem, 4vw, 4.5rem);
  line-height: 1.1;
  padding: 0 1rem;
  margin: 0;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.85),
    0 0 30px rgba(255, 255, 255, 0.9);
}

.btn-gallery { grid-column: 1; grid-row: 1; }
.btn-events  { grid-column: 3; grid-row: 1; }
.btn-baba    { grid-column: 1; grid-row: 2; }

.text-block {
  grid-column: 2;
  grid-row: 1 / span 2;
  background: var(--panel-bg);
  border: 4px solid var(--panel-border);
  border-radius: 28px;
  padding: 3vmin;
  overflow-y: auto;
  min-height: 0;
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);

  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;

  scrollbar-width: thin;
  scrollbar-color: var(--panel-border) transparent;
}

/* ========================================
   7. ПОЛЗУНОК ТЕКСТОВОГО БЛОКА (WebKit)
   ======================================== */
.text-block::-webkit-scrollbar {
  width: 8px;
}

.text-block::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 28px;
}

.text-block::-webkit-scrollbar-thumb {
  background: var(--panel-border);
  border-radius: 4px;
}

.text-block::-webkit-scrollbar-thumb:hover {
  background: #c9b94d;
}

/* ========================================
   8. КРУГЛАЯ КНОПКА «НА ГЛАВНУЮ» + КОНТЕЙНЕР ЛОГО И VK
   ======================================== */
.home-logo {
  display: block;
  width: clamp(90px, 13vmin, 200px);
  height: clamp(90px, 13vmin, 200px);
  border-radius: 50%;
  transition: transform .2s ease;
}

.home-logo:hover {
  transform: scale(1.06);
}

.home-logo img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.menu-actions {
  grid-column: 3;
  grid-row: 2;
  align-self: end;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 2vmin 2vmin 0;
}

/* ========================================
   9. МЕНЮ — планшет/мобильный 381–900px
   ======================================== */
@media (min-width: 381px) and (max-width: 900px) {
  .menu-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 16px;
    padding: 16px;
    height: auto;
    min-height: 100dvh;
  }

  .btn-gallery,
  .btn-events,
  .btn-baba,
  .text-block,
  .menu-actions {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    max-width: 100%;
  }

  .text-block    { order: 1; }
  .btn-gallery   { order: 2; }
  .btn-events    { order: 3; }
  .btn-baba      { order: 4; }
  .menu-actions  { order: 5; }

  .menu-actions {
    justify-self: center;
    align-self: auto;
    width: auto;
    margin: 20px 0 0;
  }

  .btn-tile {
    aspect-ratio: 16 / 7;
    max-height: 220px;
  }

  .btn-tile h1 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    line-height: 1.1;
    padding: 0 1rem;
  }

  .text-block {
    min-height: 200px;
    max-height: 45vh;
    padding: 16px;
    border-width: 2px;
    border-radius: 20px;
  }

  .home-logo {
    width: 110px;
    height: 110px;
  }
}

/* ========================================
   10. МЕНЮ — узкие экраны до 380px
   ======================================== */
@media (max-width: 380px) {
  .menu-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
    padding: 12px;
    height: auto;
    min-height: 100dvh;
  }

  .btn-gallery,
  .btn-events,
  .btn-baba,
  .text-block,
  .menu-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .text-block    { order: 1; }
  .btn-gallery   { order: 2; }
  .btn-events    { order: 3; }
  .btn-baba      { order: 4; }
  .menu-actions  { order: 5; }

  .btn-tile {
   aspect-ratio: 16 / 7;
   min-height: auto;
   max-height: 170px;
  }

  .btn-tile h1 {
    font-size: clamp(1.1rem, 6.5vw, 2rem);
    line-height: 1.15;
    padding: 0 0.5rem;
  }

  .text-block {
    font-size: clamp(0.95rem, 4vw, 1.15rem);
    padding: 16px;
    min-height: 160px;
    max-height: 45vh;
    border-width: 2px;
    border-radius: 16px;
  }

  .menu-actions {
    justify-self: center;
    align-self: auto;
    margin: 16px 0 0;
  }

  .home-logo {
    width: 90px;
    height: 90px;
  }
}

/* ========================================
   11. ВНУТРЕННИЕ СТРАНИЦЫ — общая база
   ======================================== */
.page-events,
.page-baba {
  background: var(--menu-bg);
  min-height: 100dvh;
  padding: 4vmin;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.5;
  color: #2b2b2b;
}

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--menu-bg);
  padding-top: 3vmin;
  padding-bottom: 2vmin;
  margin-bottom: 0;
}

.back-link {
  text-decoration: none;
  color: #8a7a3a;
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  transition: color .2s ease;
}

.back-link:hover {
  color: var(--heading-red);
}

.home-logo-mini {
  display: block;
  width: clamp(48px, 6vmin, 72px);
  height: clamp(48px, 6vmin, 72px);
  border-radius: 50%;
  overflow: hidden;
  transition: transform .2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.home-logo-mini:hover {
  transform: scale(1.08);
}

.home-logo-mini img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  margin-right: 16px;
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  color: #8a7a3a;
  line-height: 1.3;
}

.breadcrumbs a {
  color: #8a7a3a;
  text-decoration: none;
  transition: color .2s ease;
  white-space: nowrap;
}

.breadcrumbs a:hover {
  color: var(--heading-red);
  text-decoration: underline;
}

.breadcrumbs-sep {
  color: #c9be8a;
  user-select: none;
}

.breadcrumbs-current {
  color: var(--heading-red);
  white-space: nowrap;
}

.page-heading {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  color: var(--heading-red);
  text-align: center;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.1;
  margin: 0 0 5vmin;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.85),
    0 0 30px rgba(255, 255, 255, 0.9);
}

.events-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2vmin;
}

.event-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease;
}

.event-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.event-card:active {
  transform: translateY(-1px);
}

.event-card-image {
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--menu-bg);
}

.event-card-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.event-card-body {
  flex: 1;
  min-height: 0;
  padding: 2.5vmin 3vmin 3vmin;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
  max-height: 220px;
}

.event-card-date {
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  color: #8a7a3a;
  letter-spacing: 0.02em;
}

.event-card-title {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  color: #2b2b2b;
  margin: 0;
  line-height: 1.2;
}

.event-card-desc {
  font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: 1.5;
  color: #4a4430;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========================================
   11-2. ПАГИНАЦИЯ
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  margin: 5vmin 0 0;
}

.pagination-list {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination-item {
  display: flex;
}

.pagination-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  font-family: "Oglavie", Georgia, serif;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: #8a7a3a;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
  transition: background .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease, border-color .2s ease;
}

.pagination-link:hover {
  background: var(--menu-bg);
  color: var(--heading-red);
  border-color: var(--heading-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pagination-link:active {
  transform: translateY(0);
}

.pagination-link--current {
  background: var(--heading-red);
  color: #ffffff;
  border-color: var(--heading-red);
  cursor: default;
  box-shadow: 0 4px 12px rgba(254, 0, 0, 0.25);
}

.pagination-link--current:hover {
  background: var(--heading-red);
  color: #ffffff;
  border-color: var(--heading-red);
  transform: none;
}

.pagination-link--prev,
.pagination-link--next {
  font-size: 1.3rem;
}

/* --- Мобильный --- */
@media (max-width: 600px) {
  .pagination {
    margin-top: 24px;
  }

  .pagination-list {
    gap: 6px;
  }

  .pagination-link {
    min-width: 38px;
    height: 38px;
    padding: 0 8px;
    border-radius: 10px;
  }

  .pagination-link--prev,
  .pagination-link--next {
    font-size: 1.1rem;
  }
}

/* ========================================
   12. ВНУТРЕННИЕ СТРАНИЦЫ — мобильная версия
   ======================================== */
@media (max-width: 600px) {
  .page-events,
  .page-baba {
    padding: 16px;
  }

  .page-heading {
    margin-bottom: 24px;
  }

  .events-list {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .event-card-body {
    padding: 16px;
    max-height: none;
  }

  .event-card-desc {
    -webkit-line-clamp: 4;
  }

  .breadcrumbs {
    font-size: 0.5rem;
    gap: 5px;
    margin-right: 10px;
  }

  .breadcrumbs a:hover {
    text-decoration: none;
  }
}

@media (max-width: 420px) {
  .breadcrumbs a,
  .breadcrumbs-sep {
    display: none;
  }

  .breadcrumbs {
    margin-right: 8px;
  }
}

@media (max-width: 380px) {
  .breadcrumbs {
    display: none;
  }
}

/* ========================================
   13. ВЫЕЗЖАЮЩЕЕ МЕНЮ (DRAWER)
   ======================================== */
body.no-scroll {
  overflow: hidden;
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: 12px;
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: #8a7a3a;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, transform .15s ease;
}

.menu-toggle:hover {
  background: var(--menu-bg);
  color: var(--heading-red);
}

.menu-toggle:active {
  transform: scale(0.97);
}

.menu-toggle::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  background: currentColor;
  box-shadow:
    0 -6px 0 currentColor,
    0 6px 0 currentColor;
  border-radius: 1px;
}

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 100;
}

.drawer-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: min(340px, 85vw);
  height: 100dvh;
  background: var(--menu-bg);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform .3s ease;
  z-index: 101;
  display: flex;
  flex-direction: column;
  padding: 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer.is-open {
  transform: translateX(0);
}

.drawer-close {
  align-self: flex-end;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 2px solid var(--panel-border);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  color: #8a7a3a;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
  margin-bottom: 20px;
}

.drawer-close:hover {
  background: var(--panel-bg);
  color: var(--heading-red);
}

.drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-tile {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  background-image: url("../images/btn.jpg");
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform .2s ease, box-shadow .2s ease;
}

.drawer-tile:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.drawer-tile:active {
  transform: scale(0.99);
}

.drawer-tile h3 {
  position: relative;
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  color: var(--heading-red);
  text-align: center;
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
  line-height: 1.1;
  padding: 0 12px;
  margin: 0;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.85),
    0 0 30px rgba(255, 255, 255, 0.9);
}

.drawer-tile--active {
  outline: 3px solid var(--heading-red);
  outline-offset: -3px;
}

/* ========================================
   14. СТРАНИЦА «ГАЛЕРЕЯ»
   ======================================== */
.page-gallery {
  background: var(--menu-bg);
  min-height: 100dvh;
  padding: 3vmin;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.page-gallery .page-nav {
  flex-shrink: 0;
  margin-bottom: 2vmin;
}

.page-gallery .page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.page-gallery .page-heading {
  flex-shrink: 0;
  font-size: clamp(1.5rem, 4vmin, 3rem);
  margin: 0 0 3vmin;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2vmin;
}

.gallery-item {
  position: relative;
  display: block;
  padding: 6px;
  aspect-ratio: 4 / 3;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.gallery-item:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item:active {
  transform: translateY(-1px) scale(1.0);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* --- Лайтбокс --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
  z-index: 200;
  padding: 4vmin;
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.lightbox-figure {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.lightbox-img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
  max-width: 700px;
  margin: 0;
}

.lightbox-title {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.15rem, 1.8vw, 1.6rem);
  color: #f5efa5;
  line-height: 1.2;
  margin: 0;
}

.lightbox-desc {
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  color: #e0d9a0;
  line-height: 1.5;
  margin: 0;
}

.lightbox-desc[hidden] {
  display: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 239, 165, 0.15);
  border: 2px solid rgba(245, 239, 165, 0.4);
  color: #f5efa5;
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
  border-radius: 50%;
  font-family: Georgia, serif;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  font-size: 1.8rem;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  font-size: 2.2rem;
  line-height: 1;
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(245, 239, 165, 0.3);
  border-color: rgba(245, 239, 165, 0.8);
}

/* --- Планшет --- */
@media (max-width: 900px) and (min-width: 601px) {
  .page-gallery { padding: 20px; }
  .page-gallery .page-nav { margin-bottom: 16px; }
  .page-gallery .page-heading { margin-bottom: 20px; }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .gallery-item { padding: 4px; border-radius: 12px; }
  .gallery-item img { border-radius: 8px; }

  .lightbox { padding: 16px; }
  .lightbox-close { top: 12px; right: 12px; width: 44px; height: 44px; font-size: 1.6rem; }
  .lightbox-prev, .lightbox-next { width: 46px; height: 46px; font-size: 1.8rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-img { max-height: 70vh; border-radius: 10px; }
}

/* --- Телефон --- */
@media (max-width: 600px) {
  .page-gallery { padding: 14px; }
  .page-gallery .page-nav { margin-bottom: 12px; }
  .page-gallery .page-heading { margin-bottom: 16px; }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .gallery-item { padding: 4px; border-radius: 12px; }
  .gallery-item img { border-radius: 8px; }

  .lightbox { padding: 12px; }
  .lightbox-close { top: 10px; right: 10px; width: 40px; height: 40px; font-size: 1.4rem; }
  .lightbox-prev, .lightbox-next { width: 40px; height: 40px; font-size: 1.6rem; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .lightbox-img { max-height: 62vh; border-radius: 8px; }
  .lightbox-caption { max-width: 100%; }
}
/* ========================================
   15. СТРАНИЦА «АЛЬБОМЫ»
   ======================================== */
.page-albums {
  display: flex;
  flex-direction: column;
  height: 100vh;
  height: 100dvh;
  padding: 3vmin;
  box-sizing: border-box;
  overflow: hidden;
  background: var(--menu-bg);
}

.page-albums .page-nav {
  flex-shrink: 0;
  margin-bottom: 2vmin;
}

.page-albums .page-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.page-albums .page-heading {
  flex-shrink: 0;
  font-size: clamp(1.5rem, 4vmin, 3rem);
  margin: 0 0 3vmin;
}

.albums-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 2vmin;
}

.album-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 16px;
  border: 2px solid var(--panel-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
  background: var(--panel-bg);
}

.album-card:hover {
  transform: translateY(-3px) scale(1.01);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.album-card:active {
  transform: translateY(-1px) scale(1.0);
}

.album-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.65) 0%,
    rgba(0, 0, 0, 0.3) 55%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.album-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 14px;
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.6vmin + 0.4vw, 1.4rem);
  color: #f5efa5;
  text-align: center;
  line-height: 1.15;
  text-shadow:
    0 0 10px rgba(0, 0, 0, 0.9),
    0 0 20px rgba(0, 0, 0, 0.7);
  z-index: 2;
  pointer-events: none;
}

@media (max-width: 900px) and (min-width: 601px) {
  .page-albums {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: 20px;
  }

  .page-albums .page-nav { margin-bottom: 16px; }
  .page-albums .page-content { flex: none; min-height: 0; }
  .page-albums .page-heading { margin-bottom: 20px; }

  .albums-grid {
    flex: none;
    min-height: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
    gap: 14px;
  }

  .album-card { aspect-ratio: 4 / 3; border-radius: 12px; }
  .album-title { padding: 8px 10px; font-size: clamp(0.95rem, 2.4vw, 1.15rem); }
}

@media (max-width: 600px) {
  .page-albums {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    padding: 14px;
  }

  .page-albums .page-nav { margin-bottom: 12px; }
  .page-albums .page-content { flex: none; min-height: 0; }
  .page-albums .page-heading { margin-bottom: 16px; }

  .albums-grid {
    flex: none;
    min-height: 0;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
  }

  .album-card { aspect-ratio: 4 / 3; border-radius: 12px; }
  .album-title { padding: 8px 12px; font-size: clamp(0.95rem, 4vw, 1.1rem); }
}

/* ========================================
   16. СТРАНИЦА ДЕТАЛЕЙ МЕРОПРИЯТИЯ
   ======================================== */
.page-event-details {
  background: var(--menu-bg);
  min-height: 100dvh;
  padding: 4vmin;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.5;
  color: #2b2b2b;
}

.event-details {
  max-width: 900px;
  margin: 0 auto;
  background: var(--panel-bg);
  border: 4px solid var(--panel-border);
  border-radius: 28px;
  padding: 5vmin;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

.event-heading {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  color: var(--heading-red);
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.15;
  margin: 0 0 4vmin;
  text-shadow:
    0 0 12px rgba(255, 255, 255, 0.85),
    0 0 30px rgba(255, 255, 255, 0.9);
}

.event-info {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 0 0 4vmin;
  border-bottom: 2px solid var(--panel-border);
  margin-bottom: 4vmin;
}

.event-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 140px;
}

.event-info-label {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  color: #8a7a3a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.event-info-value {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  color: #2b2b2b;
  font-weight: 500;
}

.event-slider {
  position: relative;
  margin: 0 0 4vmin;
  border-radius: 16px;
  overflow: hidden;
  background: #2b2b2b;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.slider-track {
  display: flex;
  transition: transform .4s ease;
  will-change: transform;
}

.slider-item {
  flex: 0 0 100%;
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  position: relative;
  overflow: hidden;
}

.slider-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  pointer-events: none;
}

.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 239, 165, 0.85);
  border: 2px solid var(--panel-border);
  border-radius: 50%;
  color: #8a7a3a;
  font-family: Georgia, serif;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}

.slider-prev { left: 12px; }
.slider-next { right: 12px; }

.slider-prev:hover,
.slider-next:hover {
  background: #f5efa5;
  transform: translateY(-50%) scale(1.08);
}

.slider-prev:active,
.slider-next:active {
  transform: translateY(-50%) scale(0.97);
}

.slider-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}

.slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 2px solid #f5efa5;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.slider-dot:hover {
  transform: scale(1.2);
}

.slider-dot.is-active {
  background: #f5efa5;
}

.event-content {
  margin-bottom: 4vmin;
}

.event-content p {
  margin: 0 0 1.2em;
  line-height: 1.6;
}

.event-content p:last-child {
  margin-bottom: 0;
}

.event-cta {
  text-align: center;
  padding-top: 2vmin;
}

.event-button {
  display: inline-block;
  padding: 14px 40px;
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.1rem, 1.5vw, 1.35rem);
  color: #ffffff;
  background: var(--heading-red);
  border: none;
  border-radius: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 4px 12px rgba(254, 0, 0, 0.25);
}

.event-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(254, 0, 0, 0.35);
  background: #d90000;
}

.event-button:active {
  transform: translateY(0);
}

@media (max-width: 600px) {
  .page-event-details {
    padding: 16px;
  }

  .event-details {
    padding: 20px;
    border-width: 2px;
    border-radius: 20px;
  }

  .event-heading {
    margin-bottom: 20px;
  }

  .event-info {
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }

  .event-info-item {
    min-width: 0;
    flex: 1 1 140px;
  }

  .event-slider {
    margin-bottom: 24px;
    border-radius: 12px;
  }

  .slider-item img {
    aspect-ratio: 4 / 3;
  }

  .slider-prev,
  .slider-next {
    width: 38px;
    height: 38px;
    font-size: 1.4rem;
  }

  .slider-prev { left: 6px; }
  .slider-next { right: 6px; }

  .slider-dots {
    bottom: 8px;
    gap: 6px;
  }

  .slider-dot {
    width: 8px;
    height: 8px;
  }

  .event-content {
    margin-bottom: 24px;
  }

  .event-button {
    display: block;
    width: 100%;
    padding: 14px 20px;
    box-sizing: border-box;
  }
}

/* ========================================
   17. ИКОНКА VK
   ======================================== */

.vk-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--panel-bg);
  border: 2px solid var(--panel-border);
  color: #8a7a3a;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.vk-icon svg {
  width: 35px;
  height: 35px;
  display: block;
  fill: currentColor;
}

.vk-icon:hover {
  background: var(--menu-bg);
  color: var(--heading-red);
  border-color: var(--heading-red);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.vk-icon:active {
  transform: scale(1.0);
}

.page-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.vk-icon--fixed {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 50;
}

@media (max-width: 600px) {
  .vk-icon {
    width: 38px;
    height: 38px;
  }

  .vk-icon svg {
    width: 26px;
    height: 26px;
  }

  .page-nav-actions {
    gap: 8px;
  }

  .menu-actions {
    gap: 10px;
    margin: 14px 0 0;
  }

  .vk-icon--fixed {
    top: 14px;
    right: 14px;
  }
}

/* ========================================
   18. ПОДВАЛ САЙТА (FOOTER)
   ======================================== */
.footer-copy {
  font-family: "PT Serif", Georgia, serif;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  color: #8a7a3a;
  line-height: 1.5;
  margin: 4vmin 0 0 0;         /* ← отступ сверху */
  padding: 3vmin 5vmin;
  text-align: center;
  background: var(--menu-bg);
  border-top: 0.3vmin solid #b8a94a;
}

@media (max-width: 600px) {
  .footer-copy {
    margin-top: 3vmin;
    padding: 3vmin 4vmin;
  }
}