/* Анкета мероприятия (page-templates/event-survey.php) — отдельная страница без шапки сайта */

.es-page {
  --es-red: var(--color-accent, #bb1f11);
  --es-red-dark: #8a1509;
  --es-text: var(--color-text, #111111);
  --es-muted: #6b6b6b;
  --es-line: #e3e3e3;
  --es-pad: clamp(16px, 5vw, 120px);

  margin: 0;
  background: #ffffff;
  color: var(--es-text);
  font-family: var(--font-main);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  padding-top: 0;
}

.es-page *,
.es-page *::before,
.es-page *::after {
  box-sizing: border-box;
}

.es-wrap {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 var(--es-pad);
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Шапка: только логотип */

.es-header {
  border-bottom: 1px solid var(--es-line);
}

.es-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
}

.es-header__partner {
  display: block;
  width: auto;
  max-width: 260px;
  height: 44px;
  object-fit: contain;
}

.es-header__logo {
  display: block;
  width: auto;
  height: 40px;
}

/* Первый экран: текст слева, афиша справа */

.es-main {
  padding: 0 0 96px;
}

.es-hero {
  padding: 56px 0 64px;
}

.es-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: center;
}

.es-hero__inner--text {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1040px;
}

.es-hero__overline {
  margin: 0 0 16px;
  color: var(--es-red);
  font-size: var(--fs-overline);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
}

.es-hero__title {
  margin: 0 0 24px;
  font-family: var(--font-accent);
  font-size: clamp(44px, 5.4vw, 92px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.es-hero__intro {
  margin: 0 0 32px;
  max-width: 36em;
  color: #333333;
  font-size: var(--fs-subtitle);
  line-height: var(--lh-subtitle);
}

.es-hero__meta {
  display: grid;
  gap: 12px;
  margin: 0 0 36px;
  padding: 0;
  list-style: none;
}

.es-hero__meta li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
}

.es-hero__meta svg {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--es-red);
}

.es-hero__cta {
  display: inline-block;
  padding: 18px 40px;
  border-radius: 4px;
  background: var(--es-red);
  color: #ffffff;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s ease;
}

.es-hero__cta:hover {
  background: var(--es-red-dark);
  color: #ffffff;
}

.es-hero__image img {
  display: block;
  width: 100%;
  height: auto;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

/* Ниже: слева о мероприятии, справа анкета */

.es-layout {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 64px;
  align-items: start;
}

.es-layout--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 880px;
}

.es-info {
  display: grid;
  gap: 48px;
}

.es-info__title {
  margin: 0 0 20px;
  font-family: var(--font-accent);
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.es-info__text p {
  margin: 0 0 14px;
  font-size: var(--fs-subtitle);
  line-height: var(--lh-subtitle);
}

.es-info__text p:last-child {
  margin-bottom: 0;
}

.es-questions {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: es-q;
}

.es-questions li {
  position: relative;
  padding: 16px 0 16px 52px;
  border-top: 1px solid var(--es-line);
  font-size: var(--fs-body);
  line-height: 1.45;
  counter-increment: es-q;
}

.es-questions li:last-child {
  border-bottom: 1px solid var(--es-line);
}

.es-questions li::before {
  content: counter(es-q, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 13px;
  color: var(--es-red);
  font-family: var(--font-accent);
  font-size: 26px;
  line-height: 1;
}

.es-speakers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.es-speaker {
  padding: 20px 22px;
  border-top: 3px solid var(--es-red);
  background: #f5f5f5;
}

.es-speaker--moderator {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 1.5px solid var(--es-red);
  border-top-width: 3px;
}

.es-speaker__badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--es-red);
  color: #ffffff;
  font-size: 12px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.es-speaker__name {
  margin: 0 0 6px;
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  line-height: 1.25;
}

.es-speaker__role {
  margin: 0;
  color: #444444;
  font-size: var(--fs-small);
  line-height: 1.45;
}

.es-info__block--accent {
  padding: 28px 32px;
  background: var(--es-red);
  color: #ffffff;
}

.es-info__block--accent .es-info__title {
  margin-bottom: 12px;
  color: #ffffff;
}

/* Карточка анкеты — как форма на «Участникам» */

.es-card {
  padding: clamp(24px, 4vw, 56px);
  background: #f5f5f5;
}

.es-form__title {
  margin: 0 0 16px;
  font-family: var(--font-accent);
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.es-form__lead {
  margin: 0 0 28px;
  padding: 12px 16px;
  border-left: 4px solid var(--es-red);
  background: #ffffff;
  font-size: var(--fs-small);
  line-height: 1.45;
}

.es-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.es-block {
  margin: 0 0 36px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.es-block__title {
  display: flex;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  font-size: var(--fs-h4);
  font-weight: var(--fw-bold);
  line-height: var(--lh-h4);
}

.es-block__num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-top: -2px;
  border-radius: 50%;
  background: var(--es-red);
  color: #ffffff;
  font-size: 15px;
  line-height: 1;
}

.es-block__hint {
  margin: -8px 0 16px;
  color: var(--es-muted);
  font-size: var(--fs-small);
}

/* Поля */

.es-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}

.es-field__label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--fs-small);
  font-weight: var(--fw-medium);
}

