:root{
  /* Brand (теплые желтые) */
  --brand-1:#ffd84a;
  --brand-2:#ffefad;
  --brand-3:#fff7d6;

  /* VK-like base */
  --bg:#edeef0;
  --card:#ffffff;
  --text:#2c2d2e;
  --muted:#818c99;
  --border:#dce1e6;

  --primary:#0077ff;
  --primary-hover:#006ae6;

  --danger:#e64646;
  --danger-hover:#d63c3c;

  --radius:12px;
  --shadow:0 1px 0 rgba(0,0,0,.04), 0 2px 12px rgba(0,0,0,.06);

  --container:980px;

  /* topbar */
  --topbar-h:58px;
  --topbar-torn-h:22px; /* больше не используется в layout, можно удалить позже */
}

/ reset */
*{-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  color:var(--text);
  font:14px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;

  background:
    radial-gradient(900px 340px at 50% -80px, rgba(255,216,74,.35), rgba(255,216,74,0) 65%),
    radial-gradient(700px 260px at 85% -60px, rgba(255,239,173,.35), rgba(255,239,173,0) 70%),
    linear-gradient(180deg, var(--brand-3) 0px, var(--bg) 240px, var(--bg) 100%);

  /* место под фиксированную шапку */
  padding-top: calc(var(--topbar-h) + 10px);
}

/* Общий контейнер, чтобы страницы не были "на всю ширину" */
body > *{
  max-width:var(--container);
  margin-left:auto;
  margin-right:auto;
}

/* TOPBAR (фиксированная) */
.topbar{
  position:fixed;
  top:0; left:0; right:0;
  z-index:1000;

  height: var(--topbar-h);
  display:flex;
  align-items:center;

  background: transparent;
  border-bottom: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 24px rgba(0,0,0,.10);
}

/* bg layer */
.topbar::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("/img/bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: .80;
  filter: brightness(1.10) saturate(1.15);
  pointer-events:none;
  z-index:0;
}

/* overlay layer */
.topbar::after{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("/img/overlay.png");
  background-size: cover;
  background-position: center;
  opacity:.10;
  pointer-events:none;
  z-index:0;
}

.topbar__inner{
  position:relative;
  z-index:1;

  width:100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.topbar__brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 140px;
}

.topbar__logo{
  width:34px;
  height:34px;
  border-radius:10px;
  background: rgba(255,255,255,.55);
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}

.topbar__title{
  font-weight:800;
  letter-spacing:.2px;
  color:#1f2a37;
  text-decoration:none;
}

.topbar__nav{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.topbar__nav a{
  color:#1f2a37;
  text-decoration:none;
  padding:8px 10px;
  border-radius:10px;
  border:1px solid transparent;
  background: rgba(255,255,255,.28);
}
.topbar__nav a:hover{
  background: rgba(255,255,255,.45);
  border-color: rgba(0,0,0,.06);
  text-decoration:none;
}

/* page headings */
h1{
  font-size:24px;
  font-weight:700;
  margin:18px 12px 10px;
}
h2,h3{
  margin:14px 12px 10px;
}

/* paragraphs */
p{ margin:10px 12px; }

/* row: используется в ваших html */
.row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:0 12px;
}

/* links */
a{
  color:var(--primary);
  text-decoration:none;
}
a:hover{ text-decoration:underline; }

/* Buttons (универсальные, включая <a class="btn">) */
.btn, a.btn{
  appearance:none;
  -webkit-appearance:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:10px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.72);
  background:rgba(255,255,255,.62);
  color:#18212f;
  text-decoration:none;
  cursor:pointer;
  user-select:none;
  font:inherit;
  line-height:1.2;
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.65),
    0 10px 24px rgba(15,23,42,.14),
    0 2px 6px rgba(15,23,42,.08);
  transition:
    transform .16s ease,
    box-shadow .16s ease,
    background .16s ease,
    border-color .16s ease,
    color .16s ease;
}
.btn:hover, a.btn:hover{
  background:rgba(255,255,255,.78);
  border-color:rgba(255,255,255,.92);
  color:#18212f;
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.82),
    0 14px 30px rgba(15,23,42,.18),
    0 6px 12px rgba(15,23,42,.10);
}
.btn:active, a.btn:active{
  transform:translateY(0);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.55),
    0 6px 14px rgba(15,23,42,.12),
    0 2px 6px rgba(15,23,42,.08);
}

