/* ==================== GLOBAL STYLES ==================== */
/* Google Fonts Import (done in HTML) */

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

	/* Colors */
	--primary-color: #4a90e2; /* Bright Blue */
	--primary-color-alt: #357abd;
	--secondary-color: #50e3c2; /* Aqua Green */
	--title-color: #212529; /* Dark Gray */
	--text-color: #495057; /* Medium Gray */
	--text-color-light: #6c757d;
	--body-color: #f8f9fa; /* Off-white */
	--container-color: #ffffff;
	--footer-bg-color: #212529;
	--footer-text-color: #ced4da;

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

	/* Font sizes */
	--big-font-size: 2.5rem;
	--h1-font-size: 2.25rem;
	--h2-font-size: 1.5rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;
	--smaller-font-size: 0.813rem;

	/* Font weight */
	--font-normal: 400;
	--font-medium: 500;
	--font-bold: 700;
	--font-extrabold: 800;

	/* Margins & Paddings */
	--mb-0-5: 0.5rem;
	--mb-1: 1rem;
	--mb-1-5: 1.5rem;
	--mb-2: 2rem;
	--mb-2-5: 2.5rem;

	/* Z-index */
	--z-tooltip: 10;
	--z-fixed: 100;
}

/* Base */
* {
	box-sizing: border-box;
	padding: 0;
	margin: 0;
}

html {
	scroll-behavior: smooth;
}

body {
	background-color: var(--body-color);
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	color: var(--text-color);
	line-height: 1.6;
}

h1,
h2,
h3 {
	color: var(--title-color);
	font-family: var(--title-font);
	font-weight: var(--font-bold);
}

ul {
	list-style: none;
}

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

a:hover {
	color: var(--primary-color-alt);
}

img,
svg {
	max-width: 100%;
	height: auto;
}

button {
	cursor: pointer;
	border: none;
	outline: none;
	background: none;
}

/* Reusable CSS Classes */
.container {
	max-width: 1120px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

.section {
	padding: 6rem 0 2rem;
}

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

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

.logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	font-size: 1.25rem;
	color: var(--title-color);
}

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

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

.nav__link {
	font-family: var(--title-font);
	font-weight: var(--font-medium);
	color: var(--text-color);
	position: relative;
	padding-bottom: 0.25rem;
}

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

.nav__link:hover::after {
	width: 100%;
}

.header__burger {
	display: none;
	color: var(--title-color);
	position: relative;
	z-index: 100;
}

/* Mobile Nav Styles */
@media screen and (max-width: 768px) {
	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 70%;
		height: 100vh;
		background-color: var(--container-color);
		box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
		padding: 4rem 2rem;
		transition: right 0.4s ease-in-out;
	}

	.nav--open {
		right: 0;
	}

	.nav__list {
		flex-direction: column;
		gap: 2.5rem;
	}

	.nav__link {
		font-size: 1.25rem;
	}

	.header__burger {
		display: block;
	}
}

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

.footer__container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2rem;
	padding-bottom: 3rem;
}

.footer__column--main .logo {
	color: var(--container-color);
	margin-bottom: var(--mb-1);
}

.footer__column--main .logo__svg path {
	fill: var(--container-color);
}

.footer__description {
	font-size: var(--small-font-size);
	max-width: 250px;
}

.footer__title {
	font-family: var(--title-font);
	color: var(--container-color);
	font-size: var(--h3-font-size);
	margin-bottom: var(--mb-1);
}

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

.footer__link {
	color: var(--footer-text-color);
	font-size: var(--small-font-size);
	transition: color 0.3s, padding-left 0.3s;
}

.footer__link:hover {
	color: var(--container-color);
	padding-left: 0.25rem;
}

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

.footer__icon {
	width: 18px;
	height: 18px;
	margin-top: 2px;
}

.footer__address {
	font-size: var(--small-font-size);
	line-height: 1.5;
}

.footer__bottom {
	border-top: 1px solid #495057;
	padding: 1.5rem 0;
	text-align: center;
	font-size: var(--smaller-font-size);
}

