/* ЕТАП 0: ГЛОБАЛЬНІ СТИЛІ */

/* 1. Підключення шрифтів (вже зроблено в HTML через <link>) */

/* 2. CSS Змінні */
:root {
	--color-bg: #fdfdff;
	--color-surface: #ffffff;
	--color-text: #1a202c;
	--color-secondary-text: #4a5568;
	--color-primary: #4263eb;
	--color-border: #e2e8f0;

	--font-body: 'Inter', sans-serif;
	--font-heading: 'Poppins', sans-serif;

	--container-width: 1200px;
	--container-padding: 1.5rem; /* 24px */

	--header-height: 70px;
	--border-radius: 8px;
	--transition-speed: 0.3s ease;
}

/* 3. Глобальний ресет та налаштування body */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: 1.2;
	margin-bottom: 0.5rem;
}

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

a:hover {
	color: #364fc7; /* Темніший відтінок */
}

ul {
	list-style: none;
}

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

/* 4. Утиліти */
.container {
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-padding);
	padding-right: var(--container-padding);
}

/* 5. Стилі для Логотипу */
.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem; /* 8px */
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.25rem; /* 20px */
	color: var(--color-text);
}

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

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

/* ЕТАП 1: СТИЛІ ХЕДЕРА */

.header {
	width: 100%;
	height: var(--header-height);
	background-color: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

/* Навігація (Mobile-first: спершу ховаємо) */
.header__nav {
	position: fixed;
	top: var(--header-height);
	left: 0;
	width: 100%;
	height: calc(100vh - var(--header-height));
	background-color: var(--color-surface);
	padding: 2rem;

	/* Анімація виїзду */
	transform: translateX(-100%);
	opacity: 0;
	visibility: hidden;
	transition: transform var(--transition-speed), opacity var(--transition-speed),
		visibility var(--transition-speed);
}

.header__nav.nav--visible {
	transform: translateX(0);
	opacity: 1;
	visibility: visible;
}

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

.nav__link {
	font-family: var(--font-heading);
	font-size: 1.25rem; /* Збільшено для мобільного меню */
	font-weight: 600;
	color: var(--color-text);
}

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

/* Кнопка в меню */
.nav__link--button {
	background-color: var(--color-primary);
	color: #fff;
	padding: 0.75rem 1.5rem;
	border-radius: var(--border-radius);
	text-align: center;
	transition: background-color var(--transition-speed),
		box-shadow var(--transition-speed);
}

.nav__link--button:hover {
	background-color: #364fc7;
	color: #fff;
	box-shadow: 0 4px 12px rgba(66, 99, 235, 0.3);
}

/* Бургер-меню */
.burger {
	background: none;
	border: none;
	cursor: pointer;
	padding: 0.25rem;
	color: var(--color-text);
	position: relative;
	width: 28px;
	height: 28px;
}

.burger__icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	transition: opacity var(--transition-speed);
}

.burger__icon--menu {
	opacity: 1;
}
.burger__icon--close {
	opacity: 0;
}

.burger.burger--active .burger__icon--menu {
	opacity: 0;
}
.burger.burger--active .burger__icon--close {
	opacity: 1;
}

/* ЕТАП 2: СТИЛІ ФУТЕРА */
.footer {
	background-color: #1a202c; /* Темний футер для контрасту */
	color: #a0aec0; /* Світло-сірий текст */
	padding-top: 4rem;
	border-top: 4px solid var(--color-primary);
}

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

/* Логотип у футері має бути білим */
.footer .logo__text {
	color: #fff;
}

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

.footer__title {
	font-family: var(--font-heading);
	font-size: 1.125rem; /* 18px */
	color: #fff;
	margin-bottom: 1rem;
}

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

.footer__link {
	color: #a0aec0;
}

.footer__link:hover {
	color: #fff;
}

.footer__list--contact {
	gap: 1rem;
}

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

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

.footer__bottom {
	border-top: 1px solid #2d3748; /* Темний роздільник */
	margin-top: 3rem;
	padding: 1.5rem 0;
}

.footer__bottom-container {
	text-align: center;
	font-size: 0.875rem; /* 14px */
}

/* ------------------------------ */
/* АДАПТАЦІЯ (Desktop) */
/* ------------------------------ */

