/* ==========================================================================
   КУЛЬТУРНЫЙ ЦЕНТР — ГЛАВНАЯ, КОНТАКТЫ, ФОРМА
   --------------------------------------------------------------------------
   Блоки собираются компонентом «Блоки страницы». Сетка та же, что и в
   каталогах: контейнер 1200, три колонки по 384 с зазором 24.
   ========================================================================== */

/* ------------------------------------------------------ общий ритм блоков */

.block { padding-block: var(--space-16); }
.block:first-child { padding-top: var(--space-4); }

/* Заглушка вместо картинки, пока обложка не загружена */
.card__media-empty,
.event__media-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--text-disabled);
  background: var(--bg-muted);
}

/* --------------------------------------------- компактная карточка события */

.event-tile {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-5) var(--space-6);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-default);
  transition: box-shadow .2s ease, transform .2s ease;
}
.event-tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.event-tile__body { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.event-tile__title { font-size: 16px; line-height: 24px; font-weight: 600; }
.event-tile:hover .event-tile__title { color: var(--text-brand); }
.event-tile__meta { font-size: 14px; line-height: 20px; color: var(--text-muted); }

/* --------------------------------------------------- надзаголовок секции */

.section-head__overline {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-brand);
}
.section-head__left { display: flex; flex-direction: column; }

/* =========================================================== первый экран */

.hero { padding-block: var(--space-20) var(--space-24); }

.hero__row {
  display: grid;
  grid-template-columns: minmax(0, 552px) minmax(0, 1fr);
  gap: var(--space-16);
  align-items: start;
}

.hero__overline {
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-brand);
}
/* 552 px — ширина колонки из макета; при 44/52 заголовок укладывается
   в две строки, как в макете (552×104) */
.hero__title {
  margin-top: var(--space-3);
  font-size: 44px;
  line-height: 52px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.hero__subtitle {
  margin-top: var(--space-6);
  max-width: 512px;
  font-size: 18px;
  line-height: 28px;
  color: var(--text-secondary);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-8);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-10);
  margin-top: var(--space-10);
}
.stat { display: flex; flex-direction: column; gap: var(--space-1); }
.stat__value { font-size: 28px; line-height: 32px; font-weight: 700; }
.stat__label { font-size: 14px; line-height: 20px; color: var(--text-muted); }

.hero__media {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-muted);
  aspect-ratio: 584 / 460;
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 1023px) {
  .hero { padding-block: var(--space-10) var(--space-16); }
  .hero__row { grid-template-columns: minmax(0, 1fr); gap: var(--space-10); }
  .hero__title { font-size: 36px; line-height: 44px; }
}
@media (max-width: 639px) {
  .hero__title { font-size: 32px; line-height: 40px; }
  .hero__actions .btn { width: 100%; }
  .hero__stats { gap: var(--space-6); }
}

/* ----------------------------------------------------------- направления */

.tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}
@media (max-width: 1023px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .tiles { grid-template-columns: minmax(0, 1fr); } }

.direction-tile {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-6);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-default);
  transition: box-shadow .2s ease, transform .2s ease;
}
.direction-tile:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.direction-tile__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-2);
  border-radius: var(--radius-md);
  background: var(--bg-brand-subtle);
  color: var(--text-brand);
}
.direction-tile__title { font-size: 20px; line-height: 28px; font-weight: 600; }
.direction-tile__text  { font-size: 14px; line-height: 20px; color: var(--text-secondary); }
.direction-tile__meta  { margin-top: auto; padding-top: var(--space-3);
                         font-size: 14px; line-height: 20px; color: var(--text-muted); }

/* ------------------------------------------------ ближайшее событие (лента) */

.event-featured {
  display: grid;
  grid-template-columns: minmax(0, 584px) minmax(0, 1fr);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--surface-default);
}
.event-featured__media { margin: 0; background: var(--bg-muted); aspect-ratio: 584 / 382; }
.event-featured__media img { width: 100%; height: 100%; object-fit: cover; }
.event-featured__body {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-10);
}
.event-featured__date { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-brand); }
.event-featured__title { font-size: 32px; line-height: 40px; font-weight: 700; letter-spacing: -.01em; }
.event-featured__text { font-size: 16px; line-height: 24px; color: var(--text-secondary); }
.event-featured__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 14px;
  line-height: 20px;
  color: var(--text-muted);
}
.event-featured__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: auto;
  padding-top: var(--space-4);
}

@media (max-width: 1023px) {
  .event-featured { grid-template-columns: minmax(0, 1fr); }
  .event-featured__body { padding: var(--space-6); }
  .event-featured__title { font-size: 24px; line-height: 32px; }
}
@media (max-width: 639px) {
  .event-featured__actions .btn { width: 100%; }
}

