/* === Программа мероприятий 2026 ===
   Визуальный язык тизер-лендинга (home-2026.css):
   #5e2ced — фирменный фиолетовый, #fa5f26 — оранжевый акцент,
   --second-family (Coolvetica) — заголовки, --font-family (Inter) — текст.
*/

.ev {
  --ev-brand: #5e2ced;
  --ev-brand-soft: rgba(94, 44, 237, 0.08);
  --ev-border: rgba(94, 44, 237, 0.12);
  --ev-border-strong: rgba(94, 44, 237, 0.35);
  --ev-orange: #fa5f26;
  --ev-text: var(--colors-gray-light-mode-700, #344054);
  --ev-muted: var(--colors-gray-light-mode-500, #667085);
  padding-bottom: 96px;
}

.ev .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Шапка ---------- */

.ev__head {
  padding-top: 64px;
}

.ev__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ev-brand);
}
.ev__eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ev-orange);
  box-shadow: 0 0 0 5px rgba(250, 95, 38, 0.16);
}

.ev__title {
  margin: 20px 0 0;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.05;
  color: var(--ev-text);
}

.ev__lead {
  margin: 16px 0 0;
  max-width: 760px;
  font-family: var(--font-family);
  font-size: 18px;
  line-height: 150%;
  color: var(--ev-muted);
}

/* ---------- Управление: дни, форматы, фильтры ---------- */

.ev__controls {
  margin-top: 40px;
}

/* Дни — по мотивам навигации под hero: рамка-«плитка» на всю ширину */
.ev__days {
  display: grid;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
  gap: 12px;
}

.ev__day {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 20px 24px;
  border: 1px solid var(--ev-border);
  border-radius: 16px;
  background: #fff;
  font-family: var(--font-family);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 220ms ease,
    box-shadow 260ms ease,
    background 220ms ease,
    transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ev__day:hover {
  border-color: var(--ev-border-strong);
  transform: translateY(-2px);
}
.ev__day:focus-visible {
  outline: 2px solid var(--ev-brand);
  outline-offset: 2px;
}

.ev__day_weekday {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ev-muted);
}
.ev__day_date {
  font-family: var(--second-family);
  font-size: 32px;
  line-height: 1.1;
  color: var(--ev-text);
}
.ev__day_count {
  position: absolute;
  top: 18px;
  right: 18px;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ev-brand-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--ev-brand);
}

.ev__day[aria-selected='true'] {
  border-color: var(--ev-brand);
  background: linear-gradient(135deg, #6b34f0 0%, #5e2ced 55%, #4b22c9 100%);
  box-shadow: 0 16px 32px -12px rgba(94, 44, 237, 0.45);
}
.ev__day[aria-selected='true'] .ev__day_weekday {
  color: rgba(255, 255, 255, 0.72);
}
.ev__day[aria-selected='true'] .ev__day_date {
  color: #fff;
}
.ev__day[aria-selected='true'] .ev__day_count {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.ev__day.is-empty:not([aria-selected='true']) {
  opacity: 0.55;
}

/* Форматы — «пилюли» */
.ev__types {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ev__type {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--ev-border);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  color: var(--ev-text);
  cursor: pointer;
  transition:
    border-color 200ms ease,
    background 200ms ease,
    color 200ms ease;
}
.ev__type:hover {
  border-color: var(--ev-border-strong);
}
.ev__type.is-active {
  border-color: var(--ev-brand);
  background: var(--ev-brand-soft);
  color: var(--ev-brand);
}
.ev__type:focus-visible {
  outline: 2px solid var(--ev-brand);
  outline-offset: 2px;
}
.ev__type_dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ev-type-color, var(--ev-brand));
}

/* Цвета форматов: деловая — фиолетовый, образовательная — оранжевый,
   культурная — светло-лиловый */
.ev__type--BUSINESS,
.ev-card--BUSINESS,
.ev-chip--BUSINESS {
  --ev-type-color: #5e2ced;
}
.ev__type--EDUCATIONAL,
.ev-card--EDUCATIONAL,
.ev-chip--EDUCATIONAL {
  --ev-type-color: #fa5f26;
}
.ev__type--ENTERTAINMENT,
.ev-card--ENTERTAINMENT,
.ev-chip--ENTERTAINMENT {
  --ev-type-color: #b692f6;
}

