/*
* =========================================================================================
* GLOBAL STYLES (ETAP 0)
* =========================================================================================
*/

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

/* CSS Variables */
:root {
	--primary-color: #1a1a2e;
	--secondary-color: #2ca58d;
	--accent-color: #16213e;
	--background-color: #0f0f1e;
	--text-color: #e0e0e0;
	--text-color-light: #ffffff;
	--font-family-headings: 'Montserrat', sans-serif;
	--font-family-body: 'Manrope', sans-serif;
	--container-width: 1200px;
	--container-padding: 1.5rem;
	--border-radius: 8px;
	--transition-speed: 0.3s ease;
}

/* Reset and Base Styles */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
	font-size: 16px;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-family-headings);
	color: var(--text-color-light);
	line-height: 1.2;
	font-weight: 700;
}

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

ul {
	list-style: none;
}

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

button {
	font-family: inherit;
	cursor: pointer;
	border: none;
	background-color: transparent;
}

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

/*
* =========================================================================================
* HEADER (ETAP 1)
* =========================================================================================
*/
.header {
	background-color: var(--primary-color);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding: 1rem 0;
	position: sticky;
	top: 0;
	z-index: 100;
	transition: box-shadow var(--transition-speed);
}

.header.scrolled {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

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

.header__nav {
	display: none;
}

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

.header__nav-link {
	font-weight: 500;
	position: relative;
	padding: 0.5rem 0;
}

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

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

.header__burger {
	display: block;
	color: var(--text-color-light);
}

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

/* Mobile Menu (Toggled by JS) */
.header__nav--mobile {
	display: block;
	position: absolute;
	top: 100%;
	left: 0;
	width: 100%;
	background-color: var(--primary-color);
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	padding: 1rem 0;
	transform: translateY(-150%);
	transition: transform var(--transition-speed);
}

.header__nav--mobile.active {
	transform: translateY(0);
}

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

/*
* =========================================================================================
* FOOTER (ETAP 2)
* =========================================================================================
*/
.footer {
	background-color: var(--primary-color);
	color: var(--text-color-light);
	padding: 4rem 0 2rem;
}

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

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

.footer__column--about .logo {
	color: var(--text-color-light);
	margin-bottom: 1rem;
}

.footer__copyright {
	font-size: 0.9rem;
	opacity: 0.7;
}

.footer__title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: var(--text-color-light);
}

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

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

.footer__list--contact .lucide {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.footer__link {
	opacity: 0.7;
	transition: opacity var(--transition-speed);
}

.footer__link:hover {
	opacity: 1;
}

/*
* =========================================================================================
* UTILITIES (Кнопки и т.д.)
* =========================================================================================
*/
.btn {
	display: inline-block;
	padding: 0.875rem 2.5rem;
	font-family: var(--font-family-headings);
	font-weight: 600;
	font-size: 1rem;
	border-radius: var(--border-radius);
	text-align: center;
	transition: transform var(--transition-speed),
		box-shadow var(--transition-speed);
	border: 2px solid transparent;
}

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

.btn--primary:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 20px rgba(44, 165, 141, 0.2);
}

/*
* =========================================================================================
* HERO SECTION (ETAP 3)
* =========================================================================================
*/
.hero {
	background-color: var(--background-color);
	padding: 4rem 0;
	min-height: calc(100vh - 80px); /* 80px - примерная высота хедера */
	display: flex;
	align-items: center;
	overflow: hidden; /* Для красивой анимации */
}

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

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

.hero__content {
	text-align: center;
}

@media (min-width: 992px) {
	.hero__content {
		text-align: left;
	}
}

