/* ============================================================
   ТРАНЗИТНАЯ ЗОНА — Stylesheet
   Based on original design: editorial / art-institution
   Georgia italic titles · Arial body · colored circle dots
   ============================================================ */

/* ── Freeset Bold ────────────────────────────────────────── */
@font-face {
  font-family: 'Freeset';
  src: url('../fonts/Freeset-Bold.woff2') format('woff2'),
       url('../fonts/Freeset-Bold.woff')  format('woff'),
       url('../fonts/Freeset-Bold.ttf')   format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Freeset';
  src: url('../fonts/Freeset-Bold.woff2') format('woff2'),
       url('../fonts/Freeset-Bold.woff')  format('woff'),
       url('../fonts/Freeset-Bold.ttf')   format('truetype');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* ── Variables ───────────────────────────────────────────── */
:root {
  --bg:            #FFFFFF;
  --sidebar-bg:    #FFFFFF;
  --text:          #000000;
  --text-muted:    #000000;
  --border:        #CCCCCC;
  --border-dark:   #000000;
  --sidebar-width: 23vw;
  --header-h:      52px;

  --font-serif: 'Freeset', 'Times New Roman', Times, serif;
  --font-sans:  'Times New Roman', Times, serif;

  /* Nav dot colours matching mockup */
  --dot-about:    #E53E3E;
  --dot-contacts: #3B82F6;
  --dot-news:     #D4A017;
  --dot-archive:  #9F7AEA;
  --dot-opencall: #38B2AC;
  --dot-support:  #48BB78;
}

/* ── Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: auto; font-size: clamp(15.4px, 0.578vw + 11.6px, 20.9px); }
img  { display: block; max-width: 100%; }
ul   { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea, select { font: inherit; }

/* ── Base ────────────────────────────────────────────────── */
body {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.2;
  color: var(--text);
  background: var(--bg);
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

p + p { margin-top: 0; }

/* ── Typography ──────────────────────────────────────────── */
h1 {
  font-family: 'Freeset', var(--font-sans);
  font-style: normal;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: bold;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}

h2 {
  font-family: 'Freeset', var(--font-sans);
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.2;
}

h3 {
  font-family: 'Freeset', var(--font-sans);
  font-size: 0.7rem;
  font-weight: bold;
  color: var(--text-muted);
  text-transform: lowercase;
}

/* ── Layout ──────────────────────────────────────────────── */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-bg);
  
  display: flex;
  flex-direction: column;
  padding: 48px 24px 48px;
  z-index: 100;
  overflow-y: auto;
}

/* ── Logo ────────────────────────────────────────────────── */
.sidebar__logo {
  display: block;
  text-decoration: none;
  margin-bottom: 24px;
}

.sidebar__logo:hover { text-decoration: none; }

.sidebar__bus-icon {
  display: block;
  width: 63px;
  height: 94px;
  margin-bottom: 16px;
  flex-shrink: 0;
}

.mobile-header__logo-mark {
  display: block;
  width: 50px;
  height: 75px;
  flex-shrink: 0;
}

.sidebar__logo-title {
  font-family: 'Freeset', var(--font-sans);
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--text);
  line-height: 1.15;
}

/* ── Navigation ──────────────────────────────────────────── */
.sidebar__nav { flex: 1; }

.nav__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav__item a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 3px 0;
  font-family: var(--font-sans);
  font-size: 0.867rem;
  font-weight: normal;
  color: var(--text);
  text-decoration: none;
  line-height: 1.3;
}

.nav__item a:hover { text-decoration: underline; }
.nav__item.active a { font-weight: bold; }

/* Coloured circle dots */
.nav__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.nav__item--about    .nav__dot { background: var(--dot-about); }
.nav__item--contacts .nav__dot { background: var(--dot-contacts); }
.nav__item--news     .nav__dot { background: var(--dot-news); }
.nav__item--archive  .nav__dot { background: var(--dot-archive); }
.nav__item--opencall .nav__dot { background: var(--dot-opencall); }
.nav__item--support  .nav__dot { background: var(--dot-support); }

/* ── Sidebar Footer ──────────────────────────────────────── */
.sidebar__footer {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar__foundation-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.sidebar__foundation {
  font-family: var(--font-sans);
  font-size: 0.793rem;
  color: var(--text);
  line-height: 1.45;
  flex: 1;
}

.sidebar__am-logo {
  flex-shrink: 0;
  width: 120px;
  height: auto;
  margin-top: 2px;
}

.sidebar__socials {
  display: flex;
  gap: 6px;
  align-items: center;
}

.social-link {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  flex-shrink: 0;
}

.social-link:hover { opacity: 0.8; text-decoration: none; }
.social-link svg { width: 28px; height: 28px; }

/* ── Main Content ────────────────────────────────────────── */
.main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
}