/* Фильтры */
.ev__filters {
  margin-top: 16px;
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.ev__search,
.ev__select {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.ev__search input,
.ev__select select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--ev-border);
  border-radius: 12px;
  background: #fff;
  font-family: var(--font-family);
  font-size: 15px;
  color: var(--ev-text);
  transition:
    border-color 200ms ease,
    box-shadow 200ms ease;
}
.ev__search input {
  padding: 0 16px 0 44px;
}
.ev__search input::placeholder {
  color: var(--colors-gray-light-mode-400, #98a2b3);
}
.ev__search svg {
  position: absolute;
  left: 14px;
  width: 20px;
  height: 20px;
  color: var(--colors-gray-light-mode-400, #98a2b3);
  pointer-events: none;
}

.ev__select select {
  appearance: none;
  padding: 0 40px 0 16px;
  text-overflow: ellipsis;
  cursor: pointer;
}
.ev__select::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -6px;
  border-right: 1.5px solid var(--ev-brand);
  border-bottom: 1.5px solid var(--ev-brand);
  transform: rotate(45deg);
  pointer-events: none;
}
.ev__select select.is-set {
  border-color: var(--ev-brand);
  background: var(--ev-brand-soft);
  color: var(--ev-brand);
  font-weight: 600;
}

.ev__search input:hover,
.ev__select select:hover {
  border-color: var(--ev-border-strong);
}
.ev__search input:focus,
.ev__select select:focus {
  outline: none;
  border-color: var(--ev-brand);
  box-shadow: 0 0 0 4px rgba(94, 44, 237, 0.12);
}

.ev__status {
  margin-top: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 24px;
  font-family: var(--font-family);
  font-size: 14px;
  color: var(--ev-muted);
}
.ev__status b {
  color: var(--ev-text);
}

.ev__reset {
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  color: var(--ev-brand);
  cursor: pointer;
}
.ev__reset:hover {
  text-decoration: underline;
}

/* ---------- Карточки ---------- */

.ev__list {
  margin-top: 20px;
}
.ev__head + .ev__list {
  margin-top: 40px;
}

.ev__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.ev-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 28px 24px;
  border: 1px solid var(--ev-border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  transition:
    border-color 240ms ease,
    box-shadow 280ms ease,
    transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ev-card[hidden] {
  display: none;
}

/* Левая акцент-полоска цвета формата — как у карточек треков на главной */
.ev-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 28px;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: var(--ev-type-color, var(--ev-brand));
  transform: scaleY(0.25);
  transform-origin: top center;
  transition: transform 380ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ev-card::after {
  content: '';
  position: absolute;
  top: -80px;
  right: -80px;
  width: 220px;
  height: 220px;
  background: radial-gradient(closest-side, rgba(94, 44, 237, 0.1), rgba(94, 44, 237, 0));
  opacity: 0;
  transition: opacity 280ms ease;
  pointer-events: none;
}
.ev-card:hover {
  border-color: var(--ev-border-strong);
  box-shadow: 0 16px 32px -10px rgba(94, 44, 237, 0.2);
  transform: translateY(-3px);
}
.ev-card:hover::before {
  transform: scaleY(1);
}
.ev-card:hover::after {
  opacity: 1;
}

.ev-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.ev-card__time {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--second-family);
  font-size: 28px;
  line-height: 1;
  color: var(--ev-brand);
  white-space: nowrap;
}
.ev-card__time span {
  color: rgba(94, 44, 237, 0.45);
}

.ev-card__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.ev-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--colors-gray-light-mode-50, #f9fafb);
  border: 1px solid var(--colors-gray-light-mode-200, #eaecf0);
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  color: var(--ev-text);
  white-space: nowrap;
}
.ev-chip_dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ev-type-color, var(--ev-brand));
}
.ev-chip--sold {
  border-color: rgba(250, 95, 38, 0.3);
  background: rgba(250, 95, 38, 0.08);
  color: #c4410f;
}

