/* === GOOGLE FONTS === */
/* font-family: 'Inter', sans-serif; */
/* font-family: 'Roboto Mono', monospace; */

/* === CSS VARIABLES === */
:root {
    --header-height: 5rem;

    /* Colors */
    --bg-color: #0A0C1F;
    --primary-color: #00F5D4;
    --primary-color-alt: #00E0C4;
    --text-color: #E0E0E0;
    --text-color-light: #A8B2D1;
    --border-color: #535A8A;
    --container-color: #111827;

    /* Typography */
    --body-font: 'Inter', sans-serif;
    --heading-font: 'Roboto Mono', monospace;

    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Font weight */
    --font-regular: 400;
    --font-medium: 500;
    --font-bold: 700;

    /* z-index */
    --z-tooltip: 10;
    --z-fixed: 100;
}

/* === BASE STYLES === */
*,
*::before,
*::after {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: var(--heading-font);
    font-weight: var(--font-bold);
    color: var(--text-color);
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

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

/* === REUSABLE CSS CLASSES === */
.container {
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

.main {
    /* Это обеспечит пространство для контента, который мы добавим позже */
    min-height: calc(100vh - var(--header-height)); 
}

/* === HEADER === */
.header {
    width: 100%;
    background-color: transparent;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    transition: background-color .3s, box-shadow .3s;
}

.header__container {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--heading-font);
    font-weight: var(--font-bold);
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color .3s;
}

.logo:hover {
    color: var(--primary-color-alt);
}

.header__nav-list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.header__nav-link {
    font-weight: var(--font-medium);
    color: var(--text-color);
    transition: color .3s;
}

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

.header__nav-link--button {
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--primary-color);
    transition: background-color .3s, color .3s;
}

.header__nav-link--button:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.header__burger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-color);
}

/* Add background to header on scroll */
.header--scrolled {
    background-color: rgba(10, 12, 31, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

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

.footer__container {
    display: grid;
    gap: 3rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer__column--about {
    max-width: 350px;
}

.footer__description {
    margin-top: 1rem;
    color: var(--text-color-light);
}

.footer__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
}

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

.footer__list--contacts li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer__icon {
    color: var(--primary-color);
    width: 20px;
    height: 20px;
}

.footer__link, .footer__text {
    color: var(--text-color-light);
    transition: color .3s;
}

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

.footer__bottom {
    margin-top: 4rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* === RESPONSIVE STYLES === */
@media screen and (max-width: 768px) {
    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--container-color);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        padding: 6rem 2rem 2rem;
        transition: right .4s ease;
    }

    .header__nav--show {
        right: 0;
    }

    .header__nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 2rem;
    }
    
    .header__nav-link--button {
        width: 100%;
        text-align: center;
    }

    .header__burger {
        display: block;
    }
}

/* === HERO === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Скрываем все, что выходит за пределы секции */
    padding-top: var(--header-height);
}

.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: 1050px;
    margin: 0 auto;
}

.hero__title {
    font-size: clamp(2.5rem, 5vw, 4rem); /* Адаптивный размер шрифта */
    font-family: var(--heading-font);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.125rem;
    color: var(--text-color-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--bg-color);
    padding: 1rem 3rem;
    border-radius: 50px;
    font-weight: var(--font-bold);
    font-size: 1.1rem;
    border: 2px solid var(--primary-color);
    transition: background-color .3s, color .3s, transform .3s;
}

.hero__button:hover {
    background-color: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* === REUSABLE SECTION STYLES === */
.section {
    padding: 6rem 0 2rem;
}

.section__title,
.section__subtitle {
    text-align: center;
}

.section__title {
    font-size: var(--h2-font-size);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* Decorative line under title */
.section__title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background-color: var(--primary-color);
    bottom: -0.5rem;
    left: 25%;
}

.section__subtitle {
    display: block;
    margin-bottom: 4rem;
    color: var(--text-color-light);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* === COURSES === */
.courses__container {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.courses__card {
    background-color: var(--container-color);
    padding: 2.5rem 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform .3s, box-shadow .3s, border-color .3s;
    display: flex;
    flex-direction: column;
}

.courses__card-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

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

.courses__card-title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
}

.courses__card-description {
    color: var(--text-color-light);
    flex-grow: 1; /* Pushes the link to the bottom */
    margin-bottom: 2rem;
}

.courses__card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: var(--font-medium);
    color: var(--primary-color);
    transition: gap .3s;
}

.courses__card-link .lucide {
    transition: transform .3s;
}

.courses__card-link:hover {
    gap: 0.75rem;
}

.courses__card-link:hover .lucide {
    transform: translateX(5px);
}

.courses__card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(0, 245, 212, 0.1);
}

/* === ABOUT === */
.about__container {
    display: grid;
    gap: 4rem;
    align-items: center;
    grid-template-columns: 1fr;
}

.about__image-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    justify-self: center;
}

.about__image {
    width: 100%;
    /* max-width: 450px; */
    height: auto;
    object-fit: cover;
    border-radius: 8px;
}

/* Decorative element behind the image */
.about__image-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary-color);
    top: 20px;
    left: 20px;
    border-radius: 8px;
    z-index: -1;
    transition: all .3s;
}

.about__image-wrapper:hover::before {
    top: 10px;
    left: 10px;
}

.about__title {
    text-align: left;
    transform: translateX(0);
    left: 0;
    margin-bottom: 1.5rem;
}

.about__title::after {
    left: 0;
}

