/* ==================== GOOGLE FONTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@600;700&display=swap');

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

	/* Colors */
	--primary-color: #1a2e39;
	--secondary-color: #f4f7f5;
	--accent-color: #4ecdc4;
	--text-color: #333333;
	--text-color-light: #555;
	--border-color: #e0e0e0;

	/* Fonts */
	--body-font: 'Lato', sans-serif;
	--title-font: 'Montserrat', sans-serif;

	--h1-font-size: 2.25rem;
	--h2-font-size: 1.5rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;

	/* Font weight */
	--font-regular: 400;
	--font-bold: 700;
	--font-semibold: 600;

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

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

html {
	scroll-behavior: smooth;
}

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

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

ul {
	list-style: none;
}

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

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

/* ==================== REUSABLE CSS CLASSES ==================== */
.container {
	max-width: 1120px;
	margin: 0 auto;
}

/* ==================== LOGO ==================== */
.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	color: var(--primary-color);
	transition: color 0.3s ease;
}

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

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

/* ==================== HEADER ==================== */
.header {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: var(--z-fixed);
	background-color: var(--secondary-color);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

.header__burger {
	display: none; /* Hidden on desktop */
	background: none;
	border: none;
	cursor: pointer;
	color: var(--primary-color);
}

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

.nav__link {
	font-family: var(--title-font);
	font-size: var(--small-font-size);
	font-weight: var(--font-semibold);
	color: var(--primary-color);
	transition: color 0.3s ease;
	position: relative;
	padding-bottom: 0.25rem;
}

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

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

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

/* ==================== FOOTER ==================== */
.footer {
	background-color: #fff;
	border-top: 1px solid var(--border-color);
	padding-top: 4rem;
}

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

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

.footer__title {
	font-size: var(--h3-font-size);
	margin-bottom: 1rem;
}

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

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

.footer__icon {
	color: var(--accent-color);
	width: 20px;
	flex-shrink: 0;
	margin-top: 2px;
}

.footer__link {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	transition: color 0.3s ease;
}

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

.footer__bottom {
	margin-top: 4rem;
	padding: 1.5rem 0;
	background-color: var(--secondary-color);
	text-align: center;
	font-size: var(--small-font-size);
	color: var(--text-color-light);
}

/* ==================== MEDIA QUERIES ==================== */
/* For medium devices */
@media screen and (max-width: 768px) {
	.header__burger {
		display: block;
	}

	.nav {
		position: fixed;
		top: var(--header-height);
		right: -100%;
		width: 70%;
		height: 100vh;
		background-color: var(--secondary-color);
		box-shadow: -2px 0 4px rgba(0, 0, 0, 0.1);
		padding: 2rem;
		transition: right 0.4s ease;
	}

	/* Class to show menu */
	.nav--open {
		right: 0;
	}

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

	.nav__link {
		font-size: var(--normal-font-size);
	}
}

/* For small devices */
@media screen and (max-width: 350px) {
	.container {
		margin-left: 1rem;
		margin-right: 1rem;
	}
}

/* ==================== BUTTONS ==================== */
.button {
	display: inline-block;
	background-color: var(--accent-color);
	color: #fff;
	padding: 1rem 2rem;
	border-radius: 0.5rem;
	font-family: var(--title-font);
	font-weight: var(--font-semibold);
	transition: background-color 0.3s ease, transform 0.3s ease;
	border: 2px solid var(--accent-color);
}

.button:hover {
	background-color: #3dbbb2; /* Слегка темнее при наведении */
	transform: translateY(-3px);
}

/* ==================== HERO ==================== */
.hero {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	overflow: hidden; /* Чтобы элементы при анимации не вылезали */
}

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

.hero__title {
	font-size: 2.5rem; /* Увеличим размер для hero */
	font-weight: var(--font-bold);
	line-height: 1.2;
	margin-bottom: 1.5rem;
}

/* Стили для анимации заголовка */
.hero__title-line {
	display: block;
	overflow: hidden;
}

.hero__title .letter {
	display: inline-block;
	opacity: 0; /* Изначально буквы невидимы */
}

.hero__description {
	font-size: 1.125rem;
	color: var(--text-color-light);
	margin-bottom: 2.5rem;
	max-width: 500px;
	opacity: 0; /* Для анимации */
}

.hero__button {
	opacity: 0; /* Для анимации */
}

.hero__image-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0; /* Для анимации */
}

