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

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

	/* Colors */
	--clr-bg: rgb(17, 24, 39);
	--clr-text: rgb(249, 250, 251);
	--clr-accent: rgb(56, 189, 248);
	--clr-text-secondary: rgb(156, 163, 175);
	--clr-border: rgba(107, 114, 128, 0.4);

	/* Fonts */
	--font-body: 'Roboto', sans-serif;
	--font-headings: 'Inter', sans-serif;

	/* Font sizes */
	--fs-base: 1rem; /* 16px */
	--fs-lg: 1.125rem;
	--fs-xl: 1.25rem;
	--fs-2xl: 1.5rem;
	--fs-3xl: 2rem;
}

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

html {
	scroll-behavior: smooth;
}

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

ul {
	list-style: none;
}

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

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

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

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

.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(--font-headings);
	font-weight: 700;
	font-size: var(--fs-xl);
	color: var(--clr-text);
	transition: color 0.3s;
}

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

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

.header__burger {
	position: relative;
	z-index: 999;
	display: none;
	background: none;
	border: none;
	color: var(--clr-text);
	cursor: pointer;
}

/* Navigation for mobile */
@media screen and (max-width: 768px) {
	.header__nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 70%;
		height: 100vh;
		background-color: var(--clr-bg);
		border-left: 1px solid var(--clr-border);
		padding: 6rem 2rem 2rem;
		transition: right 0.4s ease-in-out;
	}

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

	.header__burger {
		display: block;
	}

	.header__nav.is-active {
		right: 0;
	}
}

.header__nav-link {
	color: var(--clr-text-secondary);
	font-weight: 500;
	transition: color 0.3s;
}

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

.header__nav-link--button {
	background-color: var(--clr-accent);
	color: var(--clr-bg);
	padding: 0.5rem 1rem;
	border-radius: 6px;
	transition: background-color 0.3s, color 0.3s;
}

.header__nav-link--button:hover {
	background-color: var(--clr-text);
	color: var(--clr-bg);
}

/* ===== FOOTER ===== */
.footer {
	padding-top: 5rem;
	padding-bottom: 2rem;
	border-top: 1px solid var(--clr-border);
}

.footer__container {
	display: grid;
	gap: 2.5rem;
}

.footer__description {
	margin-top: 1rem;
	color: var(--clr-text-secondary);
	font-size: 0.9rem;
	max-width: 250px;
}

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

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

.footer__link {
	color: var(--clr-text-secondary);
	transition: color 0.3s;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

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

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

.footer__copyright {
	margin-top: 4rem;
	text-align: center;
	color: var(--clr-text-secondary);
	font-size: 0.85rem;
}

/* ===== MEDIA QUERIES ===== */
/* For medium devices */
@media screen and (min-width: 769px) {
	.header__nav-list {
		display: flex;
		align-items: center;
		gap: 2rem;
	}

	.footer__container {
		grid-template-columns: repeat(4, 1fr);
	}
}

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

/* ===== HERO SECTION ===== */
.main {
	/* Добавляем отступ сверху, равный высоте хедера */
	padding-top: var(--header-height);
}

.hero {
	padding: 4rem 0;
	overflow: hidden; /* Важно для анимаций */
}

.hero__container {
	display: grid;
	gap: 3rem;
	align-items: center;
}

.hero__title {
	font-family: var(--font-headings);
	font-size: var(--fs-3xl);
	font-weight: 800; /* Сделаем заголовок еще выразительнее */
	line-height: 1.2;
	margin-bottom: 1.5rem;
}

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

.hero__button {
	display: inline-block;
	background-color: var(--clr-accent);
	color: var(--clr-bg);
	padding: 1rem 2rem;
	border-radius: 8px;
	font-family: var(--font-headings);
	font-weight: 600;
	transition: transform 0.3s, box-shadow 0.3s;
}

.hero__button:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(56, 189, 248, 0.2);
}

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

