/* События (редизайн 29.09.2026): раздел /events/, страница события /events/<код>/ и блок на главной.
   Язык — как у страниц вуза и услуг: #272727 текст, #e9423d акцент, #62ba87 / #2f7a4f зелёный,
   светло-зелёные подложки. Серого текста нет. Телефон — events-mobile.css. */

/* ---------- общее ---------- */
.ev-section-title { display: flex; align-items: center; gap: 12px; margin: 0 0 24px; font-size: clamp(24px, 1.2vw + 16px, 32px); font-weight: 600; line-height: 1.2; color: #272727; }
.ev-section-title::before { content: ""; flex: none; width: 4px; height: 1em; border-radius: 2px; background: #62ba87; }
a.ev-link { display: inline-block; margin-top: 20px; font-size: 16px; font-weight: 600; color: #e9423d; text-decoration: none; }
a.ev-link:hover { text-decoration: underline; }

a.ev-btn, .ev-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 14px; border: 1.5px solid transparent;
  font-size: 16px; font-weight: 600; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, color .2s;
}
a.ev-btn--primary { background: #e9423d; color: #fff; }
a.ev-btn--primary:hover { background: #d63530; color: #fff; }
a.ev-btn--ghost { background: #fff; border-color: #272727; color: #272727; }
a.ev-btn--ghost:hover { background: #272727; color: #fff; }
.ev-btn svg { width: 16px; height: 16px; }
a.ev-btn:focus-visible, .ev a:focus-visible { outline: 2px solid #62ba87; outline-offset: 3px; }
.ev-buttons { display: flex; flex-wrap: wrap; gap: 12px; }

.ev-media-empty { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #e3f3ea, #fde8e7); }

/* «календарик» на фото */
.ev-badge {
  position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; align-items: center;
  min-width: 64px; padding: 8px 12px; border-radius: 14px; background: #fff; box-shadow: 0 6px 18px rgba(39, 39, 39, .15);
  text-align: center; line-height: 1;
}
.ev-badge__day { font-size: 24px; font-weight: 700; color: #272727; white-space: nowrap; }
.ev-badge__month { margin-top: 4px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #e9423d; white-space: nowrap; }

/* метки */
.ev-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ev-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.25; }
.ev-chip--live { background: #e9423d; color: #fff; }
.ev-chip--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: ev-pulse 1.6s ease-in-out infinite; }
.ev-chip--soon { background: #fde8e7; color: #b52d28; }
.ev-chip--online { background: #e3f3ea; color: #23703f; }
.ev-chip--offline { background: #fff3dc; color: #8a5a00; }
.ev-chip--org { background: #fff; border: 1px solid #dcebe2; color: #272727; }
.ev-chip--past { background: #f1f3f2; color: #272727; }
@keyframes ev-pulse { 50% { opacity: .35; } }

/* дата / время / место — строками в одной карточке */
.ev-facts { margin: 0; padding: 4px 18px; border-radius: 18px; background: #fff; }
.ev-facts__row { display: grid; grid-template-columns: 120px minmax(0, 1fr); column-gap: 16px; align-items: baseline; padding: 12px 0; }
.ev-facts__row + .ev-facts__row { border-top: 1px solid #e6efe9; }
.ev-facts dt { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #2f7a4f; }
.ev-facts__icon { display: inline-flex; align-self: center; }
.ev-facts dd { margin: 0; font-size: 16px; font-weight: 600; line-height: 1.4; color: #272727; white-space: pre-line; overflow-wrap: anywhere; }

/* ---------- шапка раздела и вкладки ---------- */
.ev-head { margin: 8px 0 40px; }
.ev-head__title { margin: 0 0 16px; font-size: clamp(34px, 2.6vw + 16px, 56px); font-weight: 600; line-height: 1.05; color: #272727; }
.ev-head__lead { max-width: 46em; margin: 0 0 28px; font-size: 18px; font-weight: 500; line-height: 1.55; color: #272727; }
.ev-head__lead p { margin: 0; }
.ev-tabs { display: inline-flex; gap: 4px; padding: 5px; border-radius: 16px; background: #f1f3f2; }
a.ev-tabs__tab {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 12px;
  font-size: 16px; font-weight: 600; color: #272727; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, box-shadow .2s;
}
a.ev-tabs__tab:hover { background: rgba(255, 255, 255, .6); color: #272727; }
a.ev-tabs__tab[aria-current="page"] { background: #fff; color: #2f7a4f; box-shadow: 0 2px 10px rgba(39, 39, 39, .1); }
.ev-tabs__count { min-width: 24px; padding: 2px 8px; border-radius: 999px; background: #e3f3ea; font-size: 13px; font-weight: 700; text-align: center; color: #23703f; }
a.ev-tabs__tab[aria-current="page"] .ev-tabs__count { background: #62ba87; color: #fff; }

/* ---------- главная карточка ближайшего события ---------- */
.ev-showcase { display: grid; gap: 28px; }
.ev-featured {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; align-items: start;
  padding: 20px; border-radius: 28px; background: #f3f9f5;
}
.ev-featured__media { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: 20px; overflow: hidden; background: #e3f3ea; }
.ev-featured__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ev-featured__media:hover img { transform: scale(1.03); }
.ev-featured__body { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; padding: 12px 16px 12px 0; min-width: 0; }
.ev-featured__title { margin: 0; font-size: clamp(24px, 1.2vw + 16px, 34px); font-weight: 600; line-height: 1.2; color: #272727; overflow-wrap: break-word; }
.ev-featured__title a { color: inherit; text-decoration: none; }
.ev-featured__title a:hover { color: #e9423d; }
.ev-featured__desc {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden;
  font-size: 16px; line-height: 1.6; color: #272727;
}
.ev-featured__desc p, .ev-featured__desc ul { margin: 0; }
.ev-featured__desc ul { padding-left: 20px; }
a.ev-more { display: inline-flex; align-items: center; gap: 6px; margin-top: -6px; font-size: 15px; font-weight: 600; color: #e9423d; text-decoration: none; }
a.ev-more svg { width: 16px; height: 16px; transition: transform .2s; }
a.ev-more:hover svg { transform: translateX(3px); }
.ev-featured .ev-facts { align-self: stretch; }

/* ---------- сетка плиток ---------- */
.ev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ev-tile {
  display: flex; flex-direction: column; min-width: 0; border: 1px solid #e6efe9; border-radius: 22px; overflow: hidden;
  background: #fff; color: #272727; text-decoration: none; transition: box-shadow .2s, transform .2s;
}
.ev-tile:hover { box-shadow: 0 14px 34px rgba(39, 39, 39, .1); }
a.ev-tile--past:hover { transform: translateY(-2px); color: #272727; }
.ev-tile__media-link { display: block; }
.ev-tile__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #e3f3ea; }
.ev-tile__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.ev-tile:hover .ev-tile__media img { transform: scale(1.04); }
.ev-tile__body { display: flex; flex-direction: column; gap: 12px; flex: 1; padding: 20px; }
a.ev-tile__link { display: flex; flex-direction: column; gap: 8px; color: #272727; text-decoration: none; }
.ev-tile__date { font-size: 14px; font-weight: 700; color: #2f7a4f; }
.ev-tile__title { font-size: 18px; font-weight: 600; line-height: 1.3; overflow-wrap: break-word; transition: color .2s; }
.ev-tile:hover .ev-tile__title { color: #e9423d; }
.ev-tile__org { font-size: 14px; font-weight: 500; line-height: 1.4; color: #272727; }
.ev-tile .ev-buttons { margin-top: auto; }
.ev-tile .ev-btn { min-height: 46px; padding: 0 20px; font-size: 15px; }

/* ---------- ближайших нет ---------- */
.ev-empty__box { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-bottom: 56px; padding: 32px 36px; border-radius: 24px; background: #f3f9f5; }
.ev-empty__title { flex: 1 1 100%; margin: 0; font-size: 26px; font-weight: 600; line-height: 1.2; color: #272727; }
.ev-empty__box p { flex: 1 1 420px; margin: 0; font-size: 16px; line-height: 1.55; color: #272727; }

/* ---------- архив прошедших ---------- */
.ev-stats { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.ev-stats__item { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-radius: 18px; background: #f3f9f5; }
.ev-stats__value { font-size: 32px; font-weight: 700; line-height: 1; color: #2f7a4f; }
.ev-stats__label { font-size: 15px; font-weight: 500; line-height: 1.35; color: #272727; }
.ev-years { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
a.ev-years__chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: 999px; background: #f1f3f2;
  font-size: 15px; font-weight: 600; color: #272727; text-decoration: none; transition: background .2s, color .2s;
}
a.ev-years__chip:hover { background: #e3f3ea; color: #272727; }
a.ev-years__chip[aria-current="page"] { background: #272727; color: #fff; }
.ev-years__count { font-size: 12px; font-weight: 700; color: #2f7a4f; }
a.ev-years__chip[aria-current="page"] .ev-years__count { color: #8fd3aa; }
.ev-archive__group { margin-top: 40px; }
.ev-archive__year { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font-size: 28px; font-weight: 600; line-height: 1.1; color: #272727; }
.ev-archive__year::before { content: ""; width: 4px; height: 1em; border-radius: 2px; background: #62ba87; }
.ev-archive .pagination { margin-top: 40px; }

/* ---------- призыв ---------- */
.ev-cta { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; margin: 72px 0 24px; padding: 40px 48px; border-radius: 28px; background: #272727; color: #fff; }
.ev-cta__title { margin: 0 0 8px; font-size: clamp(22px, .8vw + 17px, 30px); font-weight: 600; line-height: 1.2; color: #fff; }
.ev-cta__text p { margin: 0; max-width: 36em; font-size: 16px; line-height: 1.5; color: #e8e8e8; }
.ev-cta .ev-btn { flex: none; }

/* ---------- страница события ---------- */
.ev-page__hero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; margin: 8px 0 64px; }
.ev-page__media { position: relative; aspect-ratio: 16 / 10; border-radius: 24px; overflow: hidden; background: #e3f3ea; }
.ev-page__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ev-page__card { display: flex; flex-direction: column; gap: 18px; padding: 28px; border-radius: 24px; background: #f3f9f5; }
.ev-page__title { margin: 0; font-size: clamp(26px, 1.6vw + 16px, 40px); font-weight: 600; line-height: 1.15; color: #272727; overflow-wrap: break-word; }
.ev-page__past { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.ev-page__past p { margin: 0; font-size: 15px; line-height: 1.5; color: #272727; }
/* «О событии» (текст + карточка регистрации справа) — events-prose.css */
.ev-page__others-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.ev-page__others-head .ev-link { margin: 0; }

/* ---------- блок на главной ---------- */
.upcoming-events__body.ev { position: relative; z-index: 1; padding-bottom: 24px; }

/* ---------- планшет ---------- */
@media (max-width: 1199px) {
  .ev-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .ev-featured { gap: 28px; }
  .ev-page__hero { gap: 24px; }
  .ev-page__card { padding: 24px; }
}
@media (max-width: 1022px) {
  .ev-featured { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ev-featured__body { padding: 0 8px 8px; }
  .ev-page__hero { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .ev-chip--live::before { animation: none; }
  .ev-tile, .ev-tile__media img, .ev-featured__media img, a.ev-btn { transition: none; }
}
