/* ==========================================================================
   ЕТАП 0: ГЛОБАЛЬНЫЕ СТИЛИ И НАСТРОЙКИ
   ========================================================================== */

/* Подключение шрифтов */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Space+Grotesk:wght@500;700&display=swap');

/* Переменные */
:root {
    --font-main: 'Inter', sans-serif;
    --font-headings: 'Space Grotesk', sans-serif;

    --color-bg: #111827;
    --color-text: #E5E7EB;
    --color-accent: #34D399;
    --color-secondary: #4B5563;
    --color-surface: #1F2937; /* Для карточек и других поверхностей */

    --container-width: 1140px;
    --container-padding: 20px;
}

/* Базовые стили */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    line-height: 1.2;
    font-weight: 500;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* Контейнер */
.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* ==========================================================================
   ЕТАП 1: ХЕДЕР
   ========================================================================== */
.header {
    padding: 20px 0;
    position: sticky;
    top: 0;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid var(--color-secondary);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-family: var(--font-headings);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 32px;
}

.header__nav-link {
    font-size: 16px;
    color: var(--color-text);
}

.header__nav-link:hover {
    color: var(--color-accent);
}

.header__nav-link--cta {
    background-color: var(--color-accent);
    color: var(--color-bg);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header__nav-link--cta:hover {
    background-color: #6EE7B7; /* Более светлый оттенок акцентного */
    color: var(--color-bg);
}

.header__burger {
    display: none; /* Скрыт на десктопе */
    color: var(--color-text);
}

/* Адаптивность хедера */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* Скрываем навигацию */
    }
    .header__burger {
        display: block; /* Показываем бургер */
    }
}

/* ==========================================================================
   ЕТАП 2: ФУТЕР
   ========================================================================== */
.footer {
    padding: 60px 0;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-secondary);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.footer__column--brand {
    grid-column: span 1;
}

.footer__logo {
    font-family: var(--font-headings);
    font-size: 28px;
    font-weight: 700;
    color: var(--color-text);
    display: block;
    margin-bottom: 16px;
}

.footer__copy {
    font-size: 14px;
    color: var(--color-secondary);
}

.footer__title {
    font-size: 18px;
    margin-bottom: 16px;
    color: var(--color-text);
}

.footer__list li {
    margin-bottom: 12px;
}

.footer__link {
    font-size: 14px;
    color: var(--color-secondary);
}

.footer__link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.footer__address {
    font-size: 14px;
    color: var(--color-secondary);
    font-style: normal;
}

/* Адаптивность футера */
@media (max-width: 992px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer__column--brand {
        grid-row: 4 / 5; /* Перемещаем бренд в конец на мобильных */
    }
}

/* ==========================================================================
   ОБЩИЕ КОМПОНЕНТЫ (КНОПКИ)
   ========================================================================== */
.button {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-headings);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
    background-color: var(--color-accent);
    color: var(--color-bg);
}

.button:hover {
    transform: translateY(-3px);
    background-color: #6EE7B7; /* Светлый оттенок акцентного */
}

/* ==========================================================================
   ЕТАП 3: СЕКЦИЯ HERO
   ========================================================================== */
.hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding: 100px 0;
    overflow: hidden;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero__container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero__content {
    max-width: 750px;
    margin: 0 auto;
}

.hero__title {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero__subtitle {
    font-size: 18px;
    color: var(--color-text);
    max-width: 600px;
    margin: 0 auto 32px;
    opacity: 0.9;
}

/* Адаптивность Hero */
@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
        padding: 80px 0;
    }
    .hero__title {
        font-size: 36px;
    }
    .hero__subtitle {
        font-size: 16px;
    }
}
/* ==========================================================================
   ОБЩИЕ КОМПОНЕНТЫ (ЗАГОЛОВКИ СЕКЦИЙ)
   ========================================================================== */
.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px;
}

.section-header__title {
    font-size: 42px;
    margin-bottom: 16px;
}

.section-header__subtitle {
    font-size: 18px;
    color: var(--color-text);
    opacity: 0.8;
}

@media (max-width: 768px) {
    .section-header__title {
        font-size: 32px;
    }
    .section-header__subtitle {
        font-size: 16px;
    }
}

