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

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

	/* Colors */
	--primary-color: #8a2be2; /* BlueViolet */
	--primary-color-alt: #7b25c9;
	--text-color: #121212;
	--body-bg-color: #f9f9f9;
	--container-bg-color: #ffffff;
	--border-color: #e0e0e0;

	/* Fonts */
	--body-font: 'Inter', sans-serif;
	--heading-font: 'Space Grotesk', sans-serif;

	/* Font sizes */
	--big-font-size: 2.5rem;
	--h1-font-size: 2.25rem;
	--h2-font-size: 1.5rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;

	/* Font weight */
	--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(--body-bg-color);
	color: var(--text-color);
	line-height: 1.6;
}

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

ul {
	list-style: none;
}

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

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

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

/* HEADER */
.header {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 2;
	background-color: rgba(249, 249, 249, 0.8);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--border-color);
}

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

.header__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--heading-font);
	font-size: 1.25rem;
	font-weight: var(--font-bold);
	color: var(--text-color);
}

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

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

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

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

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

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

.footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--heading-font);
	font-size: 1.25rem;
	font-weight: var(--font-bold);
	margin-bottom: 1rem;
}

.footer__copyright {
	font-size: var(--small-font-size);
	color: #6c757d;
}

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

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

.footer__link {
	transition: color 0.3s;
}

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

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

.footer__list--contacts .lucide {
	color: var(--primary-color);
	flex-shrink: 0;
}

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

	.header__nav--active {
		right: 0;
	}

	.header__nav-list {
		flex-direction: column;
		gap: 2.5rem;
	}

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

	.header__burger {
		position: relative;
		z-index: 999;
		display: block;
	}

	.header__burger .lucide-x {
		/* Style for close icon */
		display: none;
	}
}

/* REUSABLE CLASSES - BUTTON */
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background-color: var(--primary-color);
	color: #fff;
	padding: 0.9rem 1.75rem;
	border-radius: 0.5rem;
	font-weight: var(--font-medium);
	transition: background-color 0.3s, transform 0.3s;
	border: none;
	cursor: pointer;
}

.button:hover {
	background-color: var(--primary-color-alt);
	transform: translateY(-2px);
}

/* HERO SECTION */
.hero {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	overflow: hidden; /* Для корректной работы анимации */
}

.hero__container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 3rem;
	align-items: center;
}

.hero__title {
	font-size: 2.5rem;
	line-height: 1.2;
	margin-bottom: 1.5rem;
}

.hero__description {
	font-size: 1.125rem;
	color: #495057;
	margin-bottom: 2.5rem;
	max-width: 500px;
}

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

.hero__image {
	width: 100%;
	max-width: 550px;
	border-radius: 1rem;
	object-fit: cover;
}

/* RESPONSIVE STYLES (Mobile First) */

/* Добавляем стили для больших экранов */
@media screen and (min-width: 768px) {
	:root {
		--big-font-size: 3.5rem;
	}

	.hero__container {
		grid-template-columns: 1fr 1fr;
	}

	.hero__content {
		order: 1; /* Текст слева */
	}

	.hero__image-wrapper {
		order: 2; /* Картинка справа */
	}
}

@media screen and (min-width: 1024px) {
	:root {
		--big-font-size: 4rem;
	}
	.hero {
		padding-top: calc(var(--header-height) + 5rem);
		padding-bottom: 5rem;
	}
}

/* REUSABLE CLASSES - SECTION */
.section {
	padding-top: 5rem;
	padding-bottom: 5rem;
}

.section__header {
	text-align: center;
	margin-bottom: 3rem;
}

.section__subtitle {
	display: block;
	color: var(--primary-color);
	font-weight: var(--font-bold);
	font-family: var(--heading-font);
	margin-bottom: 0.5rem;
}

.section__title {
	font-size: var(--h1-font-size);
}

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

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

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

.courses__card-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.courses__card-header .lucide {
	width: 32px;
	height: 32px;
	color: var(--primary-color);
}

.courses__card-duration {
	background-color: rgba(138, 43, 226, 0.1); /* primary-color with opacity */
	color: var(--primary-color);
	font-size: var(--small-font-size);
	font-weight: var(--font-medium);
	padding: 0.25rem 0.75rem;
	border-radius: 1rem;
}

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

.courses__card-description {
	color: #495057;
	margin-bottom: 1.5rem;
	flex-grow: 1; /* Pushes tags to the bottom */
}

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

.courses__card-tags li {
	background-color: var(--body-bg-color);
	border: 1px solid var(--border-color);
	font-size: var(--small-font-size);
	padding: 0.25rem 0.75rem;
	border-radius: 0.25rem;
}

/* RESPONSIVE STYLES */
@media screen and (max-width: 768px) {
	.section {
		padding-top: 4rem;
		padding-bottom: 4rem;
	}

	.section__title {
		font-size: var(--h2-font-size);
	}
}

/* PROCESS SECTION */
.process__container {
	display: grid;
	gap: 4rem;
	position: relative;
}

/* The timeline line */
.process__container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 2px;
	height: 100%;
	background-color: var(--border-color);
}

.process__item {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
}

.process__item-content {
	position: relative;
	padding: 1.5rem;
	text-align: center;
}

.process__item-number {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 6rem;
	font-weight: var(--font-bold);
	color: rgba(0, 0, 0, 0.05);
	z-index: -1;
}

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

.process__item-image {
	border-radius: 1rem;
	overflow: hidden;
}

.process__item-image img {
	width: 100%;
	height: auto;
	display: block;
}

/* RESPONSIVE STYLES */