.ev-card__block {
  margin-top: 20px;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ev-muted);
}

.ev-card__title {
  margin: 12px 0 0;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 24px;
  line-height: 120%;
  color: var(--ev-text);
}
.ev-card__block + .ev-card__title {
  margin-top: 8px;
}
.ev-card__top + .ev-card__title {
  margin-top: 20px;
}

.ev-card__meta {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.ev-card__meta li {
  display: inline-flex;
  align-items: flex-start;
  gap: 6px;
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 20px;
  color: var(--ev-muted);
}
.ev-card__meta svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  color: var(--ev-brand);
}

.ev-card__desc {
  margin: 16px 0 0;
  font-family: var(--font-family);
  font-size: 14.5px;
  line-height: 150%;
  color: var(--ev-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ev-card__foot {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ev-card__people {
  display: flex;
  align-items: center;
}
.ev-card__people img,
.ev-card__people span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
  background: var(--ev-brand-soft);
}
.ev-card__people > * + * {
  margin-left: -10px;
}
.ev-card__people span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  color: var(--ev-brand);
}

.ev-card__actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
}

/* ---------- Кнопки ---------- */

.ev-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid rgba(94, 44, 237, 0.25);
  border-radius: 12px;
  background: rgba(94, 44, 237, 0.04);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  color: var(--ev-brand);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 200ms ease,
    border-color 200ms ease,
    color 200ms ease,
    transform 200ms ease;
}
.ev-btn:hover {
  background: rgba(94, 44, 237, 0.1);
  border-color: rgba(94, 44, 237, 0.45);
}
.ev-btn:active {
  transform: translateY(1px);
}
.ev-btn:focus-visible {
  outline: 2px solid var(--ev-brand);
  outline-offset: 2px;
}
.ev-btn svg {
  width: 20px;
  height: 20px;
}

.ev-btn--primary {
  border-color: var(--ev-brand);
  background: var(--ev-brand);
  color: #fff;
}
.ev-btn--primary:hover {
  border-color: #4b22c9;
  background: #4b22c9;
}

.ev-btn--icon {
  width: 44px;
  padding: 0;
}

/* ---------- Пустые состояния ---------- */

.ev__empty,
.ev__soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 64px 24px;
  border: 1px dashed var(--ev-border-strong);
  border-radius: 24px;
  background: radial-gradient(
    120% 90% at 50% 0%,
    rgba(94, 44, 237, 0.06) 0%,
    rgba(94, 44, 237, 0) 70%
  );
  text-align: center;
}
.ev__empty[hidden] {
  display: none;
}
.ev__soon {
  border-style: solid;
  border-color: var(--ev-border);
  padding: 88px 24px;
}

.ev__soon_icon {
  width: 64px;
  height: 64px;
  margin-bottom: 24px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ev-brand-soft);
  color: var(--ev-brand);
}
.ev__soon_icon svg {
  width: 30px;
  height: 30px;
}

.ev__empty_title,
.ev__soon_title {
  font-family: var(--second-family);
  font-size: 32px;
  line-height: 1.15;
  color: var(--ev-text);
}
.ev__empty_text,
.ev__soon_text {
  margin: 12px 0 28px;
  max-width: 480px;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 150%;
  color: var(--ev-muted);
}

/* ---------- Модалка ---------- */

.ev-modal {
  /* Глобальный reset в index4.css обнуляет margin — возвращаем центрирование <dialog> */
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(760px, calc(100% - 32px));
  max-height: calc(100% - 48px);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--ev-text);
  box-shadow: 0 32px 64px -16px rgba(12, 10, 46, 0.35);
  overflow: hidden;
}
.ev-modal::backdrop {
  background: rgba(12, 10, 46, 0.55);
  backdrop-filter: blur(4px);
}
.ev-modal[open] {
  animation: ev-modal-in 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
@keyframes ev-modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.ev-modal__inner {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ev-modal__cover {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  background: var(--ev-brand-soft);
}

.ev-modal__body {
  padding: 32px 40px 36px;
}

.ev-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ev-text);
  box-shadow: 0 2px 8px rgba(12, 10, 46, 0.12);
  cursor: pointer;
}
.ev-modal__close:hover {
  color: var(--ev-brand);
}
.ev-modal__close svg {
  width: 20px;
  height: 20px;
}