.hero__title {
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

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

.hero__description {
	font-size: 1.125rem;
	color: var(--text-color);
	margin-bottom: 2.5rem;
	max-width: 550px;
	margin-left: auto;
	margin-right: auto;
}

@media (min-width: 992px) {
	.hero__description {
		margin-left: 0;
		margin-right: 0;
	}
}

.hero__image-wrapper {
	position: relative;
	max-width: 500px;
	margin: 0 auto;
}

.hero__image {
	width: 100%;
	border-radius: var(--border-radius);
	position: relative;
	z-index: 2;
}

.hero__image-bg {
	position: absolute;
	width: 100%;
	height: 100%;
	background-color: var(--secondary-color);
	opacity: 0.2;
	border-radius: var(--border-radius);
	top: -20px;
	left: 20px;
	z-index: 1;
	transition: transform var(--transition-speed);
}

.hero__image-wrapper:hover .hero__image-bg {
	transform: translate(-5px, 5px);
}

/*
* =========================================================================================
* SHARED COMPONENTS (Общие компоненты)
* =========================================================================================
*/
.section-header {
	text-align: center;
	max-width: 750px;
	margin: 0 auto 4rem;
}

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

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

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

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

.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: 992px) {
	.features__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.features__card {
	background-color: var(--primary-color);
	padding: 2.5rem 2rem;
	border-radius: var(--border-radius);
	text-align: center;
	border: 1px solid rgba(255, 255, 255, 0.1);
	transition: transform var(--transition-speed),
		box-shadow var(--transition-speed);
}

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

.features__card-icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: rgba(44, 165, 141, 0.1);
	color: var(--secondary-color);
	margin-bottom: 1.5rem;
}

.features__card-icon .lucide {
	width: 32px;
	height: 32px;
}

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

.features__card-text {
	color: var(--text-color);
	line-height: 1.6;
}

/*
* =========================================================================================
* TECHNOLOGY SECTION
* =========================================================================================
*/
.technology {
	padding: 6rem 0;
	background-color: var(--background-color);
	overflow: hidden;
}

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

@media (min-width: 992px) {
	.technology__container {
		grid-template-columns: repeat(2, 1fr);
		gap: 5rem;
	}
}

.technology__image-wrapper {
	max-width: 500px;
	margin: 0 auto;
}

.technology__image {
	width: 100%;
	border-radius: var(--border-radius);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

.technology__content .section-header {
	margin-bottom: 2rem; /* Адаптируем отступ для этого блока */
}

/* Сбрасываем центрирование для мобильных, так как оно в инлайн-стиле */
@media (max-width: 991px) {
	.technology__content .section-header {
		text-align: center !important;
	}
	.technology__content {
		display: flex;
		flex-direction: column;
		align-items: center;
	}
}

.technology__list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.technology__list-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	font-size: 1.05rem;
}

.technology__list-item .lucide {
	flex-shrink: 0;
	color: var(--secondary-color);
	width: 24px;
	height: 24px;
	margin-top: 2px;
}

/*
* =========================================================================================
* PROCESS SECTION
* =========================================================================================
*/
.process {
	padding: 6rem 0;
	background-color: var(--accent-color);
}

.process__steps-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	position: relative;
}

@media (min-width: 992px) {
	.process__steps-container {
		grid-template-columns: repeat(3, 1fr);
		gap: 3rem;
	}

	/* Connecting line for desktop */
	.process__steps-container::before {
		content: '';
		position: absolute;
		top: 80px; /* Adjust vertical position */
		left: 5%;
		width: 90%;
		height: 2px;
		background-image: linear-gradient(
			to right,
			var(--secondary-color) 33%,
			rgba(255, 255, 255, 0) 0%
		);
		background-position: bottom;
		background-size: 15px 2px;
		background-repeat: repeat-x;
		z-index: 0;
		opacity: 0.5;
	}
}

.process__step {
	background-color: var(--primary-color);
	padding: 2.5rem 2rem;
	border-radius: var(--border-radius);
	border: 1px solid rgba(255, 255, 255, 0.1);
	text-align: center;
	position: relative;
	z-index: 1;
	overflow: hidden;
}

.process__step-number {
	position: absolute;
	top: -20px;
	right: 10px;
	font-size: 4rem;
	font-weight: 700;
	color: var(--text-color-light);
	opacity: 0.1;
	z-index: 0;
}

