/* Главная страница: общая система секций и блоки, которые есть только на главной.
   Первый экран — в components/hero.css.

   Правила:
   - каждая секция главной — .home-section и тема: --dark (тёмный фон) или --light (бежевый);
   - одинаковые вертикальные отступы у всех секций;
   - соседние секции одной темы разделены тонкой линией;
   - тренер, видео и команда — одна светлая группа без разделителей (--group-start/-mid/-end);
   - заголовки секций — .home-title: один размер, слева, акцентное слово в <span>.
   Файл подключается после styles.css, layout.css и responsive.css и перекрывает их правила для этих блоков. */

/* --- Секции --- */
.home-section {
  padding-block: clamp(64px, 7vw, 104px);
  border-top: 0;
  border-bottom: 0;
}
.home-section--dark { background: var(--bg); color: var(--white); }
.home-section--light { background: var(--bg-alt); color: var(--white); }
.home-section--dark + .home-section--dark { border-top: 0; }
.home-section--light + .home-section--light:not(.home-section--group-end) { border-top: 0; }

.home-section--group-start { padding-bottom: clamp(24px, 3vw, 40px); }
.home-section--group-end { padding-top: clamp(24px, 3vw, 40px); }

/* --- Меню: пункты не переносятся на две строки --- */
.desktop-nav a { white-space: nowrap; }

/* --- Заголовки --- */
.home-section .section-heading { display: block; margin: 0; text-align: left; }
.home-section .home-title {
  margin: 0 0 clamp(28px, 3.4vw, 48px);
  font-size: clamp(40px, 4.4vw, 64px);
  line-height: 1.08;
  letter-spacing: -.035em;
  text-align: left;
  text-wrap: balance;
}
.home-section--dark .home-title span { color: var(--accent); }
.home-section--light .home-title span { color: var(--accent); }