.es-req {
  margin-left: 2px;
  color: var(--es-red);
}

.es-input {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--es-red);
  border-radius: 0;
  background: #ffffff;
  color: var(--es-text);
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.es-input::placeholder {
  color: #aaaaaa;
}

.es-input:focus {
  border-color: var(--es-red-dark);
  box-shadow: 0 0 0 3px rgba(187, 31, 17, 0.12);
}

.es-field.is-invalid .es-input {
  border-color: var(--es-red-dark);
  background: #fff6f5;
}

.es-error {
  display: none;
  margin: 6px 0 0;
  color: var(--es-red);
  font-size: 14px;
  line-height: 1.3;
}

.is-invalid > .es-error,
.es-question.is-invalid > .es-error--block {
  display: block;
}

/* Варианты ответа */

.es-options {
  display: grid;
  gap: 10px;
}

.es-option {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 18px;
  border: 1.5px solid transparent;
  background: #ffffff;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.es-option:hover {
  border-color: rgba(187, 31, 17, 0.4);
}

.es-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.es-option__box {
  flex-shrink: 0;
  position: relative;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border: 1.5px solid var(--es-red);
  background: #ffffff;
}

.es-option--radio .es-option__box {
  border-radius: 50%;
}

.es-option input:checked + .es-option__box {
  background: var(--es-red);
}

.es-option--checkbox input:checked + .es-option__box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.es-option--radio input:checked + .es-option__box::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: #ffffff;
}

.es-option input:checked ~ .es-option__text {
  font-weight: var(--fw-medium);
}

.es-option:has(input:checked) {
  border-color: var(--es-red);
}

.es-option input:focus-visible + .es-option__box {
  box-shadow: 0 0 0 3px rgba(187, 31, 17, 0.25);
}

.es-option__text {
  font-size: var(--fs-body);
  line-height: 1.35;
}

.es-other {
  margin: -2px 0 0 54px;
}

/* Согласия */

.es-consents {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.es-consents .es-option {
  padding: 0;
  background: none;
  border: 0;
}

.es-consents .es-option__text {
  color: #444444;
  font-size: var(--fs-small);
}

.es-consents a {
  color: var(--es-text);
  text-decoration: underline;
}

.es-consents a:hover {
  color: var(--es-red);
}

/* Кнопка */

.es-submit {
  position: relative;
  width: 100%;
  padding: 20px 24px;
  border: 0;
  border-radius: 4px;
  background: var(--es-red);
  color: #ffffff;
  font: inherit;
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
}

.es-submit:hover {
  background: var(--es-red-dark);
}

.es-submit[disabled] {
  cursor: progress;
  opacity: 0.75;
}

.es-submit.is-loading .es-submit__text {
  visibility: hidden;
}

.es-submit.is-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: es-spin 0.8s linear infinite;
}

