/* Етап 0: Глобальні стилі, змінні та скидання */

/* Змінні */
:root {
	--bg-color: #ffffff;
	--text-color: #1a202c;
	--text-light: #4a5568;
	--primary-color: #38b2ac; /* Тіл/Бірюза */
	--primary-hover: #2c7a7b;
	--accent-color: #ed8936; /* Акцентний помаранчевий */
	--border-color: #e2e8f0;
	--header-height: 70px;

	--font-body: 'Roboto', sans-serif;
	--font-heading: 'Montserrat', sans-serif;
}

/* Скидання стилів */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: 700;
	color: var(--text-color);
	margin-bottom: 1rem;
}

ul,
ol {
	list-style: none;
}

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

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

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

/* Утиліта: Контейнер */
.container {
	width: 100%;
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.5rem;
	padding-right: 1.5rem;
}

/* --- Етап 1: Стилі Хедера (Mobile-first) --- */
.header {
	width: 100%;
	height: var(--header-height);
	background-color: var(--bg-color);
	border-bottom: 1px solid var(--border-color);
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1000;
}

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

.header__logo-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--text-color);
}

.header__logo-link:hover {
	color: var(--text-color); /* Логотип не змінює колір */
}

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

.header__logo-text {
	line-height: 1;
}

/* Мобільне меню: Кнопка */
.header__toggle {
	display: block;
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-color);
	z-index: 1010;
}

.header__toggle i {
	width: 28px;
	height: 28px;
}

/* Мобільне меню: Навігація */
.header__nav {
	position: fixed;
	top: 0;
	right: 0;
	width: 80%;
	height: 100vh;
	background-color: var(--bg-color);
	padding: 6rem 2rem 2rem;
	transform: translateX(100%);
	transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
	box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

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

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

.header__nav-link {
	font-family: var(--font-heading);
	font-size: 1.25rem;
	font-weight: 500;
	color: var(--text-color);
}

.header__nav-link:hover {
	color: var(--primary-color);
}

/* CTA Кнопка в мобільному меню */
.header__nav-link--cta {
	background-color: var(--accent-color);
	color: white;
	padding: 0.75rem 1.5rem;
	border-radius: 50px;
	text-align: center;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.header__nav-link--cta:hover {
	background-color: #d6731f; /* Darker orange */
	color: white;
	transform: translateY(-2px);
}

/* Десктопні стилі (з 768px) */
@media (min-width: 768px) {
	.header__toggle {
		display: none;
	}

	.header__nav {
		position: static;
		width: auto;
		height: auto;
		background-color: transparent;
		padding: 0;
		transform: none;
		box-shadow: none;
	}

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

	.header__nav-link {
		font-size: 1rem;
	}

	.header__nav-link--cta {
		padding: 0.5rem 1.25rem;
	}
}

/* --- Етап 2: Стилі Футера (Mobile-first) --- */
.footer {
	background-color: #f8f9fa; /* Трохи темніший фон для футера */
	border-top: 1px solid var(--border-color);
	padding: 4rem 0 2rem;
	margin-top: 4rem; /* Відступ від останньої секції */
}

.footer__container {
	display: grid;
	grid-template-columns: 1fr; /* 1 колонка на мобільних */
	gap: 2.5rem;
}

.footer__brand .footer__logo-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--text-color);
}
.footer__brand .footer__logo-svg {
	width: 32px;
	height: 32px;
}
.footer__brand .footer__logo-text {
	line-height: 1;
}

.footer__description {
	font-size: 0.9rem;
	color: var(--text-light);
	margin: 1rem 0;
	max-width: 300px;
}

.footer__copyright {
	font-size: 0.8rem;
	color: #718096; /* Ще світліший сірий */
}

.footer__title {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: var(--text-color);
}

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

.footer__link {
	font-size: 0.95rem;
	color: var(--text-light);
}

.footer__link:hover {
	color: var(--primary-color);
	text-decoration: underline;
}

.footer__contact {
	font-style: normal;
}