/* ==================== MEDIA QUERIES ==================== */
@media screen and (min-width: 768px) {
	:root {
		--big-font-size: 3.5rem;
		--h1-font-size: 2.75rem;
		--h2-font-size: 2rem;
		--h3-font-size: 1.5rem;
		--normal-font-size: 1.063rem;
		--small-font-size: 0.938rem;
	}
}

/* ==================== HERO ==================== */
.hero {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	overflow: hidden; /* Важно для анимации */
}

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

.hero__content {
	text-align: center;
}

.hero__title {
	font-size: var(--big-font-size);
	font-family: var(--title-font);
	font-weight: var(--font-extrabold);
	line-height: 1.2;
	margin-bottom: var(--mb-1-5);
}

.hero__description {
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
	margin-bottom: var(--mb-2-5);
	font-size: 1.125rem;
	color: var(--text-color-light);
}

.hero__button {
	display: inline-block;
	background-color: var(--primary-color);
	color: #fff;
	padding: 1rem 2.5rem;
	border-radius: 0.5rem;
	font-weight: var(--font-bold);
	font-family: var(--title-font);
	transition: background-color 0.3s, transform 0.3s;
	box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.hero__button:hover {
	background-color: var(--primary-color-alt);
	transform: translateY(-3px);
	color: #fff;
}

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

.hero__image-wrapper {
	width: 300px;
	height: 300px;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: var(--container-color);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
	z-index: 2;
}

.hero__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Анимация */
.hero__animation-shapes {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.shape {
	position: absolute;
	border-radius: 50%;
	background-color: var(--primary-color);
	opacity: 0.1;
	will-change: transform, opacity;
}

/* Медиа-запросы для Hero */
@media screen and (min-width: 768px) {
	.hero__content {
		text-align: left;
	}

	.hero__description {
		margin-left: 0;
		margin-right: 0;
	}
}

@media screen and (min-width: 992px) {
	.hero {
		padding-top: calc(var(--header-height) + 6rem);
		padding-bottom: 6rem;
	}
	.hero__container {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
	}

	.hero__image-wrapper {
		width: 400px;
		height: 400px;
	}
}

/* ==================== REUSABLE SECTION STYLES ==================== */
.section__header {
	text-align: center;
	margin-bottom: 3rem;
}

.section__title {
	font-size: var(--h1-font-size);
	font-family: var(--title-font);
	margin-bottom: var(--mb-0-5);
}

.section__subtitle {
	font-size: 1.125rem;
	color: var(--text-color-light);
	max-width: 600px;
	margin: 0 auto;
}

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

.how-it-works__steps {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
}

.how-it-works__step {
	padding: 2.5rem 2rem;
	border: 1px solid #e9ecef;
	border-radius: 0.75rem;
	text-align: center;
	transition: transform 0.3s, box-shadow 0.3s;

	/* Styles for scroll animation */
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.how-it-works__step.is-visible {
	opacity: 1;
	transform: translateY(0);
}

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

.how-it-works__icon-wrapper {
	position: relative;
	margin-bottom: var(--mb-1-5);
	display: inline-block;
}

.how-it-works__icon {
	width: 48px;
	height: 48px;
	color: var(--primary-color);
}

.how-it-works__number {
	position: absolute;
	top: 10px;
	right: 10px;
	font-size: 3rem;
	font-weight: var(--font-extrabold);
	font-family: var(--title-font);
	color: var(--primary-color);
	opacity: 0.1;
	z-index: -1;
}

.how-it-works__title {
	font-size: var(--h3-font-size);
	margin-bottom: var(--mb-0-5);
}

.how-it-works__description {
	font-size: var(--normal-font-size);
	color: var(--text-color-light);
}

/* Delay for staggered animation */
.how-it-works__step:nth-child(2).is-visible {
	transition-delay: 0.2s;
}

.how-it-works__step:nth-child(3).is-visible {
	transition-delay: 0.4s;
}

/* ==================== DIRECTIONS ==================== */
.directions {
	background-color: var(--body-color);
}

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

.directions__card {
	background-color: var(--container-color);
	border-radius: 0.75rem;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;
	transition: transform 0.3s, box-shadow 0.3s;

	/* Styles for scroll animation */
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.directions__card.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.directions__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.directions__image-wrapper {
	width: 100%;
	height: 200px;
	overflow: hidden;
}

.directions__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.directions__card:hover .directions__image {
	transform: scale(1.05);
}

.directions__content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1; /* Позволяет футеру карточки прижаться к низу */
}

.directions__title {
	font-size: 1.35rem;
	margin-bottom: var(--mb-0-5);
}

.directions__description {
	color: var(--text-color-light);
	margin-bottom: var(--mb-1-5);
	flex-grow: 1;
}

.directions__link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--primary-color);
	font-weight: var(--font-bold);
	font-family: var(--title-font);
}

.directions__link-icon {
	width: 18px;
	height: 18px;
	transition: transform 0.3s;
}

.directions__link:hover .directions__link-icon {
	transform: translateX(4px);
}

/* Delay for staggered animation */
.directions__card:nth-child(2).is-visible {
	transition-delay: 0.1s;
}
.directions__card:nth-child(3).is-visible {
	transition-delay: 0.2s;
}
.directions__card:nth-child(4).is-visible {
	transition-delay: 0.3s;
}

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

.cases__tabs {
	display: flex;
	justify-content: center;
	gap: 1rem;
	flex-wrap: wrap;
	margin-bottom: 3rem;
}

.cases__tab-button {
	padding: 0.75rem 1.5rem;
	border: 1px solid #dee2e6;
	border-radius: 2rem;
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	color: var(--text-color);
	transition: background-color 0.3s, color 0.3s;
}

.cases__tab-button:hover {
	background-color: #e9ecef;
}

.cases__tab-button--active {
	background-color: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
}

.cases__tab-button--active:hover {
	background-color: var(--primary-color-alt);
	color: #fff;
}

.cases__content {
	display: none; /* Скрываем все вкладки по умолчанию */
	grid-template-columns: 1fr;
	gap: 2rem;
	align-items: center;
	animation: fadeIn 0.5s ease-in-out;
}

.cases__content--active {
	display: grid; /* Показываем активную */
}

@media screen and (min-width: 768px) {
	.cases__content {
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
	}
}

.cases__image-wrapper {
	border-radius: 0.75rem;
	overflow: hidden;
}

.cases__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.cases__title {
	font-size: var(--h2-font-size);
	margin-bottom: var(--mb-1);
}

.cases__description {
	margin-bottom: var(--mb-1-5);
}

.cases__outcome {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	background-color: #f8f9fa;
	padding: 1rem;
	border-radius: 0.5rem;
	border-left: 4px solid var(--secondary-color);
}

.cases__outcome-icon {
	color: var(--secondary-color);
	width: 24px;
	height: 24px;
	flex-shrink: 0; /* Чтобы иконка не сжималась */
}

/* Анимация появления */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==================== MATERIALS ==================== */
.materials {
	background-color: var(--body-color);
}

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

.materials__card {
	background-color: var(--container-color);
	border-radius: 0.75rem;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
	display: flex;
	flex-direction: column;

	/* Styles for scroll animation */
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.materials__card.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.materials__image-wrapper {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
}

.materials__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s;
}

.materials__card:hover .materials__image {
	transform: scale(1.05);
}

.materials__content {
	padding: 1.5rem;
}

.materials__tag {
	display: inline-block;
	background-color: var(--secondary-color);
	color: var(--title-color);
	padding: 0.25rem 0.75rem;
	border-radius: 2rem;
	font-size: var(--smaller-font-size);
	font-weight: var(--font-bold);
	margin-bottom: var(--mb-1);
}

.materials__title a {
	font-size: 1.25rem;
	color: var(--title-color);
	line-height: 1.4;
	transition: color 0.3s;
}

.materials__title a:hover {
	color: var(--primary-color);
}

.materials__meta {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	margin-top: var(--mb-1);
}

/* Delay for staggered animation */
.materials__card:nth-child(2).is-visible {
	transition-delay: 0.2s;
}
.materials__card:nth-child(3).is-visible {
	transition-delay: 0.4s;
}

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

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

@media screen and (min-width: 992px) {
	.contact__wrapper {
		grid-template-columns: 1fr 1.2fr;
	}
}

.contact__info-title {
	font-size: var(--h2-font-size);
	margin-bottom: var(--mb-1);
}

.contact__info-description {
	margin-bottom: var(--mb-2);
	color: var(--text-color-light);
}

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

.contact__info-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.contact__info-icon {
	width: 28px;
	height: 28px;
	color: var(--primary-color);
}

.contact__info-item h4 {
	font-family: var(--title-font);
	font-size: 1.1rem;
	color: var(--title-color);
	margin-bottom: 0.25rem;
}

.contact__info-item a,
.contact__info-item span {
	color: var(--text-color);
	font-size: var(--normal-font-size);
}
.contact__info-item a:hover {
	color: var(--primary-color);
}

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

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

.contact__form-label {
	font-weight: var(--font-medium);
	margin-bottom: var(--mb-0-5);
	color: var(--title-color);
}

.contact__form-input {
	width: 100%;
	padding: 0.9rem 1.2rem;
	border: 1px solid #ced4da;
	border-radius: 0.5rem;
	font-size: var(--normal-font-size);
	font-family: var(--body-font);
	transition: border-color 0.3s, box-shadow 0.3s;
}

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

.contact__form-group--checkbox {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.75rem;
	margin-top: 0.5rem;
}

.contact__form-checkbox {
	width: 1.25em;
	height: 1.25em;
	margin-top: 0.2em;
	flex-shrink: 0;
}

.contact__form-checkbox-label {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
}

.contact__button {
	background-color: var(--primary-color);
	color: #fff;
	padding: 1rem 2.5rem;
	border-radius: 0.5rem;
	font-weight: var(--font-bold);
	font-family: var(--title-font);
	transition: background-color 0.3s, transform 0.3s;
	box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
	align-self: flex-start;
}

.contact__button:hover {
	background-color: var(--primary-color-alt);
	transform: translateY(-3px);
}
.contact__button:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.contact__form-message {
	font-size: var(--normal-font-size);
	padding: 1rem;
	border-radius: 0.5rem;
	display: none; /* Hidden by default */
}

.contact__form-message--success {
	background-color: #d1e7dd;
	color: #0f5132;
	border: 1px solid #badbcc;
	display: block;
}

.contact__form-message--error {
	background-color: #f8d7da;
	color: #842029;
	border: 1px solid #f5c2c7;
	display: block;
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: var(--container-color);
	box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
	padding: 1.5rem 2rem;
	z-index: var(--z-fixed);

	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	flex-wrap: wrap;

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

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

.cookie-popup__text {
	font-size: var(--small-font-size);
	color: var(--text-color);
}

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

.cookie-popup__button {
	background-color: var(--primary-color);
	color: #fff;
	padding: 0.6rem 1.5rem;
	border-radius: 0.5rem;
	font-size: var(--small-font-size);
	font-weight: var(--font-bold);
	transition: background-color 0.3s;
	flex-shrink: 0; /* Чтобы кнопка не сжималась */
}

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

@media screen and (max-width: 768px) {
	.cookie-popup {
		justify-content: center;
		text-align: center;
	}
}

/* ==================== POLICY & TEXT PAGES ==================== */
.pages {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	background-color: var(--container-color);
}

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

.pages h1,
.pages h2,
.pages h3 {
	font-family: var(--title-font);
	color: var(--title-color);
	margin-bottom: var(--mb-1-5);
}

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

.pages h2 {
	font-size: 1.5rem;
	margin-top: var(--mb-2-5);
}

.pages p {
	font-size: var(--normal-font-size);
	line-height: 1.7;
	color: var(--text-color);
	margin-bottom: var(--mb-1-5);
}

.pages ul,
.pages ol {
	padding-left: 1.5rem;
	margin-bottom: var(--mb-1-5);
}

.pages li {
	margin-bottom: var(--mb-0-5);
	line-height: 1.7;
}

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

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

.pages strong {
	font-weight: var(--font-bold);
	color: var(--title-color);
}
