/* ==========================================================================
 * suspended-minute.css — «Подвешенная минута»:
 *   1) баннер-счётчик на главной (.sm-banner);
 *   2) страница /adaptive-flights (префикс .af-).
 * Данные: GET {WP_BASE}/wp-json/landing/v1/suspended-minutes (js/suspended-minute.js).
 * Минута покупается на /checkout/ (mu-plugin twinfly-suspended-minute.php).
 * ========================================================================== */

/* Баннер продолжает «Акцию для именинников»: между ними — обычный зазор карточек,
   а не два полных отступа секций. */
.birthday:has(+ .sm-banner) { padding-bottom: 0; }
.sm-banner {
  background: var(--white);
  padding-top: var(--space-4);
}

.sm-banner__card {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: var(--space-4) var(--space-8);
  padding: var(--space-5) var(--space-6);
  border: 1px solid #F3D2CE;
  border-radius: var(--radius-small);
  background: linear-gradient(100deg, #FFF3F1 0%, #FFFFFF 70%);
}

.sm-banner__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-red);
  color: var(--white);
  flex: none;
}
.sm-banner__icon svg { width: 36px; height: 36px; }

.sm-banner__text { min-width: 0; }

.sm-banner__tag {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--accent-red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.sm-banner .sm-banner__title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 400;
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-heading);
  text-transform: uppercase;
  color: var(--black);
}

.sm-banner__sub {
  margin: 6px 0 0;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--gray-text);
}

/* Счётчик: число + подпись. До ответа API скрыт (hidden). */
.sm-banner__counter {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  min-width: 150px;
}
.sm-banner__counter[hidden] { display: none; }

.sm-banner__num {
  font-family: var(--font-heading);
  font-size: clamp(40px, 2rem + 1.6vw, 60px);
  font-weight: 700;
  line-height: 1;
  color: var(--accent-red);
  font-variant-numeric: tabular-nums;
}
.sm-banner__unit {
  margin-top: 4px;
  font-size: var(--fs-small);
  line-height: 1.3;
  color: var(--black);
}
.sm-banner__donors {
  font-size: 12px;
  line-height: 1.3;
  color: var(--gray-text);
}

.sm-banner__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: var(--touch-min);
  padding: 12px 22px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--accent-red);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: var(--fs-btn);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-fast);
  white-space: nowrap;
  text-decoration: none;
  grid-column: -2; /* всегда у правого края, даже если счётчик скрыт (API недоступен) */
}
.sm-banner__more:hover { background: var(--dark-red); color: var(--white); text-decoration: none; }
.sm-banner__more:focus-visible { outline: 2px solid #2F3F8F; outline-offset: 3px; }

@media (max-width: 991px) {
  .sm-banner__card {
    grid-template-columns: auto 1fr auto;
    gap: var(--space-4) var(--space-5);
  }
  .sm-banner__more { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 575px) {
  .sm-banner__card {
    grid-template-columns: auto 1fr;
    padding: var(--space-5) var(--space-4);
  }
  .sm-banner__icon { width: 48px; height: 48px; align-self: start; }
  .sm-banner__icon svg { width: 30px; height: 30px; }
  .sm-banner__counter {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    text-align: left;
    padding-top: var(--space-3);
    border-top: 1px solid #F3D2CE;
  }
  .sm-banner__donors { flex-basis: 100%; }
}

/* ==========================================================================
 * Страница /adaptive-flights
 * ========================================================================== */
.af-page { background: var(--white); }
/* Шапка прозрачная, а первый экран светлый — белый телефон не виден до прокрутки. */
body:has(.af-page) .header__phone,
body:has(.af-page) .header__phone svg { color: var(--primary-teal); }

/* Заголовок секции по левому краю (вариант .section-head). */
.section-head--left { text-align: left; margin-left: 0; margin-bottom: var(--space-6); }
.section-head--left .section-head__rule { margin-left: 0; }

/* ----- 1. Hero ----- */
.af-hero {
  padding: calc(var(--space-20) + 40px) 0 var(--space-16);
  background: linear-gradient(160deg, #FFF3F1 0%, #FFFFFF 55%);
}
.af-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: var(--space-12);
}
.af-crumbs {
  display: flex;
  gap: 8px;
  margin-bottom: var(--space-4);
  font-size: var(--fs-small);
  color: var(--gray-text);
}
.af-crumbs a { color: var(--gray-text); text-decoration: none; }
.af-crumbs a:hover { color: var(--accent-red); }
.af-hero .af-hero__title {
  margin: var(--space-2) 0 var(--space-4);
  font-family: var(--font-heading);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: var(--lh-heading);
  text-transform: uppercase;
  letter-spacing: var(--tracking-heading);
  color: var(--black);
}
.af-hero__lead {
  margin: 0;
  max-width: 56ch;
  font-size: clamp(16px, 0.95rem + 0.3vw, 19px);
  line-height: 1.55;
  color: #444;
}
.af-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  margin-top: var(--space-6);
}
.af-btn { min-width: 220px; }
.af-link {
  color: var(--primary-teal);
  font-size: var(--fs-base);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.af-link:hover { color: var(--accent-red); }
.af-counter {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-8);
  padding-top: var(--space-5);
  border-top: 1px solid #F3D2CE;
}
.af-counter[hidden] { display: none; }
.af-counter__text { display: flex; flex-direction: column; }
.af-counter .sm-banner__unit { margin-top: 0; font-size: var(--fs-base); }
.af-counter .sm-banner__donors { font-size: var(--fs-small); }
.af-hero__photo { margin: 0; }
.af-hero__photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-hover);
}