.ev-modal__when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-right: 48px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 600;
  color: var(--ev-brand);
}

.ev-modal__title {
  margin: 16px 0 0;
  font-family: var(--second-family);
  font-weight: 400;
  font-size: 36px;
  line-height: 1.12;
  color: var(--ev-text);
}

.ev-modal .ev-card__meta {
  margin-top: 16px;
}

.ev-modal__desc {
  margin: 20px 0 0;
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 160%;
  white-space: pre-line;
}

.ev-modal__section {
  margin-top: 32px;
}
.ev-modal__section_title {
  margin-bottom: 16px;
  font-family: var(--font-family);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ev-muted);
}

.ev-people {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ev-person {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--ev-border);
  border-radius: 14px;
}
.ev-person__photo {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ev-brand-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--second-family);
  font-size: 20px;
  color: var(--ev-brand);
}
.ev-person__name {
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ev-text);
}
.ev-person__position {
  margin-top: 4px;
  font-family: var(--font-family);
  font-size: 13px;
  line-height: 1.4;
  color: var(--ev-muted);
}

.ev-files {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ev-modal__actions {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--ev-border);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Адаптив ---------- */

@media screen and (max-width: 1080px) {
  .ev__title {
    font-size: 48px;
  }
  .ev__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ev__search {
    grid-column: 1 / -1;
  }
}

@media screen and (max-width: 860px) {
  .ev__grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 640px) {
  .ev {
    padding-bottom: 64px;
  }
  .ev__head {
    padding-top: 40px;
  }
  .ev__title {
    font-size: 38px;
  }
  .ev__lead {
    font-size: 16px;
  }
  .ev__controls {
    margin-top: 28px;
  }

  /* Дни — горизонтальный скролл вместо сжатия плиток */
  .ev__days {
    grid-auto-columns: minmax(172px, 1fr);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 0 -16px;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }
  .ev__days::-webkit-scrollbar {
    display: none;
  }
  .ev__day {
    padding: 16px 18px;
    scroll-snap-align: start;
  }
  .ev__day_date {
    font-size: 24px;
    white-space: nowrap;
  }
  .ev__day_count {
    top: 14px;
    right: 14px;
  }

  .ev__types {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 20px -16px 0;
    padding: 0 16px 4px;
    scrollbar-width: none;
  }
  .ev__types::-webkit-scrollbar {
    display: none;
  }
  .ev__type {
    flex-shrink: 0;
  }

  .ev__filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .ev__select select {
    font-size: 14px;
    padding: 0 32px 0 12px;
  }
  .ev__select::after {
    right: 14px;
  }
  /* Нечётный последний селект — на всю ширину */
  .ev__select:last-child:nth-child(even) {
    grid-column: 1 / -1;
  }

  .ev-card {
    padding: 22px 20px 20px;
  }
  .ev-card__time {
    font-size: 24px;
  }
  .ev-card__title {
    font-size: 21px;
  }
  .ev-card__foot {
    flex-wrap: wrap;
  }
  .ev-card__actions {
    width: 100%;
  }
  .ev-card__actions .ev-btn--primary {
    flex: 1;
  }

  .ev-modal {
    width: 100%;
    max-width: none;
    max-height: calc(100% - 24px);
    margin: auto 0 0;
    border-radius: 24px 24px 0 0;
  }
  .ev-modal__inner {
    max-height: calc(100vh - 24px);
  }
  .ev-modal__body {
    padding: 24px 20px 28px;
  }
  .ev-modal__title {
    font-size: 28px;
  }
  .ev-people {
    grid-template-columns: 1fr;
  }
  .ev-modal__actions .ev-btn {
    flex: 1;
  }

  .ev__empty_title,
  .ev__soon_title {
    font-size: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ev__day,
  .ev-card,
  .ev-card::before,
  .ev-card::after,
  .ev-btn {
    transition: none;
  }
  .ev-modal[open] {
    animation: none;
  }
}
