/* ==================== GLOBAL STYLES & VARIABLES ==================== */
:root {
	/* Colors */
	--background-color: #ffffff;
	--text-color: #111827;
	--primary-color: #4f46e5;
	--primary-hover-color: #4338ca;
	--secondary-text-color: #6b7280;
	--border-color: #e5e7eb;
	--section-bg-color: #f3f4f6;

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

	/* Spacing */
	--header-height: 5rem;
	--container-width: 1140px;
	--container-padding: 1rem;
}

/* Base Reset */
*,
*::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;
	color: var(--text-color);
	background-color: var(--background-color);
}

ul {
	list-style: none;
}

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

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

h1,
h2,
h3 {
	font-family: var(--font-family-headings);
	font-weight: 800;
}

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

/* ==================== HEADER ==================== */
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: rgba(255, 255, 255, 0.9);
	backdrop-filter: blur(10px);
	z-index: 100;
	border-bottom: 1px solid var(--border-color);
	transition: box-shadow 0.3s ease;
}

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

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

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

.header__logo-img {
	width: 32px;
	height: 32px;
}

.header__nav {
	display: block;
}

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

.header__nav-link {
	font-size: 1rem;
	font-weight: 500;
	color: var(--secondary-text-color);
	transition: color 0.3s ease;
	position: relative;
	padding: 0.5rem 0;
}

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

.header__nav-link:hover {
	color: var(--text-color);
}
.header__nav-link:hover::after {
	width: 100%;
}

.header__nav-link--button {
	background-color: var(--primary-color);
	color: #fff;
	padding: 0.6rem 1.2rem;
	border-radius: 8px;
	transition: background-color 0.3s ease, transform 0.2s ease;
}

.header__nav-link--button:hover {
	background-color: var(--primary-hover-color);
	color: #fff;
	transform: translateY(-2px);
}
.header__nav-link--button:hover::after {
	width: 0;
}

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

/* Mobile Menu Styles */
@media (max-width: 992px) {
	.header__nav {
		position: fixed;
		top: var(--header-height);
		right: -100%;
		width: 70%;
		height: calc(100vh - var(--header-height));
		background-color: #fff;
		box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
		transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
		padding: 2rem;
	}

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

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

	.header__burger {
		display: block;
	}
}

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

.footer__container {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.5fr;
	gap: 2rem;
	padding-bottom: 3rem;
	border-bottom: 1px solid #374151;
}

.footer__column--main {
	padding-right: 2rem;
}

.footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.footer__logo-img {
	width: 32px;
	height: 32px;
}

.footer__logo-text {
	font-family: var(--font-family-headings);
	font-weight: 800;
	font-size: 1.5rem;
	color: #fff;
}

.footer__description {
	font-size: 0.9rem;
	line-height: 1.7;
}

.footer__title {
	font-family: var(--font-family-body);
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	margin-bottom: 1rem;
}

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

.footer__link {
	transition: color 0.3s ease;
}

.footer__link:hover {
	color: #fff;
}

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

.footer__address {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.footer__icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	margin-top: 3px;
}

.footer__bottom {
	padding: 1.5rem 0;
	text-align: center;
	font-size: 0.9rem;
}

/* Footer Responsive */
@media (max-width: 992px) {
	.footer__container {
		grid-template-columns: 1fr 1fr;
	}
}

@media (max-width: 576px) {
	.footer__container {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.footer__column--main {
		padding-right: 0;
	}
	.footer__logo,
	.footer__list--contact .footer__link,
	.footer__address {
		justify-content: center;
	}
}

/* ==================== HERO ==================== */
.hero {
	position: relative;
	height: 100vh;
	min-height: 600px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden; /* Скрываем все, что выходит за пределы секции */
	padding-top: var(--header-height);
}

.hero__canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1; /* Помещаем canvas под контент */
}

.hero__container {
	position: relative;
	z-index: 2; /* Помещаем контент над canvas */
	max-width: 800px;
}

.hero__title {
	font-size: 3.5rem;
	line-height: 1.2;
	margin-bottom: 1rem;
	color: var(--text-color);
}

.hero__subtitle {
	font-size: 1.125rem;
	color: var(--secondary-text-color);
	margin-bottom: 2rem;
	max-width: 650px;
	margin-left: auto;
	margin-right: auto;
}

.hero__cta {
	display: inline-block;
	background-color: var(--primary-color);
	color: #fff;
	padding: 1rem 2.5rem;
	border-radius: 8px;
	font-size: 1rem;
	font-weight: 600;
	transition: background-color 0.3s ease, transform 0.2s ease;
	box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
}

.hero__cta:hover {
	background-color: var(--primary-hover-color);
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
}

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