.process__step-icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background-color: rgba(44, 165, 141, 0.2);
	color: var(--secondary-color);
	margin-bottom: 1.5rem;
}

.process__step-icon .lucide {
	width: 32px;
	height: 32px;
}

.process__step-title {
	font-size: 1.5rem;
	margin-bottom: 0.75rem;
}

.process__step-text {
	color: var(--text-color);
	line-height: 1.6;
}

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

.faq__accordion {
	max-width: 800px;
	margin: 0 auto;
	border: 1px solid rgba(255, 255, 255, 0.1);
	border-radius: var(--border-radius);
}

.faq__item {
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq__item:last-child {
	border-bottom: none;
}

.faq__question {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem;
	font-size: 1.1rem;
	font-weight: 600;
	font-family: var(--font-family-headings);
	color: var(--text-color-light);
	text-align: left;
}

.faq__question:hover {
	background-color: var(--accent-color);
}

.faq__icon {
	flex-shrink: 0;
	transition: transform var(--transition-speed);
}

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

.faq__answer p {
	padding: 0 1.5rem 1.5rem;
	color: var(--text-color);
	line-height: 1.7;
}

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

.faq__item.active .faq__question {
	background-color: var(--accent-color);
}

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

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

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

.contact__form-wrapper {
	background-color: var(--primary-color);
	padding: 2.5rem;
	border-radius: var(--border-radius);
	box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

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

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

.form-group label {
	font-weight: 500;
	margin-bottom: 0.5rem;
}

.form-group input[type='text'],
.form-group input[type='email'],
.form-group input[type='tel'] {
	width: 100%;
	padding: 0.875rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: var(--border-radius);
	font-size: 1rem;
	font-family: var(--font-family-body);
	background-color: var(--background-color);
	color: var(--text-color-light);
	transition: border-color var(--transition-speed),
		box-shadow var(--transition-speed);
}

.form-group input:focus {
	outline: none;
	border-color: var(--secondary-color);
	box-shadow: 0 0 0 3px rgba(44, 165, 141, 0.2);
}

.form-group input.error {
	border-color: #e74c3c;
	box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2);
}

.form-group input.valid {
	border-color: var(--secondary-color);
}

.form-group__error {
	color: #e74c3c;
	font-size: 0.875rem;
	margin-top: 0.5rem;
	display: none;
}

.form-group__error.show {
	display: block;
}

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

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

.form-group--checkbox label {
	font-size: 0.9rem;
	color: var(--text-color);
	font-weight: 400;
}
.form-group--checkbox a {
	color: var(--secondary-color);
	text-decoration: underline;
}

.form-success-message {
	text-align: center;
	padding: 2rem;
	border: 2px solid var(--secondary-color);
	border-radius: var(--border-radius);
	background-color: rgba(44, 165, 141, 0.05);
}

.form-success-message h3 {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

/*
* =========================================================================================
* COOKIE POP-UP (ETAP 5)
* =========================================================================================
*/
.btn--small {
	padding: 0.5rem 1.5rem;
	font-size: 0.9rem;
}

.cookie-popup {
	position: fixed;
	bottom: -100%; /* Initially hidden */
	left: 0;
	width: 100%;
	background-color: var(--accent-color);
	color: var(--text-color-light);
	padding: 1.5rem;
	box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1.5rem;
	z-index: 200;
	transition: bottom 0.5s ease-in-out;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.cookie-popup__text {
	margin: 0;
}

.cookie-popup__text a {
	color: var(--text-color-light);
	text-decoration: underline;
	font-weight: 500;
}

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

/*
* =========================================================================================
* POLICY PAGES STYLES (ETAP 5)
* =========================================================================================
*/
.pages {
	padding: 4rem 0;
}

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

.pages h1,
.pages h2 {
	margin-bottom: 1rem;
}

.pages h1 {
	font-size: 1.5rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	margin-bottom: 2rem;
}

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

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

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

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

.pages a {
	color: var(--secondary-color);
	text-decoration: underline;
	font-weight: 500;
}

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

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