/* GLOBAL SETTINGS AND VARIABLES */
:root {
	--font-primary: 'Lato', sans-serif;
	--font-secondary: 'Poppins', sans-serif;
	--color-primary: #4a90e2;
	--color-secondary: #1a202c;
	--color-background: #ffffff;
	--color-surface: #f7fafc;
	--color-text: #2d3748;
	--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
		0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--transition-fast: 0.2s ease-in-out;
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

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

.container {
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 15px;
	padding-right: 15px;
}

ul {
	list-style: none;
}

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

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

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-secondary);
	color: var(--color-secondary);
	font-weight: 700;
}

/* HEADER */
.header {
	background-color: var(--color-background);
	border-bottom: 1px solid #e2e8f0;
	position: sticky;
	top: 0;
	z-index: 1000;
	padding: 1rem 0;
}

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

.logo {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--font-secondary);
	font-weight: 700;
	font-size: 1.5rem;
	color: var(--color-secondary);
}

.logo svg {
	transition: transform var(--transition-fast);
}

.logo:hover svg {
	transform: rotate(15deg);
}

.header__nav {
	display: none; /* Mobile first: hide navigation by default */
}

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

.header__nav-link {
	font-weight: 700;
	color: var(--color-secondary);
	position: relative;
	padding: 0.5rem 0;
}

.header__nav-link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--color-primary);
	transition: width var(--transition-fast);
}

.header__nav-link:hover::after {
	width: 100%;
}

.header__nav-link--button {
	background-color: var(--color-primary);
	color: white;
	padding: 0.75rem 1.5rem;
	border-radius: 8px;
	transition: background-color var(--transition-fast),
		transform var(--transition-fast);
}

.header__nav-link--button:hover {
	background-color: #357abd;
	transform: translateY(-2px);
}

.header__nav-link--button::after {
	display: none;
}

.header__burger-button {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.5rem;
	color: var(--color-secondary);
}

/* Desktop styles for header */
@media (min-width: 768px) {
	.header__burger-button {
		display: none;
	}
	.header__nav {
		display: block;
	}
}

/* Mobile Menu Active State */
.header__nav--active {
	display: block;
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	background-color: var(--color-background);
	padding: 1rem;
	box-shadow: var(--shadow);
}

.header__nav--active .header__nav-list {
	flex-direction: column;
	align-items: flex-start;
	gap: 1.5rem;
}

/* FOOTER */
.footer {
	background-color: var(--color-secondary);
	color: #a0aec0;
	padding: 4rem 0;
}

.footer__container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
}

@media (min-width: 768px) {
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.footer__container {
		grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
		gap: 2rem;
	}
}