.page {
  padding: 2rem 2.5rem 3rem;
}

/* ── Mobile Header ───────────────────────────────────────── */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--bg);

  align-items: center;
  justify-content: space-between;
  padding: 0 0.6rem;
  z-index: 200;
}

.mobile-header__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.mobile-header__logo-mark {
  width: auto;
  height: 48px;
}

.mobile-header__title {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: bold;
  color: var(--text);
}

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
}

.burger span {
  display: block;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
  transform-origin: center;
}

.burger.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ── Mobile Menu ─────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  flex-direction: column;
  padding: 64px 24px 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.mobile-menu.is-visible  { display: flex; pointer-events: all; }
.mobile-menu.is-open     { opacity: 1; }

.mobile-menu__nav .nav__item a {
  font-size: 1.1rem;
  padding: 12px 0;
}

.mobile-menu__footer {
  margin-top: auto;
  padding-top: 20px;
  
}

/* ── Page Header ─────────────────────────────────────────── */
.page-header {
  margin-bottom: 24px;
  padding-bottom: 12px;
  
}

.page-header__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

/* ── HOME PAGE ───────────────────────────────────────────── */

/* One block per current event, stacked vertically */
.home-event {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  margin-bottom: 72px;
}

.home-event:last-child { margin-bottom: 0; }

.home__poster-img {
  width: 100%;
  display: block;
  object-fit: cover;
}

.home__poster-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #D8D8D8;
}

/* Right column */
.home__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.5rem, 2.8vw, 2.375rem);
  font-weight: normal;
  line-height: 1.1;
  text-transform: lowercase;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.home__artist-label {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: lowercase;
  margin-bottom: 1.25rem;
}

.home__description {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  line-height: 1.35;
}

.home__description p { color: #222; }

/* ── ABOUT ───────────────────────────────────────────────── */
.about__text { margin-bottom: 40px; }

.about__text h2 {
  font-size: 1.06rem;
  margin-top: 28px;
  margin-bottom: 8px;
  font-style: normal;
}

.about__text p { font-size: 0.875rem; line-height: 1.35; }

/* About page photo strip */
.about-gallery-strip {
  margin-top: 40px;
}

.about-gallery-strip #about-gallery {
  display: flex;
  gap: 3px;
  height: 220px;
  overflow: hidden;
}

.about-gallery-strip .gallery__item {
  flex: 0 0 auto;
  height: 100%;
  width: auto;
  aspect-ratio: unset;
}

.about-gallery-strip .gallery__item img {
  height: 100%;
  width: auto;
  max-width: none;
  object-fit: cover;
}

/* ── Gallery ─────────────────────────────────────────────── */
.gallery { margin-top: 8px; }

.gallery__title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  padding-top: 24px;
  text-transform: lowercase;
}

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 3px;
}

.gallery__item {
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  position: relative;
}

.gallery__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.15s;
}

.gallery__item:hover img { opacity: 0.88; }

.gallery__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.15s;
  pointer-events: none;
}

.gallery__item:hover::after { background: rgba(0,0,0,0.1); }

/* ── Lightbox ────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.lightbox.is-open { display: flex; }

.lightbox__img {
  max-width: 90vw;
  max-height: 88vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute; top: 14px; right: 18px;
  color: #fff; font-size: 22px; opacity: 0.7;
  font-family: var(--font-sans);
  transition: opacity 0.1s;
  cursor: pointer;
}
.lightbox__close:hover { opacity: 1; }

.lightbox__prev, .lightbox__next {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #fff; font-size: 28px; opacity: 0.5;
  transition: opacity 0.1s; padding: 16px; cursor: pointer;
}
.lightbox__prev { left: 8px; }
.lightbox__next { right: 8px; }
.lightbox__prev:hover, .lightbox__next:hover { opacity: 1; }

/* ── CONTACTS ────────────────────────────────────────────── */
.contacts-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
  margin-bottom: 48px;
}

.contacts-nav h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 16px;
}

.contacts-nav__links { display: flex; flex-direction: column; gap: 0; }

.contacts-nav__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px 0;
  text-align: left;
  background: none;
  transition: color 0.1s;
}

.contacts-nav__link::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #48BB78;
  flex-shrink: 0;
}

