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

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

	/* Colors */
	--background-color: #f5f7fa;
	--primary-color: #1a2233;
	--secondary-color: #5a6578;
	--accent-color: #0066cc;
	--surface-color: #ffffff;

	/* Typography */
	--font-body: 'Inter', sans-serif;
	--font-headings: 'Space Grotesk', sans-serif;

	--font-size-normal: 0.938rem;
	--font-size-small: 0.813rem;

	/* Z-index */
	--z-header: 100;
	--z-menu: 110;
}

@media screen and (min-width: 968px) {
	:root {
		--font-size-normal: 1rem;
		--font-size-small: 0.875rem;
	}
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	font-size: var(--font-size-normal);
	background-color: var(--background-color);
	color: var(--secondary-color);
}

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

ul {
	list-style: none;
}

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

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

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

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

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

.header__logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-headings);
	font-weight: 700;
	color: var(--primary-color);
}

.header__logo img {
	width: 32px;
	height: 32px;
}

.nav {
	position: fixed;
	top: 0;
	right: -100%;
	width: 70%;
	height: 100%;
	background-color: var(--surface-color);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	transition: right 0.4s;
	z-index: var(--z-menu);
	padding: 6rem 2rem 0;
}

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

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

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

.nav__toggle {
	position: relative;
	z-index: 999;
	color: var(--primary-color);
	background: none;
	border: none;
	cursor: pointer;
	display: flex; /* Для центрирования иконки */
	align-items: center;
	justify-content: center;
}

.nav__toggle i {
	width: 28px;
	height: 28px;
}

/* Show menu */
.nav--show {
	right: 0;
}

/* Sticky Header */
.header--scroll {
	background-color: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ==================== FOOTER ==================== */
.footer {
	padding-top: 5rem;
	background-color: var(--background-color);
}

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

.footer__logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-headings);
	font-weight: 700;
	color: var(--primary-color);
	margin-bottom: 1rem;
}

.footer__logo img {
	width: 32px;
	height: 32px;
}

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

.footer__title {
	font-size: 1.2rem;
	margin-bottom: 1rem;
}

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

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

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

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

.footer__list--contacts i {
	width: 20px;
	height: 20px;
	color: var(--accent-color);
}

.footer__bottom {
	margin-top: 4rem;
	padding: 1.5rem 0;
	border-top: 1px solid var(--surface-color);
}

.footer__bottom-container {
	text-align: center;
	font-size: var(--font-size-small);
}

/* ==================== MEDIA QUERIES ==================== */
@media screen and (min-width: 768px) {
	.nav {
		all: unset; /* Сбрасываем все стили мобильного меню */
	}

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

	.nav__toggle {
		display: none;
	}
}

@media screen and (min-width: 1024px) {
	.container {
		margin-left: auto;
		margin-right: auto;
	}
}

/* ==================== REUSABLE CSS CLASSES ==================== */
/* Добавьте этот код к уже существующим классам */
.section {
	padding: 6rem 0 2rem;
}

.button {
	display: inline-block;
	background-color: var(--accent-color);
	color: #ffffff;
	padding: 1rem 1.75rem;
	font-family: var(--font-headings);
	font-weight: 500;
	border-radius: 0.5rem;
	transition: transform 0.3s, box-shadow 0.3s;
}

.button:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

/* ==================== HERO ==================== */
.hero__container {
	padding-top: 2rem;
	display: grid;
	gap: 3rem;
}

.hero__content {
	text-align: center;
}

.hero__title {
	font-size: 1.5rem; /* Размер для мобильных */
	line-height: 1.2;
	margin-bottom: 1rem;
	font-weight: 700;
}

.hero__description {
	font-size: var(--font-size-normal);
	line-height: 1.6;
	margin-bottom: 2.5rem;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.hero__image-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
}

.hero__image {
	max-width: 450px;
	width: 100%;
	border-radius: 1rem;
}

/* ==================== MEDIA QUERIES ==================== */
/* Добавьте этот код к уже существующим медиа-запросам */

