/* Етап 0: Глобальні стилі */
:root {
	--bg-main: #ffffff;
	--bg-alt: #f4f7fc;
	--text-dark: #1a202c;
	--text-light: #4a5568;
	--primary: #4a90e2;
	--accent: #50e3c2;
	--font-heading: 'Manrope', sans-serif;
	--font-body: 'Inter', sans-serif;
	--container-width: 1140px;
	--radius-small: 4px;
	--radius-medium: 8px;
	--shadow-light: 0 4px 12px rgba(0, 0, 0, 0.05);
	--transition: 0.3s ease;
}

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

html {
	scroll-behavior: smooth;
	font-size: 16px; /* Базовий розмір для mobile-first */
}

body {
	font-family: var(--font-body);
	color: var(--text-dark);
	background-color: var(--bg-main);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

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

a:hover {
	opacity: 0.8;
}

ul {
	list-style: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: 800;
	line-height: 1.3;
	color: var(--text-dark);
}

/* Загальний клас контейнера */
.container {
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: 1.25rem; /* 20px */
	padding-right: 1.25rem; /* 20px */
}

/* Етап 1: Стилі Хедера */
.header {
	background-color: var(--bg-main);
	border-bottom: 1px solid #e2e8f0;
	padding-top: 1rem;
	padding-bottom: 1rem;
	position: sticky;
	top: 0;
	z-index: 1000;
	transition: box-shadow var(--transition);
}

.header--scrolled {
	box-shadow: var(--shadow-light);
}

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

.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem; /* 8px */
	color: var(--text-dark);
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: 1.25rem;
}

.logo:hover {
	opacity: 1;
}

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

/* Навігація */

.header__menu {
	display: flex;
	align-items: center;
	gap: 1.5rem; /* 24px */
}

.header__menu-link {
	font-family: var(--font-body);
	font-weight: 500;
	color: var(--text-light);
	position: relative;
	padding: 0.5rem 0;
}

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

.header__menu-link:hover {
	color: var(--text-dark);
	opacity: 1;
}

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

.header__menu-link--cta {
	background-color: var(--primary);
	color: var(--bg-main);
	padding: 0.5rem 1rem;
	border-radius: var(--radius-medium);
}

.header__menu-link--cta:hover {
	color: var(--bg-main);
	opacity: 0.9;
}

.header__menu-link--cta::after {
	display: none; /* Не потрібна лінія для кнопки */
}

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

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

/* Адаптивність Хедера (Mobile-first) */
@media (min-width: 992px) {
	.header__toggle {
		display: none;
	}

	.header__nav {
		display: block;
	}
}

/* Стилі для відкритого мобільного меню */
@media (max-width: 991.98px) {
	.header__nav {
		display: block; /* Показуємо на мобільних */
		position: fixed;
		top: 0;
		right: -100%; /* Сховано за екраном */
		width: 80%;
		max-width: 320px;
		height: 100vh;
		background-color: var(--bg-main);
		box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
		padding: 6rem 2rem 2rem;
		transition: right var(--transition);
		z-index: 1000;
	}

	.header__nav--visible {
		right: 0;
	}

	.header__menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}

	.header__menu-link {
		font-size: 1.1rem;
	}
}

/* Етап 2: Стилі Футера */
.footer {
	background-color: var(--bg-alt);
	padding-top: 4rem;
	border-top: 1px solid #e2e8f0;
	color: var(--text-light);
}

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

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

.footer__description {
	margin-top: 1rem;
	font-size: 0.9rem;
	max-width: 300px;
}

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

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

.footer__link:hover {
	color: var(--primary);
	opacity: 1;
}

.footer__address {
	font-style: normal;
	font-size: 0.95rem;
	line-height: 1.5;
}