.contacts-nav__link:hover { color: var(--text); text-decoration: none; }
.contacts-nav__link.active {
  color: #3096df;
  font-weight: bold;
  text-decoration: none;
}

.contacts-panel { display: none; }
.contacts-panel.active { display: block; }

.contacts-map-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  margin-bottom: 14px;
  
}

.contacts-map-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: #E8E8E8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.contacts-info-address {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.55;
  margin-bottom: 20px;
}

.contacts-info-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 0.875rem;
}

.contacts-info-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 7px 0;
  
}

.contacts-info-label {
  font-size: 0.75rem;
  color: var(--text);
}

.contacts-info-block {
  font-size: 0.875rem;
  line-height: 1.8;
  color: var(--text);
  white-space: pre-wrap;
  margin-bottom: 24px;
}

/* Team */
.team-section {
  padding-top: 40px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}

.team-section h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 24px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 20px;
  align-items: start;
}

.team-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.team-card__photo-wrap {
  position: relative;
  width: 100%;
  flex-shrink: 0;
  overflow: hidden;
  background: #E8E8E8;
}

.team-card__photo-wrap::before {
  content: '';
  display: block;
  padding-top: 100%;
}

.team-card__photo {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-card__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: center;
}

.team-card__name { font-size: 0.8rem; font-weight: bold; line-height: 1.3; }

.team-card__role {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.team-card__contact {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-decoration: underline;
  display: block;
}
.team-card__contact:hover { color: var(--text); }

/* ── NEWS ────────────────────────────────────────────────── */
.news-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  min-height: 50vh;
}

.news-sidebar h2 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: bold;
  margin-bottom: 14px;
}

.news-dates { display: flex; flex-direction: column; }

.news-date-link {
  font-size: 0.8rem;
  padding: 6px 6px;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  background: none;
  transition: color 0.1s;
}

.news-date-link::before { display: none; }
.news-date-link:hover { color: var(--text); }
.news-date-link.active { color: var(--text); font-weight: bold; text-decoration: underline; }

.news-content { display: none; }

.news-content.active {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.news-event__type {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: lowercase;
  margin-bottom: 6px;
}

.news-event__title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: bold;
  margin-bottom: 6px;
}

.news-event__time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.news-event__text p { font-size: 0.875rem; line-height: 1.35; color: #222; }

.news-event__poster {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
  
}

.news-event__poster-placeholder {
  width: 100%;
  aspect-ratio: 3/4;
  background: #E8E8E8;
}

/* ── ARCHIVE ─────────────────────────────────────────────── */
.archive-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}

.archive-col h2 {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: bold;
  margin-bottom: 12px;
  padding-bottom: 8px;
}

.archive-list { display: flex; flex-direction: column; }

.archive-year {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0 4px;
  font-size: 0.875rem;
  font-weight: bold;
  color: var(--text);
}

.archive-year::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text);
  flex-shrink: 0;
}

.archive-events-group {
  display: flex;
  flex-direction: column;
  padding-left: 16px;
  margin-bottom: 6px;
}

.archive-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.875rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.1s;
}

.archive-link::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text);
  flex-shrink: 0;
  opacity: 0.4;
}

.archive-link:hover { color: var(--text-muted); text-decoration: none; }
.archive-link:hover::before { opacity: 0.2; }

.archive-link__name { flex: 1; }

/* ── EVENT DETAIL ────────────────────────────────────────── */
.event-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}

.event-sidebar p,
.event-sidebar h3 {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: lowercase;
}

.event-nav { display: flex; flex-direction: column; gap: 2px; }

.event-nav__link {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  padding: 5px 0 5px 20px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  background: none;
  transition: color 0.15s;
  display: block;
  width: 100%;
  position: relative;
}

.event-nav__link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: background 0.15s;
}

