/* ==================== GOOGLE FONTS ==================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&family=Space+Grotesk:wght@500;700&display=swap');

/* ==================== CSS VARIABLES ==================== */
:root {
	/* Colors */
	--bg-color: #ffffff;
	--text-color: #2c3e50;
	--primary-color: #4a90e2; /* Tech Blue */
	--accent-color: #50e3c2; /* Mint Green */
	--light-gray: #f9f9f9;
	--white: #ffffff;
	--black: #000000;

	/* Typography */
	--font-body: 'Inter', sans-serif;
	--font-heading: 'Space Grotesk', sans-serif;

	/* Spacing */
	--header-height: 70px;
}

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

html {
	scroll-behavior: smooth;
}

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

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

ul {
	list-style: none;
}

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

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

.container {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 20px;
	padding-right: 20px;
}

/* ==================== HEADER ==================== */
.header {
	width: 100%;
	height: var(--header-height);
	background-color: var(--bg-color);
	border-bottom: 1px solid #eee;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100;
}

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

.logo {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--text-color);
	transition: opacity 0.3s;
}
.logo:hover {
	opacity: 0.7;
}

.logo__icon {
	color: var(--primary-color);
}

/* ==================== NAVIGATION ==================== */
.nav {
	position: fixed;
	top: var(--header-height);
	left: -100%; /* Сховано за замовчуванням */
	width: 100%;
	height: calc(100vh - var(--header-height));
	background-color: var(--bg-color);
	padding: 2rem;
	transition: left 0.4s ease;
	overflow-y: auto;
}

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

.nav__link {
	font-family: var(--font-heading);
	font-size: 1.2rem;
	color: var(--text-color);
	transition: color 0.3s;
}

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

/* Показати меню (для JS) */
.nav--open {
	left: 0;
}

/* Кнопка мобільного меню */
.header__toggle {
	display: inline-flex;
	font-size: 1.5rem; /* 24px */
	background: none;
	border: none;
	cursor: pointer;
	color: var(--text-color);
}
.header__toggle .lucide-x {
	/* Іконка закриття (буде додана JS) */
	display: none;
}

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

.footer__container {
	display: grid;
	gap: 2.5rem;
}

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

.footer__title {
	font-size: 1.1rem;
	margin-bottom: 1rem;
}

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

.footer__link {
	font-size: 0.9rem;
	color: #555;
	transition: color 0.3s;
}

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

.footer__list--contact li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

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

.footer__address {
	font-size: 0.9rem;
	color: #555;
	line-height: 1.6;
}

.footer__bottom {
	margin-top: 3rem;
	padding: 1.5rem 0;
	border-top: 1px solid #ddd;
}

.footer__bottom-container {
	text-align: center;
	font-size: 0.85rem;
	color: #777;
}

/* ==================== MEDIA QUERIES (Desktop) ==================== */
@media screen and (min-width: 768px) {
	.header__toggle {
		display: none; /* Ховаємо бургер */
	}

	.nav {
		all: unset; /* Скидаємо стилі мобільного меню */
	}

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

	.nav__link {
		font-size: 1rem;
		font-family: var(--font-body);
		font-weight: 500;
	}

	.footer__container {
		/* 4 колонки */
		grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	}
}

@media screen and (min-width: 1024px) {
	.container {
		padding-left: 20px;
		padding-right: 20px;
	}

	.footer__container {
		grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
	}
}

/* ==================== BUTTONS ==================== */
/* Ми будемо перевикористовувати цей стиль кнопки */
.button {
	display: inline-block;
	background-color: var(--primary-color);
	color: var(--white);
	padding: 14px 28px;
	border-radius: 8px;
	font-family: var(--font-heading);
	font-weight: 500;
	font-size: 1rem;
	border: 2px solid var(--primary-color);
	transition: background-color 0.3s, color 0.3s;
	cursor: pointer;
	text-align: center;
}

.button:hover {
	background-color: transparent;
	color: var(--primary-color);
}

/* ==================== HERO SECTION ==================== */
.hero {
	padding-top: calc(
		var(--header-height) + 3rem
	); /* Відступ від фіксованого хедера */
	padding-bottom: 4rem;
	min-height: 90vh;
	display: flex;
	align-items: center;
}

.hero__container {
	display: grid;
	gap: 3rem;
}

.hero__content {
	text-align: center;
}

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