/* Адаптивність Футера */
@media (min-width: 768px) {
	.footer__grid {
		/* 2 колонки на планшетах */
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.footer__grid {
		/* 4 колонки на десктопах */
		grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
		gap: 2rem;
	}
}

/* Нижня частина футера */
.footer__bottom {
	border-top: 1px solid #dae4f2;
	margin-top: 3rem;
	padding-top: 1.5rem;
	padding-bottom: 1.5rem;
	text-align: center;
	font-size: 0.85rem;
	color: var(--text-light);
}

/* --- Глобальні стилі для кнопок (додамо тут) --- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem; /* 12px 24px */
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 1rem;
	border-radius: var(--radius-medium);
	border: 2px solid transparent;
	cursor: pointer;
	transition: var(--transition);
	text-align: center;
}

.btn--primary {
	background-color: var(--primary);
	color: var(--bg-main);
}

.btn--primary:hover {
	background-color: transparent;
	border-color: var(--primary);
	color: var(--primary);
	opacity: 1;
}

/* --- Етап 3: Стилі Hero секції --- */
.hero {
	background-color: var(--bg-alt); /* Використовуємо альтернативний фон */
	padding-top: 4rem;
	padding-bottom: 4rem;
	overflow: hidden; /* Для декоративних елементів */
}

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

.hero__content {
	text-align: center; /* Центруємо на мобільних */
}

.hero__title {
	font-size: 1.5rem; /* 36px */
	font-weight: 800;
	margin-bottom: 1rem;
	line-height: 1.2;
}

/* Стилі для анімації заголовка */
.hero__title .char {
	display: inline-block;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

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

.hero__cta {
	font-size: 1.1rem;
	padding: 0.8rem 2rem;
}

/* Візуальна частина */
.hero__visual {
	position: relative;
	max-width: 500px;
	margin: 0 auto;
}

.hero__image {
	border-radius: var(--radius-medium);
	box-shadow: 0 10px 30px rgba(74, 144, 226, 0.2);
	position: relative;
	z-index: 2;
}

/* Декоративні елементи для "живості" */
.hero__deco {
	position: absolute;
	border-radius: 50%;
	z-index: 1;
	animation: hero-pulse 5s infinite ease-in-out;
}

.hero__deco--1 {
	width: 100px;
	height: 100px;
	background-color: rgba(74, 144, 226, 0.1); /* --primary з прозорістю */
	top: -20px;
	left: -30px;
}

.hero__deco--2 {
	width: 60px;
	height: 60px;
	background-color: rgba(80, 227, 194, 0.2); /* --accent з прозорістю */
	bottom: -10px;
	right: -20px;
	animation-delay: -2s; /* Різний час анімації */
}

@keyframes hero-pulse {
	0%,
	100% {
		transform: scale(1);
		opacity: 0.8;
	}
	50% {
		transform: scale(1.3);
		opacity: 0.4;
	}
}

/* Адаптивність Hero (Mobile-first) */
@media (min-width: 992px) {
	.hero {
		padding-top: 6rem;
		padding-bottom: 6rem;
	}

	.hero__container {
		grid-template-columns: 1fr 1fr; /* 2 колонки на десктопах */
		gap: 3rem;
	}

	.hero__content {
		text-align: left; /* Вирівнюємо по лівому краю */
	}

	.hero__title {
		font-size: 2.5rem; /* 48px */
	}

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

	.hero__visual {
		max-width: none;
	}
}

/* --- Загальні стилі для секцій (додамо тут) --- */
.section {
	padding-top: 4rem;
	padding-bottom: 4rem;
}

/* Кожен другий блок буде мати інший фон для ритму */
.section:nth-of-type(even) {
	background-color: var(--bg-alt);
}

.section-header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto 3rem auto;
}

.section-header__subtitle {
	display: inline-block;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--primary);
	background-color: rgba(74, 144, 226, 0.1);
	padding: 0.3rem 0.8rem;
	border-radius: var(--radius-small);
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

.section-header__title {
	font-size: 2rem; /* 32px */
	margin-bottom: 1rem;
}

.section-header__description {
	font-size: 1.1rem;
	color: var(--text-light);
}

/* --- Етап 3: Стилі секції "Практики" --- */
.practice__grid {
	display: grid;
	grid-template-columns: 1fr; /* 1 колонка на мобільних */
	gap: 1.5rem; /* 24px */
}