/* Значок доверия в первом экране */
.af-hero__badge {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 56ch;
  margin: var(--space-5) 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-small);
  background: var(--white);
  border: 1px solid #CFE6E6;
  color: var(--primary-teal);
  font-size: var(--fs-base);
  line-height: 1.4;
}
.af-hero__badge svg { flex: none; width: 24px; height: 24px; margin-top: -1px; }

/* ----- 2. Что такое ----- */
.af-prose { max-width: 760px; margin: 0 auto; }
.af-prose p {
  margin: 0 0 var(--space-4);
  font-size: clamp(16px, 0.95rem + 0.2vw, 18px);
  line-height: 1.6;
  color: #333;
}
.af-about { padding-bottom: var(--space-8); }

/* ----- 3. Карточки пользы ----- */
.af-benefits { padding-top: var(--space-8); }
.af-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.af-card {
  padding: var(--space-6);
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
  border-top: 3px solid var(--accent-red);
}
.af-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--space-4);
  border-radius: 50%;
  background: #FFF3F1;
  color: var(--accent-red);
}
.af-card__icon svg { width: 26px; height: 26px; }
.af-card .af-card__title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: 700;
  line-height: var(--lh-tight);
  text-transform: none;
  color: var(--black);
}
.af-card p { margin: 0; font-size: var(--fs-base); line-height: 1.5; color: var(--gray-text); }

/* ----- 4. Что известно ----- */
.af-evidence { padding-top: 0; }
.af-evidence__box {
  max-width: 860px;
  margin: 0 auto;
  padding: var(--space-8);
  border-radius: var(--radius-card);
  background: var(--light-teal-2);
}
.af-evidence .af-evidence__title {
  margin: 0 0 var(--space-4);
  font-family: var(--font-heading);
  font-size: var(--fs-h3);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-teal);
}
.af-evidence__box p { margin: 0 0 var(--space-3); font-size: var(--fs-base); line-height: 1.6; color: #2b3b3b; }
.af-evidence__box p:last-child { margin-bottom: 0; font-weight: 700; }
.af-evidence__box a { color: var(--primary-teal); text-decoration: underline; text-underline-offset: 3px; }
.af-evidence__box a:hover { color: var(--accent-red); }

/* ----- 5. Шаги занятия ----- */
.af-how { background: #F7F9F9; }
.af-steps {
  counter-reset: af-step;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--grid-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}
.af-step {
  counter-increment: af-step;
  position: relative;
  padding: var(--space-12) var(--space-5) var(--space-5);
  border-radius: var(--radius-card);
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.af-step::before {
  content: counter(af-step);
  position: absolute;
  top: var(--space-4);
  left: var(--space-5);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-teal);
  color: var(--white);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 18px;
  line-height: 36px;
  text-align: center;
}
.af-step .af-step__title {
  margin: var(--space-3) 0 var(--space-2);
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: 700;
  text-transform: none;
  color: var(--black);
}
.af-step p { margin: 0; font-size: var(--fs-base); line-height: 1.5; color: var(--gray-text); }

/* Блок «Инструкторы с подтверждённой квалификацией» */
.af-qual {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  max-width: 960px;
  margin: 0 auto var(--space-8);
  padding: var(--space-5) var(--space-6);
  border-radius: var(--radius-card);
  background: var(--white);
  border-left: 4px solid var(--primary-teal);
  box-shadow: var(--shadow-card);
}
.af-qual__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--light-teal-2);
  color: var(--primary-teal);
}
.af-qual__icon svg { width: 30px; height: 30px; }
.af-qual .af-qual__title {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: var(--fs-h4);
  font-weight: 700;
  text-transform: none;
  color: var(--black);
}
.af-qual__text p { margin: 0; font-size: var(--fs-base); line-height: 1.5; color: var(--gray-text); }
@media (max-width: 575px) {
  .af-qual { flex-direction: column; align-items: flex-start; padding: var(--space-5) var(--space-4); }
}