.hero__description {
	font-size: 1.125rem; /* 18px */
	color: #555;
	margin-bottom: 2rem;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.hero__cta {
	font-size: 1.125rem;
}

/* Анімація терміналу */
.hero__visual {
	padding: 1rem;
	border-radius: 12px;
	background-color: var(--light-gray);
	border: 1px solid #eee;
}

.hero__terminal {
	background-color: #2c3e50; /* Колір терміналу */
	border-radius: 8px;
	padding: 1.5rem;
	min-height: 200px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	color: var(--white);
	font-family: monospace;
	font-size: 1rem;
}

.hero__terminal-header {
	display: flex;
	gap: 8px;
	margin-bottom: 1rem;
}

.hero__terminal-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
}
.hero__terminal-dot:nth-child(1) {
	background-color: #ff5f56;
} /* Red */
.hero__terminal-dot:nth-child(2) {
	background-color: #ffbd2e;
} /* Yellow */
.hero__terminal-dot:nth-child(3) {
	background-color: #27c93f;
} /* Green */

.hero__terminal-body {
	color: var(--accent-color); /* М'ятний колір для тексту */
}

/* Курсор для анімації друкування */
#typing-animation::after {
	content: '_';
	opacity: 1;
	animation: blink 1s infinite;
}

@keyframes blink {
	0%,
	100% {
		opacity: 1;
	}
	50% {
		opacity: 0;
	}
}

/* ==================== MEDIA QUERIES (Hero) ==================== */
@media screen and (min-width: 768px) {
	.hero {
		padding-top: calc(var(--header-height) + 4rem);
		min-height: 80vh;
	}

	.hero__container {
		grid-template-columns: 1fr 1fr; /* Дві колонки */
		align-items: center;
		gap: 2rem;
	}

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

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

	.hero__description {
		margin-left: 0;
	}
}

@media screen and (min-width: 1024px) {
	.hero__title {
		font-size: 2rem; /* 56px */
	}
	.hero__terminal {
		font-size: 1.1rem;
	}
}

/* ==================== REUSABLE SECTION STYLES ==================== */
/* Ми будемо використовувати ці стилі для наступних секцій */
.section {
	padding-top: 5rem;
	padding-bottom: 5rem;
}

/* Чергування фону для секцій */
.section:nth-of-type(even) {
	background-color: var(--light-gray);
}

.section__container {
	display: grid;
	gap: 3rem;
}

.section__tag {
	display: inline-block;
	padding: 5px 12px;
	background-color: var(--accent-color);
	color: var(--text-color);
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 500;
	margin-bottom: 1rem;
}

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

.section__description {
	font-size: 1rem;
	color: #555;
	margin-bottom: 1.5rem;
}
.section__description:last-of-type {
	margin-bottom: 2rem;
}

/* ==================== ABOUT BOTS SECTION ==================== */
.about-bots__features {
	display: grid;
	gap: 1.5rem;
}