@keyframes es-spin {
  to {
    transform: rotate(360deg);
  }
}

.es-form__error {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 4px solid var(--es-red);
  background: #fff6f5;
  color: var(--es-red-dark);
  font-size: var(--fs-small);
}

.es-form__note {
  margin: 12px 0 0;
  color: var(--es-muted);
  font-size: 14px;
}

/* После отправки */

.es-done {
  padding: 24px 0;
  outline: none;
}

.es-done__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
  color: var(--es-red);
}

.es-done__title {
  margin: 0 0 16px;
  font-family: var(--font-accent);
  font-size: clamp(36px, 3.4vw, 52px);
  font-weight: 400;
  line-height: 1;
  text-transform: uppercase;
}

.es-done__text {
  margin: 0 0 24px;
  max-width: 32em;
  font-size: var(--fs-subtitle);
  line-height: var(--lh-subtitle);
}

.es-again {
  margin-top: 8px;
  padding: 14px 24px;
  border: 1.5px solid var(--es-red);
  border-radius: 4px;
  background: transparent;
  color: var(--es-red);
  font: inherit;
  font-weight: var(--fw-bold);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.es-again:hover {
  background: var(--es-red);
  color: #ffffff;
}

.es-done__meta li {
  padding-left: 14px;
  border-left: 3px solid var(--es-red);
}

/* Подвал */

.es-footer {
  border-top: 1px solid var(--es-line);
}

.es-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
  color: var(--es-muted);
  font-size: 14px;
}

.es-footer a {
  color: var(--es-muted);
}

.es-footer a:hover {
  color: var(--es-red);
}

/* Планшет и мобилка */

@media (prefers-reduced-motion: no-preference) {
  html:has(.es-split.es-page) {
    scroll-behavior: smooth;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:has(.es-split.es-page) {
    scroll-behavior: auto;
  }
}

@media (min-width: 1025px) {
  .es-split .es-main {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
    gap: clamp(32px, 4vw, 64px);
    max-width: 1440px;
    margin-inline: auto;
    padding: 48px var(--es-pad) 96px;
  }

  .es-split .es-main > .es-hero,
  .es-split .es-main > .es-layout {
    position: sticky;
    top: min(calc(var(--wp-admin--admin-bar--height, 0px) + 16px), calc(100vh - var(--es-column-height, 0px) - 16px));
    padding: 0;
  }

  .es-split .es-hero__inner,
  .es-split .es-layout {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }

  .es-split .es-hero__inner {
    padding: 0;
  }

  .es-split .es-hero__title {
    font-size: clamp(44px, 4vw, 64px);
  }
}

@media (max-width: 1024px) {
  .es-hero__inner,
  .es-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .es-hero__image {
    max-width: 520px;
  }
}

@media (max-width: 640px) {
  .es-header .es-wrap {
    min-height: 64px;
  }

  .es-header__logo {
    height: 32px;
  }

  .es-header__partner {
    max-width: 150px;
    height: 32px;
  }

  .es-main {
    padding: 0 0 56px;
  }

  .es-hero {
    padding: 32px 0 40px;
  }

  .es-hero__cta {
    display: block;
    text-align: center;
  }

  .es-speakers {
    grid-template-columns: 1fr;
  }

  .es-info__block--accent {
    padding: 24px 20px;
  }

  .es-grid {
    grid-template-columns: 1fr;
  }

  .es-option {
    padding: 12px 14px;
    gap: 12px;
  }

  .es-other {
    margin-left: 0;
  }

  .es-card {
    margin: 0 calc(var(--es-pad) * -1);
  }
}
