/* ==========================================================================
   Global styles & Fonts
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500&family=Poppins:wght@600;700&display=swap');

:root {
    --color-background: #111827;
    --color-surface: #1F2937;
    --color-text-primary: #F9FAFB;
    --color-text-secondary: #9CA3AF;
    --color-accent: #38BDF8;
    --color-border: #374151;

    --font-family-base: 'Inter', sans-serif;
    --font-family-heading: 'Poppins', sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

ul {
    list-style: none;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    z-index: 100;
}

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

.header__logo {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

.header__logo:hover {
    color: var(--color-text-primary);
}

.header__nav-list {
    display: flex;
    gap: 2rem;
}

.header__nav-link {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding-bottom: 0.25rem;
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-accent);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.header__nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

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


/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: 4rem 0;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
}

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

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

.footer__logo {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer__copyright {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
}

.footer__title {
    font-family: var(--font-family-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link,
.footer__address {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
}

.footer__address {
    line-height: 1.5;
}

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

@media (max-width: 576px) {
    .footer__container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .footer {
        padding: 3rem 0;
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: calc(100vh - 81px); /* Высота экрана минус высота хедера */
    display: flex;
    align-items: center;
    padding: 4rem 0;
    overflow: hidden;
}

.hero__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero__content {
    max-width: 750px;
}

.hero__title {
    font-family: var(--font-family-heading);
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--color-text-primary);
}
/* Стили для обертки букв, которые добавит JS */
.hero__title .letter {
    display: inline-block;
    opacity: 0; /* Изначально буквы невидимы */
}

.hero__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
    line-height: 1.7;
}

.hero__cta-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    background-color: var(--color-accent);
    color: var(--color-background);
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero__cta-button:hover {
    color: var(--color-background);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2);
}

.hero__visual {
    display: none; /* На мобильных устройствах визуальный блок скрыт */
    position: relative;
    flex: 1;
}

/* Стили для декоративных элементов */
.hero__deco {
    position: absolute;
    background-color: var(--color-surface);
    border-radius: 12px;
    opacity: 0; /* Изначально невидимы */
}

.hero__deco--1 {
    width: 150px;
    height: 150px;
    top: 10%;
    right: 5%;
    transform: rotate(45deg);
}
.hero__deco--2 {
    width: 80px;
    height: 200px;
    bottom: 20%;
    right: 40%;
    transform: rotate(30deg);
}
.hero__deco--3 {
    width: 250px;
    height: 80px;
    top: 30%;
    left: 0;
    transform: rotate(-20deg);
}

.hero__image-wrapper {
    position: relative;
    z-index: 2;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    opacity: 0;
}

.hero__image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}


/* Адаптивность для Hero */
@media (min-width: 768px) {
    .hero__title {
        font-size: 3rem;
    }
}

@media (min-width: 992px) {
    .hero {
        min-height: 600px;
        padding: 5rem 0;
    }
    .hero__container {
        flex-direction: row;
        text-align: left;
        gap: 3rem;
    }
    .hero__content {
        flex: 1;
        max-width: none;
    }
    .hero__visual {
        display: block;
    }
}

@media (min-width: 1200px) {
    .hero__title {
        font-size: 3.75rem;
    }
}

/* ==========================================================================
   Directions Section
   ========================================================================== */
.directions {
    padding: 5rem 0;
    background-color: var(--color-surface);
}