.hero__image {
	width: 100%;
	max-width: 450px;
	border-radius: 1rem;
	object-fit: cover;
}

/* ==================== MEDIA QUERIES (дополнения) ==================== */
/* For large devices */
@media screen and (max-width: 992px) {
	.hero__container {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.hero__content {
		order: 2;
	}
	.hero__image-wrapper {
		order: 1;
		margin-bottom: 2rem;
	}
	.hero__description {
		margin-left: auto;
		margin-right: auto;
	}
	.hero__title {
		font-size: 2rem;
	}
}

/* For small devices */
@media screen and (max-width: 350px) {
	.hero__title {
		font-size: 1.5rem;
	}
}

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

.section__title,
.section__subtitle {
	text-align: center;
}

.section__title {
	font-size: var(--h2-font-size);
	margin-bottom: 1rem;
}

.section__subtitle {
	color: var(--text-color-light);
	margin-bottom: 3rem;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

/* ==================== DIRECTIONS ==================== */
.directions {
	background-color: #fff; /* Сделаем фон секции белым для контраста */
}

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

.directions__card {
	background-color: var(--secondary-color);
	border: 1px solid var(--border-color);
	padding: 2.5rem 2rem;
	border-radius: 0.75rem;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.directions__icon-wrapper {
	display: inline-flex;
	padding: 1rem;
	background-color: #fff;
	border-radius: 50%;
	margin-bottom: 1.5rem;
	color: var(--accent-color);
	box-shadow: 0 0 15px rgba(78, 205, 196, 0.2);
}

.directions__icon-wrapper i {
	width: 32px;
	height: 32px;
}

.directions__card-title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.75rem;
}

.directions__card-description {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	line-height: 1.7;
}

/* ==================== MEDIA QUERIES (дополнения) ==================== */
@media screen and (max-width: 992px) {
	.section {
		padding: 4rem 0;
	}
	.directions__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 768px) {
	.directions__grid {
		grid-template-columns: 1fr;
	}
}

/* ==================== PROCESS ==================== */
.process {
	background-color: var(--secondary-color);
}

.process__timeline {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	padding: 2rem 0;
}

/* Центральная линия таймлайна */
.process__timeline::after {
	content: '';
	position: absolute;
	width: 3px;
	background-color: var(--accent-color);
	opacity: 0.2;
	top: 0;
	bottom: 0;
	left: 50%;
	margin-left: -1.5px;
}

.process__item {
	padding: 1rem 3rem;
	position: relative;
	width: 50%;
}

/* Располагаем четные элементы справа */
.process__item:nth-child(even) {
	left: 50%;
}

/* Располагаем нечетные элементы слева и выравниваем текст по правому краю */
.process__item:nth-child(odd) {
	text-align: right;
}

.process__content {
	background-color: #fff;
	padding: 2rem;
	border-radius: 0.75rem;
	border: 1px solid var(--border-color);
	position: relative;
}

/* Круг на таймлайне */
.process__item::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 20px;
	background-color: #fff;
	border: 4px solid var(--accent-color);
	top: 2.5rem;
	right: -14px;
	border-radius: 50%;
	z-index: 1;
}

.process__item:nth-child(even)::after {
	left: -14px;
}

.process__step-number {
	position: absolute;
	top: -2rem;
	font-family: var(--title-font);
	font-size: 2.5rem;
	font-weight: var(--font-bold);
	color: var(--border-color);
	z-index: 1;
}

.process__item:nth-child(odd) .process__step-number {
	right: -1rem;
}

.process__item:nth-child(even) .process__step-number {
	left: -1rem;
}

.process__icon-wrapper {
	display: inline-flex;
	color: var(--accent-color);
	margin-bottom: 1rem;
}

.process__icon-wrapper i {
	width: 28px;
	height: 28px;
}

.process__item-title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.5rem;
}