.footer__address p {
	font-size: 0.95rem;
	color: var(--text-light);
	margin-bottom: 0.75rem;
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.footer__address .footer__link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.footer__icon {
	width: 16px;
	height: 16px;
	color: var(--primary-color);
	margin-top: 3px;
	flex-shrink: 0;
}

/* Десктопні стилі для футера (з 768px) */
@media (min-width: 768px) {
	.footer__container {
		/* 4 колонки */
		grid-template-columns: 2fr 1fr 1fr 1.5fr;
		gap: 2rem;
	}
}

/* --- Етап 3.1: Стилі Hero-секції --- */
.hero {
	position: relative; /* Важливо для canvas */
	min-height: 90vh; /* Займає майже весь екран */
	padding-top: var(--header-height); /* Відступ для фікс. хедера */
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden; /* Щоб canvas не виходив за межі */
	background-color: #f8f9fa; /* Світлий фон, якщо canvas не завантажиться */
}

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

.hero__container {
	position: relative;
	z-index: 2; /* Поверх canvas */
	display: flex;
	flex-direction: column;
	align-items: center;
}

.hero__title {
	font-size: 2.25rem; /* Розмір для мобільних */
	font-weight: 700;
	margin-bottom: 1.5rem;
	max-width: 800px;
	line-height: 1.2;
}

.hero__subtitle {
	font-size: 1.1rem;
	color: var(--text-light);
	margin-bottom: 2.5rem;
	max-width: 600px;
}

/* Адаптивність для Hero */
@media (min-width: 768px) {
	.hero {
		min-height: 80vh;
	}

	.hero__title {
		font-size: 3rem; /* Більший шрифт на десктопі */
	}
	.hero__subtitle {
		font-size: 1.25rem;
	}
}

/* Утиліти: Секції */
.section__title {
	font-size: 2.5rem;
	text-align: center;
	margin-bottom: 1rem;
	padding-top: 4rem; /* Відступ від попередньої секції */
}

.section__subtitle {
	font-size: 1.15rem;
	color: var(--text-light);
	text-align: center;
	margin-bottom: 3.5rem;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

/* Адаптивність для заголовків секцій */
@media (max-width: 768px) {
	.section__title {
		font-size: 2rem;
		padding-top: 3rem;
	}
	.section__subtitle {
		font-size: 1rem;
		margin-bottom: 2.5rem;
	}
}

/* --- Етап 3.2: Стилі секції "Возможности" (Features) --- */

.features {
	background-color: var(--bg-color); /* Звичайний білий фон */
	padding-bottom: 4rem; /* Внутрішній відступ знизу */
}

.features__grid {
	display: grid;
	grid-template-columns: 1fr; /* 1 колонка на мобільних */
	gap: 1.5rem;
}

.features__card {
	background-color: #f8f9fa; /* Світлий фон для карток */
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.features__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.features__card-icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: var(--primary-color);
	color: white;
	margin-bottom: 1.5rem;
}

.features__card-icon i {
	width: 28px;
	height: 28px;
}

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

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

/* Адаптивність для Features (з 768px) */
@media (min-width: 768px) {
	.features__grid {
		/* 3 колонки на десктопі */
		grid-template-columns: repeat(3, 1fr);
		gap: 2rem;
	}
}

/* --- Етап 3.3: Стилі секції "Инструменты" (Tools) --- */
.tools {
	background-color: #f8f9fa; /* Світлий фон */
	padding-bottom: 4rem;
	border-top: 1px solid var(--border-color);
	border-bottom: 1px solid var(--border-color);
	overflow: hidden; /* Для анімації зображення */
}

.tools__grid {
	display: grid;
	grid-template-columns: 1fr; /* 1 колонка на мобільних */
	gap: 3rem;
	align-items: center;
}

.tools__image-wrapper {
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

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

.tools__image-wrapper:hover .tools__image {
	transform: scale(1.05);
}

/* Стилі Акордеону */
.tools__accordion {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.accordion__item {
	background-color: var(--bg-color);
	border: 1px solid var(--border-color);
	border-radius: 8px;
	transition: box-shadow 0.3s ease;
}

.accordion__item--active {
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
	border-color: var(--primary-color);
}

.accordion__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	width: 100%;
	padding: 1.25rem 1.5rem;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
}

.accordion__title {
	font-family: var(--font-heading);
	font-size: 1.15rem;
	font-weight: 500;
	color: var(--text-color);
}

.accordion__icon {
	width: 20px;
	height: 20px;
	color: var(--primary-color);
	transition: transform 0.3s ease;
	flex-shrink: 0;
	margin-left: 1rem;
}

/* Обертання іконки */
.accordion__item--active .accordion__icon {
	transform: rotate(180deg);
}

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

.accordion__content p {
	padding: 0 1.5rem 1.5rem;
	font-size: 0.95rem;
	color: var(--text-light);
	line-height: 1.7;
}

/* Адаптивність для Tools (з 992px) */
@media (min-width: 992px) {
	.tools__grid {
		/* 2 колонки на десктопі */
		grid-template-columns: 1fr 1fr;
	}
}

/* --- Етап 3.4: Стилі секції "Примеры" (Cases) --- */
.cases {
	background-color: var(--bg-color); /* Звичайний білий фон */
	padding-bottom: 5rem;
}

.cases__slider {
	width: 100%;
	padding: 1rem 0 3rem 0; /* Додатковий відступ для пагінації */
	overflow: hidden; /* Важливо для Swiper */
}

.cases__card {
	background-color: #f8f9fa;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 2.5rem 2rem;
	height: 100%; /* Щоб картки були однакової висоти */
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 280px;
}

.cases__card-rating {
	display: flex;
	gap: 0.25rem;
	margin-bottom: 1.5rem;
	color: var(--accent-color); /* Помаранчевий для зірок */
}

.cases__card-rating i {
	width: 20px;
	height: 20px;
}

.cases__star--filled {
	fill: var(--accent-color);
}

.cases__star--half {
	fill: var(--accent-color);
	/* Можна додати градієнт, але для SVG це складніше,
       тому обмежимось заповненою/незаповненою */
}

.cases__card-text {
	font-size: 1.1rem;
	font-style: italic;
	color: var(--text-color);
	line-height: 1.6;
	margin-bottom: 1.5rem;
	flex-grow: 1; /* Текст займає вільне місце */
}

.cases__author-name {
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 0.1rem;
}

.cases__author-location {
	font-size: 0.9rem;
	color: var(--text-light);
}

/* Стилізація навігації Swiper */
.swiper-button-prev,
.swiper-button-next {
	width: 50px !important;
	height: 50px !important;
	background-color: var(--bg-color);
	border: 1px solid var(--border-color);
	border-radius: 50%;
	color: var(--primary-color);
	transition: all 0.3s ease;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.swiper-button-prev:hover,
.swiper-button-next:hover {
	background-color: var(--primary-color);
	color: white;
}

.swiper-button-prev::after,
.swiper-button-next::after {
	display: none !important ; /* Ховаємо стандартні стрілки */
}

.swiper-button-prev i,
.swiper-button-next i {
	width: 24px !important;
	height: 24px !important;
}

/* Приховуємо стрілки на мобільних */
.swiper-button-prev,
.swiper-button-next {
	display: none !important;
}

/* Показуємо стрілки на десктопі */
@media (min-width: 768px) {
	.swiper-button-prev,
	.swiper-button-next {
		display: flex !important;
		justify-content: center;
		align-items: center;
	}
	.swiper-button-prev {
		left: -10px !important;
	}
	.swiper-button-next {
		right: -10px !important;
	}
}

/* Стилізація пагінації Swiper */
.swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	background-color: var(--border-color);
	opacity: 1;
	transition: background-color 0.3s ease;
}

.swiper-pagination-bullet-active {
	background-color: var(--primary-color);
}

/* --- Етап 3.5: Стилі секції "Быстрый старт" (Start) --- */
.start {
	background-color: #f8f9fa; /* Світлий фон */
	padding-bottom: 5rem;
	border-top: 1px solid var(--border-color);
}

.start__roadmap {
	display: grid;
	grid-template-columns: 1fr; /* 1 колонка на мобільних */
	gap: 2rem;
	position: relative; /* Для псевдо-ліній */
	margin-bottom: 3rem;
}

.start__step {
	background-color: var(--bg-color);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
	position: relative;
	z-index: 2; /* Щоб бути над лініями */
}

.start__step-icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: var(--primary-color);
	color: white;
	margin-bottom: 1rem;
}

.start__step-icon i {
	width: 28px;
	height: 28px;
}

.start__step-number {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--text-light);
	margin-bottom: 0.5rem;
}

.start__step-title {
	font-size: 1.4rem;
	margin-bottom: 0.75rem;
}

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

.start__cta {
	text-align: center;
}

/* Адаптивність для Start (з 768px) + Дорожня карта */
@media (min-width: 768px) {
	.start__roadmap {
		grid-template-columns: repeat(3, 1fr);
		gap: 2rem;
	}

	/* Лінії, що з'єднують кроки (тільки на десктопі) */
	.start__step {
		z-index: 2;
	}

	.start__roadmap::before {
		content: '';
		position: absolute;
		top: 50px; /* На рівні центру іконок */
		left: 16.66%; /* (100% / 3) / 2 */
		width: 66.66%; /* 2/3 ширини */
		height: 2px;
		background: repeating-linear-gradient(
			to right,
			var(--primary-color),
			var(--primary-color) 6px,
			transparent 6px,
			transparent 12px
		);
		opacity: 0.5;
		z-index: 1; /* Позаду карток */
	}
}

/* --- Етап 4: Стилі секції "Контакти" (Contact) --- */
.contact {
	background-color: var(--bg-color);
	padding-bottom: 5rem;
}

.contact__grid {
	display: grid;
	grid-template-columns: 1fr; /* 1 колонка на мобільних */
	gap: 3rem;
}

@media (min-width: 992px) {
	.contact__grid {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
		align-items: flex-start; /* Вирівнюємо по верху */
	}
}

.contact__text-title {
	font-size: 1.8rem;
	margin-bottom: 1rem;
	color: var(--primary-color);
}

.contact__text-desc {
	font-size: 1.1rem;
	color: var(--text-light);
	line-height: 1.7;
	margin-bottom: 2rem;
}

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

.contact__info-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 1rem;
	font-weight: 500;
}

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

