/* ================= ROOT ================= */
:root {
    --bg: #05070d;
    --card: #0b0f17;
    --accent: #00f5c4;
    --accent2: #00b3ff;
    --text: #ffffff;
    --muted: #8a8f98;
    --brand-green: #13b286;
    --brand-green-light: #41c9ab;
}

html { scroll-behavior: smooth; }

/* ================= RESET ================= */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ================= BASE ================= */
body { background: var(--bg); font-family: 'Inter', sans-serif; color: var(--text); overflow-x: hidden; }
a { text-decoration: none; }

/* ================= LAYOUT ================= */
.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 20px; }
.block { padding: 25px 0; }
.block__title { font-size: 32px; margin-bottom: 30px; font-weight: 800; text-transform: uppercase; }
.title-accent { color: var(--brand-green-light); }

/* ================= BUTTONS ================= */
.btn { border-radius: 12px; padding: 16px 22px; cursor: pointer; transition: all 0.2s ease; font-family: inherit; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: none; position: relative; }
.btn:active { transform: translateY(2px); }
.btn-primary { background: linear-gradient(135deg, #41c9ab, #13b286); color: #fff; border-bottom: 4px solid rgba(0, 0, 0, 0.2); text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 7px 20px rgba(19, 178, 134, 0.4); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: translateY(0); box-shadow: none; }
.btn-dark { background: linear-gradient(180deg, #161b22, #0c1018); color: #fff; border-bottom: 4px solid #000; box-shadow: inset 0 1px 0 rgba(255,255,255,0.05); }
.btn-dark:hover { transform: translateY(-3px); box-shadow: 0 7px 20px rgba(0, 0, 0, 0.5); }
.btn-outline { border: 1px solid var(--brand-green); color: var(--brand-green); background: transparent; }
.btn-outline:hover { background: rgba(19, 178, 134, 0.1); box-shadow: 0 0 15px rgba(19, 178, 134, 0.2); }
.btn__text-group { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.btn__title { font-size: 14px; font-weight: 700; line-height: 1.2; }
.btn__sub { font-size: 11px; font-weight: 400; opacity: 0.8; line-height: 1.2; }

/* ================= HEADER ================= */
.block-header { padding: 15px 0; position: sticky; top: 0; z-index: 100; background: rgba(5, 7, 13, 0.85); backdrop-filter: blur(15px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.header__container { display: flex; justify-content: space-between; align-items: center; }
.header__logo { display: flex; align-items: center; gap: 15px; text-decoration: none; }
.logo-icon { height: 40px; width: auto; }
.header__logo-text { display: flex; flex-direction: column; }
.logo-main { font-weight: 800; font-size: 20px; color: var(--text); line-height: 1.2; }
.logo-sub { font-weight: 600; font-size: 10px; letter-spacing: 2px; color: var(--brand-green-light); }
.header__nav-wrapper { display: flex; align-items: center; }
.header__nav { display: flex; gap: 30px; }
.nav__link { color: var(--muted); font-size: 14px; font-weight: 500; transition: color 0.3s; position: relative; }
.nav__link:hover { color: var(--text); }
.nav__link::after { content: ''; position: absolute; bottom: -5px; left: 0; width: 0; height: 2px; background: var(--brand-green); transition: width 0.3s ease; }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }
.nav__link.active { color: var(--text); }
.mobile-actions { display: none; }
.header__burger { display: none; flex-direction: column; gap: 6px; background: none; border: none; cursor: pointer; padding: 5px; z-index: 110; }
.header__burger span { display: block; width: 25px; height: 2px; background: var(--text); transition: all 0.3s ease; }
.header__burger.active span:nth-child(1) { transform: rotate(45deg) translate(6px, 5px); }
.header__burger.active span:nth-child(2) { opacity: 0; }
.header__burger.active span:nth-child(3) { transform: rotate(-45deg) translate(6px, -5px); }

/* ================= МОДАЛЬНОЕ ОКНО ================= */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); z-index: 200; display: flex; justify-content: center; align-items: center; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content { background: var(--card); padding: 40px; border-radius: 20px; width: 100%; max-width: 400px; position: relative; border: 1px solid rgba(255,255,255,0.1); transform: translateY(-20px); transition: transform 0.3s ease; }
.modal-overlay.active .modal-content { transform: translateY(0); }
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; color: var(--muted); font-size: 28px; cursor: pointer; transition: color 0.3s; z-index: 10; }
.modal-close:hover { color: var(--text); }
.modal-title { margin-bottom: 15px; font-size: 22px; color: var(--text); }
.modal-text { color: var(--muted); font-size: 14px; line-height: 1.6; margin-bottom: 25px; }
.modal-close-btn { width: 100%; padding: 16px; }

/* Модалка Видео */
.modal-video-content { background: #000; border-radius: 12px; width: 90%; max-width: 900px; position: relative; padding: 0; overflow: hidden; border: 1px solid rgba(255,255,255,0.1); transform: translateY(-20px); transition: transform 0.3s ease; }
.modal-overlay.active .modal-video-content { transform: translateY(0); }
.modal-video-close { top: 5px; right: 10px; color: #fff; }
.video-responsive { padding-bottom: 56.25%; height: 0; position: relative; }
.video-responsive iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }

/* Модалка Программы */
.modal-program-content { background: var(--card); padding: 40px; border-radius: 20px; width: 90%; max-width: 600px; position: relative; border: 1px solid rgba(255,255,255,0.1); transform: translateY(-20px); transition: transform 0.3s ease; }
.modal-overlay.active .modal-program-content { transform: translateY(0); }

/* Форма авторизации */
.modal-form { display: flex; flex-direction: column; gap: 15px; }
.modal-input { padding: 15px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: var(--bg); color: var(--text); font-family: inherit; font-size: 16px; outline: none; transition: border-color 0.3s; }
.modal-input:focus { border-color: var(--brand-green); }
.modal-submit { width: 100%; padding: 16px; }

@media (max-width: 900px) {
    .modal-content { max-width: 90%; }
}

/* ================= КНОПКА НАВЕРХ ================= */
.scroll-to-top { position: fixed; bottom: 30px; right: 30px; width: 50px; height: 50px; border-radius: 50%; background: var(--brand-green); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all 0.3s; z-index: 90; box-shadow: 0 4px 15px rgba(19, 178, 134, 0.4); }
.scroll-to-top.visible { opacity: 1; visibility: visible; }
.scroll-to-top:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(19, 178, 134, 0.6); }

/* ================= HERO ================= */
.block-hero { position: relative; background-image: url('bg_hero.jpg'); background-repeat: no-repeat; background-position: right -220px center; background-size: cover; overflow: hidden; }
.block-hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to right, rgba(5, 7, 13, 0.95) 35%, rgba(5, 7, 13, 0.4) 60%); z-index: 1; }
.hero__container { position: relative; z-index: 2; }
.hero__content { max-width: 600px; padding: 40px 0; }
.hero__badge { display: inline-flex; align-items: center; gap: 8px; color: #00a080; border: 1px solid #00a080; border-radius: 20px; padding: 6px 16px; font-size: 12px; font-weight: 600; margin-bottom: 20px; }
.badge-dot { width: 8px; height: 8px; background-color: #00a080; border-radius: 50%; display: inline-block; }
.hero__title { font-size: clamp(32px, 5.5vw, 54px); font-weight: 800; line-height: 1.1; }
.hero__title-accent { color: var(--accent); }
.hero__description { color: var(--muted); margin: 20px 0; }
.hero__buttons { display: flex; gap: 15px; }
.hero__students { display: flex; align-items: center; gap: 15px; margin-top: 30px; }
.students__avatars { display: flex; }
.avatar { width: 40px; height: 40px; border-radius: 50%; margin-left: -10px; border: 2px solid var(--bg); object-fit: cover; background: #222; }
.avatar:first-child { margin-left: 0; }
.students__text { display: flex; flex-direction: column; }
.students__count { font-size: 18px; font-weight: 800; color: var(--brand-green-light); }
.students__word { color: var(--text); font-weight: 600; }
.students__label { font-size: 13px; color: var(--text); margin-top: 2px; }

/* ================= АДАПТИВ ГЕРОЯ И ХЕДЕРА ================= */
@media (max-width: 900px) {
    .block-hero::before { background: rgba(5, 7, 13, 0.85); }
    .hero__content { width: 100%; }
    .hero__title { font-size: clamp(28px, 8vw, 42px); }
    .hero__buttons { flex-direction: column; }
    .hero__buttons .btn { width: 100%; justify-content: center; }
    .hero__buttons .btn__text-group { align-items: center; }
    .block__title { text-align: center; } /* Центрирование заголовков */

    .header__burger { display: flex; }
    .desktop-actions { display: none; }
    .header__nav-wrapper { display: none; } /* Скрываем полностью, чтобы не было багов с наложением */
    .header__nav-wrapper.active { display: flex; position: fixed; top: 0; left: auto; right: 0; width: 300px; height: 100vh; background: var(--card); flex-direction: column; justify-content: center; padding: 40px; border-left: 1px solid rgba(255,255,255,0.05); z-index: 105; }
    .header__nav { flex-direction: column; align-items: center; gap: 30px; margin-bottom: 40px; }
    .nav__link { font-size: 18px; }
    .mobile-actions { display: block; width: 100%; }
    .mobile-actions .login-btn { width: 100%; justify-content: center; }
}

/* ================= STATS ================= */
.block-stats { padding: 30px 10px; }
.stats__container { display: flex; justify-content: space-between; background: var(--card); padding: 30px; border-radius: 20px; border: 1px solid rgba(255,255,255,0.1); }
.stats__item { display: flex; align-items: center; gap: 15px; padding: 0 20px; border-right: 1px solid rgba(255,255,255,0.1); }
.stats__item:last-child { border-right: none; }
.stats__icon { color: var(--brand-green-light); flex-shrink: 0; }
.stats__text { display: flex; flex-direction: column; }
.stats__value { font-size: 18px; font-weight: 400; color: var(--text); line-height: 1.2; text-transform: uppercase; }
.stats__label { font-size: 14px; color: var(--muted); }

@media (max-width: 900px) {
    .stats__container { display: grid; grid-template-columns: repeat(2, 1fr); border-radius: 15px; padding: 0; overflow: hidden; }
    .stats__item { padding: 20px; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }
    .stats__item:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.1); }
    .stats__item:last-child { grid-column: 1 / -1; justify-self: center; width: 50%; border-bottom: none; border-right: none; }
}
@media (max-width: 380px) {
    .stats__item { padding: 20px 10px; }
}

/* ================= WHY ================= */
.why__container { padding: 0 30px; }
.why__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.why__card { background: var(--card); padding: 10px; border-radius: 15px; border: 1px solid rgba(255,255,255,0.1); display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.why__icon { color: var(--brand-green-light); flex-shrink: 0; }
.why__content { flex: 1; min-width: 0; }
.why__title { font-size: 14px; font-weight: 400; color: var(--text); margin-bottom: 5px; line-height: 1.3; }
.why__text { font-size: 14px; color: var(--muted); }
.why__play-btn { width: 100%; display: flex; justify-content: flex-end; background: none; border: none; color: var(--muted); cursor: pointer; transition: color 0.3s, transform 0.3s; padding: 5px 0; }
.why__play-btn:hover { color: var(--brand-green-light); transform: scale(1.1); }

@media (max-width: 900px) { .why__grid { grid-template-columns: 1fr; } }

/* ================= GUIDE & CTA ================= */
.block-guide, .block-cta { position: relative; background-repeat: no-repeat; background-position: center; background-size: cover; overflow: hidden; }
.block-guide { background-image: url('min_block_01.jpg'); }
.block-cta { background-image: url('min_block_02.jpg'); margin-top: 50px; }
.block-guide::before, .block-cta::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: linear-gradient(to bottom, rgba(5, 7, 13, 0.85) 0%, rgba(5, 7, 13, 0.75) 35%, rgba(5, 7, 13, 0.75) 65%, rgba(5, 7, 13, 0.95) 100%); z-index: 1; }
.guide__container, .cta__container { position: relative; z-index: 2; padding: 80px 20px; }
.guide__text { color: var(--text); margin-bottom: 25px; font-size: 16px; line-height: 1.5; }
.guide__form { display: flex; flex-direction: column; gap: 15px; }
.guide__input-row { display: flex; gap: 15px; align-items: center; }
.guide__input { padding: 16px 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); background: var(--card); color: var(--text); font-family: inherit; font-size: 16px; outline: none; flex: 1; transition: border-color 0.3s; } /* 16px против зума */
.guide__input:focus { border-color: var(--brand-green); }
.guide__btn { white-space: nowrap; }
.guide__gift-icon { color: var(--brand-green-light); flex-shrink: 0; border: 2px solid var(--brand-green-light); border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; }
.guide__checkbox-row { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.guide__checkbox-row a { color: var(--brand-green-light); text-decoration: underline; }
.guide__checkbox-row input[type="checkbox"] { accent-color: var(--brand-green); width: 16px; height: 16px; cursor: pointer; }
.guide__message { color: var(--brand-green-light); font-size: 14px; font-weight: 600; display: none; }
.guide__message.active { display: block; }
.cta__container { text-align: center; }
.cta__subtitle { color: var(--text); font-size: 18px; margin-bottom: 30px; }

@media (max-width: 900px) {
    .guide__input-row { flex-direction: column; }
    .guide__input, .guide__btn { width: 100%; }
}

/* ================= PROGRAMS ================= */
.programs__subtitle { color: var(--muted); font-size: 18px; margin-top: -20px; margin-bottom: 40px; }
.programs__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.program__card { background: var(--card); border-radius: 15px; border: 1px solid rgba(255,255,255,0.1); overflow: hidden; display: flex; flex-direction: column; }
.program__top { 
    position: relative; 
    padding: 25px; 
    background-size: cover; 
    background-position: center; 
    flex-grow: 1; 
    background-color: rgba(11, 15, 23, 0.4); /* Полупрозрачный фон если нет картинки */
}
.program__top::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: rgba(11, 15, 23, 0.92); z-index: 0; }
.program__top > * { position: relative; z-index: 1; }
.program__tag { font-size: 24px; font-weight: 800; background: linear-gradient(135deg, #41c9ab, #13b286); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 10px; }
.program__title { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.program__desc { font-size: 14px; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }
.program__features { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.program__features li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.program__features svg { color: var(--brand-green-light); flex-shrink: 0; }
.program__divider { border-bottom: 1px solid rgba(255,255,255,0.1); margin: 0 25px; }
.program__bottom { display: flex; justify-content: space-between; align-items: center; padding: 20px 25px; }
.program__price { font-size: 22px; font-weight: 700; color: var(--text); }
.program__btn { padding: 10px 20px; font-size: 14px; }

@media (max-width: 900px) { .programs__grid { grid-template-columns: 1fr; } }

/* ================= RESULTS ================= */
.container.results__container { width: 80%; margin-top: 50px; }
.results__subtitle { color: var(--muted); margin-top: -20px; margin-bottom: 40px; font-size: 16px; }
.results__stats { display: flex; justify-content: space-between; gap: 20px; }
.results__item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.results__value { font-size: 33px; font-weight: 800; color: var(--brand-green-light); line-height: 1.2; }
.results__label { font-size: 16px; color: var(--text); margin-top: 5px; font-weight: 400; }

@media (max-width: 900px) {
    .results__stats { flex-wrap: nowrap; }
    .results__value { font-size: 18px; }
    .results__label { font-size: 11px; }
    .container.results__container { width: 100%; }
    .results__subtitle { text-align: center; }
}

/* ================= QUESTIONS ================= */
.block-questions { margin-top: 60px; border-top: 1px solid rgba(255,255,255,0.05); border-bottom: 1px solid rgba(255,255,255,0.05); }
.questions__container { text-align: center; display: flex; flex-direction: column; align-items: center; }
.questions__subtitle { color: var(--muted); font-size: 18px; margin-top: -20px; margin-bottom: 30px; }

/* ================= FOOTER ================= */
.block-footer { padding: 40px 0 20px; background-color: var(--card); border-top: 1px solid rgba(255,255,255,0.05); }
.footer__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.footer__socials { display: flex; gap: 20px; }
.social-link { color: var(--muted); transition: color 0.3s, transform 0.3s; }
.social-link:hover { color: var(--brand-green-light); transform: translateY(-3px); }
.footer__nav { display: flex; gap: 30px; }
.footer__link { color: #e0e0e0; font-size: 14px; font-weight: 500; transition: color 0.3s; }
.footer__link:hover { color: var(--brand-green-light); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.footer__bottom a { color: var(--muted); transition: color 0.3s; }
.footer__bottom a:hover { color: var(--text); }

@media (max-width: 900px) {
    .footer__nav { display: none; } /* Скрываем меню в мобилке */
    .footer__bottom { flex-direction: column; gap: 10px; text-align: center; }
}

/* Авторизация */
.modal-register-btn { width: 100%; margin-top: 10px; text-decoration: none; }
.auth-message { font-size: 14px; margin-top: 15px; font-weight: 600; min-height: 20px; }
.auth-message.error { color: #ff4d4d; }
.auth-message.success { color: var(--brand-green-light); }

/* OTP Инпуты */
.otp-inputs { display: flex; gap: 10px; justify-content: center; margin-bottom: 25px; }
.otp-input {
    width: 50px; height: 60px; text-align: center; font-size: 24px; font-weight: 700;
    border-radius: 10px; border: 1px solid rgba(255,255,255,0.1); background: var(--bg);
    color: var(--text); font-family: inherit; outline: none; transition: border-color 0.3s;
}
.otp-input:focus { border-color: var(--brand-green); }

@media (max-width: 900px) {
    .otp-input { width: 45px; height: 50px; font-size: 20px; }
}

/* Кнопки навигации внутри авторизации */
.auth-actions { display: flex; justify-content: space-between; margin-top: 20px; width: 100%; }
.auth-link-btn { background: none; border: none; color: var(--brand-green); cursor: pointer; font-size: 13px; font-family: inherit; transition: opacity 0.3s; }
.auth-link-btn:hover { opacity: 0.8; text-decoration: underline; }
.auth-link-btn:disabled { color: var(--muted); cursor: not-allowed; text-decoration: none; }

/* ================= РЕЖИМ РАЗРАБОТКИ ================= */
.module-wrapper.dev-mode {
    position: relative;
    outline: 2px dashed rgba(255, 165, 0, 0.4);
    outline-offset: -2px;
}

.module-wrapper.dev-mode:hover {
    outline-color: rgba(255, 165, 0, 0.8);
}

.dev-banner {
    position: absolute;
    top: 15px;ч
    right: -35px;
    background: #ff9800;
    color: #000;
    padding: 5px 40px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    transform: rotate(45deg);
    z-index: 50;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    letter-spacing: 1px;
    pointer-events: none;
}

/* Стили для HTML контента из базы внутри карточки */
.program__desc-html p {
    color: var(--muted);
    margin-bottom: 15px;
    font-size: 14px;
}
.program__desc-html ul.program__features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.program__desc-html ul.program__features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text);
}
.program__desc-html ul.program__features svg {
    color: var(--brand-green-light);
    flex-shrink: 0;
}

/* Стили для полного описания курса в модалке */
.modal-text-full {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 25px;
}
.modal-text-full p {
    margin-bottom: 15px;
}