/* «Афиша выходных»: герой, переключатель выходных, «Событие недели», фильтры, карточки, шторка события. */

/* ---------- Герой ---------- */
.hero { display: flex; flex-direction: column; gap: 14px; margin: 4px 0 18px; }
.hero__text { display: grid; gap: 10px; }
.hero__actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 960px) {
  .hero { flex-direction: row; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; }
  .hero__actions { flex-wrap: nowrap; }
  .hero .display { font-size: 58px; }
}

/* ---------- Переключатель выходных ---------- */
/* Навигация-ссылки (aria-current). На узких экранах прокручивается по горизонтали внутри себя — страница не едет. */
.wsw {
  position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 1fr); gap: 4px;
  padding: 5px; border-radius: 22px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin-bottom: 16px; max-width: 100%;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
}
.wsw::-webkit-scrollbar { display: none; }
.wsw__pill {
  position: absolute; top: 5px; bottom: 5px; left: 0; border-radius: 17px; background: var(--grad-coral);
  box-shadow: 0 8px 22px rgba(255, 107, 87, .35); transition: transform .5s var(--ease-spring), width .4s var(--ease); z-index: 0;
}
.wsw__btn {
  position: relative; z-index: 1; display: flex; flex-direction: column; gap: 1px; padding: 9px 14px; border-radius: 17px;
  text-decoration: none; color: var(--text-2); transition: color .3s; -webkit-tap-highlight-color: transparent; min-width: 0;
  scroll-snap-align: center;
}
.wsw__btn:hover { color: var(--text); }
.wsw__btn.is-on { color: #2A0E12; }
.wsw__label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; opacity: .85; white-space: nowrap; }
.wsw__range { font-family: var(--font-display); font-weight: 700; font-size: 15px; white-space: nowrap; }
.wsw__n { font-size: 12px; font-weight: 700; opacity: .75; white-space: nowrap; }
.wsw__btn--hol .wsw__label::before { content: "🇷🇺 "; letter-spacing: 0; }
.wsw__short { display: none; }
@media (max-width: 640px) {
  .wsw { grid-auto-columns: minmax(118px, 1fr); }
  .wsw--4 { grid-auto-columns: minmax(112px, 1fr); }
  .wsw__btn { padding: 8px 10px; }
  .wsw__full { display: none; }
  .wsw__short { display: inline; }
  .wsw__label { font-size: 11px; letter-spacing: .04em; }
  .wsw__range { white-space: normal; font-size: 13px; line-height: 1.2; min-height: 2.4em; display: flex; align-items: center; }
  .wsw__n { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .wsw { scroll-behavior: auto; } .wsw__pill { transition: none; } }

.holiday { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--r-s); background: linear-gradient(90deg, rgba(88, 178, 240, .14), rgba(255, 107, 87, .12)); border: 1px solid var(--line-2); font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.holiday b { color: var(--text); }
/* чип категории, которого нет при текущих фильтрах */
.chip.chip--zero { opacity: .5; }
.chip.chip--zero:hover { opacity: .8; }
.holiday__i { font-size: 20px; }
.aautonote { margin-bottom: 14px; }

/* ---------- «Событие недели» ---------- */
.afeat { margin-bottom: 18px; }
.featured {
  position: relative; display: grid; grid-template-columns: 1fr; border-radius: var(--r-l); overflow: hidden; text-decoration: none; color: var(--text);
  background: var(--surface); isolation: isolate; box-shadow: var(--shadow);
  animation: slideIn .6s var(--ease) both;
}
.featured::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 2px; z-index: 3; pointer-events: none;
  background: conic-gradient(from var(--ang, 0deg), #F5B947, #FF6B57, #B07CE0, #F5B947);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spinBorder 6s linear infinite;
}
@property --ang { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spinBorder { to { --ang: 360deg; } }
.featured:hover { color: var(--text); }
.featured .cover { aspect-ratio: 2 / 1; }
.featured:hover .cover__svg { transform: scale(1.04); }
.featured .cover__svg { transition: transform .8s var(--ease); }
.featured__glow { position: absolute; inset: auto -20% -60% -20%; height: 80%; background: radial-gradient(closest-side, rgba(245, 185, 71, .25), transparent); z-index: 0; pointer-events: none; }
.featured__body { position: relative; z-index: 1; padding: 16px 18px 18px; display: grid; gap: 6px; }
.featured__badge {
  justify-self: start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
  padding: 5px 11px; border-radius: 999px; background: var(--grad-gold); color: var(--ink);
}
.featured__star { display: inline-block; animation: twinkle 2.4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.3) rotate(20deg); } }
.featured__title { font-size: clamp(20px, 5.4vw, 30px); font-weight: 800; line-height: 1.12; }
.featured__meta { color: var(--text-2); font-weight: 700; font-size: 14px; }
.featured__place { color: var(--muted); font-size: 14px; }
.featured__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.featured__cta { font-weight: 800; color: var(--gold-2); font-size: 14px; }
.featured .dbadge { top: 14px; left: 14px; }
@media (min-width: 760px) {
  .featured { grid-template-columns: 1.15fr 1fr; min-height: 280px; }
  .featured .cover { aspect-ratio: auto; height: 100%; }
  .featured__body { align-content: center; padding: 26px 28px; }
}