/* ==========================================================================
   СЕКЦИЯ НАПРАВЛЕНИЯ (#courses)
   ========================================================================== */
.courses {
    padding: 100px 0;
    background-color: var(--color-bg); /* Можно чередовать с --color-surface для контраста */
}

.courses__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.courses__card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-secondary);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.courses__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.courses__card-icon {
    color: var(--color-accent);
    margin-bottom: 20px;
}

.courses__card-icon svg {
    width: 40px;
    height: 40px;
}

.courses__card-title {
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 700;
}

.courses__card-description {
    font-size: 15px;
    color: var(--color-text);
    opacity: 0.8;
    flex-grow: 1; /* Чтобы карточки были одной высоты */
    margin-bottom: 24px;
}

.courses__card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.courses__tag {
    background-color: var(--color-secondary);
    color: var(--color-text);
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 12px;
}

/* ==========================================================================
   СЕКЦИЯ ПРОЦЕСС (#process)
   ========================================================================== */
.process {
    padding: 100px 0;
    background-color: var(--color-surface);
}

.process__timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Центральная линия таймлайна */
.process__timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    height: 100%;
    width: 2px;
    background-color: var(--color-secondary);
}

.process__item {
    padding: 10px 0 40px 70px; /* Отступы для контента */
    position: relative;
}

.process__item:last-child {
    padding-bottom: 0;
}

.process__item-icon {
    position: absolute;
    left: 0;
    top: 10px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--color-surface);
    z-index: 2;
}

.process__item-icon svg {
    width: 20px;
    height: 20px;
}

.process__item-content {
    background-color: var(--color-bg);
    padding: 24px;
    border-radius: 8px;
    border: 1px solid var(--color-secondary);
}

.process__item-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--color-accent);
}

.process__item-description {
    font-size: 16px;
    color: var(--color-text);
    opacity: 0.8;
}

/* Адаптивность таймлайна для десктопов */
@media (min-width: 768px) {
    .process__timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .process__item {
        width: 50%;
        padding: 10px 40px 40px 40px;
    }

    /* Элементы справа */
    .process__item:nth-child(even) {
        left: 50%;
        padding-left: 70px;
    }

    /* Элементы слева */
    .process__item:nth-child(odd) {
        padding-right: 70px;
        text-align: right;
    }

    .process__item-icon {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   СЕКЦИЯ ПРЕПОДАВАТЕЛИ (#mentors)
   ========================================================================== */
.mentors {
    padding: 100px 0;
    background-color: var(--color-bg);
}

.mentors__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.mentors__card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-secondary);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mentors__card-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid var(--color-accent);
    object-fit: cover;
    margin-bottom: 20px;
}

.mentors__card-name {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 4px;
}

.mentors__card-role {
    font-size: 14px;
    color: var(--color-accent);
    margin-bottom: 16px;
}

.mentors__card-bio {
    font-size: 15px;
    color: var(--color-text);
    opacity: 0.8;
    flex-grow: 1;
    margin-bottom: 20px;
}

.mentors__card-socials {
    display: flex;
    gap: 16px;
}

.mentors__card-socials a {
    color: var(--color-secondary);
    transition: color 0.3s ease, transform 0.3s ease;
}

.mentors__card-socials a:hover {
    color: var(--color-accent);
    transform: translateY(-2px);
}

/* ==========================================================================
   СЕКЦИЯ ОТЗЫВЫ (#reviews)
   ========================================================================== */
.reviews {
    padding: 100px 0;
    background-color: var(--color-surface);
}

.reviews__slider-wrapper {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.reviews__slider {
    padding-bottom: 60px; /* Место для пагинации */
}

.reviews__card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-secondary);
    border-radius: 12px;
    padding: 32px;
    height: 100%; /* Для одинаковой высоты слайдов */
    display: flex;
    flex-direction: column;
}

.reviews__card-text {
    font-size: 18px;
    font-style: italic;
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 24px;
}