.btn.primary, a.btn.primary{
  background:rgba(255,255,255,.62);
  border-color:rgba(255,255,255,.72);
  color:#18212f;
}
.btn.primary:hover, a.btn.primary:hover{
  background:rgba(255,255,255,.78);
  border-color:rgba(255,255,255,.92);
  color:#18212f;
}

.btn.danger, a.btn.danger{
  background:var(--danger);
  border-color:var(--danger);
  color:#fff;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 8px 20px rgba(230,70,70,.22),
    0 2px 6px rgba(15,23,42,.08);
}
.btn.danger:hover, a.btn.danger:hover{
  background:var(--danger-hover);
  border-color:var(--danger-hover);
  color:#fff;
  text-decoration:none;
}
/* card: блок/пост */
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:12px;
  margin:12px;
  overflow:hidden;
  position:relative;
}

/* легкий декоративный свет на карточ (очень слабо) */
.card::after{
  content:"";
  position:absolute;
  inset:-2px;
  pointer-events;
  opacity:.06;
  background:
    radial-gradient(220px 220px at 92% 10%, rgba(255,216,74,.45), rgba(255,216,74,0) 70%),
    radial-gradient(200px 200px at 8% 0%, rgba(0,119,255,.25), rgba(0,119,255,0) 70%);
}

/* inputs */
input, select, textarea{
  width:auto;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:10px;
  background:#fff;
  color:var(--text);
  outline:none;
}
input:focus, select:focus, textarea:focus{
  border-color: rgba(0,119,255,.55);
  box-shadow: 0 0 0 3px rgba(0,119,255,.12);
}

/* buttons */
button{
  appearance:none;
  border:1px solid var(--border);
  background:#f5f6f8;
  color:var(--text);
  padding:10px 12px;
  border-radius:10px;
  cursor:pointer;
}
button:hover{ background:#eef0f3; }
button:active{ transform: translateY(1px); }

button.primary{
  background:var(--primary);
  border-color:var(--primary);
  color:#fff;
}
button.primary:hover{
  background:var(--primary-hover);
  border-color:var(--primary-hover);
}

button.danger{
  background:var(--danger);
  border-color:var(--danger);
  color:#fff;
}
button.danger:hover{
  background:var(--danger-hover);
  border-color:var(--danger-hover);
}

/* Главная (index): hero + сетка событий */
.hero{
  margin: 12px;
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.08);
  box-shadow: 0 6px 24px rgba(0,0,0,.10);
  overflow: hidden;
  position: relative;
  color:#1f2a37;

  background:
    radial-gradient(circle at 18% 18%, rgba(255,255,255,.35) 0 2px, rgba(255,255,255,0) 3px 18px),
    radial-gradient(circle at 28% 8%, rgba(255,255,255,.18) 0 2px, rgba(255,255,255,0) 3px 20px),
    radial-gradient(circle at 72% 14%, rgba(255,255,255,.22) 0 2px, rgba(255,255,255,0) 3px 20px),
    radial-gradient(900px 320px at 40% 0%, rgba(255,255,255,.55), rgba(255,255,255,0) 70%),
    radial-gradient(800px 280px at 90% 10%, rgba(255,255,255,.35), rgba(255,255,255,0) 75%),
    linear-gradient(180deg, #ffd84a 0%, #ffefad 48%, #ffffff 48%, #ffffff 100%);
}

.hero.hero--no-torn::after{
  display:none;
}

.hero.hero--no-torn::before{
  display:none;
}

.hero.hero--no-torn{
  background: transparent;
}

.hero__bg{
  position:absolute;
  inset:0;
  z-index:0;
  background-image: url("/img/bg.jpg");
  background-size: cover;
  background-position: center;
  opacity: .80;
  filter:   brightness(1.10) saturate(1.15);
  pointer-events:none;
}

.hero__overlay{
  position:absolute;
  inset:0;
  z-index:1;
  background-image: url("/img/overlay.png");
  background-size: cover;
  background-position: center;
  opacity: .24;
  mix-blend-mode: normal;
  pointer-events:none;
}

.hero::after{
  content:"";
  position:absolute;
  left:0; right:0;
  top:48%;
  height: 26px;
  background: #fff;

  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80'%3E%3Cpath d='M0 0H1200V40c-60 0-60 28-120 28s-60-20-120-20-60 26-120 26-60-18-120-18-60 22-120 22-60-24-120-24-60 26-120 26-60-18-120-18-60 22-120 22-60-24-120-24-60 26-120 26S60 54 0 54V0z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;

  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 80'%3E%3Cpath d='M0 0H1200V40c-60 0-60 28-120 28s-60-20-120-20-60 26-120 26-60-18-120-18-60 22-120 22-60-24-120-24-60 26-120 26-60-18-120-18-60 22-120 22-60-24-120-24-60 26-120 26S60 54 0 54V0z' fill='white'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  mask-repeat: no-repeat;

  opacity: .98;
  pointer-events:none;
}

.hero::before{
  content:"";
  position:absolute;
  left:-140px; right:-140px;
  bottom:-160px;
  height: 320px;
  background:
    radial-gradient(220px 160px at 18% 48%, rgba(255,255,255,.98) 0 64%, rgba(255,255,255,0) 66%),
    radial-gradient(260px 180px at 40% 62%, rgba(255,255,255,.96) 0 64%, rgba(255,255,255,0) 66%),
    radial-gradient(240px 170px at 63% 46%, rgba(255,255,255,.97) 0 63%, rgba(255,255,255,0) 65%),
    radial-gradient(280px 200px at 86% 66%, rgba(255,255,255,.95) 0 60%, rgba(255,255,255,0) 62%);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.12));
  pointer-events:none;
  opacity:.98;
}