.event-nav__link:hover { color: #3096df; }
.event-nav__link:hover::before { background: #3096df; opacity: 0.4; }

.event-nav__link.active {
  color: #3096df;
  font-weight: bold;
}

.event-nav__link.active::before {
  background: #3096df;
}

.event-panel { display: none; }
.event-panel.active { display: block; animation: fadeIn 0.2s ease; }

/* ── Gallery media: photos + VK video ───────────────────── */
.media-gallery { display: flex; flex-direction: column; gap: 32px; }

.media-gallery__photos .gallery__grid { margin-top: 8px; }

.media-gallery__videos { display: flex; flex-direction: column; gap: 16px; }

.video-embed {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.event-main__poster {
  width: 50%;
  max-width: none;
  height: auto;
  display: block;
  margin-bottom: 20px;
}

.event-main__poster-placeholder {
  width: 50%;
  max-width: none;
  aspect-ratio: 3/4;
  background: #E8E8E8;
  margin-bottom: 20px;
}

.event-main__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: lowercase;
}

.event-main__title { margin-bottom: 8px; font-style: normal; font-size: 1.5rem; }

.event-main__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 16px;
}

.event-main__description p { font-size: 0.875rem; line-height: 1.35; color: #222; }

/* ── OPEN CALL ───────────────────────────────────────────── */
.opencall-content h1 { font-style: italic; margin-bottom: 8px; }

.opencall-content .subtitle {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.35;
}

.opencall-section {
  margin-top: 28px;
  padding-top: 20px;
}

.opencall-section h2 { font-size: 1.06rem; margin-bottom: 10px; font-style: normal; }

.opencall-section p,
.opencall-section li { font-size: 0.875rem; line-height: 1.35; color: #222; }

.opencall-section ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.opencall-section ul li::before {
  content: '– ';
  color: var(--text-muted);
}

.opencall-deadline {
  display: inline-block;
  padding: 12px 18px;
  margin-top: 18px;
}

.opencall-deadline__label {
  font-size: 0.7rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 3px;
  text-transform: lowercase;
}

.opencall-deadline__date {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: bold;
}

.opencall-apply-btn {
  display: inline-block;
  background: var(--text);
  color: #fff;
  padding: 10px 22px;
  font-size: 0.8rem;
  margin-top: 22px;
  text-decoration: none;
  transition: opacity 0.15s;
}

.opencall-apply-btn:hover { opacity: 0.8; text-decoration: none; color: #fff; }

/* ── SUPPORT ─────────────────────────────────────────────── */
.support-intro { margin-bottom: 32px; padding-bottom: 24px; }
.support-intro h1 { font-style: italic; margin-bottom: 12px; }
.support-intro p { font-size: 0.875rem; line-height: 1.35; }

.support-ways {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  
}

.support-way {
  padding: 0;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

.support-way:nth-child(even) { border-right: none; }
.support-way:nth-last-child(-n+2) { border-bottom: none; }

.support-way__icon { font-size: 1.25rem; margin-bottom: 8px; color: var(--text-muted); }

.support-way h2 {
  font-family: var(--font-serif);
  font-size: 1.06rem;
  font-weight: bold;
  margin-bottom: 8px;
  font-style: normal;
}

.support-way p { font-size: 0.8rem; color: #444; line-height: 1.35; margin-bottom: 12px; }

.support-way__link {
  font-size: 0.75rem;
  text-decoration: underline;
  color: var(--text);
}

.support-way__link:hover { color: var(--text-muted); }

/* ── ADMIN ───────────────────────────────────────────────── */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  background: #fff;
}

.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar__logo {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.8rem;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 2px;
}

.admin-sidebar__sub {
  font-size: 0.55rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

.admin-nav__link {
  display: block;
  width: 100%;
  text-align: left;
  padding: 5px 0 5px 10px;
  font-size: 0.7rem;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  border-left: 1px solid transparent;
  transition: color 0.1s;
  text-transform: lowercase;
}

.admin-nav__link:hover { color: var(--text); }
.admin-nav__link.active { color: var(--text); border-left-color: var(--text); }

.admin-nav__sep {
  border: none;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}

.admin-nav__back {
  display: block;
  font-size: 0.6rem;
  color: var(--text-muted);
  padding: 3px 0;
  text-decoration: none;
  text-transform: lowercase;
}
.admin-nav__back:hover { color: var(--text); text-decoration: none; }

.admin-main {
  flex: 1;
  padding: 36px 48px;
  min-width: 0;
}

.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-section > h1 {
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Tables */
.admin-table-wrap { overflow-x: auto; }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.7rem;
}

.admin-table th {
  text-align: left;
  font-size: 0.6rem;
  font-weight: normal;
  color: var(--text-muted);
  padding: 6px 12px;
  border-bottom: 1px solid #000;
  text-transform: lowercase;
  letter-spacing: 0.04em;
}

.admin-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #f0f0f0;
  vertical-align: middle;
}

.admin-table tr:hover td { background: #fafafa; }

/* Actions bar */
.admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-size: 0.7rem;
  cursor: pointer;
  border: 1px solid;
  background: none;
  font-family: inherit;
  text-decoration: none;
  text-transform: lowercase;
  letter-spacing: 0.02em;
}

.btn-primary  { background: #000; color: #fff; border-color: #000; }
.btn-primary:hover { background: #333; border-color: #333; color: #fff; text-decoration: none; }
.btn-secondary { background: #fff; color: #000; border-color: #ccc; }
.btn-secondary:hover { border-color: #000; text-decoration: none; }
.btn-danger { background: #fff; color: #b00; border-color: #ddd; }
.btn-danger:hover { border-color: #b00; text-decoration: none; }
.btn-sm { padding: 3px 8px; font-size: 0.63rem; }

/* Filters & inputs */
.admin-filters { display: flex; gap: 8px; flex-wrap: wrap; }

.admin-input,
.admin-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.7rem;
  background: #fff;
  outline: none;
}

.admin-input { min-width: 180px; }
.admin-input:focus,
.admin-select:focus { border-color: #000; }

/* Section header with actions */
.admin-section-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.admin-section-head h1 {
  margin: 0;
  padding: 0;
  border: none;
  flex-shrink: 0;
}

.admin-section-head .admin-filters {
  flex: 1;
}

/* Column layout */
.admin-cols {
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.admin-col-list {
  flex: 1;
  min-width: 0;
}

.admin-cols.has-panel .admin-col-list {
  border-right: 1px solid var(--border);
  padding-right: 28px;
}

.admin-col-edit {
  width: 380px;
  flex-shrink: 0;
  padding-left: 28px;
  display: none;
  overflow-y: auto;
}

.admin-col-edit.is-open { display: block; }

.admin-col-sub {
  width: 340px;
  flex-shrink: 0;
  border-left: 1px solid var(--border);
  padding-left: 28px;
  display: none;
  overflow-y: auto;
}

.admin-col-sub.is-open { display: block; }

/* Team: equal-width list and edit columns */
#team-cols .admin-col-list {
  width: auto;
  flex: 1;
  min-width: 0;
}

#team-cols .admin-col-edit {
  width: auto;
  flex: 1;
  min-width: 0;
}

/* Events: hide list when editing, give edit columns full width */
#events-cols.has-panel .admin-col-list {
  display: none;
}

#events-cols .admin-col-edit {
  width: auto;
  flex: 1;
  min-width: 0;
  padding-left: 0;
}

#events-cols .admin-col-sub {
  width: auto;
  flex: 1;
  min-width: 0;
}

.admin-col__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.admin-col__title {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  font-weight: normal;
}

.admin-col__close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.admin-col__close:hover { color: var(--text); }

/* Tab navigation (pages section) */
.admin-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.admin-tab {
  padding: 6px 18px 6px 0;
  font-size: 0.7rem;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-family: inherit;
  text-transform: lowercase;
  letter-spacing: 0.03em;
  transition: color 0.1s;
}

.admin-tab:hover { color: var(--text); }

.admin-tab.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 14px;
}

.form-group label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: lowercase;
  letter-spacing: 0.03em;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 7px 10px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.75rem;
  background: #fff;
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus { border-color: #000; }

.form-group textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.form-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Dashboard stats */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  margin-bottom: 40px;
}

.admin-stat {
  background: #fff;
  padding: 24px 20px;
}

.admin-stat__num {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: normal;
  line-height: 1;
  margin-bottom: 4px;
}

.admin-stat__label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: lowercase;
  letter-spacing: 0.05em;
}

/* Toast */
/* Nav visibility toggles */
.nav-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  cursor: pointer;
}
.nav-toggle input { width: auto; margin: 0; }

.admin-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #000;
  color: #fff;
  padding: 10px 18px;
  font-size: 0.7rem;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.admin-toast.show { opacity: 1; }

/* ── Rich text editor ────────────────────────────────────── */
.rich-editor {
  border: 1px solid var(--border);
}

.rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid var(--border);
  background: #fafafa;
  padding: 3px 4px;
  align-items: center;
}

.rich-toolbar button,
.rich-toolbar select {
  padding: 2px 6px;
  font-size: 0.68rem;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  border-radius: 2px;
  min-width: 22px;
  height: 22px;
  line-height: 1;
  vertical-align: middle;
}

.rich-toolbar select {
  padding-right: 2px;
  max-width: 80px;
}

.rich-toolbar button:hover,
.rich-toolbar select:hover { background: #eee; }
.rich-toolbar button[data-cmd="bold"]          { font-weight: bold; }
.rich-toolbar button[data-cmd="italic"]        { font-style: italic; }
.rich-toolbar button[data-cmd="underline"]     { text-decoration: underline; }
.rich-toolbar button[data-cmd="strikeThrough"] { text-decoration: line-through; }

.rich-toolbar__sep {
  display: inline-block;
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 3px;
  vertical-align: middle;
  flex-shrink: 0;
}

.rich-toolbar__color {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 4px;
  cursor: pointer;
  font-size: 0.68rem;
  height: 22px;
  border-radius: 2px;
  position: relative;
}

.rich-toolbar__color:hover { background: #eee; }

.rich-toolbar__color input[type="color"] {
  width: 14px;
  height: 14px;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  border-radius: 2px;
  flex-shrink: 0;
}

.rich-body {
  padding: 8px 10px;
  min-height: 80px;
  font-size: 0.75rem;
  line-height: 1.5;
  outline: none;
  color: #000;
}

.rich-body:focus { box-shadow: inset 0 0 0 1px #000; }
.rich-body p { margin: 0 0 0.5em; }
.rich-body p:last-child { margin-bottom: 0; }

/* ── Photo field (single URL → preview) ─────────────────── */
.photo-field { position: relative; }

.photo-field__preview {
  position: relative;
  display: none;
  margin-bottom: 4px;
}

.photo-field__img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  background: #e8e8e8;
}

.photo-field__remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.photo-field__remove:hover { background: rgba(0,0,0,0.8); }

/* ── Photo list (multiple images with reorder) ───────────── */
.photo-list { display: flex; flex-direction: column; gap: 0; }

.photo-list__items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.photo-list__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--border);
  background: #fafafa;
}

.photo-list__thumb {
  display: block;
  width: 60px;
  height: 60px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e8e8e8;
}

.photo-list__alt {
  flex: 1;
  padding: 5px 8px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.7rem;
  background: #fff;
  outline: none;
}

.photo-list__controls {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.photo-list__controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #eee;
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 0;
}

.photo-list__controls button:hover { background: #ddd; }

.photo-list__add {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.photo-list__add-url {
  flex: 1;
  min-width: 160px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.7rem;
  outline: none;
}

.photo-list__add-alt {
  flex: 0 1 130px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  font: inherit;
  font-size: 0.7rem;
  outline: none;
}

.photo-list__add button {
  padding: 5px 10px;
  background: #000;
  color: #fff;
  border: none;
  font: inherit;
  font-size: 0.7rem;
  cursor: pointer;
  white-space: nowrap;
}

.photo-list__add button:hover { background: #333; }

/* ── Utilities ───────────────────────────────────────────── */
.divider  { border: none;  margin: 24px 0; }
.text-muted { color: var(--text-muted); }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-24 { margin-bottom: 24px; }
.fade-in { animation: fadeIn 0.25s ease both; }

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 1100px) {
  .home-event { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 900px) {
  .archive-layout { grid-template-columns: 1fr; }
  /* участники без года — добавляем такой же отступ как у года (32px + 10px gap) */
  #archive-participants .archive-link { padding-left: 16px; }
  .support-ways   { grid-template-columns: 1fr; }
  .support-way:nth-child(even)      {  }
  .support-way:nth-last-child(-n+2) {  }
  .support-way:last-child           { border-bottom: none; }
  .team-grid      { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .sidebar      { display: none; }
  .mobile-header { display: flex; }
  .main { margin-left: 0; padding-top: var(--header-h); }
  .page { padding: 1.25rem 1rem 2.5rem; }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.06rem; }

  .home-event      { grid-template-columns: 1fr; }
  .contacts-layout { grid-template-columns: 1fr; gap: 24px; }
  .news-layout     { grid-template-columns: 1fr; gap: 24px; }
  .news-content.active { grid-template-columns: 1fr; }
  .event-layout    { grid-template-columns: 1fr; gap: 24px; }
  :root            { --sidebar-width: 0px; }
  .two-col        { display: block; }
  .team-grid      { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .admin-sidebar  { display: none; }
  .admin-main     { padding: 20px 16px; }
  .form-row       { grid-template-columns: 1fr; }

  .about-gallery-strip #about-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: auto;
  }
  .about-gallery-strip .gallery__item {
    height: 120px;
    width: auto;
  }
  .about-gallery-strip .gallery__item img {
    width: 100%;
    height: 100%;
  }
}

@media (max-width: 480px) {
  .page { padding: 1rem 0.75rem 2rem; }
  .gallery__grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid     { grid-template-columns: repeat(3, 1fr); }
}
