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

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

	/* Colors */
	--primary-color: #64ffda;
	--primary-color-alt: #00c7b1;
	--title-color: #ccd6f6;
	--text-color: #8892b0;
	--body-color: #0a192f;
	--container-color: #112240;

	/* Fonts */
	--body-font: 'Roboto', sans-serif;
	--title-font: 'Poppins', sans-serif;

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

/* BASE STYLES */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

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

h1,
h2,
h3 {
	color: var(--title-color);
	font-family: var(--title-font);
	font-weight: 700;
}

ul {
	list-style: none;
}

a {
	text-decoration: none;
	color: var(--text-color);
}

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

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

/* HEADER & NAVIGATION */
.header {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100;
	background-color: rgba(10, 25, 47, 0.85);
	backdrop-filter: blur(10px);
	transition: box-shadow 0.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;
	color: var(--title-color);
	font-family: var(--title-font);
	font-weight: 700;
	font-size: 1.5rem;
}

.logo__img {
	width: 32px;
	height: 32px;
}

.nav__list {
	display: flex;
	gap: 2.5rem;
}

.nav__link {
	color: var(--title-color);
	font-weight: 500;
	position: relative;
	transition: color 0.3s;
}

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

.nav__link::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--primary-color);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s;
}

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

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

/* FOOTER */
.footer {
	background-color: var(--container-color);
	padding: 4rem 0 2rem;
	margin-top: 5rem;
}

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

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

.footer__description {
	margin-top: 1rem;
	font-size: var(--small-font-size);
}

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

.footer__list li {
	margin-bottom: 0.5rem;
}

.footer__list--contact li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.footer__list--contact i {
	color: var(--primary-color);
	margin-top: 4px; /* Icon alignment */
	flex-shrink: 0;
}

.footer__link {
	font-size: var(--small-font-size);
	transition: color 0.3s;
}

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

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

/* MOBILE-FIRST: RESPONSIVE DESIGN */
@media screen and (max-width: 768px) {
	.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 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	}

	.nav.nav--show {
		right: 0;
	}

	.nav__list {
		flex-direction: column;
		gap: 2rem;
	}

	.nav__link {
		font-size: var(--h3-font-size);
	}

	.header__burger {
		display: block;
		z-index: 101; /* Above mobile menu */
	}
}

/* ==================== HERO ==================== */
.hero {
	padding-top: var(--header-height);
	min-height: 100vh;
	display: flex;
	align-items: center;
	text-align: center;
}

.hero__container {
	max-width: 750px;
}

.hero__title {
	font-size: clamp(2.5rem, 6vw, 4.5rem); /* Адаптивный размер шрифта */
	margin-bottom: 1.5rem;
	line-height: 1.2;
	min-height: 120px; /* Резервируем место под анимацию */
}

.hero__title span {
	display: inline-block;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero__description {
	font-size: 1.125rem;
	max-width: 650px;
	margin: 0 auto 2.5rem;
	color: var(--text-color);
	opacity: 0;
	transform: translateY(20px);
	animation: fadeIn-up 0.8s ease forwards;
	animation-delay: 1.5s; /* Задержка после анимации заголовка */
}

/* ==================== BUTTONS ==================== */
.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem 2rem;
	border-radius: 4px;
	font-family: var(--title-font);
	font-weight: 600;
	transition: all 0.3s ease;
}

.button--primary {
	background-color: var(--primary-color);
	color: var(--body-color);
	border: 2px solid var(--primary-color);
}

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

.button__icon {
	transition: transform 0.3s ease;
}

.button--primary:hover .button__icon {
	transform: translateX(5px);
}

.button {
	opacity: 0;
	transform: translateY(20px);
	animation: fadeIn-up 0.8s ease forwards;
	animation-delay: 1.8s; /* Задержка после подзаголовка */
}

/* ==================== KEYFRAMES ==================== */
@keyframes fadeIn-up {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==================== 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;
	padding-bottom: 0.5rem;
	display: inline-block;
	left: 50%;
	transform: translateX(-50%);
}

.section__title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 60px;
	height: 3px;
	background-color: var(--primary-color);
}

.section__subtitle {
	margin-bottom: 4rem;
	color: var(--text-color);
}

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

