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

/* ==================== CSS VARIABLES ==================== */
:root {
	/* Colors */
	--background-color: #0d1117;
	--secondary-color: #161b22;
	--text-color: #c9d1d9;
	--text-color-light: #8b949e;
	--primary-color: #238636;
	--primary-color-hover: #2ea043;
	--border-color: #30363d;

	/* Fonts */
	--header-font: 'Manrope', sans-serif;
	--body-font: 'Inter', sans-serif;

	/* Typograhy */
	--fs-base: 16px;
	--fs-lg: 18px;
	--fs-xl: 24px;
	--fs-h1: 48px;
	--fs-h2: 36px;
	--fs-h3: 20px;

	/* Other */
	--header-height: 70px;
	--border-radius: 8px;
	--transition-duration: 0.3s;
}

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

html {
	scroll-behavior: smooth;
}

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

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

ul {
	list-style: none;
}

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

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

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

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

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

.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--header-font);
	font-weight: 600;
	font-size: var(--fs-lg);
	color: var(--text-color);
}

.header__nav {
	display: block;
}

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

.header__link {
	font-size: var(--fs-base);
	color: var(--text-color-light);
	transition: color var(--transition-duration) ease;
}

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

.header__link--button {
	background-color: var(--primary-color);
	color: #fff;
	padding: 0.5rem 1.25rem;
	border-radius: var(--border-radius);
	transition: background-color var(--transition-duration) ease;
}

.header__link--button:hover {
	background-color: var(--primary-color-hover);
	color: #fff;
}

.header__toggle {
	display: none;
	background: none;
	border: none;
	color: var(--text-color);
	cursor: pointer;
	padding: 0.25rem;
}

