/* Глобальные стили и переменные */
:root {
	--color-background: #0d1117;
	--color-surface: #161b22;
	--color-primary: #58a6ff;
	--color-secondary: #1f6feb;
	--color-text: #c9d1d9;
	--color-text-muted: #8b949e;
	--color-border: #30363d;

	--font-family-headings: 'Inter', sans-serif;
	--font-family-body: 'Manrope', sans-serif;

	--container-width: 1200px;
	--container-padding: 16px;
	--header-height: 70px;
}

/* Сброс стилей и базовые настройки */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-family-body);
	font-size: 16px;
	line-height: 1.6;
	background-color: var(--color-background);
	color: var(--color-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-family-headings);
	color: #ffffff;
	line-height: 1.2;
	margin-bottom: 1rem;
}

a {
	color: var(--color-primary);
	text-decoration: none;
	transition: color 0.3s ease;
}

a:hover {
	color: var(--color-secondary);
}

ul {
	list-style: none;
}

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

.container {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 0 var(--container-padding);
}

/* Хедер */
.header {
	background-color: rgba(13, 17, 23, 0.8);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid var(--color-border);
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--header-height);
	z-index: 1000;
}

.header__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 100%;
}

.logo {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 1.5rem;
	font-weight: 700;
	font-family: var(--font-family-headings);
	color: #ffffff;
}

.logo__svg {
	color: var(--color-primary);
	transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.logo:hover .logo__svg {
	transform: rotate(180deg);
}

.header__nav {
	display: flex;
}

.header__nav-list {
	display: flex;
	align-items: center;
	gap: 32px;
}

.header__nav-link {
	font-size: 1rem;
	color: var(--color-text);
	position: relative;
	padding: 8px 0;
}

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

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

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

/* Адаптив хедера */
@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(--color-background);
		flex-direction: column;
		justify-content: center;
		align-items: center;
		transition: left 0.4s ease-in-out;
	}

	.header__nav--active {
		left: 0;
	}

	.header__nav-list {
		flex-direction: column;
		gap: 40px;
	}

	.header__nav-link {
		font-size: 1.5rem;
	}

	.header__burger-btn {
		display: block;
		z-index: 1001;
	}
}

/* Футер */
.footer {
	background-color: var(--color-surface);
	border-top: 1px solid var(--color-border);
	padding: 60px 0 20px;
	margin-top: 80px;
}

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

.footer__column--about .logo {
	margin-bottom: 20px;
}

.footer__description {
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

.footer__title {
	font-size: 1.2rem;
	margin-bottom: 20px;
	color: #ffffff;
}

.footer__list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.footer__link,
.footer__text {
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

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

.footer__list--contacts .footer__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.footer__icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	color: var(--color-primary);
}

.footer__bottom {
	border-top: 1px solid var(--color-border);
	margin-top: 40px;
	padding-top: 20px;
	text-align: center;
	font-size: 0.8rem;
	color: var(--color-text-muted);
}

/*--------------------
    Общие компоненты
--------------------*/
.btn {
	display: inline-block;
	padding: 14px 32px;
	font-family: var(--font-family-headings);
	font-size: 1rem;
	font-weight: 700;
	text-align: center;
	border-radius: 8px;
	cursor: pointer;
	transition: transform 0.3s ease, background-color 0.3s ease,
		box-shadow 0.3s ease;
	border: none;
}

.btn--primary {
	background-color: var(--color-primary);
	color: var(--color-background);
}

.btn--primary:hover {
	background-color: var(--color-secondary);
	color: var(--color-background);
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(88, 166, 255, 0.2);
}

/*--------------------
    Секция Hero
--------------------*/
.hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 100vh;
	padding-top: var(--header-height); /* Компенсация высоты хедера */
	overflow: hidden;
}