/* ---------- Фильтры ---------- */
.fbar { display: grid; gap: 10px; margin-bottom: 8px; }
.fbar__quick { align-items: center; }
.fbar__sel { flex: none; width: auto; min-height: 38px; padding: 6px 34px 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--text-2); background-color: rgba(255, 255, 255, .04); appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23D9CBDD' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
.fbar__sel option { background: var(--bg-2); color: var(--text); }
.fbar__cats .chip[aria-pressed="true"] { background: var(--cat, var(--text)); border-color: var(--cat, var(--text)); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.fbar__cats .chip:first-child[aria-pressed="true"] { background: var(--text); color: var(--ink); text-shadow: none; border-color: var(--text); }
@media (min-width: 960px) {
  .fbar { grid-template-columns: minmax(260px, 340px) 1fr; align-items: center; }
  .fbar__cats { grid-column: 1 / -1; }
}
.acount-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 4px; }
.acount { color: var(--muted); font-size: 14px; font-weight: 700; }
.acount-reset { background: none; border: 0; color: var(--gold-2); font-weight: 800; cursor: pointer; padding: 6px; font-size: 14px; }

/* ---------- Список ---------- */
.alist { display: grid; gap: 6px; }
.alist.is-swap { animation: swapIn .45s var(--ease); }
@keyframes swapIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.agroup { margin-top: 16px; }
.agroup__head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; position: sticky; top: var(--top-h); z-index: 5; padding: 8px 0; background: linear-gradient(var(--bg) 70%, rgba(26, 16, 38, 0)); }
.agroup__title { font-size: 18px; font-weight: 700; }
.agroup__sub { color: var(--muted); font-size: 13px; font-weight: 700; }
.agrid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .agrid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .agrid { grid-template-columns: repeat(3, 1fr); } }
.abanner { display: block; margin: 18px 0 4px; text-decoration: none; color: inherit; }
.abanner:hover { color: inherit; }

/* Карточка события: на телефоне — горизонтальная, шире — вертикальная */
.ecard { display: grid; grid-template-columns: 112px 1fr; min-height: 128px; }
.ecard .cover { aspect-ratio: auto; height: 100%; min-height: 128px; }
.ecard__body { padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ecard__title { font-family: var(--font); font-weight: 800; font-size: 16px; line-height: 1.25; letter-spacing: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ecard__meta { font-size: 13px; font-weight: 800; color: var(--coral-2); }
.ecard__place { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ecard .tags { margin-top: auto; padding-top: 4px; }
.ecard__cat { display: none; }
@media (min-width: 680px) {
  .ecard { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ecard .cover { aspect-ratio: 16 / 8; min-height: 0; height: auto; }
  .ecard__body { padding: 14px 16px 16px; }
  .ecard__cat { display: inline-flex; position: absolute; right: 10px; top: 10px; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: rgba(20, 12, 30, .55); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
}
.ecard:hover .cover__svg { transform: scale(1.06); }
.ecard .cover__svg { transition: transform .6s var(--ease); }

/* бейдж даты на обложке */
.dbadge {
  position: absolute; left: 8px; top: 8px; z-index: 2; display: flex; flex-direction: column; align-items: center; min-width: 48px;
  padding: 5px 7px 6px; border-radius: 14px; background: rgba(255, 246, 236, .94); color: var(--ink); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); line-height: 1;
}
.dbadge__wd { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #8A3B2E; }
.dbadge__d { font-family: var(--font-display); font-size: 22px; font-weight: 800; margin: 2px 0 1px; }
.dbadge__m { font-size: 10px; font-weight: 800; text-transform: uppercase; color: #5B4A66; }
.dbadge--long { background: rgba(245, 185, 71, .95); }

/* блок для организаторов */
.addcta { display: flex; flex-direction: column; gap: 14px; margin-top: 28px; padding: 20px; border-radius: var(--r-l); background: var(--grad-hero); border: 1px solid var(--line-2); }
.addcta h3 { font-size: 20px; margin-bottom: 6px; }
@media (min-width: 760px) { .addcta { flex-direction: row; align-items: center; justify-content: space-between; padding: 26px 30px; } }

/* ---------- Шторка события ---------- */
.esheet { display: grid; gap: 16px; }
.esheet__cover { margin: 0 calc(var(--gutter) * -1); aspect-ratio: 16 / 9; border-radius: 0; }
@media (min-width: 960px) { .esheet__cover { margin: -20px -26px 0; } }
.esheet__cover .dbadge { left: 16px; top: auto; bottom: 14px; transform: scale(1.1); transform-origin: left bottom; }
.esheet__head { display: grid; gap: 8px; }
.esheet__title { font-size: clamp(22px, 6vw, 30px); font-weight: 800; line-height: 1.12; }
.esheet__info { display: grid; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 14px; }
.irow { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.irow:last-child { border-bottom: 0; }
.irow__i { font-size: 20px; width: 26px; text-align: center; flex: none; }
.irow__main { font-weight: 800; }
.irow__sub { color: var(--muted); font-size: 14px; }
.esheet__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.esheet__actions .btn { white-space: normal; text-align: center; line-height: 1.2; }
.esheet__actions:has(> :only-child) { grid-template-columns: 1fr; }
.esheet__desc { display: grid; gap: 10px; color: var(--text-2); }
.esheet__map { height: 210px; }
.esheet__src { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); border-top: 1px solid var(--line); padding-top: 12px; }
.esheet__unv { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.esheet__note { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 14px; }
.esheet__note summary { cursor: pointer; font-weight: 700; color: var(--text-2); }
.esheet__note p { margin-top: 8px; }

@media (prefers-reduced-motion: reduce) {
  .featured::before { animation: none; }
  .featured__star { animation: none; }
  .alist.is-swap { animation: none; }
}