.about__description {
    color: var(--text-color-light);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.about__list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.about__list-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.about__list-icon {
    color: var(--primary-color);
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 2px;
}

/* === Responsive styles for ABOUT section === */
@media screen and (min-width: 768px) {
    .about__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === PROCESS === */
.process__container {
    position: relative;
    margin: 0 auto;
    max-width: 750px;
    /* display: grid; */
    gap: 3rem 2rem;
}

/* Timeline vertical line */
.process__container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 49px;
    width: 2px;
    height: 100%;
    background-color: var(--border-color);
}

.process__step {
    position: relative;
    padding-left: 5rem; /* Space for number and line */
    display: flex;
    align-items: flex-start;
}

.process__step-number {
    position: absolute;
    left: 0;
    top: -5px;
    width: 100px;
    font-size: 3rem;
    font-family: var(--heading-font);
    font-weight: var(--font-bold);
    color: var(--border-color);
    text-align: center;
    transform: translateX(-50%) rotate(-90deg);
    opacity: 0.5;
    transition: color .3s, opacity .3s;
}

/* Circle on the timeline */
.process__step::before {
    content: '';
    position: absolute;
    left: 41px; /* (50px - 8px)/2 for centering */
    top: 8px;
    width: 18px;
    height: 18px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    background-color: var(--bg-color);
    transition: border-color .3s;
}

.process__step-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.process__step-title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
}

.process__step-description {
    color: var(--text-color-light);
}

.process__step:hover .process__step-number {
    color: var(--primary-color);
    opacity: 1;
}

.process__step:hover::before {
    border-color: var(--primary-color);
}

/* === Responsive styles for PROCESS section === */
@media screen and (min-width: 576px) {
    .process__container {
        grid-template-columns: repeat(2, 1fr);
    }
    .process__step:nth-child(even) {
        margin-top: 4rem;
    }
}

@media screen and (max-width: 575px) {
    .process__container::before {
        left: 15px;
    }
    .process__step {
        padding-left: 3rem;
    }
    .process__step::before {
        left: 7px;
    }
    .process__step-number {
       display: none; /* Hide rotated number on mobile */
    }
}

/* === REVIEWS === */
.reviews__swiper {
    padding: 1rem 0 4rem; /* Space for pagination */
}

.reviews__card {
    background-color: var(--container-color);
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    height: 100%; /* Ensure all cards have same height */
    display: flex;
    flex-direction: column;
}

.reviews__card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.reviews__card-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}

.reviews__card-name {
    font-size: 1.1rem;
    font-weight: var(--font-bold);
}

.reviews__card-course {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.reviews__card-text {
    color: var(--text-color-light);
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.reviews__card-rating {
    display: flex;
    gap: 0.25rem;
    color: #FFD700; /* Gold color for stars */
}

.reviews__card-rating .lucide {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Swiper custom styles */
.swiper-pagination-bullet {
    background-color: var(--border-color);
}

.swiper-pagination-bullet-active {
    background-color: var(--primary-color);
}

/* === CONTACT === */
.contact__container {
    display: grid;
    gap: 4rem;
}

.contact__title,
.contact__subtitle {
    text-align: center;
}

.contact__form-wrapper {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background-color: var(--container-color);
    padding: 3rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.contact__form {
    display: grid;
    gap: 2rem;
}

.contact__form-group {
    position: relative;
}

.contact__form-input {
    width: 100%;
    padding: 1rem;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    font-size: var(--normal-font-size);
    outline: none;
    transition: border-color .3s;
}

.contact__form-label {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--text-color-light);
    pointer-events: none;
    transition: top .3s, font-size .3s, color .3s;
}

.contact__form-input:focus {
    border-color: var(--primary-color);
}

/* Input animation */
.contact__form-input:focus + .contact__form-label,
.contact__form-input:not(:placeholder-shown) + .contact__form-label {
    top: -0.75rem;
    left: 0.75rem;
    font-size: var(--small-font-size);
    color: var(--primary-color);
    background-color: var(--container-color);
    padding: 0 0.25rem;
}

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

.contact__form-checkbox {
    margin-top: 5px;
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
}

.contact__form-checkbox-label {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.contact__form-checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact__form-button {
    width: 100%;
    border: none;
    cursor: pointer;
}

/* Success Message */
.contact__success-message {
    display: none; /* Hidden by default */
    text-align: center;
    padding: 2rem;
}

.contact__success-icon {
    width: 60px;
    height: 60px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact__success-title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.5rem;
}

@media screen and (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1.2fr;
        align-items: center;
    }
    .contact__title,
    .contact__subtitle {
        text-align: left;
    }
}

/* === COOKIE POPUP === */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden */
    left: 0;
    width: 100%;
    background-color: var(--container-color);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    z-index: var(--z-fixed);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    transition: bottom .4s ease-in-out;
}

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

.cookie-popup__text {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

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

.cookie-popup__button {
    background-color: var(--primary-color);
    color: var(--bg-color);
    border: 2px solid var(--primary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: var(--font-medium);
    white-space: nowrap; /* Prevent button text from wrapping */
    transition: background-color .3s, color .3s;
}

.cookie-popup__button:hover {
    background-color: transparent;
    color: var(--primary-color);
}

/* Responsive styles for COOKIE POPUP */
@media screen and (max-width: 576px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
    }
}

/* === POLICY & TEXT PAGES (.pages) === */
.pages {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
}

.pages .container {
    max-width: 800px; /* Limit line length for readability */
}

.pages h1 {
    font-size: 1.5rem;
    font-family: var(--heading-font);
    margin-bottom: 2rem;
}

.pages h2 {
    font-size: 1.5rem;
    font-family: var(--heading-font);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.pages p, 
.pages li {
    color: var(--text-color-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.pages a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color .3s;
}

.pages a:hover {
    color: var(--primary-color-alt);
}

.pages ul {
    list-style-type: disc;
    padding-left: 2rem;
    margin-top: 1.5rem;
}

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