.footer__column:first-child {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.footer__logo {
	color: white;
}

.footer__copyright {
	font-size: 0.875rem;
}

.footer__title {
	font-family: var(--font-secondary);
	color: white;
	font-size: 1.125rem;
	margin-bottom: 1rem;
}

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

.footer__list--contacts {
	gap: 1rem;
}

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

.footer__link:hover {
	color: white;
}

.footer__list--contacts .lucide {
	flex-shrink: 0;
}

/* HERO SECTION */
.hero {
	padding: 6rem 0;
	background-color: var(--color-surface);
	min-height: 80vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.hero__container {
	text-align: center;
	max-width: 800px; /* Ограничиваем ширину для лучшей читаемости */
}

.hero__title {
	font-size: 2.5rem;
	line-height: 1.2;
	margin-bottom: 1.5rem;
	font-family: 'Roboto Mono', monospace; /* Используем моноширинный шрифт для эффекта */
	min-height: 1.2em; /* Резервируем место, чтобы текст не прыгал */
}

@media (min-width: 768px) {
	.hero__title {
		font-size: 4rem;
		min-height: 1.2em;
	}
}

.hero__description {
	font-size: 1.125rem;
	color: var(--color-text);
	margin-bottom: 2.5rem;
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInUP 0.5s ease 1s forwards; /* Анимация появления после заголовка */
}

.hero__cta {
	padding: 1rem;
	border-radius: 8px;
	background-color: var(--color-primary);
	color: white;
	font-weight: 700;
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInUP 0.5s ease 1.2s forwards; /* Анимация появления после описания */
}

/* Анимация для второстепенных элементов */
@keyframes fadeInUP {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* SECTION DEFAULTS */
.section-title {
	font-size: 2.25rem;
	margin-bottom: 1.5rem;
	line-height: 1.2;
}

.section-description {
	font-size: 1.125rem;
	color: var(--color-text);
	margin-bottom: 2rem;
	max-width: 600px;
}

/* ABOUT SECTION */
.about {
	padding: 6rem 0;
	background-color: var(--color-background);
}

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

@media (min-width: 992px) {
	.about__container {
		grid-template-columns: 1fr 1fr;
	}
}

.about__features {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 2.5rem;
}

.about__feature-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	background-color: var(--color-surface);
	padding: 1rem;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	font-weight: 700;
	color: var(--color-secondary);
}

.about__feature-item .lucide {
	color: var(--color-primary);
	flex-shrink: 0;
}

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

.about__image {
	border-radius: 12px;
	box-shadow: var(--shadow);
	z-index: 2;
	position: relative;
}

/* Декоративный элемент за изображением */
.about__visual::after {
	content: '';
	position: absolute;
	width: 80%;
	height: 80%;
	background-color: var(--color-primary);
	opacity: 0.1;
	border-radius: 12px;
	top: -20px;
	right: -20px;
	z-index: 1;
	transition: transform 0.3s ease;
}

@media (max-width: 991px) {
	.about__visual::after {
		top: -10px;
		right: -10px;
	}
}

/* FEATURES SECTION */
.features {
	padding: 6rem 0;
	background-color: var(--color-surface);
}

.features__header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto 4rem auto;
}

.features__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

@media (min-width: 768px) {
	.features__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.features__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.feature-card {
	background-color: var(--color-background);
	padding: 2.5rem 2rem;
	border-radius: 12px;
	border: 1px solid #e2e8f0;
	text-align: center;
	transition: transform var(--transition-fast),
		box-shadow var(--transition-fast);
}

.feature-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow);
}

.feature-card__icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 64px;
	height: 64px;
	background-color: #ebf4ff; /* Светлый оттенок основного синего */
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

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

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

.feature-card__description {
	font-size: 1rem;
	line-height: 1.6;
	color: var(--color-text);
}

/* HOW IT WORKS SECTION */
.how-it-works {
	padding: 6rem 0;
	background-color: var(--color-background);
}

.how-it-works__header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto 4rem auto;
}

.how-it-works__steps {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
	position: relative;
}

@media (min-width: 992px) {
	.how-it-works__steps {
		grid-template-columns: repeat(3, 1fr);
	}

	/* Connecting line for desktop */
	.how-it-works__steps::before {
		content: '';
		position: absolute;
		top: 40px; /* Adjust vertical position of the line */
		left: 5%;
		width: 90%;
		height: 2px;
		background-image: linear-gradient(
			to right,
			var(--color-primary) 50%,
			transparent 50%
		);
		background-size: 16px 2px;
		background-repeat: repeat-x;
		z-index: 1;
	}
}

.how-it-works__step {
	background-color: var(--color-surface);
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 2.5rem 2rem;
	position: relative;
	z-index: 2;
}

.how-it-works__step-number {
	font-family: var(--font-secondary);
	font-size: 3rem;
	font-weight: 700;
	color: var(--color-primary);
	opacity: 0.2;
	position: absolute;
	top: 1rem;
	left: 2rem;
}

.how-it-works__step-title {
	font-size: 1.5rem;
	margin-bottom: 1rem;
	padding-top: 2rem; /* Make space for the number */
	color: var(--color-secondary);
}

.how-it-works__step-description {
	font-size: 1rem;
	line-height: 1.6;
}