@media screen and (min-width: 768px) {
	.section {
		padding: 8rem 0 4rem;
	}

	.hero__container {
		grid-template-columns: 1fr 0.8fr;
		align-items: center;
		text-align: left;
	}

	.hero__content {
		text-align: left;
	}

	.hero__description {
		margin-left: 0;
		margin-right: 0;
	}

	.hero__title {
		font-size: 2.5rem;
	}
}

@media screen and (min-width: 1024px) {
	.hero__title {
		font-size: 3rem;
	}
}

/* ==================== REUSABLE CSS CLASSES ==================== */
/* Добавьте этот код к уже существующим классам */
.section__header {
	text-align: center;
	margin-bottom: 3rem;
}

.section__title {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.section__subtitle {
	max-width: 600px;
	margin: 0 auto;
	line-height: 1.6;
}

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

.course-card {
	background-color: var(--surface-color);
	border: 1px solid transparent;
	border-radius: 0.75rem;
	padding: 1.75rem;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

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

.course-card__title {
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
}

.course-card__description {
	font-size: var(--font-size-small);
	line-height: 1.5;
	margin-bottom: 1.5rem;
}

.course-card__footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-top: 1px solid rgba(90, 101, 120, 0.2);
	padding-top: 1rem;
	margin-top: auto; /* Прижимает футер к низу */
}

.course-card__tech {
	display: flex;
	gap: 0.75rem;
	color: var(--primary-color);
}

.course-card__tech i {
	width: 22px;
	height: 22px;
}

.course-card__duration {
	font-size: var(--font-size-small);
	font-weight: 500;
	color: var(--accent-color);
}

/* ==================== MEDIA QUERIES ==================== */
/* Добавьте этот код к уже существующим медиа-запросам */
@media screen and (min-width: 768px) {
	.section__title {
		font-size: 2.5rem;
	}
}

/* ==================== PROCESS ==================== */
.process__timeline {
	position: relative;
	display: grid;
	gap: 2.5rem;
}

.process__step {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	position: relative;
}

/* Vertical connector line for mobile */
.process__timeline::before {
	content: '';
	position: absolute;
	top: 20px;
	left: 20px;
	bottom: 20px;
	width: 2px;
	background-color: var(--surface-color);
	transform: translateX(-50%);
}

.process__icon-wrapper {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	background-color: var(--surface-color);
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	color: var(--accent-color);
	z-index: 2; /* To be above the connector line */
}

.process__icon-wrapper i {
	width: 20px;
	height: 20px;
}

.process__title {
	font-size: 1.1rem;
	margin-bottom: 0.5rem;
}

.process__description {
	font-size: var(--font-size-small);
	line-height: 1.6;
}

/* ==================== MEDIA QUERIES ==================== */
/* Добавьте этот код к уже существующим медиа-запросам */

@media screen and (min-width: 768px) {
	.process__timeline {
		grid-template-columns: repeat(4, 1fr);
		gap: 1.5rem;
	}

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

	.process__icon-wrapper {
		margin-bottom: 1rem;
		width: 50px;
		height: 50px;
	}

	.process__icon-wrapper i {
		width: 24px;
		height: 24px;
	}

	/* Horizontal connector line for desktop */
	.process__timeline::before {
		top: 25px; /* Vertically center */
		left: 0;
		right: 0;
		width: auto;
		height: 2px;
		transform: none;
	}
}

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

.mentor-card {
	background-color: var(--surface-color);
	border-radius: 0.75rem;
	padding: 2rem 1.5rem;
	text-align: center;
	transition: transform 0.3s;
}

.mentor-card:hover {
	transform: translateY(-5px);
}

.mentor-card__image {
	width: 120px;
	height: 120px;
	border-radius: 50%;
	border: 3px solid var(--accent-color);
	margin-bottom: 1.5rem;
	object-fit: cover;
}

.mentor-card__name {
	font-size: 1.25rem;
	margin-bottom: 0.25rem;
}

.mentor-card__title {
	font-size: var(--font-size-small);
	margin-bottom: 1rem;
	color: var(--secondary-color);
}

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

.mentor-card__social-link {
	color: var(--secondary-color);
	transition: color 0.3s;
}

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

/* ==================== REVIEWS ==================== */
.reviews__swiper {
	padding-bottom: 3rem; /* Space for pagination */
}

.review-card {
	background-color: var(--surface-color);
	border-radius: 0.75rem;
	padding: 2rem;
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.review-card__text {
	font-style: italic;
	line-height: 1.6;
	margin-bottom: 1.5rem;
}

.review-card__author {
	border-top: 1px solid rgba(90, 101, 120, 0.2);
	padding-top: 1.5rem;
}

.review-card__name {
	font-size: 1.1rem;
	margin-bottom: 0.25rem;
}

.review-card__course {
	font-size: var(--font-size-small);
	color: var(--secondary-color);
}

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

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

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

.contact__data {
	text-align: center;
}

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

.form__group {
	position: relative;
}

.form__label {
	position: absolute;
	top: 0.25rem;
	left: 1rem;
	font-size: var(--font-size-small);
	color: var(--secondary-color);
	transition: all 0.3s;
	pointer-events: none; /* Allows click-through */
}

.form__input {
	width: 100%;
	padding: 1.5rem 1rem 0.75rem;
	background-color: var(--surface-color);
	border: 1px solid transparent;
	border-radius: 0.5rem;
	color: var(--primary-color);
	font-size: var(--font-size-normal);
	outline: none;
}

.form__input:focus {
	border-color: var(--accent-color);
}

/* Move label up when input is focused or has content */
.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
	top: 0.25rem;
	font-size: 0.7rem;
}

/* Checkbox styles */
.form__group--checkbox {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.form__checkbox-input {
	width: 1.25rem;
	height: 1.25rem;
	accent-color: var(--accent-color);
}

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

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

.form__button {
	width: 100%;
	border: none;
	cursor: pointer;
}

/* Success Message */
.form__success-message {
	display: none; /* Hidden by default */
	background-color: var(--surface-color);
	padding: 2rem;
	border-radius: 0.75rem;
	text-align: center;
	border: 1px solid var(--accent-color);
}

.form__success-message.show {
	display: block; /* Shown via JS */
}

.form__success-message i {
	width: 48px;
	height: 48px;
	color: var(--accent-color);
	margin-bottom: 1rem;
}

/* ==================== MEDIA QUERIES ==================== */
/* Добавьте этот код к уже существующим медиа-запросам */

@media screen and (min-width: 968px) {
	.contact__container {
		grid-template-columns: 0.8fr 1fr;
		align-items: center;
	}

	.contact__data {
		text-align: left;
	}
}

/* ==================== COOKIE POP-UP ==================== */
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--surface-color);
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
	padding: 1rem 0;
	z-index: 200;
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
	transition: transform 0.4s ease, opacity 0.4s ease, visibility 0.4s;
}

.cookie-popup--hidden {
	transform: translateY(100%);
	opacity: 0;
	visibility: hidden;
}

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

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

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

.cookie-popup__button {
	background-color: var(--accent-color);
	color: #ffffff;
	border: none;
	padding: 0.5rem 1.25rem;
	border-radius: 0.5rem;
	cursor: pointer;
	font-size: var(--font-size-small);
	font-weight: 500;
}

/* ==================== MEDIA QUERIES ==================== */
/* Добавьте этот код к уже существующим медиа-запросам */
@media screen and (min-width: 768px) {
	.cookie-popup {
		padding: 1.25rem 0;
	}
	.cookie-popup__container {
		flex-direction: row;
		justify-content: space-between;
	}
	.cookie-popup__text {
		text-align: left;
	}
}

/* ==================== POLICY & TEXT PAGES ==================== */
.pages {
	padding-top: 120px;
}

.pages .container {
	max-width: 800px; /* Optimal width for reading */
}

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

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

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

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

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

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

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

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

/* ==================== MEDIA QUERIES ==================== */
/* Добавьте этот код к уже существующим медиа-запросам */
@media screen and (min-width: 768px) {
	.pages h1 {
		font-size: 3rem;
	}
}