/* Планшети і вище */
@media (min-width: 768px) {
	/* 2 колонки у футері */
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Десктопи */
@media (min-width: 1024px) {
	/* Ховаємо бургер */
	.burger {
		display: none;
	}

	/* Показуємо десктопну навігацію */
	.header__nav {
		position: static;
		transform: none;
		opacity: 1;
		visibility: visible;
		width: auto;
		height: auto;
		padding: 0;
		background-color: transparent;
	}

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

	.nav__link {
		font-size: 1rem; /* Стандартний розмір */
	}

	.nav__link--button {
		padding: 0.5rem 1.25rem;
	}

	/* 4 колонки у футері */
	.footer__container {
		grid-template-columns: 2fr 1fr 1fr 1.5fr;
		gap: 3rem;
	}

	.footer__bottom-container {
		text-align: left;
	}
}

/* ... (попередні стилі для хедера та футера) ... */

/* ------------------------------ */
/* 5. Глобальний клас кнопки */
/* ------------------------------ */
.button {
	display: inline-block;
	padding: 0.875rem 2rem; /* 14px 32px */
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	border: none;
	border-radius: var(--border-radius);
	transition: all var(--transition-speed);
}

.button--primary {
	background-color: var(--color-primary);
	color: #fff;
	box-shadow: 0 4px 15px rgba(66, 99, 235, 0.2);
}

.button--primary:hover {
	background-color: #364fc7;
	color: #fff;
	box-shadow: 0 6px 20px rgba(66, 99, 235, 0.3);
	transform: translateY(-2px);
}

/* ------------------------------ */
/* ЕТАП 3: HERO СЕКЦІЯ */
/* ------------------------------ */
main {
	/* Відступ, щоб контент не ховався за фіксований хедер */
	padding-top: var(--header-height);
}

.hero {
	padding: 4rem 0;
	background-color: var(--color-surface); /* Білий фон для контрасту з body */
	overflow: hidden; /* Важливо для AOS анімацій */
}

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

.hero__subtitle {
	display: block;
	font-size: 1.125rem; /* 18px */
	font-weight: 600;
	color: var(--color-primary);
	margin-bottom: 0.5rem;
}

.hero__title {
	font-size: 1.5rem; /* 40px */
	line-height: 1.2;
	margin-bottom: 1.5rem;
}

.hero__text {
	font-size: 1.125rem; /* 18px */
	color: var(--color-secondary-text);
	margin-bottom: 2.5rem;
	max-width: 500px;
}

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

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

/* ------------------------------ */
/* АДАПТАЦІЯ (Hero) */
/* ------------------------------ */

/* Планшети */
@media (min-width: 768px) {
	.hero__title {
		font-size: 2rem; /* 48px */
	}
}

/* Десктопи */
@media (min-width: 1024px) {
	.hero {
		padding: 6rem 0;
	}

	.hero__container {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
	}

	/* Міняємо порядок, щоб текст був зліва */
	.hero__content {
		order: 1;
	}

	.hero__image-wrapper {
		order: 2;
	}

	.hero__title {
		font-size: 3rem; /* 56px */
	}
}

/* ------------------------------ */
/* ЕТАП 5: СТИЛІ ДЛЯ СТОРІНОК ПОЛІТИК */
/* ------------------------------ */
/* (Додамо це зараз, щоб не забути) */

.pages {
	padding: 4rem 0;
}

.pages .container {
	max-width: 800px; /* Вужчий контейнер для читабельності */
	margin-left: auto;
	margin-right: auto;
}

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

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

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

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

.pages li {
	font-size: 1.1rem;
	color: var(--color-secondary-text);
	margin-bottom: 0.75rem;
}

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

.pages a {
	font-weight: 500;
	text-decoration: underline;
}

.pages a:hover {
	color: #364fc7;
}

.section {
	padding: 4rem 0;
	overflow: hidden; /* Для AOS */
}

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

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

.section__subtitle {
	display: inline-block;
	font-family: var(--font-heading);
	font-weight: 600;
	color: var(--color-primary);
	margin-bottom: 0.5rem;
	font-size: 1rem;
}

.section__title {
	font-size: 2.25rem; /* 36px */
	margin-bottom: 1rem;
}

.section__description {
	font-size: 1.125rem; /* 18px */
	color: var(--color-secondary-text);
}

/* ------------------------------ */
/* ЕТАП 3.2: СЕКЦІЯ ЛАЙФХАКИ */
/* ------------------------------ */
.lifehacks__grid {
	display: grid;
	grid-template-columns: 1fr; /* 1 колонка на мобільних */
	gap: 1.5rem; /* 24px */
}

.lifehack-card {
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	padding: 2rem;
	text-align: center;
	transition: all var(--transition-speed);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

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

.lifehack-card__icon-wrapper {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: #eef2ff; /* Світлий фон для іконки */
	display: grid;
	place-items: center;
	margin: 0 auto 1.5rem auto;
}

.lifehack-card__icon {
	width: 28px;
	height: 28px;
	color: var(--color-primary);
}

.lifehack-card__title {
	font-size: 1.5rem; /* 24px */
	margin-bottom: 0.75rem;
	color: var(--color-text);
}

.lifehack-card__text {
	color: var(--color-secondary-text);
	line-height: 1.6;
}

/* ------------------------------ */
/* АДАПТАЦІЯ (Лайфхаки) */
/* ------------------------------ */

/* Планшети */
@media (min-width: 768px) {
	.lifehacks__grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.section {
		padding: 5rem 0;
	}

	.section__title {
		font-size: 2.5rem; /* 40px */
	}
}

/* Десктопи */
@media (min-width: 1024px) {
	.lifehacks__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

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

/* Налаштовуємо заголовок для цієї секції, щоб він не був по центру */
.work .section__header {
	text-align: left;
	margin-left: 0;
	margin-right: 0;
}

.work__list {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	margin: 2rem 0;
}

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

.work__item-icon {
	width: 24px;
	height: 24px;
	color: var(--color-primary);
	flex-shrink: 0;
}

.work__item-text {
	font-size: 1.125rem; /* 18px */
	font-weight: 500;
}

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

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

/* ------------------------------ */
/* АДАПТАЦІЯ (Робота) */
/* ------------------------------ */

@media (min-width: 1024px) {
	.work__container {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
	}

	.work__content {
		order: 1; /* Текст зліва */
	}

	.work__image-wrapper {
		order: 2; /* Картинка справа */
	}
}

.creative {
	/* Ця секція буде світлою (парна) */
	background-color: var(--color-surface);
}

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

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

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

/* Заголовок знову зліва */
.creative .section__header {
	text-align: left;
	margin-left: 0;
	margin-right: 0;
}

.creative__features {
	margin-top: 2.5rem;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
}

.creative__feature-item {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.creative__feature-icon {
	width: 32px;
	height: 32px;
	color: var(--color-primary);
	margin-bottom: 0.5rem;
}

.creative__feature-title {
	font-size: 1.25rem; /* 20px */
	font-family: var(--font-heading);
	color: var(--color-text);
}

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

/* ------------------------------ */
/* АДАПТАЦІЯ (Творчість) */
/* ------------------------------ */

@media (min-width: 768px) {
	.creative__features {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.creative__container {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
	}

	/* На десктопі міняємо їх місцями */
	.creative__image-wrapper {
		order: 1; /* Картинка зліва */
	}

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

.learn {
	background-color: var(--color-bg); /* Непарна секція, світлий фон */
}

.learn__content {
	max-width: 800px;
	margin: 0 auto;
}

.accordion {
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	overflow: hidden;
	background-color: var(--color-surface);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.accordion__item {
	border-bottom: 1px solid var(--color-border);
}
.accordion__item:last-child {
	border-bottom: none;
}

.accordion__header {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	padding: 1.5rem;
	background-color: var(--color-surface);
	border: none;
	cursor: pointer;
	text-align: left;
	font-family: var(--font-heading);
	font-size: 1.125rem; /* 18px */
	font-weight: 600;
	color: var(--color-text);
	transition: background-color var(--transition-speed);
}

.accordion__header:hover {
	background-color: #f9f9fb;
}

.accordion__icon {
	width: 20px;
	height: 20px;
	color: var(--color-primary);
	flex-shrink: 0;
	transition: transform var(--transition-speed);
}

/* Стилі для відкритого стану */
.accordion__item.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 1.5rem;
	color: var(--color-secondary-text);
	line-height: 1.7;
	font-size: 1rem;
}

.contact {
	background-color: var(--color-surface); /* Парна секція */
}

.contact__wrapper {
	max-width: 600px;
	margin: 0 auto;
	background-color: var(--color-surface);
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	padding: 2rem;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contact-form__title {
	font-size: 1.75rem; /* 28px */
	text-align: center;
	margin-bottom: 2rem;
}

.contact-form__group {
	position: relative;
	margin-bottom: 1.5rem;
}

.contact-form__label {
	display: block;
	font-size: 0.875rem; /* 14px */
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--color-secondary-text);
}

.contact-form__input {
	width: 100%;
	height: 50px;
	padding: 0 1rem 0 2.75rem; /* Відступ зліва для іконки */
	border: 1px solid var(--color-border);
	border-radius: var(--border-radius);
	font-family: var(--font-body);
	font-size: 1rem;
	color: var(--color-text);
	transition: border-color var(--transition-speed),
		box-shadow var(--transition-speed);
}

.contact-form__input:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(66, 99, 235, 0.2);
}

.contact-form__icon {
	position: absolute;
	left: 1rem;
	bottom: 13px; /* (50px - 24px) / 2 */
	width: 24px;
	height: 24px;
	color: var(--color-secondary-text);
	transition: color var(--transition-speed);
}

.contact-form__input:focus + .contact-form__icon {
	color: var(--color-primary);
}

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

.contact-form__checkbox {
	/* Створюємо кастомний чекбокс */
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid var(--color-border);
	border-radius: 4px;
	margin-top: 3px;
	cursor: pointer;
	flex-shrink: 0;
	transition: all var(--transition-speed);
}

.contact-form__checkbox:checked {
	background-color: var(--color-primary);
	border-color: var(--color-primary);
	/* Додаємо "галочку" через псевдо-елемент */
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10l3 3l6-6'/%3e%3c/svg%3e");
	background-size: 80%;
	background-position: center;
	background-repeat: no-repeat;
}

.contact-form__checkbox-label {
	font-size: 0.875rem; /* 14px */
	color: var(--color-secondary-text);
	line-height: 1.5;
}
.contact-form__checkbox-label a {
	text-decoration: underline;
}

.contact-form__button {
	width: 100%;
}

/* Повідомлення про успіх (сховане) */
.contact-success {
	display: none; /* Сховано за замовчуванням */
	text-align: center;
	padding: 2rem;
}

.contact-success__icon {
	width: 60px;
	height: 60px;
	color: #28a745; /* Зелений */
	margin-bottom: 1rem;
}

.contact-success__title {
	font-size: 1.75rem;
	margin-bottom: 0.5rem;
}

.contact-success__text {
	font-size: 1.125rem;
	color: var(--color-secondary-text);
}

/* ------------------------------ */
/* АДАПТАЦІЯ (Контакти) */
/* ------------------------------ */
@media (min-width: 768px) {
	.contact__wrapper {
		padding: 3rem;
	}
}


/* ... (попередні стилі) ... */

/* ------------------------------ */
/* ЕТАП 5: COOKIE POP-UP */
/* ------------------------------ */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Сховано за замовчуванням */
    left: 0;
    width: 100%;
    background-color: var(--color-surface);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem;
    z-index: 2000;
    transition: bottom 0.5s ease-in-out;
}

/* Клас для показу */
.cookie-popup--visible {
    bottom: 0;
}

.cookie-popup__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 1200px; /* Співпадає з --container-width */
    margin: 0 auto;
}

.cookie-popup__text {
    color: var(--color-secondary-text);
    text-align: center;
    font-size: 0.875rem; /* 14px */
}

.cookie-popup__link {
    font-weight: 600;
    text-decoration: underline;
}

.cookie-popup__button {
    padding: 0.6rem 1.5rem; /* Трохи менша кнопка */
    width: 100%;
    max-width: 200px; /* Обмеження на моб */
}


/* ------------------------------ */
/* АДАПТАЦІЯ (Cookie) */
/* ------------------------------ */
@media (min-width: 768px) {
    .cookie-popup {
        padding: 1.5rem var(--container-padding);
    }
    .cookie-popup__content {
        flex-direction: row;
        justify-content: space-between;
    }
    .cookie-popup__text {
        text-align: left;
        font-size: 1rem;
    }
    .cookie-popup__button {
        width: auto;
        flex-shrink: 0;
    }
}