.process__item-description {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	line-height: 1.7;
}

/* ==================== MEDIA QUERIES (дополнения для Process) ==================== */
@media screen and (max-width: 768px) {
	.process__timeline::after {
		left: 20px; /* Смещаем линию влево */
	}

	.process__item {
		width: 100%;
		padding-left: 50px; /* Отступ для контента */
		padding-right: 1rem;
		text-align: left !important; /* Выравнивание по левому краю для всех */
	}

	.process__item:nth-child(even) {
		left: 0;
	}

	.process__item:nth-child(even)::after {
		left: 6px;
	}

	.process__item::after {
		left: 6px; /* Позиционируем кружок на линии */
	}

	.process__item:nth-child(odd) .process__step-number,
	.process__item:nth-child(even) .process__step-number {
		left: -0.5rem;
		right: auto;
	}
}

/* ==================== CASES ==================== */
.cases {
	background-color: #fff;
}

.cases__container {
	display: flex;
	flex-direction: column;
	gap: 4rem;
}

.case-study {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	align-items: center;
	gap: 3rem;
}

/* Модификатор для "зеркального" кейса */
.case-study--reversed .case-study__image-wrapper {
	order: 2;
}

.case-study--reversed .case-study__content {
	order: 1;
}

.case-study__image {
	border-radius: 0.75rem;
	width: 100%;
	object-fit: cover;
}

.case-study__title {
	font-size: var(--h3-font-size);
	margin-bottom: 1rem;
}

.case-study__description {
	color: var(--text-color-light);
	margin-bottom: 1.5rem;
}

.case-study__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.case-study__tag {
	background-color: var(--secondary-color);
	color: var(--accent-color);
	padding: 0.25rem 0.75rem;
	border-radius: 1rem;
	font-size: var(--small-font-size);
	font-weight: var(--font-bold);
	border: 1px solid var(--accent-color);
}