.practice-card {
	background-color: var(--bg-main);
	border: 1px solid #e2e8f0;
	border-radius: var(--radius-medium);
	padding: 2rem;
	text-align: center;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
	transition: transform var(--transition), box-shadow var(--transition);
}

.practice-card:hover {
	transform: translateY(-8px);
	box-shadow: var(--shadow-light);
}

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

.practice-card__icon .lucide {
	width: 32px;
	height: 32px;
}

.practice-card__title {
	font-size: 1.25rem; /* 20px */
	margin-bottom: 0.75rem;
}

.practice-card__text {
	font-size: 0.95rem;
	color: var(--text-light);
	line-height: 1.7;
}

/* Адаптивність секції "Практики" */
@media (min-width: 768px) {
	.section-header__title {
		font-size: 2.25rem; /* 36px */
	}

	.practice__grid {
		/* 3 колонки на планшетах і десктопах */
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (min-width: 992px) {
	.section {
		padding-top: 5rem;
		padding-bottom: 5rem;
	}
}

/* --- Етап 3: Стилі секції "Инструменты" --- */
.tools__layout {
	display: grid;
	grid-template-columns: 1fr; /* 1 колонка на мобільних */
	gap: 2.5rem;
	align-items: center;
}

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

.tools__image {
	width: 100%;
	border-radius: var(--radius-medium);
	box-shadow: var(--shadow-light);
}

.tools__content-title {
	font-size: 1.75rem; /* 28px */
	font-weight: 800;
	margin-bottom: 1rem;
}

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

.tools__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 2rem;
}

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

.tools__list-item .lucide {
	width: 20px;
	height: 20px;
	color: var(--accent); /* Використовуємо акцентний колір */
	flex-shrink: 0;
}

/* Адаптивність секції "Инструменты" */
@media (min-width: 992px) {
	.tools__layout {
		grid-template-columns: 1fr 1fr; /* 2 колонки на десктопах */
		gap: 4rem;
	}

	.tools__visual {
		max-width: none;
		order: 1; /* Змінюємо порядок: зображення зліва */
	}

	.tools__content {
		order: 2; /* Текст справа */
	}

	.tools__content-title {
		font-size: 2rem; /* 32px */
	}
}

/* --- Етап 3: Стилі секції "Как это работает" --- */
.how-it-works__layout {
	display: grid;
	grid-template-columns: 1fr; /* 1 колонка на мобільних */
	gap: 3rem;
	align-items: center;
}

.how-it-works__visual {
	max-width: 450px;
	margin: 0 auto;
	display: none; /* Сховаємо на мобільних для економії місця */
}

.how-it-works__image {
	width: 100%;
	border-radius: var(--radius-medium);
	box-shadow: var(--shadow-light);
}

/* Стилі акордеону */
.accordion {
	width: 100%;
	max-width: 700px;
	margin: 0 auto;
}

.accordion__item {
	border: 1px solid #e2e8f0;
	border-radius: var(--radius-medium);
	margin-bottom: 1rem;
	overflow: hidden; /* Важливо для анімації max-height */
	background-color: var(--bg-main);
}

.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;
	font-family: var(--font-heading);
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--text-dark);
}

.accordion__icon {
	color: var(--primary);
	transition: transform var(--transition);
	flex-shrink: 0;
	margin-left: 1rem;
}

.accordion__content {
	max-height: 0; /* Сховано за замовчуванням */
	overflow: hidden;
	transition: max-height 0.4s ease-out;
}

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

/* Стилі для активного стану */
.accordion__header[aria-expanded='true'] + .accordion__content {
	/* max-height буде встановлено через JS */
}

.accordion__header[aria-expanded='true'] .accordion__icon {
	transform: rotate(180deg);
}

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

	.how-it-works__visual {
		display: block; /* Показуємо зображення на десктопах */
		order: 2; /* Зображення справа */
	}

	.how-it-works__accordion {
		order: 1; /* Акордеон зліва */
	}
}

/* --- Етап 3: Стилі секції "Вопросы" (FAQ) --- */
.faq {
	background-color: var(--bg-alt); /* Чергуємо фон */
}