.reviews__author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.reviews__author-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.reviews__author-name {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.reviews__author-course {
    font-size: 14px;
    color: var(--color-secondary);
}

/* Кастомизация Swiper.js */
.reviews__slider-wrapper .swiper-button-next,
.reviews__slider-wrapper .swiper-button-prev {
    color: var(--color-accent);
    top: 50%;
    transform: translateY(-70%); /* Центрируем относительно карточки, а не всей высоты */
}

.reviews__slider-wrapper .swiper-pagination-bullet {
    background-color: var(--color-secondary);
    opacity: 1;
}

.reviews__slider-wrapper .swiper-pagination-bullet-active {
    background-color: var(--color-accent);
}

/* ==========================================================================
   СЕКЦИЯ КОНТАКТЫ (#contact)
   ========================================================================== */
.contact {
    padding: 100px 0;
    background-color: var(--color-bg);
}

.contact__wrapper {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-surface);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--color-secondary);
}

.contact__form-group {
    margin-bottom: 20px;
}

.contact__label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--color-text);
    opacity: 0.8;
}

.contact__input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--color-bg);
    border: 1px solid var(--color-secondary);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.3);
}

.contact__input::placeholder {
    color: var(--color-secondary);
}

/* Кастомный чекбокс */
.contact__form-group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.contact__checkbox-input {
    display: none; /* Скрываем стандартный чекбокс */
}

.contact__checkbox-label {
    font-size: 14px;
    color: var(--color-secondary);
    position: relative;
    padding-left: 30px;
    cursor: pointer;
}

.contact__checkbox-label a {
    color: var(--color-accent);
    text-decoration: underline;
}

.contact__checkbox-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border: 1px solid var(--color-secondary);
    border-radius: 4px;
    background-color: var(--color-bg);
    transition: background-color 0.3s, border-color 0.3s;
}

.contact__checkbox-label::after {
    content: '\2713'; /* Галочка */
    position: absolute;
    left: 4px;
    top: 2px;
    font-size: 16px;
    color: var(--color-bg);
    opacity: 0;
    transition: opacity 0.3s;
}

.contact__checkbox-input:checked + .contact__checkbox-label::before {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.contact__checkbox-input:checked + .contact__checkbox-label::after {
    opacity: 1;
}

.contact__button {
    width: 100%;
    margin-top: 10px;
}

/* Сообщение об успехе */
.contact__success-message {
    display: none; /* Изначально скрыто */
    text-align: center;
    padding: 20px;
}

.contact__success-icon {
    color: var(--color-accent);
    margin-bottom: 16px;
}
.contact__success-icon svg {
    width: 60px;
    height: 60px;
}

.contact__success-title {
    font-size: 24px;
    margin-bottom: 8px;
}
.contact__success-text {
    color: var(--color-text);
    opacity: 0.8;
}

@media(max-width: 576px) {
    .contact__wrapper {
        padding: 20px;
    }
}

/* ==========================================================================
   ЕТАП 5.1: COOKIE POP-UP
   ========================================================================== */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Изначально скрыт за экраном */
    left: 0;
    width: 100%;
    background-color: var(--color-surface);
    padding: 20px;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.2);
    z-index: 200;
    transition: bottom 0.5s ease-in-out;
    border-top: 1px solid var(--color-secondary);
    
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.cookie-popup--show {
    bottom: 0;
}

.cookie-popup__text {
    color: var(--color-text);
    opacity: 0.9;
    font-size: 15px;
}

.cookie-popup__text a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cookie-popup__button {
    padding: 10px 20px;
    flex-shrink: 0; /* Чтобы кнопка не сжималась */
}

@media(max-width: 576px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
    }
}

/* ==========================================================================
   ЕТАП 5.2: СТИЛИ ДЛЯ СТРАНИЦ ПОЛИТИК (privacy.html и т.д.)
   ========================================================================== */
.pages {
    padding: 80px 0;
}

.pages h1 {
    font-size: 42px;
    color: var(--color-accent);
    margin-bottom: 32px;
}

.pages h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pages p {
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--color-text);
    opacity: 0.9;
}

.pages ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 16px;
}

.pages li {
    margin-bottom: 10px;
}

.pages a {
    color: var(--color-accent);
    text-decoration: underline;
}

.pages a:hover {
    text-decoration: none;
}

.pages strong {
    font-weight: 700;
    color: var(--color-text);
}