.courses__card {
	background-color: var(--container-color);
	padding: 2.5rem 2rem;
	border-radius: 8px;
	border: 2px solid transparent;
	transition: transform 0.3s ease, border-color 0.3s ease;
}

.courses__card:hover {
	transform: translateY(-8px);
	border-color: var(--primary-color);
}

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

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

.courses__card-description {
	font-size: var(--small-font-size);
	margin-bottom: 2rem;
}

.courses__card-link {
	color: var(--primary-color);
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	transition: gap 0.3s ease;
}

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

/* ==================== FEATURES ==================== */
.features__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
	align-items: center;
}

.features__image-wrapper {
	text-align: center;
}

.features__image {
	width: 100%;
	height: auto;
	border-radius: 8px;
	opacity: 0.9;
}

.features__content {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

.features__item {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
}

.features__item-icon {
	color: var(--primary-color);
	font-size: 1.5rem;
}

.features__item-icon i {
	width: 32px;
	height: 32px;
}

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

.features__item-description {
	font-size: var(--small-font-size);
}

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

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

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

.about__title::after {
	left: 0;
	transform: translateX(0);
}

.about__description {
	margin-bottom: 1.5rem;
}

.about__stats {
	margin-top: 3rem;
	display: flex;
	gap: 2rem;
	flex-wrap: wrap;
}

.about__stat {
	text-align: center;
	flex-grow: 1;
}

.about__stat-number {
	font-size: 2.25rem;
	color: var(--primary-color);
	margin-bottom: 0.25rem;
}

.about__stat-label {
	font-size: var(--small-font-size);
	color: var(--title-color);
}

.about__image-wrapper {
	text-align: center;
}

.about__image {
	width: 100%;
	height: auto;
	border-radius: 8px;
	opacity: 0.9;
}

/* Responsive styles for larger screens */
@media screen and (min-width: 768px) {
	.about__container {
		grid-template-columns: 1.1fr 0.9fr;
	}
}

@media screen and (min-width: 992px) {
	.about__container {
		gap: 5rem;
	}
}

/* ==================== REVIEWS ==================== */
.reviews {
    background-color: var(--container-color);
}

.reviews__swiper {
    padding: 1rem 0 4rem; /* Bottom padding for pagination */
}

.reviews__card {
    background-color: var(--body-color);
    padding: 2rem;
    border-radius: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.reviews__text {
    font-style: italic;
    margin-bottom: 2rem;
}

.reviews__author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

.reviews__author-name {
    font-size: var(--normal-font-size);
    color: var(--title-color);
}

.reviews__author-title {
    font-size: var(--small-font-size);
}

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

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

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    opacity: 1;
}

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

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

.contact__content-description {
    margin-bottom: 2rem;
}

.contact__info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact__info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.contact__info-item i {
    color: var(--primary-color);
}

.contact__form-group {
    margin-bottom: 1.5rem;
}

.contact__form-label {
    display: block;
    font-size: var(--small-font-size);
    margin-bottom: 0.5rem;
    color: var(--title-color);
}

.contact__form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--body-color);
    border: 2px solid var(--text-color);
    border-radius: 4px;
    color: var(--title-color);
    font-size: var(--normal-font-size);
    transition: border-color 0.3s;
}

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

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

.contact__form-checkbox {
    width: 1.25rem;
    height: 1.25rem;
}

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

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

.contact__form-button {
    width: 100%;
    justify-content: center;
}

.contact__form-message {
    display: none; /* Initially hidden */
    padding: 2rem;
    background-color: var(--container-color);
    border-left: 5px solid var(--primary-color);
    text-align: center;
}

.contact__form-message i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Responsive styles for larger screens */
@media screen and (min-width: 768px) {
    .contact__container {
        grid-template-columns: repeat(2, 1fr);
        align-items: flex-start;
    }
}

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

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

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

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

.cookie-popup__button {
    padding: 0.75rem 1.5rem;
    flex-shrink: 0; /* Prevent button from shrinking */
}

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

/* ==================== GENERIC PAGES (TERMS, PRIVACY, ETC.) ==================== */
.pages {
    padding-top: var(--header-height);
    min-height: 80vh;
}

.pages .container {
    max-width: 800px;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

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

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

.pages p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

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

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

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

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

.pages strong {
    color: var(--title-color);
}