@media screen and (min-width: 768px) {
	.process__item {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
		/* Add a circle on the timeline */
		position: relative;
	}

	.process__item::after {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 16px;
		height: 16px;
		background-color: var(--body-bg-color);
		border: 3px solid var(--primary-color);
		border-radius: 50%;
		z-index: 1;
	}

	.process__item-content {
		text-align: left;
	}

	.process__item-number {
		left: 0;
		transform: translate(0, -50%);
	}

	/* Alternating layout */
	.process__item:nth-child(even) .process__item-content {
		order: 2;
		text-align: right;
	}

	.process__item:nth-child(even) .process__item-number {
		left: auto;
		right: 0;
		transform: translate(0, -50%);
	}

	.process__item:nth-child(even) .process__item-image {
		order: 1;
	}
}

/* Hide the timeline on mobile */
@media screen and (max-width: 767px) {
	.process__container::before {
		display: none;
	}
}

/* TUTORS SECTION */
.tutors {
	background-color: var(--container-bg-color);
}

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

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

.tutors__card-img {
	width: 140px;
	height: 140px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 1.5rem;
	border: 4px solid var(--primary-color);
	box-shadow: 0 4px 12px rgba(138, 43, 226, 0.2);
}

.tutors__card-name {
	font-size: var(--h3-font-size);
	margin-bottom: 0.25rem;
}

.tutors__card-spec {
	color: var(--primary-color);
	font-weight: var(--font-medium);
	margin-bottom: 1rem;
	font-size: var(--small-font-size);
}

.tutors__card-bio {
	color: #6c757d;
	font-size: var(--normal-font-size);
	line-height: 1.5;
}

/* REVIEWS SECTION */
.reviews {
	background-color: var(--body-bg-color);
}

.reviews__container {
	position: relative;
}

.reviews__slider {
	padding-bottom: 4rem; /* Space for pagination */
}

.reviews__card {
	background-color: var(--container-bg-color);
	border: 1px solid var(--border-color);
	border-radius: 1rem;
	padding: 2rem;
	height: 100%;
	display: flex;
	flex-direction: column;
}

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

.reviews__card-text {
	font-size: var(--normal-font-size);
	line-height: 1.7;
	color: #495057;
	margin-bottom: 1.5rem;
	flex-grow: 1;
}

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

.reviews__card-avatar {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	object-fit: cover;
}

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

.reviews__card-course {
	font-size: var(--small-font-size);
	color: #6c757d;
}

/* Swiper Controls Customization */
.reviews__controls {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1rem;
	margin-top: 1rem;
}

.swiper-button-next,
.swiper-button-prev {
	position: static;
	width: 44px;
	height: 44px;
	margin: 0;
	background-color: var(--container-bg-color);
	border: 1px solid var(--border-color);
	border-radius: 50%;
	color: var(--primary-color);
	transition: background-color 0.3s, color 0.3s;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
	background-color: var(--primary-color);
	color: #fff;
}

.swiper-button-next::after,
.swiper-button-prev::after {
	font-size: 1.25rem;
	font-weight: bold;
}

.swiper-pagination {
	position: static;
	width: auto;
}

.swiper-pagination-bullet {
	background-color: #ccc;
	opacity: 1;
}

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

/* CONTACT SECTION */
.contact {
	background-color: var(--container-bg-color);
}

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

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

.contact__info-description {
	color: #495057;
	margin-bottom: 2rem;
}

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

.contact__info-list li {
	display: flex;
	align-items: center;
	gap: 1rem;
	font-weight: var(--font-medium);
}

.contact__info-list li .lucide {
	color: var(--primary-color);
}

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

.form__group {
	display: flex;
	flex-direction: column;
}

.form__label {
	margin-bottom: 0.5rem;
	font-weight: var(--font-medium);
	font-size: var(--small-font-size);
}

.form__input {
	width: 100%;
	padding: 0.9rem 1rem;
	border: 1px solid var(--border-color);
	border-radius: 0.5rem;
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	transition: border-color 0.3s, box-shadow 0.3s;
}

.form__input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.15);
}

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

.form__checkbox-input {
	margin-top: 0.25rem;
	flex-shrink: 0;
}

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

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

.contact__button {
	width: 100%;
}

.form__message {
	display: none; /* Hidden by default */
	padding: 2rem;
	border: 1px solid var(--primary-color);
	border-radius: 0.5rem;
	text-align: center;
	background-color: rgba(138, 43, 226, 0.05);
}

.form__message-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;
		gap: 5rem;
	}
}

/* COOKIE POPUP */
.cookie-popup {
	position: fixed;
	bottom: 2rem;
	left: 2rem;
	z-index: var(--z-fixed);
	max-width: 480px;
	background-color: var(--container-bg-color);
	padding: 1.5rem;
	border-radius: 1rem;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	display: flex;
	align-items: center;
	gap: 1.5rem;
	transform: translateY(200%);
	opacity: 0;
	transition: transform 0.5s ease, opacity 0.5s ease;
	visibility: hidden;
}

.cookie-popup--active {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

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

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

.cookie-popup__button {
	padding: 0.6rem 1.2rem;
	flex-shrink: 0;
}

@media screen and (max-width: 576px) {
	.cookie-popup {
		flex-direction: column;
		left: 1rem;
		right: 1rem;
		bottom: 1rem;
		max-width: none;
	}

	.cookie-popup__button {
		width: 100%;
	}
}

/* GENERIC PAGES (Privacy, Terms, etc.) */
.pages {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 5rem;
	background-color: var(--container-bg-color);
}

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

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

.pages h1 {
	font-size: 1.5rem;
	margin-bottom: 2rem;
}

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

.pages p {
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	line-height: 1.8;
	color: #343a40;
	margin-bottom: 1.5rem;
}

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

.pages li {
	margin-bottom: 0.75rem;
	line-height: 1.8;
	color: #343a40;
}

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

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

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