/* ==================== FOOTER ==================== */
.footer {
	background-color: var(--secondary-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__copy {
	margin-top: 1rem;
	font-size: 0.9rem;
	color: var(--text-color-light);
}

.footer__title {
	font-size: var(--fs-lg);
	margin-bottom: 1rem;
	font-weight: 600;
}

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

.footer__link {
	color: var(--text-color-light);
	transition: color var(--transition-duration) ease;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

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

.footer__icon {
	width: 18px;
	height: 18px;
}

/* ==================== MEDIA QUERIES (Mobile First) ==================== */
@media (max-width: 768px) {
	.header__nav {
		position: fixed;
		top: var(--header-height);
		left: -100%;
		width: 100%;
		height: calc(100vh - var(--header-height));
		background-color: var(--background-color);
		padding: 2rem;
		transition: left var(--transition-duration) ease-in-out;
	}

	.header__nav.active {
		left: 0;
	}

	.header__list {
		flex-direction: column;
		align-items: flex-start;
		gap: 2rem;
	}

	.header__link {
		font-size: var(--fs-lg);
	}

	.header__toggle {
		display: block;
	}
}

/* ==================== REUSABLE CLASSES (Дополнение) ==================== */
.button {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background-color: var(--primary-color);
	color: #fff;
	padding: 0.9rem 1.75rem;
	border-radius: var(--border-radius);
	font-weight: 500;
	transition: background-color var(--transition-duration) ease,
		transform var(--transition-duration) ease;
}

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

.button__icon {
	width: 20px;
	height: 20px;
}

/* ==================== HERO ==================== */
.hero {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	min-height: 90vh;
	display: flex;
	align-items: center;
}

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

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

.hero__description {
	font-size: var(--fs-lg);
	color: var(--text-color-light);
	margin-bottom: 2.5rem;
	max-width: 500px;
}

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

.hero__image-wrapper {
	background: linear-gradient(
		145deg,
		var(--secondary-color),
		var(--background-color)
	);
	border: 1px solid var(--border-color);
	padding: 1.5rem;
	border-radius: var(--border-radius);
	animation: floatAnimation 4s ease-in-out infinite;
}

.hero__image {
	border-radius: var(--border-radius);
}

/* Анимация "парения" */
@keyframes floatAnimation {
	0% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-15px);
	}
	100% {
		transform: translateY(0px);
	}
}

/* ==================== MEDIA QUERIES (Дополнение для Hero) ==================== */
@media (max-width: 992px) {
	:root {
		--fs-h1: 36px;
	}
	.hero__container {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.hero__content {
		order: 2;
	}
	.hero__visual {
		order: 1;
	}
	.hero__description {
		margin-left: auto;
		margin-right: auto;
	}
}

@media (max-width: 768px) {
	.hero {
		padding-top: calc(var(--header-height) + 2rem);
		padding-bottom: 2rem;
	}
}

/* ==================== REUSABLE CLASSES (Дополнение) ==================== */
.section {
	padding: 5rem 0;
}

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

.section__title {
	font-size: var(--fs-h2);
	margin-bottom: 0.75rem;
}

.section__subtitle {
	font-size: var(--fs-lg);
	color: var(--text-color-light);
	max-width: 600px;
	margin: 0 auto;
}

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

.courses__card {
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	padding: 2rem;
	border-top: 3px solid transparent;
	transition: transform var(--transition-duration) ease,
		border-top-color var(--transition-duration) ease;
}

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

.courses__icon-wrapper {
	width: 50px;
	height: 50px;
	display: grid;
	place-items: center;
	background-color: rgba(35, 134, 54, 0.1);
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

.courses__icon {
	width: 24px;
	height: 24px;
	color: var(--primary-color);
}

.courses__title {
	font-size: var(--fs-xl);
	margin-bottom: 0.75rem;
}

.courses__description {
	color: var(--text-color-light);
	margin-bottom: 1.5rem;
	font-size: 0.95rem;
}

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

.courses__stack-item {
	background-color: var(--border-color);
	color: var(--text-color-light);
	font-size: 0.8rem;
	padding: 0.25rem 0.75rem;
	border-radius: 1rem;
}

/* ==================== MEDIA QUERIES (Дополнение для Courses) ==================== */
@media (max-width: 992px) {
	.courses__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.section {
		padding: 4rem 0;
	}
	.courses__grid {
		grid-template-columns: 1fr;
	}
}

/* ==================== PROCESS ==================== */
.process__timeline {
	position: relative;
	max-width: 800px;
	margin: 2rem auto;
}

/* Центральная линия */
.process__timeline::after {
	content: '';
	position: absolute;
	width: 2px;
	background-color: var(--border-color);
	top: 0;
	bottom: 0;
	left: 50%;
	margin-left: -1px;
}

.process__item {
	padding: 1rem 3rem;
	position: relative;
	width: 50%;
}

/* Круги на линии */
.process__item::after {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	right: -8px;
	background-color: var(--background-color);
	border: 2px solid var(--primary-color);
	top: 28px;
	border-radius: 50%;
	z-index: 1;
}

/* Расположение контейнеров */
.process__item:nth-child(odd) {
	left: 0;
	padding-right: 3rem;
}

.process__item:nth-child(even) {
	left: 50%;
	padding-left: 3rem;
}

/* Расположение кругов для четных элементов */
.process__item:nth-child(even)::after {
	left: -8px;
}

.process__content {
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	padding: 1.5rem;
	border-radius: var(--border-radius);
	position: relative;
}

.process__number {
	position: absolute;
	top: -1.2rem;
	left: 1.5rem;
	font-size: 2.5rem;
	font-weight: 700;
	font-family: var(--header-font);
	color: rgba(201, 209, 217, 0.1);
	z-index: -1;
}

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

.process__description {
	font-size: 0.95rem;
	color: var(--text-color-light);
}

/* ==================== MEDIA QUERIES (Дополнение для Process) ==================== */
@media screen and (max-width: 768px) {
	.process__timeline::after {
		left: 20px;
	}

	.process__item {
		width: 100%;
		padding-left: 50px;
		padding-right: 1rem;
	}

	.process__item:nth-child(odd),
	.process__item:nth-child(even) {
		left: 0;
	}

	.process__item::after {
		left: 12px;
	}
}

/* ==================== REUSABLE CLASSES (Дополнение) ==================== */
/* Модификатор для заголовков с выравниванием по левому краю */
.section__header--left {
	text-align: left;
	margin-bottom: 2rem;
}
.section__header--left .section__subtitle {
	margin: 0;
	max-width: none;
}

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

.about__visual {
	position: relative;
}

/* Декоративный элемент за изображением */
.about__visual::before {
	content: '';
	position: absolute;
	width: 80%;
	height: 80%;
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	top: -1.5rem;
	left: -1.5rem;
	z-index: -1;
	transition: transform var(--transition-duration) ease;
}
.about__visual:hover::before {
	transform: translate(-5px, -5px);
}

.about__image {
	border-radius: var(--border-radius);
	position: relative;
	z-index: 1;
}

.about__metrics {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin-top: 2.5rem;
}

.about__metric-number {
	font-size: 2.5rem;
	font-family: var(--header-font);
	font-weight: 700;
	color: var(--primary-color);
	display: block;
	margin-bottom: 0.25rem;
}

.about__metric-text {
	font-size: 0.9rem;
	color: var(--text-color-light);
	line-height: 1.5;
}

/* ==================== MEDIA QUERIES (Дополнение для About) ==================== */
@media (max-width: 992px) {
	.about__container {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
	.about__visual {
		max-width: 450px;
		margin: 0 auto;
	}
	.section__header--left {
		text-align: center;
	}
	.section__header--left .section__subtitle {
		max-width: 600px;
		margin: 0 auto;
	}
	.about__metrics {
		justify-items: center;
		text-align: center;
	}
}
@media (max-width: 576px) {
	.about__metrics {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
}

/* ==================== FAQ ==================== */
.faq__accordion {
	max-width: 750px;
	margin: 0 auto;
}

.faq__item {
	border-bottom: 1px solid var(--border-color);
}
.faq__item:first-child {
	border-top: 1px solid var(--border-color);
}

.faq__header {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem 1rem;
	cursor: pointer;
	background: none;
	border: none;
	color: var(--text-color);
	font-family: var(--header-font);
	font-size: var(--fs-lg);
	font-weight: 600;
	text-align: left;
}

.faq__icon {
	width: 20px;
	height: 20px;
	transition: transform var(--transition-duration) ease;
	flex-shrink: 0; /* Предотвращает сжатие иконки */
	margin-left: 1rem;
}

.faq__content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.35s ease-out, padding 0.35s ease-out;
}

.faq__text {
	padding: 0 1rem 1.5rem;
	color: var(--text-color-light);
	line-height: 1.7;
}

/* Active state for accordion item */
.faq__item.active .faq__content {
	max-height: 200px; /* Достаточно большое значение для контента */
	transition: max-height 0.4s ease-in;
}

.faq__item.active .faq__icon {
	transform: rotate(180deg);
}
.faq__item.active .faq__header {
	color: var(--primary-color);
}

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

/* Form Styles */
.form__group {
	margin-bottom: 1.5rem;
}

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

.form__input {
	width: 100%;
	padding: 0.9rem 1rem;
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	color: var(--text-color);
	font-family: var(--body-font);
	font-size: 1rem;
	transition: border-color var(--transition-duration) ease,
		box-shadow var(--transition-duration) ease;
}

.form__input::placeholder {
	color: var(--text-color-light);
}

.form__input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(35, 134, 54, 0.2);
}

/* Custom Checkbox */
.form__group--checkbox {
	display: flex;
	align-items: center;
}

.form__checkbox-input {
	display: none;
}

.form__checkbox-label {
	align-items: center;
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--text-color-light);
}

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

.form__custom-checkbox {
	width: 20px;
	height: 20px;
	border: 2px solid var(--border-color);
	border-radius: 4px;
	margin-right: 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color var(--transition-duration) ease,
		border-color var(--transition-duration) ease;
	flex-shrink: 0;
}

.form__custom-checkbox::after {
	content: '\2713'; /* Checkmark symbol */
	color: #fff;
	font-size: 14px;
	opacity: 0;
	transition: opacity var(--transition-duration) ease;
}

.form__checkbox-input:checked + .form__checkbox-label .form__custom-checkbox {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}

.form__checkbox-input:checked
	+ .form__checkbox-label
	.form__custom-checkbox::after {
	opacity: 1;
}

.form__button {
	width: 100%;
	justify-content: center;
	font-size: 1.1rem;
	padding: 1rem;
}

/* Success Message */
.form__success-message {
	display: none; /* Hidden by default */
	text-align: center;
	padding: 2rem;
	border: 1px solid var(--border-color);
	border-radius: var(--border-radius);
	background-color: var(--secondary-color);
}
.form__success-icon {
	width: 48px;
	height: 48px;
	color: var(--primary-color);
	margin-bottom: 1rem;
}
.form__success-title {
	font-size: var(--fs-xl);
	margin-bottom: 0.5rem;
}

/* ==================== MEDIA QUERIES (Дополнение для Contact) ==================== */
@media (max-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
	.contact__info {
		text-align: center;
	}
}

/* ==================== COOKIE POP-UP ==================== */
.cookie-popup {
	position: fixed;
	bottom: -100%; /* Initially hidden */
	left: 0;
	width: 100%;
	background-color: var(--secondary-color);
	border-top: 1px solid var(--border-color);
	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.active {
	bottom: 0;
}

.cookie-popup__text {
	color: var(--text-color-light);
	text-align: center;
}

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

.cookie-popup__button {
	padding: 0.6rem 1.5rem;
	white-space: nowrap; /* Prevent button text from wrapping */
}

@media (max-width: 768px) {
	.cookie-popup {
		flex-direction: column;
		text-align: center;
	}
}

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

.pages .container {
	max-width: 800px;
}

.pages h1,
.pages h2 {
	font-family: var(--header-font);
	margin-bottom: 1.5rem;
}

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

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

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

.pages ul {
	list-style-type: disc;
	padding-left: 20px;
	margin-bottom: 1rem;
}

.pages li {
	margin-bottom: 0.75rem;
	color: var(--text-color-light);
}

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

.pages a:hover {
	color: var(--primary-color-hover);
	text-decoration: none;
}

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