/* ---------------------------------------------------------------- контакты */

.contacts-row {
  display: grid;
  grid-template-columns: minmax(0, 480px) minmax(0, 1fr);
  gap: var(--space-16);
  align-items: start;
}
@media (max-width: 1023px) { .contacts-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-10); } }

.contact-list { display: flex; flex-direction: column; gap: var(--space-6); }
.contact { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: var(--space-3); }
.contact__icon { color: var(--text-brand); padding-top: 2px; }
.contact__label { font-size: 14px; line-height: 18px; color: var(--text-muted); }
.contact__value { font-size: 16px; line-height: 24px; color: var(--text-primary); }
.contact__value a:hover { color: var(--text-brand); }

.map-placeholder {
  display: grid;
  place-items: center;
  gap: var(--space-3);
  min-height: 320px;
  border-radius: var(--radius-lg);
  background: var(--bg-muted);
  color: var(--text-muted);
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}
.map-placeholder__icon { color: var(--text-disabled); }

/* ------------------------------------------------------------------- формы */

.form-card {
  padding: var(--space-10);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  background: var(--surface-default);
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-6); }
.form-grid > .field--wide { grid-column: 1 / -1; }
.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  margin-top: var(--space-8);
}
.form-note { font-size: 14px; line-height: 20px; color: var(--text-muted); max-width: 46ch; }

@media (max-width: 767px) {
  .form-card { padding: var(--space-6); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-foot .btn { width: 100%; }
}

/* Состояние после отправки */
.success-panel {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-10);
  border-radius: var(--radius-xl);
  background: var(--bg-brand-subtle);
}
.success-panel__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--bg-default);
  color: var(--text-success);
}
.success-panel__title { font-size: 24px; line-height: 32px; font-weight: 700; }

/* --------------------------------------------------- страница-обёртка формы */

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: var(--space-16);
  align-items: start;
}
@media (max-width: 1023px) { .form-layout { grid-template-columns: minmax(0, 1fr); gap: var(--space-10); } }

/* ------------------------------------------------------------- правовой текст */

.legal { max-width: var(--container-narrow); }
.legal h2 { margin-top: var(--space-10); font-size: 24px; line-height: 32px; font-weight: 600; color: var(--text-primary); }
.legal h2:first-child { margin-top: 0; }
.legal p { margin-top: var(--space-4); font-size: 16px; line-height: 24px; color: var(--text-secondary); }
.legal dl { margin-top: var(--space-6); display: grid; gap: var(--space-5); }
.legal dt { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text-primary); }
.legal dd { margin: var(--space-1) 0 0; font-size: 16px; line-height: 24px; color: var(--text-secondary); }

/* ============================================================== календарь */

.kc-cal { display: flex; flex-direction: column; gap: var(--space-2); }

.kc-cal__week,
.kc-cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: var(--space-2);
}

.kc-cal__dow {
  padding-block: var(--space-2);
  text-align: center;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.kc-cal__day {
  display: grid;
  place-items: center;
  height: 64px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-primary);
}
.kc-cal__day--empty { visibility: hidden; }
.kc-cal__day--event {
  cursor: pointer;
  background: var(--bg-brand-subtle);
  color: var(--text-brand);
  font-weight: 600;
}
.kc-cal__day--event:hover { background: var(--bg-brand); color: var(--text-on-brand); }
.kc-cal__day--today { border-color: var(--border-strong); }
.kc-cal__day--selected { background: var(--bg-brand); color: var(--text-on-brand); font-weight: 600; }

.kc-cal__month { font-size: 20px; line-height: 28px; font-weight: 600; }

/* Сетка календаря не растягивается на всю ширину контейнера: в макете
   она заметно уже, иначе клетки превращаются в широкие полосы. */
.calendar { max-width: 860px; }

.calendar__head {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.calendar__head .kc-cal__month { flex: 1 1 auto; text-align: center; }

.calendar__day {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-8);
}

.kc-cal__item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-4) 0;
  border-top: 1px solid var(--border-default);
}
.kc-cal__item:hover .kc-cal__item-title { color: var(--text-brand); }
.kc-cal__item-time { font-size: 16px; line-height: 24px; font-weight: 600; color: var(--text-brand); }
.kc-cal__item-title { font-size: 16px; line-height: 24px; }
.kc-cal__item-place { font-size: 14px; line-height: 20px; color: var(--text-muted); }
.kc-cal__empty { padding: var(--space-5) 0; color: var(--text-muted); font-size: 14px; }

@media (max-width: 767px) {
  .kc-cal__day { height: 44px; font-size: 14px; }
  .kc-cal__item { grid-template-columns: 56px minmax(0, 1fr); }
  .kc-cal__item-place { grid-column: 2; }
}