/* ----- 6. Подвешенная минута ----- */
.af-sospeso__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-12);
  align-items: center;
}
.af-sospeso__story p { margin: 0 0 var(--space-4); font-size: var(--fs-base); line-height: 1.65; color: #333; }
.af-sospeso__steps {
  counter-reset: af-s;
  margin: 0;
  padding: var(--space-6);
  list-style: none;
  border-radius: var(--radius-card);
  background: #FFF3F1;
  border: 1px solid #F3D2CE;
}
.af-sospeso__steps li {
  counter-increment: af-s;
  position: relative;
  padding: 0 0 var(--space-5) 48px;
  font-size: var(--fs-base);
  line-height: 1.5;
  color: #333;
}
.af-sospeso__steps li:last-child { padding-bottom: 0; }
.af-sospeso__steps li::before {
  content: counter(af-s);
  position: absolute;
  left: 0;
  top: -2px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-red);
  color: var(--white);
  font-weight: 700;
  line-height: 32px;
  text-align: center;
}
.af-sospeso__steps b { display: block; color: var(--black); }

/* ----- 7. Подарить ----- */
.af-donate { padding-top: 0; }
.af-donate__card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-10);
  padding: var(--space-10);
  border-radius: var(--radius-card);
  background: var(--primary-teal);
  color: var(--white);
}
.af-donate .af-donate__title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-heading);
  font-size: var(--fs-h2);
  font-weight: 700;
  text-transform: uppercase;
  line-height: var(--lh-tight);
  color: var(--white);
}
.af-donate__lead { margin: 0 0 var(--space-6); font-size: var(--fs-base); line-height: 1.5; color: rgba(255, 255, 255, 0.9); }
.af-donate__controls { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; }
.af-donate__quick { display: flex; gap: 8px; flex-wrap: wrap; }
.af-chip {
  min-width: 70px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}
.af-chip:hover { background: rgba(255, 255, 255, 0.15); }
.af-chip.is-active { background: var(--white); color: var(--primary-teal); border-color: var(--white); }
.af-stepper { display: flex; }
.af-stepper__btn {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: transparent;
  color: var(--white);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.af-stepper__btn:first-child { border-radius: var(--radius-button) 0 0 var(--radius-button); }
.af-stepper__btn:last-child { border-radius: 0 var(--radius-button) var(--radius-button) 0; }
.af-stepper__btn:hover { background: rgba(255, 255, 255, 0.15); }
.af-stepper__input {
  width: 72px;
  height: 44px;
  margin: 0;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-left: 0;
  border-right: 0;
  border-radius: 0;
  background: var(--white);
  color: var(--black);
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  -moz-appearance: textfield;
}
.af-stepper__input::-webkit-outer-spin-button,
.af-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.af-donate__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  margin-top: var(--space-6);
  padding: 0 28px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--accent-red);
  color: var(--white);
  font-family: var(--font-heading);
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--transition-fast), opacity var(--transition-fast);
}
.af-donate__submit:hover { background: var(--dark-red); }
.af-donate__submit:disabled { opacity: 0.6; cursor: progress; }
.af-donate__sum { padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.5); font-weight: 700; }
.af-donate__error { margin: var(--space-3) 0 0; color: #FFD9D4; font-size: var(--fs-small); }
.af-donate__error[hidden] { display: none; }
.af-chip:focus-visible, .af-stepper__btn:focus-visible, .af-stepper__input:focus-visible, .af-donate__submit:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 2px;
}
.af-donate__side { display: flex; flex-direction: column; gap: var(--space-5); justify-content: center; }
.af-recent { padding: var(--space-5); border-radius: var(--radius-small); background: rgba(255, 255, 255, 0.12); }
.af-recent[hidden] { display: none; }
.af-recent__title {
  margin: 0 0 var(--space-2);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.af-recent__list { margin: 0; padding: 0; list-style: none; }
.af-recent__list li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: var(--fs-base);
}
.af-recent__list li:first-child { border-top: 0; }
.af-recent__list b { white-space: nowrap; }
.af-donate__note { margin: 0; font-size: var(--fs-small); line-height: 1.5; color: rgba(255, 255, 255, 0.85); }

/* ----- 8. FAQ + предупреждение ----- */
.af-warning {
  max-width: 760px;
  margin: var(--space-10) auto 0;
  padding: var(--space-4) var(--space-5);
  border: 2px solid var(--black);
  font-family: var(--font-heading);
  font-size: clamp(16px, 0.95rem + 0.4vw, 20px);
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  color: var(--black);
}

/* ----- Адаптив ----- */
@media (max-width: 1100px) {
  .af-cards, .af-steps { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 991px) {
  .af-hero__grid, .af-sospeso__grid, .af-donate__card { grid-template-columns: 1fr; }
  .af-hero__photo { order: -1; }
  .af-hero { padding-top: calc(var(--space-16) + 40px); }
}
@media (max-width: 575px) {
  .af-cards, .af-steps { grid-template-columns: 1fr; }
  .af-hero__actions .af-btn { width: 100%; }
  .af-donate__card { padding: var(--space-6) var(--space-5); }
  .af-donate__quick { width: 100%; }
  .af-chip { flex: 1; min-width: 0; }
  .af-stepper { width: 100%; }
  .af-stepper__input { flex: 1; }
  .af-donate__submit { width: 100%; }
  .af-evidence__box { padding: var(--space-6) var(--space-5); }
}
