/*
 * Общие компоненты мероприятий.
 *
 * Bootstrap отвечает за flex/grid utilities, кнопки, Collapse/Accordion
 * и адаптивную основу. Здесь хранится фирменная геометрия TrendPlaner:
 * карточки событий, дата, регистрация, программа, файлы, отзыв и FAQ.
 */

.event-list {
  gap: 16px;
}

.event-card {
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 22px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.event-card:hover,
.event-card:focus-visible {
  border-color: var(--line-2);
  box-shadow: var(--shadow-md);
  color: var(--ink);
  transform: translateY(-1px);
}

.event-card:focus-visible {
  outline: 3px solid var(--accent-tint2);
  outline-offset: 3px;
}

.event-date {
  --event-hue: 264;
  width: 84px;
  height: 84px;
  border-radius: var(--r-md);
  background: hsl(var(--event-hue) 40% 92%);
  text-align: center;
}

.event-date--24 {
  --event-hue: 24;
}

.event-date--200 {
  --event-hue: 200;
}

.event-date--264 {
  --event-hue: 264;
}

.event-date__day {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
}

.event-date__month {
  margin-top: 5px;
  color: var(--ink-2);
  font-size: 12.5px;
  text-transform: lowercase;
}

.event-card__topline,
.event-detail__topline {
  gap: 10px;
}

.event-format {
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
}

.event-status {
  color: var(--positive);
  font-size: 12.5px;
  font-weight: 500;
}

.event-status--muted {
  color: var(--ink-3);
}

.event-card__title {
  margin: 9px 0 7px;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: var(--type-component-title);
  font-weight: 600;
  line-height: 1.2;
}

.event-card__summary {
  max-width: 56ch;
  margin: 0 0 14px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
}

.event-card__footer {
  align-items: center;
  gap: 18px;
}

.event-card__meta {
  gap: 7px;
  color: var(--ink-3);
  font-size: 13.5px;
  white-space: nowrap;
}

.event-card__price {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.event-card__action {
  align-self: center;
  margin-left: 8px;
}

.event-card__button,
.event-registration__button {
  --bs-btn-color: var(--on-accent);
  --bs-btn-bg: var(--accent);
  --bs-btn-border-color: var(--accent);
  --bs-btn-hover-color: var(--on-accent);
  --bs-btn-hover-bg: var(--accent);
  --bs-btn-hover-border-color: var(--accent);
  --bs-btn-active-color: var(--on-accent);
  --bs-btn-active-bg: var(--accent);
  --bs-btn-active-border-color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.event-card__button {
  padding: 9px 16px;
  font-size: 13px;
}

.event-registration,
.event-host {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}

.event-registration {
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.event-registration__price {
  margin-bottom: 18px;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
}

.event-registration__meta {
  gap: 11px;
  margin-bottom: 20px;
}

.event-registration__row {
  gap: 10px;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.4;
}

.event-registration__row svg {
  flex: none;
  margin-top: 1px;
  color: var(--ink-3);
}

.event-registration__button {
  padding: 10px 18px;
  font-size: 14px;
}

.event-registration__note {
  margin: 12px 0 0;
  color: var(--positive);
  font-size: 13px;
  text-align: center;
}

.event-registration__tickets {
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.event-registration__tickets-label {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-ticket {
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.event-ticket--featured {
  border-color: var(--accent-tint2);
  background: var(--accent-tint);
}

.event-ticket__name {
  color: var(--ink);
  font-size: 14.5px;
}

.event-ticket__status {
  color: var(--ink-3);
  font-size: 12.5px;
}

.event-ticket__price {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
}

.event-host {
  gap: 12px;
  padding: 18px 20px;
}

.event-host__mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-head);
  font-size: 22px;
  font-weight: 600;
}

.event-host__label,
.event-host__publication {
  color: var(--ink-3);
  font-size: 12.5px;
}

.event-host__name {
  margin: 2px 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.event-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: 26px 0;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--line);
}

.event-fact {
  gap: 5px;
  padding: 16px 18px;
  background: var(--surface);
}

.event-fact__label {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.event-fact__value {
  color: var(--ink);
  font-size: 15.5px;
}

.event-agenda__row {
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 20px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.event-agenda__row:first-child {
  border-top: 0;
}

.event-agenda__time {
  padding-top: 2px;
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
}

.event-agenda__title {
  margin: 0 0 5px;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: var(--type-subheading);
  font-weight: 600;
  line-height: var(--line-heading);
}

.event-agenda__text {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.5;
}

.event-gallery {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.event-gallery__figure {
  margin: 0;
}

.event-gallery__image {
  --event-hue: 24;
  width: 100%;
  border-radius: var(--media-radius);
  background-color: hsl(var(--event-hue) 16% 82%);
  background-image:
    radial-gradient(110% 90% at 76% 18%, hsl(var(--event-hue) 28% 88% / 0.88), transparent 58%),
    linear-gradient(135deg, hsl(var(--event-hue) 14% 90%), hsl(var(--event-hue) 16% 82%));
}

.event-gallery__image--1 {
  --event-hue: 24;
  aspect-ratio: 4 / 3;
}

.event-gallery__image--2 {
  --event-hue: 78;
  aspect-ratio: 3 / 4;
}

.event-gallery__image--3 {
  --event-hue: 220;
  aspect-ratio: 4 / 3;
}

.event-gallery__image--4 {
  --event-hue: 150;
  aspect-ratio: 1 / 1;
}

.event-gallery__caption {
  margin-top: 7px;
  color: var(--ink-3);
  font-size: 12.5px;
}

.event-files {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.event-testimonial {
  padding: 30px 32px;
  border-radius: var(--r-lg);
  background: var(--surface-2);
}

.event-testimonial__quote {
  margin: 0 0 20px;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: var(--type-quote);
  font-style: italic;
  line-height: var(--line-quote);
}

.event-testimonial__author {
  gap: 12px;
}

.event-testimonial__avatar {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-head);
  font-weight: 600;
}

.event-testimonial__name {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.event-testimonial__role {
  color: var(--ink-3);
  font-size: 12.5px;
}

.event-faq {
  --bs-accordion-bg: transparent;
  --bs-accordion-border-color: var(--line);
  --bs-accordion-btn-color: var(--ink);
  --bs-accordion-btn-bg: transparent;
  --bs-accordion-active-color: var(--ink);
  --bs-accordion-active-bg: transparent;
  --bs-accordion-color: var(--ink-2);
}

.event-faq .accordion-item {
  border-right: 0;
  border-left: 0;
}

.event-faq .accordion-header {
  margin: 0;
  font-size: var(--type-subheading);
  line-height: var(--line-heading);
}

.event-faq .accordion-button {
  padding: 20px 0;
  box-shadow: none;
  font-size: 16px;
  font-weight: 600;
}

.event-faq .accordion-button::after {
  filter: none;
}

.event-faq .accordion-body {
  padding: 0 40px 22px 0;
  color: var(--ink-2);
  font-size: 15.5px;
  line-height: 1.6;
}

html[data-theme="dark"] .event-date,
html[data-theme="dark"] .event-gallery__image {
  background-color: hsl(var(--event-hue) 22% 24%);
  background-image:
    radial-gradient(110% 90% at 76% 18%, hsl(var(--event-hue) 28% 32% / 0.72), transparent 58%),
    linear-gradient(135deg, hsl(var(--event-hue) 18% 28%), hsl(var(--event-hue) 20% 22%));
}

html[data-theme="dark"] .event-faq .accordion-button::after {
  filter: invert(1);
}

@media (max-width: 680px) {
  .event-card {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .event-card__action {
    width: 100%;
    margin-left: 0;
  }

  .event-card__button {
    width: 100%;
  }

  .event-card__footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .event-facts {
    grid-template-columns: 1fr;
  }

  .event-agenda__row {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 14px;
  }

  .event-gallery,
  .event-files {
    grid-template-columns: 1fr 1fr;
  }

  .event-testimonial {
    padding: 24px;
  }
}

@media (max-width: 440px) {
  .event-gallery,
  .event-files {
    grid-template-columns: 1fr;
  }
}