.hero__image {
	width: 100%;
	border-radius: 1rem;
	position: relative;
	z-index: 2;
}

/* Декоративный фон для изображения */
.hero__image-bg {
	position: absolute;
	width: 90%;
	height: 90%;
	background: linear-gradient(45deg, var(--clr-accent), var(--clr-border));
	opacity: 0.3;
	filter: blur(40px);
	border-radius: 50%;
	z-index: 1;
}

/* ===== MEDIA QUERIES (дополнение) ===== */
@media screen and (min-width: 769px) {
	.hero {
		padding: 6rem 0;
	}

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

/* ===== HOW IT WORKS SECTION ===== */
.how-it-works {
	padding: 4rem 0;
	background-color: rgba(249, 250, 251, 0.03); /* Очень легкий акцент на фоне */
}

.how-it-works__header {
	text-align: center;
	margin-bottom: 3rem;
}

.how-it-works__title {
	font-family: var(--font-headings);
	font-size: var(--fs-2xl);
	margin-bottom: 0.75rem;
}

.how-it-works__subtitle {
	font-size: var(--fs-lg);
	color: var(--clr-text-secondary);
	max-width: 550px;
	margin: 0 auto;
}

.how-it-works__steps {
	display: grid;
	gap: 2rem;
}

.how-it-works__step {
	background-color: var(--clr-bg);
	border: 1px solid var(--clr-border);
	padding: 2rem;
	border-radius: 12px;
	text-align: center;
	transition: transform 0.3s, box-shadow 0.3s;
}

.how-it-works__step:hover {
	transform: translateY(-8px);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.how-it-works__icon-wrapper {
	display: inline-flex;
	padding: 1rem;
	background-color: rgba(56, 189, 248, 0.1);
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

.how-it-works__icon-wrapper .lucide {
	width: 32px;
	height: 32px;
	color: var(--clr-accent);
}

.how-it-works__step-title {
	font-family: var(--font-headings);
	font-size: var(--fs-xl);
	margin-bottom: 0.5rem;
}

.how-it-works__step-description {
	color: var(--clr-text-secondary);
	font-size: 0.95rem;
}

/* ===== MEDIA QUERIES (дополнение) ===== */
@media screen and (min-width: 769px) {
	.how-it-works {
		padding: 6rem 0;
	}

	.how-it-works__steps {
		grid-template-columns: repeat(3, 1fr);
	}

	.how-it-works__title {
		font-size: var(--fs-3xl);
	}
}

/* ===== TOPICS SECTION ===== */
.topics {
	padding: 4rem 0;
}

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

.topics__title {
	font-family: var(--font-headings);
	font-size: var(--fs-2xl);
	margin-bottom: 0.75rem;
}

.topics__subtitle {
	font-size: var(--fs-lg);
	color: var(--clr-text-secondary);
	max-width: 550px;
	margin: 0 auto;
}

/* Tabs */
.topics__tabs {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 3rem;
}

.topics__tab-button {
	background-color: transparent;
	border: 1px solid var(--clr-border);
	color: var(--clr-text-secondary);
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	font-family: var(--font-headings);
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s;
}

.topics__tab-button:hover {
	background-color: var(--clr-accent);
	color: var(--clr-bg);
	border-color: var(--clr-accent);
}

.topics__tab-button.is-active {
	background-color: var(--clr-accent);
	color: var(--clr-bg);
	border-color: var(--clr-accent);
}

/* Content panels */
.topics__panel {
	display: none;
}

.topics__panel.is-active {
	display: block;
}

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

/* Course cards */
.topics__card {
	background-color: var(--clr-bg);
	border: 1px solid var(--clr-border);
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s, box-shadow 0.3s;
}

.topics__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.topics__card-img {
	width: 100%;
	height: 180px;
	object-fit: cover;
}

.topics__card-body {
	padding: 1.5rem;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.topics__card-tag {
	display: inline-block;
	background-color: rgba(56, 189, 248, 0.1);
	color: var(--clr-accent);
	padding: 0.25rem 0.75rem;
	border-radius: 99px;
	font-size: 0.8rem;
	font-weight: 500;
	margin-bottom: 1rem;
	align-self: flex-start;
}

.topics__card-title {
	font-family: var(--font-headings);
	font-size: var(--fs-lg);
	margin-bottom: 0.5rem;
}

.topics__card-description {
	color: var(--clr-text-secondary);
	font-size: 0.95rem;
	line-height: 1.5;
}

/* ===== MEDIA QUERIES (дополнение) ===== */
@media screen and (min-width: 576px) {
	.topics__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 769px) {
	.topics {
		padding: 6rem 0;
	}
	.topics__title {
		font-size: var(--fs-3xl);
	}
}

@media screen and (min-width: 992px) {
	.topics__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ===== CASES SECTION ===== */
.cases {
	padding: 4rem 0;
	background-color: rgba(249, 250, 251, 0.03);
}

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

.cases__title {
	font-family: var(--font-headings);
	font-size: var(--fs-2xl);
	margin-bottom: 0.75rem;
}

.cases__subtitle {
	font-size: var(--fs-lg);
	color: var(--clr-text-secondary);
	max-width: 550px;
	margin: 0 auto;
}

/* Swiper slider styles */
.cases__slider {
	width: 100%;
	padding: 1rem 0 3rem; /* Добавим отступ снизу для пагинации */
}

.cases__card {
	background-color: var(--clr-bg);
	border: 1px solid var(--clr-border);
	border-radius: 12px;
	overflow: hidden;
	height: 100%; /* Чтобы карточки были одинаковой высоты */
	display: flex;
	flex-direction: column;
}

.cases__card-img {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.cases__card-body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.cases__card-title {
	font-family: var(--font-headings);
	font-size: var(--fs-lg);
	margin-bottom: 0.75rem;
}

.cases__card-description {
	color: var(--clr-text-secondary);
	font-size: 0.95rem;
	line-height: 1.5;
	margin-bottom: 1.5rem;
	flex-grow: 1;
}

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

.cases__card-tag {
	background-color: rgba(156, 163, 175, 0.1);
	color: var(--clr-text-secondary);
	padding: 0.25rem 0.75rem;
	border-radius: 99px;
	font-size: 0.8rem;
	font-weight: 500;
}

/* Swiper navigation and pagination */
.swiper-button-next,
.swiper-button-prev {
	color: var(--clr-accent) !important;
}

.swiper-pagination-bullet-active {
	background-color: var(--clr-accent) !important;
}

/* ===== MEDIA QUERIES (дополнение) ===== */
@media screen and (min-width: 769px) {
	.cases {
		padding: 6rem 0;
	}
	.cases__title {
		font-size: var(--fs-3xl);
	}
}

/* ===== FAQ SECTION ===== */
.faq {
	padding: 4rem 0;
}

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

.faq__title {
	font-family: var(--font-headings);
	font-size: var(--fs-2xl);
	margin-bottom: 0.75rem;
}

.faq__subtitle {
	font-size: var(--fs-lg);
	color: var(--clr-text-secondary);
	max-width: 550px;
	margin: 0 auto;
}

.faq__accordion {
	max-width: 700px;
	margin: 0 auto;
}

.faq__item {
	border-bottom: 1px solid var(--clr-border);
}

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

.faq__icon {
	transition: transform 0.3s ease;
	color: var(--clr-accent);
}

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

.faq__answer-text {
	color: var(--clr-text-secondary);
	padding-bottom: 1.5rem;
	line-height: 1.7;
}

/* Active state for accordion */
.faq__item.is-active .faq__icon {
	transform: rotate(180deg);
}

.faq__item.is-active .faq__answer {
	/* max-height будет установлен через JS для точного значения */
}

/* ===== MEDIA QUERIES (дополнение) ===== */
@media screen and (min-width: 769px) {
	.faq {
		padding: 6rem 0;
	}
	.faq__title {
		font-size: var(--fs-3xl);
	}
}

/* ===== CONTACT SECTION ===== */
.contact {
	padding: 4rem 0;
	background-color: rgba(249, 250, 251, 0.03);
}

.contact__container {
	display: grid;
	gap: 3rem;
}

.contact__title {
	font-family: var(--font-headings);
	font-size: var(--fs-2xl);
	margin-bottom: 1rem;
}

.contact__description {
	font-size: var(--fs-lg);
	color: var(--clr-text-secondary);
	max-width: 400px;
}

/* Form Styles */
.contact__form {
	background-color: var(--clr-bg);
	padding: 2rem;
	border: 1px solid var(--clr-border);
	border-radius: 12px;
}

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

.contact__form-label {
	display: block;
	margin-bottom: 0.5rem;
	color: var(--clr-text-secondary);
	font-size: 0.9rem;
}

.contact__form-input {
	width: 100%;
	padding: 0.75rem 1rem;
	background-color: rgba(0, 0, 0, 0.2);
	border: 1px solid var(--clr-border);
	border-radius: 8px;
	color: var(--clr-text);
	font-size: 1rem;
	transition: border-color 0.3s, box-shadow 0.3s;
}

.contact__form-input:focus {
	outline: none;
	border-color: var(--clr-accent);
	box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

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

.contact__form-checkbox {
	margin-top: 0.25rem;
}

.contact__form-checkbox-label {
	color: var(--clr-text-secondary);
	font-size: 0.9rem;
}

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

.contact__form-button {
	width: 100%;
	background-color: var(--clr-accent);
	color: var(--clr-bg);
	padding: 1rem 2rem;
	border-radius: 8px;
	font-family: var(--font-headings);
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: background-color 0.3s;
}

.contact__form-button:hover {
	background-color: var(--clr-text);
}

/* Success Message */
.contact__form-message {
	display: none; /* Hidden by default */
	text-align: center;
	padding: 2rem;
	border: 1px solid var(--clr-accent);
	border-radius: 8px;
	background-color: rgba(56, 189, 248, 0.05);
}
.contact__form-message.is-visible {
	display: block;
}

.contact__form-message-title {
	font-family: var(--font-headings);
	font-size: var(--fs-xl);
	margin-bottom: 0.5rem;
	color: var(--clr-accent);
}

/* ===== MEDIA QUERIES (дополнение) ===== */
@media screen and (min-width: 769px) {
	.contact {
		padding: 6rem 0;
	}
	.contact__container {
		grid-template-columns: 1fr 1.25fr;
		align-items: center;
	}
	.contact__title {
		font-size: var(--fs-3xl);
	}
}

/* ===== COOKIE POP-UP ===== */
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--clr-bg);
	border-top: 1px solid var(--clr-border);
	padding: 1rem 0;
	z-index: 200;
	transform: translateY(100%);
	transition: transform 0.5s ease-in-out;
}

.cookie-popup.is-visible {
	transform: translateY(0);
}

.cookie-popup__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.cookie-popup__text {
	color: var(--clr-text-secondary);
}

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

.cookie-popup__button {
	background-color: var(--clr-accent);
	color: var(--clr-bg);
	padding: 0.5rem 1.5rem;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	font-weight: 500;
	white-space: nowrap;
}

/* ===== GENERIC PAGES STYLES (privacy, terms, etc.) ===== */
.pages {
	padding: calc(var(--header-height) + 4rem) 0 4rem;
}

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

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

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

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

.pages ul {
	list-style: disc;
	padding-left: 1.5rem;
	color: var(--clr-text-secondary);
	margin-bottom: 1rem;
}

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

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

.pages a:hover {
	color: var(--clr-text);
}

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