/* ==================== MEDIA QUERIES (дополнения для Cases) ==================== */
@media screen and (max-width: 768px) {
	.case-study {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	.case-study--reversed .case-study__image-wrapper,
	.case-study--reversed .case-study__content {
		order: initial; /* Сбрасываем порядок на мобильных */
	}
}

/* assets/css/style.css */

/* ... после стилей для .cases ... */

/* ==================== BLOG ==================== */
.blog {
	background-color: var(--secondary-color);
}

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

.blog-card {
	background-color: #fff;
	border-radius: 0.75rem;
	overflow: hidden;
	border: 1px solid var(--border-color);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 20px rgba(26, 46, 57, 0.1);
}

.blog-card__image-wrapper {
	overflow: hidden;
	height: 200px;
}

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

.blog-card:hover .blog-card__image {
	transform: scale(1.05);
}

.blog-card__content {
	padding: 1.5rem;
}

.blog-card__category {
	display: inline-block;
	background-color: var(--accent-color);
	color: #fff;
	padding: 0.2rem 0.6rem;
	border-radius: 0.25rem;
	font-size: 0.75rem;
	font-weight: var(--font-bold);
	margin-bottom: 1rem;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.blog-card__title {
	font-size: 1.125rem;
	margin-bottom: 0.75rem;
	line-height: 1.4;
	/* Ограничение по высоте в 2 строки */
	min-height: 4.5em;
	max-height: 4.5em;
	overflow: hidden;
}

.blog-card__meta {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	margin-bottom: 1.5rem;
}

.blog-card__link {
	font-family: var(--title-font);
	font-weight: var(--font-semibold);
	color: var(--primary-color);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	transition: color 0.3s ease, gap 0.3s ease;
}

.blog-card__link i {
	width: 16px;
	height: 16px;
	transition: transform 0.3s ease;
}

.blog-card__link:hover {
	color: var(--accent-color);
	gap: 0.75rem;
}

.blog-card__link:hover i {
	transform: translateX(4px);
}

/* ==================== MEDIA QUERIES (дополнения для Blog) ==================== */
@media screen and (max-width: 992px) {
	.blog__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 768px) {
	.blog-card__title {
		min-height: auto; /* Убираем ограничение по высоте на мобильных */
	}
}

@media screen and (max-width: 576px) {
	.blog__grid {
		grid-template-columns: 1fr;
	}
}

/* assets/css/style.css */

/* ... после стилей для .blog ... */

/* ==================== CONTACT ==================== */
.contact {
	background-color: #fff;
}

.contact__container {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 4rem;
	background-color: var(--secondary-color);
	padding: 3rem;
	border-radius: 1rem;
}

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

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

.contact__info-details p {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.contact__info-details i {
	color: var(--accent-color);
	width: 24px;
	height: 24px;
}

.contact__form-group {
	margin-bottom: 1.5rem;
}

.contact__form-label {
	display: block;
	font-size: var(--small-font-size);
	font-weight: var(--font-semibold);
	margin-bottom: 0.5rem;
	color: var(--primary-color);
}

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

.contact__form-input:focus {
	outline: none;
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.2);
}

.contact__form-group--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.contact__form-checkbox {
	margin-top: 4px;
}

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

.contact__form-checkbox-label a {
	color: var(--accent-color);
	text-decoration: underline;
}

.contact__form-button {
	width: 100%;
	justify-content: center;
}

/* Сообщение об успехе */
.contact__success-message {
	display: none; /* Изначально скрыто */
	text-align: center;
	padding: 2rem;
	border: 2px dashed var(--accent-color);
	border-radius: 0.5rem;
}

.contact__success-icon {
	color: var(--accent-color);
	margin-bottom: 1rem;
}

.contact__success-icon i {
	width: 48px;
	height: 48px;
}

.contact__success-title {
	font-size: var(--h3-font-size);
	margin-bottom: 0.5rem;
}

/* ==================== MEDIA QUERIES (дополнения для Contact) ==================== */
@media screen and (max-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr;
		gap: 2rem;
		padding: 2rem;
	}
}

/* assets/css/style.css */
/* ... в конец секции CONTACT ... */

/* Стили для ошибок валидации */
.contact__error-message {
	display: none; /* Скрываем по умолчанию */
	color: #d32f2f; /* Красный цвет для ошибки */
	font-size: var(--small-font-size);
	margin-top: 0.25rem;
}

.contact__form-group.has-error .contact__error-message {
	display: block; /* Показываем при ошибке */
}

.contact__form-group.has-error .contact__form-input {
	border-color: #d32f2f;
}

.contact__form-group.has-error .contact__form-input:focus {
	box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

.contact__form-group.has-error .contact__form-checkbox-label {
	color: #d32f2f;
}

/* Стили для состояния загрузки кнопки */
.contact__form-button:disabled {
	background-color: #a0a0a0;
	border-color: #a0a0a0;
	cursor: wait;
}

/* Переопределение стилей для сообщения об успехе */
.contact__success-message {
	display: none;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
	/* ... остальные стили ... */
}

.contact__success-message.is-visible {
	display: block;
	opacity: 1;
}

/* assets/css/style.css */

/* ... после стилей для .contact ... */

/* ==================== COOKIE POP-UP ==================== */
.cookie-popup {
	position: fixed;
	bottom: -100%; /* Изначально скрыт за пределами экрана */
	left: 0;
	right: 0;
	background-color: var(--primary-color);
	color: #fff;
	padding: 1.5rem 2rem;
	box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.1);
	z-index: var(--z-fixed);
	transition: bottom 0.5s ease-in-out;
}

/* Класс для отображения */
.cookie-popup.is-visible {
	bottom: 0;
}

.cookie-popup__content {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;
	max-width: 1120px;
	margin: 0 auto;
}

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

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

.cookie-popup__button {
	flex-shrink: 0; /* Чтобы кнопка не сжималась */
	padding: 0.75rem 1.5rem;
}

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

/* ==================== POLICY PAGES ==================== */
.pages {
	padding: calc(var(--header-height) + 4rem) 0 4rem 0;
	background-color: #fff;
	min-height: 80vh;
	padding-inline: 20px;
}

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

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

.pages h1 {
	font-size: 1.5rem;
}

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

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

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

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

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

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