.faq__accordion-container {
	max-width: 800px; /* Робимо акордеон трохи ширшим */
	margin: 0 auto;
}


/* --- Етап 4: Стилі секції контактів --- */
.contact {
    /* Ця секція буде на білому тлі (за замовчуванням) */
}

.contact__wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--bg-alt);
    padding: 2rem;
    border-radius: var(--radius-medium);
    box-shadow: var(--shadow-light);
}

.contact__form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

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

.form-group__label {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-group__input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-dark);
    border: 1px solid #CBD5E0;
    border-radius: var(--radius-medium);
    background-color: var(--bg-main);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group__input::placeholder {
    color: #A0AEC0;
}

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

/* Стилі для чекбокса */
.form-group--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.form-group__checkbox {
    width: 1.25em;
    height: 1.25em;
    margin-top: 0.2em; /* Вирівнюємо по тексту */
    flex-shrink: 0;
    cursor: pointer;
}

.form-group__checkbox:checked {
    accent-color: var(--primary);
}

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

.form-group__checkbox-label a {
    color: var(--primary);
    text-decoration: underline;
}

.contact__form-btn {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.9rem;
    margin-top: 1rem;
}

/* Повідомлення про успіх/помилку */
.contact__message {
    display: none; /* Сховано за замовчуванням */
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: var(--radius-medium);
    font-weight: 500;
    text-align: center;
}

.contact__message--success {
    display: block; /* Показати */
    background-color: #C6F6D5; /* Зелений */
    color: #22543D;
    border: 1px solid #9AE6B4;
}

.contact__message--error {
    display: block; /* Показати */
    background-color: #FED7D7; /* Червоний */
    color: #742A2A;
    border: 1px solid #FEB2B2;
}

/* Адаптивність форми */
@media (min-width: 768px) {
    .contact__wrapper {
        padding: 3rem;
    }
    
    .contact__form {
        /* Ім'я та Email в один рядок */
        grid-template-columns: 1fr 1fr;
    }
    
    /* Телефон, чекбокс та кнопка на всю ширину */
    .form-group:nth-child(3),
    .form-group--checkbox,
    .contact__form-btn {
        grid-column: 1 / -1; /* Охопити всі колонки */
    }
}

/* --- Етап 5 (Частина 1): Стилі Cookie Pop-up --- */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--text-dark);
    color: var(--bg-main);
    padding: 1.5rem 1.25rem;
    z-index: 2000;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    
    /* Анімація появи */
    transform: translateY(100%);
    transition: transform 0.5s ease-out;
}

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

.cookie-popup__content {
    display: flex;
    flex-direction: column; /* На мобільних */
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: var(--container-width);
    margin: 0 auto;
}

.cookie-popup__text {
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
}

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

.cookie-popup__text a:hover {
    color: var(--accent);
    opacity: 1;
}

.cookie-popup__btn {
    /* Використовуємо стилі .btn, але з іншими кольорами */
    display: inline-flex;
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-medium);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    
    background-color: var(--primary);
    color: var(--bg-main);
    flex-shrink: 0;
}

.cookie-popup__btn:hover {
    opacity: 0.8;
}

/* Адаптивність Cookie Pop-up */
@media (min-width: 768px) {
    .cookie-popup__content {
        flex-direction: row; /* В рядок на десктопах */
        gap: 1.5rem;
    }
    .cookie-popup__text {
        text-align: left;
    }
}


/* --- Етап 5 (Частина 2): Стилі для сторінок політик (.pages) --- */
.pages {
    padding-top: 3rem;
    padding-bottom: 4rem;
    background-color: var(--bg-main);
}

.pages .container {
    max-width: 800px; /* Вузький контейнер для тексту */
}

/* Всі текстові елементи всередині .pages */
.pages h1,
.pages h2,
.pages h3,
.pages p,
.pages ul,
.pages li {
    color: var(--text-dark);
}

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

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

.pages h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.pages p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-light);
    margin-bottom: 1.25rem;
}

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

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

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

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

.pages strong {
    font-weight: 600;
    color: var(--text-dark);
}