/* Стилі форми */
.contact__form-wrapper {
	background-color: #f8f9fa;
	padding: 2.5rem;
	border-radius: 12px;
	border: 1px solid var(--border-color);
}

.form__group {
	margin-bottom: 1.5rem;
}

.form__label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.5rem;
	font-size: 0.95rem;
}

.form__input {
	width: 100%;
	padding: 0.9rem 1rem;
	font-size: 1rem;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	background-color: var(--bg-color);
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(56, 178, 172, 0.2);
}

/* Чекбокс */
.form__group--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-top: 1rem;
}

.form__checkbox {
	margin-top: 4px; /* Вирівнюємо */
	flex-shrink: 0;
}

.form__checkbox-label {
	font-size: 0.9rem;
	color: var(--text-light);
	line-height: 1.5;
}

.form__checkbox-label a {
	text-decoration: underline;
}

.contact__form-btn {
	width: 100%;
	margin-top: 1rem;
	padding: 1rem; /* Робимо кнопку більшою */
}

/* Повідомлення про статус */
.form__message {
	padding: 1rem;
	margin-bottom: 1.5rem;
	border-radius: 8px;
	font-size: 0.95rem;
	display: none; /* ВАЖЛИВО: приховані за замовчуванням */
}

.form__message--success {
	background-color: #e6fffa;
	border: 1px solid #b2f5ea;
	color: #2c7a7b;
}

