/* ============================================================
   Общие стили сайта и админ-панели (тёмная тема)
   ============================================================ */
:root {
  --bg: #07070c;
  --panel: rgba(255, 255, 255, .045);
  --line: rgba(255, 255, 255, .09);
  --a1: #8b5cf6;
  --a2: #22d3ee;
  --a3: #f472b6;
  color-scheme: dark;
}
* { -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
html.no-scroll, html.no-scroll body { overflow: hidden; }
body {
  background: var(--bg);
  color: #e9e9f3;
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
.font-display { font-family: 'Unbounded', 'Manrope', sans-serif; letter-spacing: -.01em; }
::selection { background: rgba(139, 92, 246, .45); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #262636; border-radius: 10px; }
::-webkit-scrollbar-track { background: #0b0b12; }

/* ---------- Фон ---------- */
.bg-blobs { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-blobs i { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .28; }
.bg-blobs i:nth-child(1) { width: 46vw; height: 46vw; left: -12vw; top: -10vw; background: var(--a1); }
.bg-blobs i:nth-child(2) { width: 38vw; height: 38vw; right: -10vw; top: 30vh; background: var(--a2); opacity: .16; }
.bg-blobs i:nth-child(3) { width: 40vw; height: 40vw; left: 20vw; bottom: -18vw; background: var(--a3); opacity: .13; }
.bg-blobs::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse at 50% 0%, #000 15%, transparent 70%);
}

/* ---------- Стекло, градиентный текст ---------- */
.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}
.grad-text {
  background: linear-gradient(90deg, #c4b5fd, #67e8f9);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Кнопки (всегда по центру содержимого) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.5rem; border-radius: 999px; font-weight: 700; font-size: .9rem;
  line-height: 1.2; text-align: center; cursor: pointer; border: 1px solid transparent;
  transition: transform .25s, box-shadow .25s, background .25s, opacity .25s;
  user-select: none;
}
.btn-primary {
  color: #fff;
  background: linear-gradient(90deg, var(--a1), #6366f1 55%, #0ea5e9);
  box-shadow: 0 10px 30px -10px rgba(139, 92, 246, .75);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(99, 102, 241, .9); }
.btn-ghost { background: rgba(255, 255, 255, .05); border-color: var(--line); color: #e9e9f3; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
.btn-danger { background: rgba(244, 63, 94, .14); border-color: rgba(244, 63, 94, .4); color: #fda4af; }
.btn-danger:hover { background: rgba(244, 63, 94, .26); }
.btn-ok { background: rgba(16, 185, 129, .16); border-color: rgba(16, 185, 129, .45); color: #6ee7b7; }
.btn-ok:hover { background: rgba(16, 185, 129, .28); }
.btn-sm { padding: .45rem .95rem; font-size: .78rem; }
.btn:disabled, .btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; }
.btn:focus-visible, .nav-link:focus-visible, .drop-item:focus-visible, .ph:focus-visible,
.gal-item:focus-visible, .event-card:focus-visible, .star-btn:focus-visible {
  outline: 2px solid var(--a2); outline-offset: 2px;
}

/* ---------- Шапка ---------- */
.nav-link {
  padding: .5rem .95rem; border-radius: 999px; font-size: .88rem; font-weight: 600;
  color: rgba(255, 255, 255, .7); transition: .2s; white-space: nowrap;
}
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
/* Панели вынесены за пределы шапки (у шапки есть backdrop-filter, он ломает position:fixed у потомков) */
.drop-panel {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 45;
  width: min(92vw, 24rem); max-height: 70vh; overflow: auto; padding: .5rem;
  border-radius: 1.25rem; background: rgba(14, 14, 22, .97); border: 1px solid var(--line);
  box-shadow: 0 30px 80px -20px #000; animation: pop .18s ease;
}
@keyframes pop {
  from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
  to { opacity: 1; transform: translateX(-50%); }
}
.drop-item {
  display: flex; width: 100%; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .8rem 1rem; border-radius: .9rem; text-align: left; color: #e9e9f3;
  font-weight: 600; font-size: .92rem; transition: .2s;
}
.drop-item:hover { background: rgba(139, 92, 246, .16); }
.drop-item small { color: rgba(255, 255, 255, .4); font-weight: 600; white-space: nowrap; }
.drop-sep { height: 1px; background: var(--line); margin: .35rem .5rem; }

/* ---------- Заголовки секций ---------- */
.section { position: relative; padding: 4.5rem 1rem; }
@media (min-width: 768px) { .section { padding: 7rem 1.5rem; } }
.sec-head { max-width: 42rem; margin: 0 auto 3rem; text-align: center; }
.eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .2em;
  text-transform: uppercase; color: var(--a2); margin-bottom: .8rem;
}
.sec-head h2 {
  font-family: 'Unbounded', sans-serif; font-weight: 700;
  font-size: clamp(1.7rem, 4.5vw, 2.8rem); line-height: 1.15;
}
.sec-head h2::after {
  content: ""; display: block; width: 64px; height: 3px; border-radius: 3px;
  margin: 1.1rem auto 0; background: linear-gradient(90deg, var(--a1), var(--a2));
}
.sec-head p { margin-top: 1rem; color: rgba(255, 255, 255, .55); line-height: 1.7; }

/* ---------- Карточки ---------- */
.card { border-radius: 1.5rem; padding: 1.5rem; }
@media (min-width: 768px) { .card { padding: 2rem; } }
.card h3 {
  font-family: 'Unbounded', sans-serif; font-size: 1rem; font-weight: 600;
  margin-bottom: 1.1rem; display: flex; align-items: center; gap: .6rem;
}
.card h3::before {
  content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, var(--a1), var(--a2)); box-shadow: 0 0 12px var(--a1);
}
.prose-lite p { color: rgba(255, 255, 255, .72); line-height: 1.8; }
.prose-lite p + p { margin-top: .8rem; }
.check-li {
  display: flex; gap: .7rem; align-items: flex-start; padding: .6rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .09); color: rgba(255, 255, 255, .8);
}
.check-li:last-child { border-bottom: 0; }
.check-li svg { flex: none; margin-top: .2rem; color: var(--a2); }
.org-chip {
  padding: .45rem .9rem; border-radius: 999px; font-size: .85rem;
  background: rgba(139, 92, 246, .12); border: 1px solid rgba(139, 92, 246, .3); color: #ddd6fe;
}
.chip {
  display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 1rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; color: rgba(255, 255, 255, .75);
  background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }

/* ---------- Эквалайзер в шапке сайта ---------- */
.eq { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: 56px; }
.eq span {
  width: 5px; height: 100%; border-radius: 3px; transform-origin: bottom;
  background: linear-gradient(to top, var(--a1), var(--a2));
  animation: eq 1.2s ease-in-out infinite;
}
@keyframes eq { 0%, 100% { transform: scaleY(.18); } 50% { transform: scaleY(1); } }

/* ---------- Статистика ---------- */
.stat { border-radius: 1.25rem; padding: 1.1rem .5rem; text-align: center; }
.stat b { display: block; font-family: 'Unbounded', sans-serif; font-size: clamp(1.4rem, 4vw, 2.2rem); }
.stat span { display: block; margin-top: .25rem; font-size: .75rem; color: rgba(255, 255, 255, .5); }

/* ---------- Личные фото ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.ph {
  position: relative; overflow: hidden; border-radius: 1.1rem; aspect-ratio: 1 / 1; padding: 0;
  border: 1px solid var(--line); background: #111118; cursor: zoom-in;
}
.ph-main { grid-column: span 2; aspect-ratio: 4 / 3; }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.ph:hover img { transform: scale(1.06); }
.ph-empty {
  grid-column: span 2; aspect-ratio: 4 / 3; display: grid; place-items: center; text-align: center;
  border-radius: 1.4rem; border: 1px dashed rgba(255, 255, 255, .15); color: rgba(255, 255, 255, .4);
  background: linear-gradient(135deg, rgba(139, 92, 246, .12), rgba(34, 211, 238, .08));
}

/* ---------- Услуги и этапы ---------- */
.svc { border-radius: 1.4rem; padding: 1.6rem; text-align: center; transition: transform .3s, border-color .3s; }
.svc:hover { transform: translateY(-5px); border-color: rgba(34, 211, 238, .4); }
.svc-ico {
  width: 54px; height: 54px; margin: 0 auto 1rem; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, .3), rgba(34, 211, 238, .2)); color: #c4b5fd;
}
.svc h4 { font-family: 'Unbounded', sans-serif; font-size: .95rem; font-weight: 600; }
.svc p { margin-top: .6rem; font-size: .9rem; line-height: 1.65; color: rgba(255, 255, 255, .58); }
.step-num {
  font-family: 'Unbounded', sans-serif; font-size: 2.4rem; font-weight: 700; line-height: 1;
  background: linear-gradient(135deg, var(--a1), var(--a2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Мероприятия ---------- */
.event-card { border-radius: 1.5rem; overflow: hidden; cursor: pointer; transition: transform .35s, border-color .35s, box-shadow .35s; }
.event-card:hover { transform: translateY(-6px); border-color: rgba(139, 92, 246, .5); box-shadow: 0 25px 60px -25px rgba(139, 92, 246, .6); }
.event-cover { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: linear-gradient(135deg, #1a1033, #0b2a33); }
.event-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.event-card:hover .event-cover img { transform: scale(1.07); }
.event-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(7, 7, 12, .75), transparent 55%); pointer-events: none; }
.event-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .3); }
.event-count {
  position: absolute; left: 50%; bottom: .8rem; transform: translateX(-50%); z-index: 2;
  padding: .3rem .8rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap;
  background: rgba(7, 7, 12, .65); border: 1px solid var(--line); color: #fff;
}

/* ---------- Окно мероприятия и просмотр фото ---------- */
/* ВАЖНО: у #eventModal намеренно нет backdrop-filter — иначе нижняя кнопка "Закрыть" начнёт прокручиваться вместе с контентом */
.overlay { position: fixed; inset: 0; display: none; z-index: 60; }
.overlay.open { display: block; }
#eventModal { background: rgba(5, 5, 10, .95); overflow-y: auto; overscroll-behavior: contain; }
.gal { column-count: 2; column-gap: .75rem; }
@media (min-width: 768px) { .gal { column-count: 3; column-gap: 1rem; } }
.gal-item {
  position: relative; display: block; width: 100%; margin-bottom: .75rem; padding: 0; break-inside: avoid;
  border-radius: 1rem; overflow: hidden; cursor: zoom-in; border: 1px solid var(--line); background: #111118;
}
@media (min-width: 768px) { .gal-item { margin-bottom: 1rem; } }
.gal-item img { width: 100%; display: block; transition: transform .5s; }
.gal-item:hover img { transform: scale(1.04); }

#lightbox { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(0, 0, 0, .97); touch-action: pan-y; }
#lightbox.open { display: flex; }
#lbImg { max-width: min(96vw, 1500px); max-height: calc(100vh - 8.5rem); max-height: calc(100dvh - 8.5rem); object-fit: contain; border-radius: .5rem; user-select: none; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; transition: .2s;
}
.lb-nav:hover { background: rgba(255, 255, 255, .22); }
.lb-close { position: absolute; top: max(1rem, env(safe-area-inset-top)); left: 0; right: 0; margin-inline: auto; width: max-content; }
.lb-count { position: absolute; bottom: max(1.2rem, env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; font-size: .85rem; color: rgba(255, 255, 255, .6); }

/* ---------- Отзывы ---------- */
.rev { border-radius: 1.4rem; padding: 1.5rem; display: flex; flex-direction: column; gap: .9rem; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--a1), var(--a2)); }
.star-btn { color: rgba(255, 255, 255, .2); transition: .15s; padding: .2rem; border-radius: .6rem; }
.star-btn svg { width: 2.3rem; height: 2.3rem; }
.star-btn.on { color: #fbbf24; transform: scale(1.08); }

/* ---------- Поля форм ---------- */
.inp {
  width: 100%; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 14px;
  padding: .8rem 1rem; color: #fff; outline: none; transition: .2s; font-size: .95rem;
}
.inp::placeholder { color: rgba(255, 255, 255, .3); }
.inp:focus { border-color: var(--a1); box-shadow: 0 0 0 3px rgba(139, 92, 246, .22); }
textarea.inp { resize: vertical; min-height: 6rem; line-height: 1.6; }
.lbl { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: rgba(255, 255, 255, .5); margin-bottom: .45rem; }

/* ---------- Всплывающие сообщения ---------- */
.toasts { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: .5rem; align-items: center; width: min(92vw, 28rem); pointer-events: none; }
.toast { pointer-events: auto; padding: .8rem 1.1rem; border-radius: 1rem; background: #15151f; border: 1px solid var(--line); font-size: .9rem; text-align: center; opacity: 0; transform: translateY(10px); transition: .3s; box-shadow: 0 15px 40px -10px #000; }
.toast.show { opacity: 1; transform: none; }
.toast-ok { border-color: rgba(52, 211, 153, .55); }
.toast-err { border-color: rgba(248, 113, 113, .65); }

/* ---------- Появление при прокрутке ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Админ-панель ---------- */
.tab { padding: .6rem 1.2rem; border-radius: 999px; font-weight: 700; font-size: .88rem; color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .05); border: 1px solid var(--line); transition: .2s; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.tab:hover { background: rgba(255, 255, 255, .1); }
.tab.active { color: #fff; border-color: transparent; background: linear-gradient(90deg, var(--a1), #6366f1); }
.badge { min-width: 1.4rem; padding: 0 .4rem; height: 1.4rem; border-radius: 999px; display: inline-grid; place-items: center; font-size: .72rem; font-weight: 800; background: #f43f5e; color: #fff; }
.dropzone { border: 2px dashed rgba(255, 255, 255, .16); border-radius: 1.2rem; padding: 1.5rem 1rem; text-align: center; transition: .2s; }
.dropzone.drag { border-color: var(--a2); background: rgba(34, 211, 238, .07); }
.progress { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .08); overflow: hidden; margin-top: 1rem; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--a1), var(--a2)); transition: width .2s; }
.thumb { position: relative; border-radius: 1rem; overflow: hidden; aspect-ratio: 1; border: 2px solid transparent; background: #111; cursor: pointer; }
.thumb.sel { border-color: var(--a2); }
.thumb.sel::after { content: "✓"; position: absolute; top: .5rem; left: 0; right: 0; margin-inline: auto; width: 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 50%; background: var(--a2); color: #06222a; font-weight: 800; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .bar { position: absolute; left: 0; right: 0; bottom: 0; padding: .5rem; display: flex; justify-content: center; background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent); }
.cat-sum { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .5rem 1rem; padding: 1.1rem 1.25rem; cursor: pointer; list-style: none; text-align: center; }
.cat-sum::-webkit-details-marker { display: none; }
details[open] > .cat-sum { border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.status { font-size: .72rem; font-weight: 800; padding: .25rem .7rem; border-radius: 999px; }
.status-new { background: rgba(251, 191, 36, .15); color: #fcd34d; }
.status-pub { background: rgba(16, 185, 129, .15); color: #6ee7b7; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .eq span, .pulse-dot { animation: none; }
  * { transition-duration: .01ms !important; }
}