.feature-card {
	background-color: var(--bg-color);
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 2rem;
	transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.feature-card__icon {
	width: 24px;
	height: 24px;
}

.feature-card__title {
	font-size: 1.25rem;
	margin-bottom: 0.75rem;
}

.feature-card__text {
	font-size: 0.95rem;
	color: #555;
}

/* ==================== MEDIA QUERIES (About Bots) ==================== */
@media screen and (min-width: 768px) {
	.section__container {
		grid-template-columns: 1fr 1fr; /* Дві колонки */
		align-items: center;
	}

	.section__title {
		font-size: 2.5rem;
	}
}

@media screen and (min-width: 1024px) {
	.section {
		padding-top: 6rem;
		padding-bottom: 6rem;
	}

	.about-bots__features {
		gap: 2rem;
	}
}

/* ==================== TECHNOLOGIES SECTION ==================== */
/* Вирівнювання заголовка секції по центру */
.section__header {
	text-align: center;
	margin-bottom: 3rem;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

.tech__container {
	display: block; /* Скидаємо grid, бо тут своя структура */
}

/* Навігація табів */
.tech__tabs-nav {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 2rem;
	flex-wrap: wrap; /* Для мобільних */
}

.tech__tab-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	font-family: var(--font-heading);
	font-size: 1rem;
	font-weight: 500;
	background-color: var(--light-gray);
	border: 2px solid #eee;
	color: #555;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s;
}

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

.tech__tab-button--active {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
	color: var(--white);
}

.tech__tab-icon {
	width: 18px;
	height: 18px;
}

/* Вміст табів */
.tech__tab-content {
	display: none; /* Ховаємо всі таби за замовчуванням */
	animation: fadeIn 0.5s; /* Анімація появи */
}

.tech__tab-content--active {
	display: block; /* Показуємо активний таб */
}

.tech__content-inner {
	display: grid;
	gap: 2rem;
	background-color: var(--bg-color);
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 2rem;
}

.tech__content-text h3 {
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
}

.tech__content-text p {
	color: #555;
	margin-bottom: 1.5rem;
}

.tech__content-text ul {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.tech__content-text li {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #333;
}

.tech__list-icon {
	width: 20px;
	height: 20px;
	color: var(--accent-color);
}

.tech__content-img {
	border-radius: 8px;
	object-fit: cover;
	width: 100%;
	height: 250px; /* Фіксована висота для зображення */
}

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

/* ==================== MEDIA QUERIES (Tech Tabs) ==================== */
@media screen and (min-width: 768px) {
	.tech__content-inner {
		grid-template-columns: 1fr 1fr; /* 2 колонки */
		align-items: center;
		padding: 2.5rem;
	}

	/* Міняємо місцями (картинка зліва) для другого табу */
	.tech__tab-content[data-content='2'] .tech__content-inner {
		grid-template-columns: 1fr 1fr;
	}
	.tech__tab-content[data-content='2'] .tech__content-text {
		order: 2; /* Текст праворуч */
	}
	.tech__tab-content[data-content='2'] .tech__content-img {
		order: 1; /* Картинка зліва */
	}
}

@media screen and (min-width: 1024px) {
	.tech__content-inner {
		padding: 3rem;
	}

	.tech__content-img {
		height: 300px;
	}
}

/* ==================== AI ASSISTANTS SECTION ==================== */
/* Ми використовуємо .section__container, але додаємо клас
   ai-assistants__container для зміни напрямку на mobile-first */

.ai-assistants__container {
	gap: 2rem;
}

.ai-assistants__image-wrapper {
	order: -1; /* Зображення зверху на мобільних */
}

.ai-assistants__image {
	width: 100%;
	height: auto;
	max-height: 400px;
	object-fit: cover;
	border-radius: 12px;
}

/* Акордеон */
.accordion {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 2rem;
}

.accordion__item {
	background-color: var(--bg-color);
	border: 1px solid #eee;
	border-radius: 8px;
	overflow: hidden; /* Важливо для анімації */
	transition: all 0.3s;
}

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

.accordion__header {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.25rem 1.5rem;
	background: none;
	border: none;
	cursor: pointer;
	font-family: var(--font-heading);
	font-size: 1.1rem;
	font-weight: 500;
	text-align: left;
	color: var(--text-color);
}

.accordion__icon {
	width: 20px;
	height: 20px;
	color: var(--primary-color);
	transition: transform 0.3s;
}

.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;
	font-size: 0.95rem;
	color: #555;
	line-height: 1.7;
}

/* ==================== MEDIA QUERIES (AI Assistants) ==================== */
@media screen and (min-width: 768px) {
	.ai-assistants__container {
		grid-template-columns: 1fr 1fr; /* 2 колонки */
		align-items: center;
		gap: 3rem;
	}

	.ai-assistants__image-wrapper {
		order: 0; /* Повертаємо зображення на місце */
	}

	.ai-assistants__image {
		max-height: 500px;
	}
}

/* ==================== SOLUTIONS (PRICING) SECTION ==================== */
.solutions__grid {
	display: grid;
	gap: 2rem;
	margin-top: 3rem;
}

.solution-card {
	background-color: var(--bg-color);
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 2rem;
	display: flex;
	flex-direction: column;
	position: relative; /* Для бейджа */
	transition: transform 0.3s, box-shadow 0.3s;
}

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

/* Виділена картка */
.solution-card--popular {
	border: 2px solid var(--primary-color);
}

.solution-card__badge {
	position: absolute;
	top: -15px;
	right: 20px;
	background-color: var(--primary-color);
	color: var(--white);
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 0.8rem;
	font-weight: 500;
}

.solution-card__header {
	text-align: center;
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 1.5rem;
	margin-bottom: 1.5rem;
}

.solution-card__icon {
	width: 40px;
	height: 40px;
	color: var(--primary-color);
	margin-bottom: 1rem;
}

.solution-card__title {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

.solution-card__price {
	font-size: 1rem;
	color: #555;
	font-weight: 500;
}

/* Список переваг */
.solution-card__features {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-bottom: 2rem;
	flex-grow: 1; /* Притискає кнопку донизу */
}

.solution-card__features li {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.95rem;
}

.solution-card__check {
	width: 18px;
	height: 18px;
	color: var(--accent-color);
}

/* Кнопки */
.solution-card__button {
	width: 100%;
}

/* "Прозора" кнопка */
.button.solution-card__button--outline {
	background-color: transparent;
	color: var(--primary-color);
	border: 2px solid var(--primary-color);
}
.button.solution-card__button--outline:hover {
	background-color: var(--primary-color);
	color: var(--white);
}

/* ==================== MEDIA QUERIES (Solutions) ==================== */
@media screen and (min-width: 768px) {
	.solutions__grid {
		grid-template-columns: 1fr 1fr; /* 2 колонки */
	}
}

@media screen and (min-width: 1024px) {
	.solutions__grid {
		grid-template-columns: 1fr 1fr 1fr; /* 3 колонки */
	}

	/* Робимо центральну картку більшою */
	.solution-card--popular {
		transform: translateY(-15px); /* Виділяємо її */
	}
	.solution-card--popular:hover {
		transform: translateY(-20px);
	}
}

/* ==================== CONTACT SECTION ==================== */
.contact__container {
	align-items: flex-start; /* Вирівнюємо по верху */
}

.contact__form-wrapper {
	background-color: var(--bg-color);
	border: 1px solid #eee;
	border-radius: 12px;
	padding: 2.5rem;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

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

.form__group {
	display: flex;
	flex-direction: column;
}

.form__label {
	font-size: 0.9rem;
	font-weight: 500;
	margin-bottom: 0.5rem;
	color: #333;
}

.form__input {
	width: 100%;
	padding: 12px 14px;
	font-size: 1rem;
	font-family: var(--font-body);
	border: 1px solid #ddd;
	border-radius: 8px;
	transition: border-color 0.3s, box-shadow 0.3s;
}

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

/* Стилі для чекбокса */
.form__group--checkbox {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
}

.form__checkbox {
	margin-top: 4px; /* Вирівнювання */
	width: 16px;
	height: 16px;
	accent-color: var(--primary-color);
}

.form__checkbox-label {
	font-size: 0.85rem;
	color: #555;
	line-height: 1.5;
}

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

.form__button {
	width: 100%;
	font-size: 1.1rem;
	padding-top: 16px;
	padding-bottom: 16px;
}

/* Повідомлення про успіх */
.form__success-message {
	display: none; /* СХОВАНО ЗА ЗАМОВЧУВАННЯМ */
	text-align: center;
	padding: 2rem;
	background-color: var(--light-gray);
	border-radius: 8px;
	margin-top: 1.5rem; /* З'явиться на місці форми */
	animation: fadeIn 0.5s;
}

.form__success-icon {
	width: 50px;
	height: 50px;
	color: var(--accent-color);
	margin-bottom: 1rem;
}

.form__success-message h4 {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

/* ==================== MEDIA QUERIES (Contact) ==================== */
@media screen and (min-width: 768px) {
	.contact__container {
		grid-template-columns: 1fr 1fr;
	}
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Сховано за замовчуванням */
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    padding: 1.5rem 0;
    z-index: 200;
    transition: bottom 0.5s ease-in-out;
}

/* Клас для показу (додається JS) */
.cookie-popup--show {
    bottom: 0;
}

.cookie-popup__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.cookie-popup__text {
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

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

.cookie-popup__button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.3s;
}

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

/* ==================== STYLES FOR POLICY PAGES ==================== */
/* (Для privacy.html, terms.html і т.д.) */
main .pages {
    padding-top: calc(var(--header-height) + 3rem); /* Відступ від хедера */
    padding-bottom: 5rem;
    min-height: 60vh;
}

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

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

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

.pages p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 1.5rem;
}

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

.pages li {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 0.75rem;
}

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

.pages strong {
    font-weight: 700;
}

/* ==================== MEDIA QUERIES (Cookie) ==================== */
@media screen and (min-width: 768px) {
    .cookie-popup__container {
        flex-direction: row;
        justify-content: space-between;
    }

    .cookie-popup__text {
        text-align: left;
    }
}