.hero__inner{
  position:relative;
  z-index:2;
  padding: 22px 18px 96px;
}

.hero__title{
  font-size: 28px;
  font-weight: 900;
  letter-spacing: .2px;
}
.hero__title{ text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.hero__subtitle{ text-shadow: 0 2px 10px rgba(0,0,0,.22); }
.hero__subtitle{
  margin-top:6px;
  color: rgba(31,42,55,.82);
  font-weight: 650;
}

.eventsGrid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 12px 12px;
}
@media (max-width: 720px){
  .eventsGrid{ grid-template-columns: 1fr; }
}

.eventCard{ margin:0; }

/* Фоновая картинка в карточках событий (ярче) */
.eventCard::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("/img/bg.jpg");
  background-size: cover;
  background-position: center;
  opacity:.75;
  filter:  brightness(1.10) saturate(1.15);
  pointer-events:none;
  border-radius: inherit;
  z-index:0;
}
.eventCard > *{
  position:relative;
  z-index:1;
}

.eventCoverWrap{
  width:100%;
  aspect-ratio: 16 / 9;
  border-radius:12px;
  border:1px solid #ddd;
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.eventCover{
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain;
  display:block;
}

.eventTitle{
  font-size:16px;
  font-weight:800;
  line-height:1.25;
}

.eventMeta{
  margin-top:6px;
  color:#000;
  font-size:15px;
  font-weight:600;
  line-height:1.25;
}
.eventMeta .eventWhen{
  font-weight:900;
}
.eventMeta .eventWhere{
  color:#1f2a37;
  font-weight:600;
}

.mt4{ margin-top:4px; }
.mt6{ margin-top:6px; }
.mt8{ margin-top:8px; }
.mt10{ margin-top:10px; }

/* Privacy banner */
.privacyBanner{
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 99999;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  padding: 12px;
  display: none;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.privacyBanner__text{
  color:var(--text);
  max-width: 820px;
  line-height: 1.35;
}
.privacyBanner__text small{ color:var(--muted); }
.privacyBanner__actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}

/* */
img{ max-width:100%; height:auto; }

small{ color:var(--muted); }

code{
  background:#f5f6f8;
  border:1px solid var(--border);
  padding:2px 6px;
  border-radius:8px;
}

/* Главная (home): hero + оранжевые кнопки + инфоблоки */
.hero__inner--home{
  position:relative;
  padding: 20px 18px 22px;
  min-height: 220px;
  display:flex;
  flex-direction:column;
}

.heroActions{
  margin-top: auto;
  gap: 10px;
}

.hero{
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 800;
}

/* Делаем ровно как "btn-warn" из admin-panel, но только для hero */
.btn.heroBtn--orange, a.btn.heroBtn--orange{
  background: linear-gradient(180deg, #ffb546, #ff8a00);
  border-color: #ff8a00;
  color: #fff;
  box-shadow: 0 10px 24px rgba(255,152,0,0.25);
}
.btn.heroBtn--orange:hover, a.btn.heroBtn--orange:hover{
  background: linear-gradient(180deg, #ffb546, #ff8a00);
  border-color: #ff8a00;
}

/* Не даём общему .btn:hover перебивать hero (и не прыгаем) */
.btn.heroBtn:hover, a.btn.heroBtn:hover{
 :none;
}

.infoCard::before{
  content:"";
  position:absolute;
  inset:0;
  background-image: url("/img/bg.jpg");
  background-size: cover;
  background-position: center;
  opacity:.18;
  filter: brightness(.84) saturate(.95);
  pointer-events:none;
  border-radius: inherit;
  z-index:0;
}
.infoCard > *{
  position:relative;
  z-index:1;
}

/* Mobile */
@media (max-width: 640px){
  :root{
    --topbar-h:95px;
    --topbar-torn-h:18px;
  }
  body > *{ max-width:100%; }
  h1{ font-size:22px; }
  .card{ margin:10px; }
  .row{ margin:0 10px; }
  .hero{ margin:10px; }
  .eventsGrid{ margin:0 10px 10px; }
  .topbar__brand{ min-width: auto; }
  .topbar__nav{ gap:8px; }
  .topbar__nav a{ padding:7px 9px; }
}

/* Afisha hero: убрать декоративные слои полностью, чтобы был виден фон как у карточек */
.hero.hero--no-torn::before,
.hero.hero--no-torn::after{
  content: none !important;
  display: none !important;
  opacity: 0 !important;
}
/* Afisha hero: overlay.png как в шапке (легко) */
.hero.hero--no-torn .hero__overlay{
  display: block !important;
  opacity: .10 !important;
}

/* Event page: hero по высоте как раньше (без большого нижнего отступа) */
.eventHero .eventHero__inner{
  padding: 22px 18px 22px;
}

/* Event page: фиксируем высоту hero, чтобы горизонтальная и вертикальная афиша были одинаковые */
.eventHero .eventHero__inner{
  min-height:  366px;
}

/* Safety: never let decorative layers block inputlicks (Safari fix) */
.topbar::before,
.topbar::after,
.hero__bg,
.hero__overlay,
.hero::before,
.hero::after{
  pointer-events: none !important;
}

/* Fix: card декоративный слой не должен блокировать клики по input/button */
.card::after{
  pointer-events: none !important;
  z-index: 0 !important;
}
.card > *{
  position: relative;
  z-index: 1;
}


/* === CTA BUTTONS SYSTEM === */

.cta-orange{
  background: linear-gradient(135deg, #ff8a00, #ff5e00);
  box-shadow: 0 12px 28px rgba(255,120,0,.35);
  color:#18212f !important;
}

.cta-yellow{
  background: linear-gradient(135deg, #ffd84a, #ffefad);
  box-shadow: 0 12px 28px rgba(255,216,74,.35);
  color:#18212f !important;
}

.cta-blue{
  background: linear-gradient(135deg, #4da3ff, #0077ff);
  box-shadow: 0 12px 28px rgba(0,119,255,.35);
  color:#fff !important;
}

.cta-purple{
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  box-shadow: 0 12px 28px rgba(124,58,237,.35);
  color:#fff !important;
}

.cta-green{
  background: linear-gradient(135deg, #34d399, #10b981);
  box-shadow: 0 12px 28px rgba(16,185,129,.35);
  color:#0f172a !important;
}

.cta-orange:hover,
.cta-yellow:hover,
.cta-blue:hover,
.cta-purple:hover,
.cta-green:hover{
  transform: translateY(-2px) scale(1.02);
  filter: brightness(1.05);
}