.directions__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.directions__title {
    font-family: var(--font-family-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.directions__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.directions__grid {
    display: grid;
    gap: 1.5rem;
    /* Адаптивная сетка: минимум 280px, максимум 1fr */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    border-top: 4px solid transparent; /* "Невидимая" граница для анимации */
    transition: transform 0.3s ease, border-top-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    border-top-color: var(--color-accent);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card__icon-wrapper {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-surface);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.card__icon-wrapper svg {
    width: 28px;
    height: 28px;
}

.card__title {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
}

.card__description {
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Растягивает описание, чтобы теги были внизу */
}

.card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.card__tag {
    background-color: var(--color-surface);
    color: var(--color-text-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px; /* "Pill" shape */
    font-size: 0.875rem;
    font-weight: 500;
}

@media (min-width: 768px) {
    .directions {
        padding: 6rem 0;
    }

    .directions__title {
        font-size: 2.75rem;
    }
}

/* ==========================================================================
   Process Section
   ========================================================================== */
.process {
    padding: 5rem 0;
}

.process__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.process__title {
    font-family: var(--font-family-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.process__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.process__timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    padding-left: 2rem; /* Отступ для линии на мобильных */
}

/* Вертикальная линия таймлайна */
.process__timeline::before {
    content: '';
    position: absolute;
    left: 2rem; /* Совпадает с padding-left */
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--color-border);
    transform: translateX(-1px);
}

.timeline__item {
    position: relative;
    margin-bottom: 3rem;
    opacity: 0; /* Начальное состояние для анимации */
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.timeline__item:last-child {
    margin-bottom: 0;
}

/* Класс, который будет добавлять JS для анимации */
.timeline__item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline__point {
    position: absolute;
    left: 2rem; /* Совпадает с padding-left */
    top: 5px;
    width: 16px;
    height: 16px;
    background-color: var(--color-background);
    border: 3px solid var(--color-accent);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline__content {
    padding-left: 2rem;
}

.timeline__step {
    display: inline-block;
    background-color: var(--color-surface);
    color: var(--color-accent);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline__title {
    font-family: var(--font-family-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-text-primary);
}

.timeline__description {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* Адаптивность для таймлайна (десктопная версия) */
@media (min-width: 768px) {
    .process {
        padding: 6rem 0;
    }

    .process__title {
        font-size: 2.75rem;
    }

    .process__timeline {
        padding-left: 0;
    }

    .process__timeline::before {
        left: 50%; /* Линия по центру */
    }

    .timeline__item {
        width: 50%;
        padding-right: 2.5rem; /* Отступ от центральной линии */
        margin-bottom: 0; /* Убираем, т.к. позиционирование будет другим */
    }

    /* Четные элементы справа */
    .timeline__item:nth-child(even) {
        margin-left: 50%;
        padding-left: 2.5rem;
        padding-right: 0;
    }

    .timeline__point {
        left: 50%; /* Точка по центру */
    }

    .timeline__content {
        padding-left: 0;
    }

    /* Анимация появления для десктопа */
    .timeline__item {
        transform: translateX(-30px);
    }
    .timeline__item:nth-child(even) {
        transform: translateX(30px);
    }
    .timeline__item.is-visible {
        transform: translateX(0);
    }
}


/* ==========================================================================
   Mentors Section
   ========================================================================== */
.mentors {
    padding: 5rem 0;
    background-color: var(--color-surface);
}

.mentors__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.mentors__title {
    font-family: var(--font-family-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.mentors__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

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

.mentor-card {
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mentor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.mentor-card__photo-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    border: 4px solid var(--color-surface);
    overflow: hidden;
}

.mentor-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mentor-card__name {
    font-family: var(--font-family-heading);
    font-size: 1.25rem;
    color: var(--color-text-primary);
    margin-bottom: 0.25rem;
}

.mentor-card__role {
    color: var(--color-accent);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.mentor-card__socials {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.mentor-card__social-link {
    color: var(--color-text-secondary);
}

.mentor-card__social-link:hover {
    color: var(--color-accent);
    transform: scale(1.1);
}

/* ==========================================================================
   Reusable Animation Class
   ========================================================================== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Корректировка для таймлайна --- */
/* Убираем старые стили анимации, чтобы не было конфликта */
.timeline__item {
    position: relative;
    margin-bottom: 3rem;
    /* УДАЛИТЬ СЛЕДУЮЩИЕ 3 СТРОКИ:
    opacity: 0; 
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    */
}
.timeline__item.is-visible {
    /* УДАЛИТЬ СЛЕДУЮЩИЕ 2 СТРОКИ:
    opacity: 1;
    transform: translateY(0);
    */
}
@media (min-width: 768px) {
    /* ... (старые стили) ... */
    /* Корректируем начальное смещение для десктопной анимации таймлайна */
    .timeline__item.fade-in-up {
        transform: translateX(-30px);
    }
    .timeline__item.fade-in-up:nth-child(even) {
        transform: translateX(30px);
    }
    .timeline__item.fade-in-up.is-visible {
        transform: translateX(0);
    }
}
/* ==========================================================================
   Graduates Section
   ========================================================================== */
.graduates {
    padding: 5rem 0;
}

.graduates__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.graduates__title {
    font-family: var(--font-family-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.graduates__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.graduates__logos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    align-items: center;
    justify-content: center;
    max-width: 900px;
    margin: 0 auto;
}

.logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-item__image {
    max-width: 140px;
    width: 100%;
    height: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.logo-item__image:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@media (min-width: 576px) {
    .graduates__logos {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .graduates {
        padding: 6rem 0;
    }
    .graduates__title {
        font-size: 2.75rem;
    }
    .graduates__logos {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    padding: 5rem 0;
    background-color: var(--color-surface);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact__title {
    font-family: var(--font-family-heading);
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

.contact__description {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.contact__note {
    color: var(--color-text-secondary);
    font-style: italic;
}

.contact__form-wrapper {
    background-color: var(--color-background);
    padding: 2.5rem;
    border-radius: 12px;
    border: 1px solid var(--color-border);
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.form__input {
    width: 100%;
    padding: 0.875rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.form__input::placeholder {
    color: #6b7280; /* Gray 500 */
}

.form__group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form__checkbox {
    margin-top: 5px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.form__label-checkbox {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}
.form__label-checkbox a {
    color: var(--color-accent);
    text-decoration: underline;
}

.form__button {
    width: 100%;
    padding: 0.875rem 2rem;
    background-color: var(--color-accent);
    color: var(--color-background);
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.form__button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2);
}

.form__success-message {
    display: none; /* Изначально скрыто */
    text-align: center;
    padding: 2rem;
}
.form__success-message i {
    color: var(--color-accent);
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}
.form__success-message h3 {
    font-family: var(--font-family-heading);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}
.form__success-message p {
    color: var(--color-text-secondary);
}

@media (min-width: 992px) {
    .contact {
        padding: 6rem 0;
    }
    .contact__container {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
    }
    .contact__title {
        font-size: 2.75rem;
    }
}
/* ==========================================================================
   Cookie Pop-up
   ========================================================================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1rem 0;
    z-index: 200;
    transform: translateY(0);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup.is-hidden {
    transform: translateY(100%);
}

.cookie-popup__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.cookie-popup__text {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

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

.cookie-popup__button {
    padding: 0.5rem 1.5rem;
    background-color: var(--color-accent);
    color: var(--color-background);
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.cookie-popup__button:hover {
    background-color: #0ea5e9; /* Sky 500 */
}

@media (min-width: 768px) {
    .cookie-popup__container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

/* ==========================================================================
   Static Pages (Privacy, Terms, etc.)
   ========================================================================== */
.pages {
    padding: 4rem 0;
}

.pages .container {
    max-width: 800px; /* Оптимальная ширина для комфортного чтения */
}

.pages h1,
.pages h2 {
    font-family: var(--font-family-heading);
    color: var(--color-text-primary);
    line-height: 1.3;
}

.pages h1 {
    font-size: 2.75rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1rem;
}

.pages h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.pages p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.pages ul {
    list-style: disc;
    padding-left: 1.5rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.pages li {
    margin-bottom: 0.75rem;
}

.pages a {
    color: var(--color-accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-bottom-color 0.3s ease;
}

.pages a:hover {
    border-bottom-color: var(--color-accent);
}

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