/* ==================== REUSABLE SECTION STYLES ==================== */
.section {
	padding: 5rem 0;
}

.section__header {
	text-align: center;
	margin-bottom: 3rem;
	max-width: 650px;
	margin-left: auto;
	margin-right: auto;
}

.section__title {
	font-size: 2.5rem;
	margin-bottom: 0.75rem;
}

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

/* ==================== HOW IT WORKS ==================== */
.how-it-works {
	background-color: var(--section-bg-color);
}

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

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

.how-it-works__step:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.how-it-works__icon-wrapper {
	width: 64px;
	height: 64px;
	margin: 0 auto 1.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--primary-color);
	color: #fff;
	border-radius: 50%;
}

.how-it-works__icon-wrapper i {
	width: 32px;
	height: 32px;
}

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

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

/* How It Works Responsive */
@media (max-width: 992px) {
	.how-it-works__steps {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.section {
		padding: 4rem 0;
	}
	.section__title {
		font-size: 2rem;
	}
}

/* ==================== DIRECTIONS ==================== */
.directions {
	background-color: #fff;
}

.directions__tabs-container {
	background-color: #fff;
	border: 1px solid var(--border-color);
	border-radius: 16px;
	padding: 1rem;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.directions__tabs-nav {
	display: flex;
	justify-content: space-around;
	background-color: var(--section-bg-color);
	border-radius: 12px;
	margin-bottom: 2rem;
	overflow-x: auto;
	-ms-overflow-style: none; /* IE and Edge */
	scrollbar-width: none; /* Firefox */
}
.directions__tabs-nav::-webkit-scrollbar {
	display: none; /* Chrome, Safari, Opera */
}

.directions__tab-button {
	flex: 1;
	padding: 1rem 0.5rem;
	background-color: transparent;
	border: none;
	cursor: pointer;
	font-size: 1rem;
	font-weight: 500;
	color: var(--secondary-text-color);
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	white-space: nowrap;
	border-bottom: 3px solid transparent;
}

.directions__tab-button:hover {
	color: var(--text-color);
	background-color: #e5e7eb;
}

.directions__tab-button.is-active {
	color: var(--primary-color);
	border-bottom-color: var(--primary-color);
}

.directions__tab-content {
	display: none;
	animation: fadeIn 0.5s ease-in-out;
}

.directions__tab-content.is-active {
	display: block;
}

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

.directions__text-content h3 {
	font-size: 1.75rem;
	margin-bottom: 1rem;
}

.directions__text-content p {
	color: var(--secondary-text-color);
	margin-bottom: 1.5rem;
}

.directions__text-content ul {
	list-style: none;
	margin-bottom: 2rem;
}

.directions__text-content ul li {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.directions__text-content ul i {
	color: var(--primary-color);
	width: 20px;
	height: 20px;
}

.directions__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	color: var(--primary-color);
	transition: all 0.3s ease;
}

.directions__cta:hover {
	gap: 0.75rem;
	text-decoration: underline;
}

.directions__image-content img {
	border-radius: 12px;
}

/* Keyframes for fade in animation */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Directions Responsive */
@media (max-width: 992px) {
	.directions__content-grid {
		grid-template-columns: 1fr;
	}
	.directions__image-content {
		order: -1; /* Move image to the top on mobile */
		margin-bottom: 2rem;
	}
}
@media (max-width: 768px) {
	.directions__tabs-nav {
		justify-content: flex-start;
	}
	.directions__tab-button {
		padding: 0.8rem 1rem;
	}
}

/* ==================== CASES ==================== */
.cases {
	background-color: var(--section-bg-color);
}

.cases__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.cases__card {
	background-color: #fff;
	border-radius: 12px;
	border: 1px solid var(--border-color);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cases__card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

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

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

.cases__card-tag {
	display: inline-block;
	margin-bottom: 0.75rem;
	padding: 0.25rem 0.75rem;
	font-size: 0.75rem;
	font-weight: 500;
	background-color: var(--primary-color);
	color: #fff;
	border-radius: 999px;
	align-self: flex-start;
}

.cases__card-title {
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
}

.cases__card-description {
	color: var(--secondary-text-color);
	margin-bottom: 1.5rem;
	flex-grow: 1;
}

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

.cases__card-tech span {
	background-color: var(--section-bg-color);
	padding: 0.25rem 0.75rem;
	font-size: 0.8rem;
	border-radius: 6px;
	color: var(--secondary-text-color);
}

/* Cases Responsive */
@media (max-width: 992px) {
	.cases__grid {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 1.5rem; /* Space for scrollbar */
		gap: 1.5rem;
	}
	.cases__grid::-webkit-scrollbar {
		height: 8px;
	}
	.cases__grid::-webkit-scrollbar-thumb {
		background: #ccc;
		border-radius: 4px;
	}
	.cases__grid::-webkit-scrollbar-track {
		background: #f1f1f1;
		border-radius: 4px;
	}

	.cases__card {
		flex: 0 0 80%; /* Each card takes 80% of the screen width */
		scroll-snap-align: start;
	}
}

@media (max-width: 576px) {
	.cases__card {
		flex-basis: 90%; /* On very small screens, make it wider */
	}
}

/* ==================== ABOUT US ==================== */
.about {
	background-color: #fff;
}

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

.about__text-content .section__title {
	text-align: left;
}

.about__description {
	font-size: 1.1rem;
	color: var(--secondary-text-color);
	line-height: 1.7;
	margin-top: 1.5rem;
	margin-bottom: 2.5rem;
}

.about__metrics {
	display: flex;
	gap: 2rem;
}

.about__metric-item {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.about__metric-item i {
	width: 40px;
	height: 40px;
	color: var(--primary-color);
}

.about__metric-text strong {
	display: block;
	font-size: 1.75rem;
	font-family: var(--font-family-headings);
	color: var(--text-color);
}

.about__metric-text span {
	color: var(--secondary-text-color);
}

.about__image {
	width: 100%;
	border-radius: 12px;
}

/* About Us Responsive */
@media (max-width: 992px) {
	.about__grid {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
	.about__text-content .section__title {
		text-align: center;
	}
	.about__metrics {
		justify-content: center;
	}
}

@media (max-width: 576px) {
	.about__metrics {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
}

/* ==================== CONTACT ==================== */
.contact {
	background-color: var(--section-bg-color);
}

.contact__wrapper {
	max-width: 700px;
	margin: 0 auto;
	background-color: #fff;
	padding: 2.5rem;
	border-radius: 12px;
	border: 1px solid var(--border-color);
}

.contact__form-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.form__group {
	position: relative;
}

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

.form__input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

.form__label {
	position: absolute;
	top: 50%;
	left: 1rem;
	transform: translateY(-50%);
	background-color: #fff;
	padding: 0 0.25rem;
	color: var(--secondary-text-color);
	transition: all 0.2s ease-out;
	pointer-events: none;
}

.form__input:focus + .form__label,
.form__input:not(:placeholder-shown) + .form__label {
	top: 0;
	font-size: 0.8rem;
	color: var(--primary-color);
}

.form__group--checkbox {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 1.5rem;
}

.form__checkbox-input {
	width: 1.25rem;
	height: 1.25rem;
}

.form__checkbox-label {
	font-size: 0.9rem;
	color: var(--secondary-text-color);
}
.form__checkbox-label a {
	color: var(--primary-color);
	text-decoration: underline;
}

.form__submit {
	width: 100%;
	padding: 1rem;
	background-color: var(--primary-color);
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease, transform 0.2s ease;
}

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

.form-message {
	display: none; /* Hidden by default */
	margin-top: 1.5rem;
	padding: 1rem;
	border-radius: 8px;
	background-color: #d1fae5;
	color: #065f46;
	text-align: center;
	align-items: center;
	gap: 0.75rem;
	animation: fadeIn 0.5s ease;
}
.form-message.is-visible {
	display: flex; /* Make visible */
	justify-content: center;
}

@media (max-width: 576px) {
	.contact__wrapper {
		padding: 1.5rem;
	}
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
	position: fixed;
	bottom: 1.5rem;
	left: 1.5rem;
	right: 1.5rem;
	max-width: 500px;
	background-color: var(--text-color);
	color: #fff;
	padding: 1rem 1.5rem;
	border-radius: 12px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	z-index: 200;
	transform: translateY(200%);
	transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cookie-popup__text {
	font-size: 0.9rem;
}

.cookie-popup__text a {
	color: #fff;
	text-decoration: underline;
	font-weight: 500;
}

.cookie-popup__button {
	background-color: var(--primary-color);
	color: #fff;
	border: none;
	padding: 0.6rem 1.2rem;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 500;
	white-space: nowrap;
	transition: background-color 0.3s ease;
}

.cookie-popup__button:hover {
	background-color: var(--primary-hover-color);
}

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

/* ==================== POLICY PAGES STYLES ==================== */
.main-pages {
	padding-top: var(
		--header-height
	); /* Чтобы контент не уходил под фиксированный хедер */
}

.pages {
	padding: 7rem 0;
}

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

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

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

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

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

.pages li {
	margin-bottom: 0.5rem;
	line-height: 1.8;
	color: var(--secondary-text-color);
}

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

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

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