.form__message--error {
	background-color: #fff5f5;
	border: 1px solid #fed7d7;
	color: #c53030;
}

/* --- Етап 5.1: Стилі Cookie Pop-up --- */
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--bg-color);
	padding: 1.5rem 0;
	border-top: 1px solid var(--border-color);
	box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.05);
	z-index: 999;

	/* Стан "приховано" (для анімації) */
	visibility: hidden;
	transform: translateY(100%);
	transition: transform 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

/* Стан "видимо" (додається через JS) */
.cookie-popup--visible {
	visibility: visible;
	transform: translateY(0);
}

.cookie-popup__container {
	display: flex;
	flex-direction: column; /* На мобільних */
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.cookie-popup__text {
	font-size: 0.9rem;
	color: var(--text-light);
	text-align: center;
}

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

.cookie-popup__btn {
	padding: 0.6rem 1.5rem; /* Трохи менша кнопка */
	flex-shrink: 0;
}

/* Адаптивність для Pop-up (з 768px) */
@media (min-width: 768px) {
	.cookie-popup__container {
		flex-direction: row; /* На десктопі */
		gap: 2rem;
	}
	.cookie-popup__text {
		text-align: left;
	}
}

/* --- Етап 5.2: Стилі для сторінок політик (.pages) --- */
.pages {
	/* Відступ зверху, враховуючи фіксований хедер */
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 5rem;
	min-height: 80vh; /* Щоб футер не прилипав на коротких сторінках */
}

.pages .container {
	max-width: 800px; /* Робимо контент вужчим для кращої читабельності */
}

/* Головний заголовок сторінки */
.pages h1 {
	font-size: 2.75rem;
	color: var(--text-color);
	margin-bottom: 2rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--border-color);
}

/* Підзаголовки */
.pages h2 {
	font-size: 1.75rem;
	color: var(--text-color);
	margin-top: 2.5rem;
	margin-bottom: 1.25rem;
}

/* Основний текст */
.pages p {
	font-size: 1.05rem;
	color: var(--text-light);
	line-height: 1.7;
	margin-bottom: 1.5rem;
}

/* Списки */
.pages ul {
	list-style-type: disc;
	padding-left: 1.5rem;
	margin-bottom: 1.5rem;
}

.pages li {
	font-size: 1.05rem;
	color: var(--text-light);
	line-height: 1.7;
	margin-bottom: 0.75rem;
}

/* Виділення тексту */
.pages strong {
	font-weight: 700;
	color: var(--text-color);
}

/* Посилання в тексті */
.pages a {
	color: var(--primary-color);
	font-weight: 500;
	text-decoration: underline;
}

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

/* Адаптивність для заголовків на мобільних */
@media (max-width: 768px) {
	.pages h1 {
		font-size: 2.25rem;
	}
	.pages h2 {
		font-size: 1.5rem;
	}
}