/* --- Направления: карточки с цветом направления --- */
.directions-section [data-kind=mma] { --c: #f0522d; }
.directions-section [data-kind=bjj] { --c: #4c8dff; }
.directions-section [data-kind=boxing] { --c: #e8b23a; }
.directions-section [data-kind=muaythai] { --c: #b37cf5; }
.directions-section [data-kind=crossfit] { --c: #3fc48c; }
.directions-section [data-kind=personal] { --c: #9aa09a; }
.home-section--dark.directions-section,
.home-section--dark.reviews-section { background: var(--bg-alt); }
.home-section--dark.directions-section,
.directions-section + .home-section--dark { border-top: 0; }
.direction-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }

/* Карточка: слева название, возраст, описание и запись, справа фото */
.direction-card {
  position: relative;
  display: flex;
  min-height: 300px;
  overflow: hidden;
  background: var(--panel);
}
.direction-body { display: flex; flex-direction: column; align-items: flex-start; width: 55%; padding: 28px 26px 26px; }
.direction-card h3 { font-size: clamp(28px, 2.6vw, 38px); line-height: 1.08; text-transform: uppercase; letter-spacing: -.01em; }
.direction-card .direction-meta { margin-top: 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.4; color: #cecfcb; }
.direction-text { margin-top: 14px; font-size: 15px; line-height: 1.6; color: #bcbeba; }
.direction-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: auto; padding-top: 22px; }
.direction-cta { position: relative; z-index: 1; flex: none; min-height: 46px; padding: 11px 22px; }
/* Фото занимает правую часть и не влияет на высоту карточки */
.direction-photo { position: absolute; top: 0; right: 0; bottom: 0; width: 45%; height: 100%; object-fit: cover; filter: saturate(.85); transition: transform .5s ease; pointer-events: none; }
/* «Подробнее» ведёт на страницу направления: вся карточка кликабельна, кнопка записи — поверх */
.direction-more { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent); }
.direction-more::after { content: '→'; transition: transform .2s; }
.direction-more::before { content: ''; position: absolute; inset: 0; z-index: 0; }
.direction-card:hover .direction-more::after { transform: translateX(4px); }
.direction-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) {
  .direction-card:hover .direction-photo { transform: scale(1.04); }
}
@media (prefers-reduced-motion: reduce) {
  .direction-photo, .mobile-book { transition: none; }
}

/* --- Контакты --- */
.contact-section .contacts-info .home-title { margin-bottom: 4px; }

/* --- Главный тренер --- */
.head-coach { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.coach-photo { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--panel); }
.coach-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; }
.coach-copy .home-title { margin-bottom: 0; }
.coach-name { margin-top: 24px; font-family: var(--display); font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; line-height: 1.2; }
.coach-text { max-width: 560px; margin-top: 16px; font-size: 17px; line-height: 1.75; color: #bcbeba; }
.coach-facts { display: grid; grid-template-columns: repeat(4, max-content); gap: 20px 40px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); }
.coach-facts strong { display: block; font-family: var(--display); font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; line-height: 1.1; white-space: nowrap; }
.coach-facts strong i { font-style: normal; color: #a4a79d; }
.coach-facts span { display: block; margin-top: 8px; font-size: 13px; line-height: 1.5; color: #a4a79d; }
.coach-more { margin-top: 32px; }

/* --- Видео в октагоне — внутри светлой группы тренера --- */
.team-film--inset { padding-inline: var(--content-gutter, var(--page)); line-height: 0; }
.team-film--inset .team-film-frame { position: relative; background: #090909; }

/* Видео замыкает светлую группу тренера */
.team-film--inset.home-section--group-end { padding-top: 0; }

/* --- Стоимость: пробная отдельно, абонементы — тремя карточками --- */

/* --- Стоимость: как на картинке с прайсом --- */
.home-section--dark.prices-section { position: relative; overflow: hidden; background: radial-gradient(760px 600px at 82% 26%, #2c2719 0%, rgba(24, 24, 24, 0) 66%), var(--bg); }
.prices-top { position: relative; min-height: 600px; }
.prices-copy { position: relative; z-index: 1; }
.home-title.prices-title { font-size: clamp(56px, 8.4vw, 116px); line-height: .98; letter-spacing: -.035em; }
.prices-title span { display: block; }
.prices-photo { position: absolute; inset: -40px -10px -80px auto; width: min(50%, 560px); pointer-events: none; }
.prices-photo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; object-position: right top; -webkit-mask-image: linear-gradient(to bottom, #000 66%, transparent 97%); mask-image: linear-gradient(to bottom, #000 66%, transparent 97%); }
.prices-ghost { position: absolute; top: 24%; right: 0; font-family: var(--display); font-size: clamp(120px, 15vw, 200px); font-weight: 600; line-height: .85; letter-spacing: -.02em; text-align: right; color: transparent; -webkit-text-stroke: 2px #2c2d2b; }
.price-trial { width: min(100%, 520px); margin-top: 44px; padding: 30px 34px 32px; border: 2px solid var(--accent); background: rgba(24, 24, 24, .85); }
.price-trial-name { font-family: var(--body); font-size: 15px; font-weight: 600; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.price-trial-value { display: block; margin-top: 10px; font-family: var(--display); font-size: clamp(72px, 7vw, 96px); font-weight: 600; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.price-trial-note { margin-top: 12px; font-size: 18px; line-height: 1.5; color: #cfd0cb; }
.price-trial-cta { margin-top: 24px; min-height: 54px; padding: 14px 28px; }
.price-group-title { position: relative; z-index: 1; margin: 72px 0 22px; font-family: var(--display); font-size: clamp(30px, 3vw, 40px); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; text-transform: uppercase; }
.price-plans { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.price-plan { display: flex; flex-direction: column; padding: 28px 26px 26px; background: var(--panel); border: 1px solid var(--line); }
.price-plan-name { font-size: 20px; font-weight: 600; line-height: 1.3; color: #e4e4df; }
.price-plan-value { margin-top: 16px; font-family: var(--display); font-size: clamp(48px, 5vw, 66px); font-weight: 600; line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.price-plan-period { margin-top: 8px; font-size: 15px; line-height: 1.5; color: #a4a79d; }
.price-plan.is-accent { background: var(--accent); border-color: var(--accent); color: #131313; }
.price-plan.is-accent .price-plan-name,
.price-plan.is-accent .price-plan-period { color: #131313; }
.price-footnote { position: relative; z-index: 1; margin-top: 24px; font-size: 16px; line-height: 1.6; color: #a4a79d; }

/* --- Отзывы: карточки с Яндекс Карт --- */
.reviews-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; }
.reviews-head .home-title { margin: 0; }
.reviews-text { margin-top: 14px; max-width: 460px; font-size: 17px; line-height: 1.7; color: #bcbeba; }
.reviews-link { flex: none; }
.review-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; }
.review-card { display: flex; flex-direction: column; padding: 28px 28px 26px; background: var(--panel); border: 1px solid var(--line); }
.review-stars { font-size: 18px; letter-spacing: 3px; color: var(--accent); line-height: 1; }
.review-card blockquote { flex: 1; margin: 18px 0 0; font-size: 16px; line-height: 1.7; color: #dcdcd7; }
.review-author { display: flex; flex-direction: column; gap: 2px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.review-author b { font-weight: 600; color: var(--white); }
.review-author span { font-size: 13px; color: #a4a79d; }

/* --- Липкая кнопка записи на телефоне --- */
.mobile-book { display: none; }


/* --- Частые вопросы на тёмном фоне --- */
.start-section .faq-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; border-top: 0; padding-top: 0; }
.start-section .faq-layout > .home-title { margin: 0; }
.start-section.home-section--dark .faq-list,
.start-section.home-section--dark .faq-list details { border-color: var(--line); }
.start-section.home-section--dark .faq-list summary { color: var(--white); }
.start-section.home-section--dark .faq-list details p { color: #bcbeba; }
.start-section.home-section--dark .faq-list a { color: var(--white); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.start-section.home-section--dark .faq-list a:hover { color: var(--accent); }

/* --- Планшет --- */
@media (max-width: 1100px) {
  .direction-grid { grid-template-columns: minmax(0, 1fr); }
  .prices-top { min-height: 0; }
  .prices-photo { width: 40%; inset: -20px -10px -40px auto; }
  .price-trial { width: 58%; }
  .price-plan { padding: 24px 20px 22px; }
  .price-plan-name { font-size: 18px; }
  .price-plan-value { font-size: 44px; }
  .review-card { padding: 24px 22px 22px; }
  .coach-facts { grid-template-columns: repeat(2, max-content); }
}

/* --- Телефон --- */
@media (max-width: 760px) {
  .prices-photo { display: none; }
  .home-title.prices-title { font-size: clamp(52px, 15vw, 72px); }
  .price-trial { width: 100%; margin-top: 28px; padding: 24px 20px; }
  .price-trial-value { font-size: 64px; }
  .price-trial-note { font-size: 16px; }
  .price-trial-cta { width: 100%; }
  .price-group-title { margin-top: 44px; font-size: 28px; }
  .price-plans { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .price-plan { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 16px; padding: 20px; }
  .price-plan-value { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; align-self: center; font-size: 40px; }
  .price-plan-name { font-size: 17px; }
  .price-plan-period { margin-top: 4px; font-size: 14px; }
  .price-footnote { font-size: 14px; }
  .reviews-head { display: block; }
  .reviews-link { width: 100%; margin-top: 24px; }
  .review-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: 28px; }
  .review-card { padding: 22px 20px; }
  .mobile-book { position: fixed; z-index: 40; inset: auto 0 0 0; display: block; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(24, 24, 24, .94); border-top: 1px solid var(--line); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform .25s ease, visibility .25s; }
  .mobile-book .button { width: 100%; min-height: 52px; }
  .mobile-book.is-hidden { transform: translateY(110%); visibility: hidden; }
  body.menu-open .mobile-book { visibility: hidden; transition: none; }
  .home-section { padding-block: 56px; }
  .home-section--group-start { padding-bottom: 24px; }
  .home-section--group-end { padding-top: 24px; }
  .home-section .home-title { font-size: clamp(36px, 10.4vw, 52px); }
  .direction-grid { grid-template-columns: minmax(0, 1fr); }
  .direction-card { flex-direction: column; min-height: 0; }
  .direction-photo { position: static; order: -1; width: 100%; height: auto; aspect-ratio: 16 / 10; }
  .direction-body { width: auto; padding: 20px 18px 22px; }
  .head-coach { grid-template-columns: minmax(0, 1fr); }
  .coach-photo { aspect-ratio: 1; }
  .coach-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
  .coach-facts strong { font-size: clamp(22px, 6.6vw, 28px); white-space: normal; }
}