/* FAQ SECTION */
.faq {
	padding: 6rem 0;
	background-color: var(--color-surface);
}

.faq__header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto 4rem auto;
}

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

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

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

.faq__icon {
	transition: transform 0.3s ease;
	flex-shrink: 0;
	margin-left: 1rem;
}

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

.faq__answer p {
	padding: 0 1.5rem 1.5rem 1.5rem;
	line-height: 1.7;
	font-size: 1rem;
}

/* Active state for accordion */
.faq__item--active .faq__answer {
	max-height: 200px; /* Adjust if your answers are longer */
}

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

/* CONTACT SECTION */
.contact {
	padding: 6rem 0;
	background-color: var(--color-background);
}

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

@media (min-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr 1.2fr;
		gap: 5rem;
	}
}

.contact__form-wrapper {
	position: relative;
}

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

.form-group {
	display: flex;
	flex-direction: column;
}

.form-label {
	font-weight: 700;
	margin-bottom: 0.5rem;
	color: var(--color-secondary);
}

.form-input {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 1px solid #cbd5e0;
	border-radius: 8px;
	font-size: 1rem;
	font-family: var(--font-primary);
	transition: border-color var(--transition-fast),
		box-shadow var(--transition-fast);
}

.form-input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

.form-group--checkbox {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.75rem;
	font-size: 0.875rem;
}

.form-group--checkbox input[type='checkbox'] {
	margin-top: 4px;
	flex-shrink: 0;
}

.form-group--checkbox a {
	color: var(--color-primary);
	text-decoration: underline;
}

.contact__submit-button {
	width: 100%;
	padding-top: 1rem;
	padding-bottom: 1rem;
}

.form-success-message {
	display: none; /* Hidden by default */
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 2rem;
	background-color: #ebf4ff;
	border: 1px solid var(--color-primary);
	border-radius: 12px;
	color: var(--color-secondary);
	font-weight: 700;
}

.form-success-message .lucide {
	width: 48px;
	height: 48px;
	color: var(--color-primary);
	margin-bottom: 1rem;
}

/* State for when the form is successfully submitted */
.contact__form-wrapper.form-submitted .contact__form {
	display: none;
}

.contact__form-wrapper.form-submitted .form-success-message {
	display: flex;
}

/* COOKIE POP-UP */
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--color-secondary);
	color: white;
	padding: 1.5rem 2rem;
	box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
	z-index: 2000;

	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;

	transform: translateY(120%);
	transition: transform 0.5s ease-in-out;
}

@media (min-width: 768px) {
	.cookie-popup {
		flex-direction: row;
	}
}

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

.cookie-popup__text {
	text-align: center;
}

@media (min-width: 768px) {
	.cookie-popup__text {
		text-align: left;
	}
}

.cookie-popup__text a {
	color: white;
	text-decoration: underline;
	font-weight: 700;
}

.cookie-popup__button {
	border: none;
	border-radius: 8px;
	padding: 0.75rem 1.5rem;
	background-color: var(--color-primary);
	flex-shrink: 0; /* Чтобы кнопка не сжималась */
}

/* POLICY & TEXT PAGES */
.pages {
	padding: 5rem 0;
	background-color: var(--color-background);
}

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

.pages h1 {
	font-size: 1.5rem;
	font-family: var(--font-secondary);
	color: var(--color-secondary);
	margin-bottom: 2rem;
	line-height: 1.2;
}

.pages h2 {
	font-size: 1.5rem;
	font-family: var(--font-secondary);
	color: var(--color-secondary);
	margin-top: 3rem;
	margin-bottom: 1.5rem;
	line-height: 1.3;
}

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

.pages a {
	color: var(--color-primary);
	text-decoration: underline;
	font-weight: 700;
	transition: color var(--transition-fast);
}

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

.pages ul,
.pages ol {
	margin-bottom: 1.5rem;
	padding-left: 1.5rem;
}

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

.pages strong {
	font-weight: 700;
	color: var(--color-secondary);
}