.hero__gradient-bg {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(250deg, #0d1117, #1f2a38, #0d1117);
	background-size: 400% 400%;
	animation: gradientAnimation 15s ease infinite;
	z-index: -1;
}

@keyframes gradientAnimation {
	0% {
		background-position: 0% 50%;
	}
	50% {
		background-position: 100% 50%;
	}
	100% {
		background-position: 0% 50%;
	}
}

.hero__container {
	text-align: center;
	z-index: 1;
}

.hero__content {
	max-width: 800px;
	margin: 0 auto;
}

.hero__title {
	font-size: 3.5rem;
	margin-bottom: 1.5rem;
	background: linear-gradient(90deg, #ffffff, #c9d1d9);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hero__subtitle {
	font-size: 1.25rem;
	color: var(--color-text-muted);
	margin-bottom: 2.5rem;
	line-height: 1.7;
}

.hero__btn {
	font-size: 1.1rem;
}

/* Анимация появления */
.animate-on-load {
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-load:nth-child(1) {
	transition-delay: 0.2s;
}
.animate-on-load:nth-child(2) {
	transition-delay: 0.4s;
}
.animate-on-load:nth-child(3) {
	transition-delay: 0.6s;
}

@media (max-width: 768px) {
	.hero__title {
		font-size: 2.5rem;
	}
	.hero__subtitle {
		font-size: 1rem;
	}
}

/*--------------------
    Общие компоненты секций
--------------------*/
.section-header {
	text-align: center;
	max-width: 750px;
	margin: 0 auto 60px;
}

.section-header__title {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.section-header__subtitle {
	font-size: 1.1rem;
	color: var(--color-text-muted);
}

@media (max-width: 768px) {
	.section-header__title {
		font-size: 2rem;
	}
}

/*--------------------
    Секция Features
--------------------*/
.features {
	padding: 80px 0;
}

.features__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
}

.features__card {
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	padding: 30px;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;

	/* Для анимации появления */
	opacity: 0;
	transform: translateY(30px);
}

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

.features__card-icon {
	margin: 0 auto 20px;
	width: 60px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: rgba(88, 166, 255, 0.1);
	border-radius: 50%;
}

.features__card-icon i {
	width: 32px;
	height: 32px;
	color: var(--color-primary);
}

.features__card-title {
	font-size: 1.5rem;
	margin-bottom: 15px;
}

.features__card-text {
	color: var(--color-text-muted);
}

/*--------------------
    Секция How It Works
--------------------*/
.how-it-works {
	padding: 80px 0;
	background-color: var(--color-surface);
}

.how-it-works__timeline {
	position: relative;
	max-width: 600px;
	margin: 0 auto;
	padding: 20px 0;
}

/* Вертикальная линия */
.how-it-works__timeline::before {
	content: '';
	position: absolute;
	top: 0;
	left: 35px;
	height: 100%;
	width: 2px;
	background-color: var(--color-border);
}

.how-it-works__step {
	display: flex;
	align-items: flex-start;
	gap: 30px;
	position: relative;
	padding-left: 50px; /* Отступ для иконки */
	margin-bottom: 40px;

	/* Для анимации появления */
	opacity: 0;
	transform: translateX(-30px);
}

.how-it-works__step:last-child {
	margin-bottom: 0;
}

.how-it-works__step-icon {
	position: absolute;
	left: 0;
	top: 0;
	width: 70px;
	height: 70px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background-color: var(--color-background);
	border: 2px solid var(--color-border);
	z-index: 1;
}

.how-it-works__step-icon i {
	width: 30px;
	height: 30px;
	color: var(--color-primary);
}

.how-it-works__step-content {
	padding-left: 40px; /* Отступ от иконки */
}

.how-it-works__step-title {
	font-size: 1.5rem;
	margin-bottom: 10px;
}

.how-it-works__step-text {
	color: var(--color-text-muted);
}

@media (max-width: 768px) {
	.how-it-works__timeline::before {
		left: 25px;
	}
	.how-it-works__step {
		padding-left: 30px;
		gap: 20px;
	}
	.how-it-works__step-icon {
		width: 50px;
		height: 50px;
	}
	.how-it-works__step-icon i {
		width: 24px;
		height: 24px;
	}
	.how-it-works__step-content {
		padding-left: 30px;
	}
}

/*--------------------
    Секция Reviews
--------------------*/
.reviews {
	padding: 80px 0;
}

.reviews__slider {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	overflow: hidden;
}

.reviews__slider-wrapper {
	display: flex;
	transition: transform 0.5s ease-in-out;
}

.reviews__slide {
	flex: 0 0 100%;
	width: 100%;
	padding: 40px;
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: 12px;
	box-sizing: border-box;
}

.reviews__slide-text {
	font-size: 1.2rem;
	font-style: italic;
	color: var(--color-text);
	line-height: 1.7;
	margin-bottom: 30px;
	text-align: center;
}

.reviews__slide-author {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
}

.reviews__author-img {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--color-primary);
}

.reviews__author-info {
	display: flex;
	flex-direction: column;
	text-align: left;
}

.reviews__author-name {
	font-weight: 700;
	color: #ffffff;
}

.reviews__author-location {
	font-size: 0.9rem;
	color: var(--color-text-muted);
}

.reviews__slider-nav {
	margin-top: 30px;
	display: flex;
	justify-content: center;
	gap: 20px;
}

.reviews__nav-btn {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	color: var(--color-primary);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.reviews__nav-btn:hover {
	background-color: var(--color-primary);
	color: var(--color-background);
}

@media (max-width: 768px) {
	.reviews__slide {
		padding: 25px;
	}
	.reviews__slide-text {
		font-size: 1rem;
	}
}

/*--------------------
    Секция FAQ
--------------------*/
.faq {
	padding: 80px 0;
	background-color: var(--color-surface);
}

.faq__accordion {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.faq__item {
	background-color: var(--color-background);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	overflow: hidden;
}

.faq__question {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-size: 1.2rem;
	font-family: var(--font-family-headings);
	color: #ffffff;
}

.faq__icon {
	flex-shrink: 0;
	color: var(--color-primary);
	transition: transform 0.3s ease-in-out;
}

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

.faq__answer p {
	padding: 0 20px 20px;
	color: var(--color-text-muted);
	line-height: 1.7;
}

/* Стили для активного элемента */
.faq__item--active .faq__question {
	color: var(--color-primary);
}

.faq__item--active .faq__icon {
	transform: rotate(135deg);
}

.faq__item--active .faq__answer {
	max-height: 200px; /* Установите значение, достаточное для вашего текста */
}

/*--------------------
    Секция Contact
--------------------*/
.contact {
	padding: 80px 0;
}

.contact__wrapper {
	max-width: 600px;
	margin: 0 auto;
	background-color: var(--color-surface);
	padding: 40px;
	border-radius: 12px;
	border: 1px solid var(--color-border);
	transition: height 0.5s ease-in-out;
}

.contact__form {
	display: flex;
	flex-direction: column;
	gap: 25px;
}

.form__group {
	position: relative;
}

.form__input {
	width: 100%;
	padding: 14px;
	background-color: var(--color-background);
	border: 1px solid var(--color-border);
	border-radius: 8px;
	color: var(--color-text);
	font-size: 1rem;
	transition: border-color 0.3s ease;
}

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

.form__label {
	position: absolute;
	top: 14px;
	left: 14px;
	color: var(--color-text-muted);
	pointer-events: none;
	transition: top 0.3s ease, font-size 0.3s ease, color 0.3s ease;
}

/* Floating label effect */
.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
	top: -10px;
	left: 10px;
	font-size: 0.8rem;
	color: var(--color-primary);
	background-color: var(--color-surface);
	padding: 0 5px;
}

.form__group--checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
}

.form__checkbox {
	width: 1.2em;
	height: 1.2em;
	accent-color: var(--color-primary);
	flex-shrink: 0;
}

.form__checkbox-label {
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

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

.form__checkbox-label a:hover {
	text-decoration: none;
}

.contact__btn {
	width: 100%;
}

.contact__success-message {
	display: none; /* Скрыто по умолчанию */
	text-align: center;
	padding: 40px 20px;
}

.contact__success-message h3 {
	font-size: 1.5rem;
	color: var(--color-primary);
	margin-bottom: 10px;
}

@media (max-width: 768px) {
	.contact__wrapper {
		padding: 25px;
	}
}

/*--------------------
    Cookie Pop-up
--------------------*/
.cookie-popup {
	position: fixed;
	bottom: -100%; /* Изначально скрыт */
	left: 0;
	width: 100%;
	background-color: rgba(22, 27, 34, 0.9);
	backdrop-filter: blur(5px);
	border-top: 1px solid var(--color-border);
	padding: 20px;
	z-index: 2000;
	transition: bottom 0.5s ease-in-out;
}

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

.cookie-popup__content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: var(--container-width);
	margin: 0 auto;
	gap: 20px;
}

.cookie-popup__text {
	color: var(--color-text-muted);
	font-size: 0.9rem;
}

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

.cookie-popup__btn {
	padding: 10px 25px;
	white-space: nowrap;
}

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

/*--------------------
    Стили для страниц политик (privacy.html, terms.html, etc.)
--------------------*/
.pages {
	padding: 120px 0 80px; /* Больше отступ сверху из-за фиксированного хедера */
}

.pages .container {
	max-width: 800px; /* Ограничиваем ширину для лучшей читабельности */
}

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

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

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

.pages a {
	text-decoration: underline;
}

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

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

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

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

@media (max-width: 768px) {
	.pages h1 {
		font-size: 2.2rem;
	}
	.pages h2 {
		font-size: 1.5rem;
	}
}
