/* =========== GLOBAL STYLES & VARIABLES =========== */
:root {
	--bg-color: #f8f9fa;
	--text-color: #212529;
	--primary-color: #4a90e2;
	--secondary-color: #50e3c2;
	--muted-color: #6c757d;
	--white-color: #ffffff;
	--border-color: #dee2e6;
	--footer-bg: #212529;
	--footer-text: #f8f9fa;

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

	--header-height: 70px;
}

*,
*::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(--text-color);
	background-color: var(--bg-color);
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-heading);
	font-weight: 600;
	line-height: 1.2;
}

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

a:hover {
	color: #357abd;
}

ul {
	list-style: none;
}

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

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

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

.header.scrolled {
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--text-color);
	font-family: var(--font-heading);
	font-weight: 700;
	font-size: 24px;
}

.footer__logo .logo__text {
	color: var(--footer-text);
}

.header__nav {
	display: flex;
}

.header__nav-list {
	display: flex;
	align-items: center;
	gap: 30px;
}

.header__nav-link {
	color: var(--text-color);
	font-weight: 500;
	position: relative;
	padding: 5px 0;
}

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

.header__nav-link:hover::after,
.header__nav-link.active::after {
	width: 100%;
}

.header__burger-btn {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 5px;
	color: var(--text-color);
}

/* =========== FOOTER =========== */
.footer {
	background-color: var(--footer-bg);
	color: var(--footer-text);
	padding: 60px 0 20px;
}

.footer__container {
	display: grid;
	grid-template-columns: 2fr 1fr 1fr 1.5fr;
	gap: 40px;
	margin-bottom: 40px;
}

.footer__column--main .logo {
	margin-bottom: 15px;
}

.footer__tagline {
	color: var(--muted-color);
	font-size: 14px;
}

.footer__title {
	font-size: 18px;
	margin-bottom: 15px;
	color: var(--white-color);
}

.footer__list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.footer__link {
	color: var(--muted-color);
	font-size: 14px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

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

.footer__icon {
	width: 16px;
	height: 16px;
	color: var(--secondary-color);
}

.footer__list--contact .footer__link,
.footer__list--contact .footer__link span {
	align-items: flex-start;
}

.footer__list--contact .footer__icon {
	margin-top: 3px;
}

.footer__bottom {
	text-align: center;
	padding-top: 20px;
	border-top: 1px solid #495057;
	font-size: 13px;
	color: var(--muted-color);
}

/* =========== RESPONSIVE STYLES =========== */
@media (max-width: 992px) {
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.header__nav {
		position: fixed;
		top: var(--header-height);
		left: -100%;
		width: 100%;
		height: calc(100vh - var(--header-height));
		background-color: var(--bg-color);
		flex-direction: column;
		justify-content: center;
		align-items: center;
		transition: left 0.4s ease-in-out;
	}

	.header__nav.active {
		left: 0;
	}

	.header__nav-list {
		flex-direction: column;
		gap: 40px;
	}

	.header__nav-link {
		font-size: 20px;
	}

	.header__burger-btn {
		display: block;
		z-index: 101; /* Поверх навигации */
	}

	.footer__container {
		grid-template-columns: 1fr;
		text-align: center;
	}

	.footer__column--main .logo,
	.footer__list--contact .footer__link {
		justify-content: center;
	}
}

/* =========== HERO SECTION =========== */
.hero {
	position: relative;
	height: 100vh;
	min-height: 600px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	overflow: hidden;
	padding-top: var(--header-height);
}

.hero__canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 1;
}

.hero__container {
	position: relative;
	z-index: 2;
}

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

.hero__title {
	font-size: 56px;
	font-weight: 700;
	margin-bottom: 20px;
	color: var(--text-color);
	letter-spacing: -1px;
}

.hero__subtitle {
	font-size: 18px;
	color: var(--muted-color);
	max-width: 650px;
	margin: 0 auto 30px;
	line-height: 1.7;
}

.button {
	display: inline-block;
	padding: 15px 35px;
	font-family: var(--font-heading);
	font-size: 16px;
	font-weight: 600;
	color: var(--white-color);
	background-color: var(--primary-color);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	text-align: center;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
	background-color: #357abd;
	transform: translateY(-3px);
	color: var(--white-color);
}

/* --- Responsive for Hero --- */
@media (max-width: 768px) {
	.hero__title {
		font-size: 40px;
	}

	.hero__subtitle {
		font-size: 16px;
	}
}

@media (max-width: 480px) {
	.hero__title {
		font-size: 32px;
	}

	.button {
		padding: 12px 28px;
		font-size: 15px;
	}
}

/* =========== GENERAL SECTION STYLES =========== */
.section {
	padding: 80px 0;
}

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

.section__title {
	font-size: 40px;
	margin-bottom: 15px;
}

.section__subtitle {
	font-size: 18px;
	color: var(--muted-color);
	line-height: 1.7;
}

/* =========== HOW IT WORKS SECTION =========== */
.how-it-works {
	background-color: var(--white-color);
}

.how-it-works__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
}

.how-it-works__step {
	text-align: center;
	padding: 40px 30px;
	background-color: var(--bg-color);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.how-it-works__icon-wrapper {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 64px;
	height: 64px;
	background-color: var(--secondary-color);
	border-radius: 50%;
	margin-bottom: 25px;
}

.how-it-works__icon-wrapper i {
	width: 32px;
	height: 32px;
	color: var(--text-color);
}

.how-it-works__step-title {
	font-size: 22px;
	margin-bottom: 10px;
}

.how-it-works__step-description {
	font-size: 15px;
	color: var(--muted-color);
	line-height: 1.6;
}

/* --- Responsive for How It Works --- */
@media (max-width: 992px) {
	.how-it-works__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.section {
		padding: 60px 0;
	}
	.section__title {
		font-size: 32px;
	}
	.section__subtitle {
		font-size: 16px;
	}
	.section__header {
		margin-bottom: 40px;
	}
}

/* =========== TOPICS SECTION =========== */
.topics__container {
	border: 1px solid var(--border-color);
	border-radius: 12px;
	background-color: var(--white-color);
	overflow: hidden;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.topics__tabs-nav {
	display: flex;
	border-bottom: 1px solid var(--border-color);
	background-color: var(--bg-color);
}

.topics__tab-btn {
	padding: 15px 25px;
	font-family: var(--font-body);
	font-size: 16px;
	font-weight: 500;
	color: var(--muted-color);
	background-color: transparent;
	border: none;
	cursor: pointer;
	transition: color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
	flex-grow: 1;
	border-right: 1px solid var(--border-color);
}
.topics__tab-btn:last-child {
	border-right: none;
}

.topics__tab-btn:hover {
	background-color: #e9ecef;
	color: var(--text-color);
}

.topics__tab-btn.active {
	color: var(--primary-color);
	background-color: var(--white-color);
	box-shadow: inset 0 -2px 0 var(--primary-color);
}

.topics__tab-pane {
	display: none;
	padding: 40px;
	animation: fadeIn 0.5s ease-in-out;
}

.topics__tab-pane.active {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 40px;
	align-items: center;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.topics__tab-image img {
	border-radius: 8px;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.topics__tab-title {
	font-size: 28px;
	margin-bottom: 15px;
}

.topics__tab-text p {
	margin-bottom: 20px;
	color: var(--muted-color);
}

.topics__tab-text ul {
	list-style: none;
	padding: 0;
}

.topics__tab-text li {
	margin-bottom: 10px;
	padding-left: 25px;
	position: relative;
	color: var(--text-color);
}

.topics__tab-text li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--secondary-color);
	font-weight: bold;
}

/* --- Responsive for Topics --- */
@media (max-width: 992px) {
	.topics__tab-pane.active {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.topics__tabs-nav {
		flex-direction: column;
	}
	.topics__tab-btn {
		border-right: none;
		border-bottom: 1px solid var(--border-color);
	}
	.topics__tab-btn.active {
		box-shadow: inset 2px 0 0 var(--primary-color);
	}
	.topics__tab-title {
		font-size: 24px;
	}
}

/* =========== TOOLS SECTION =========== */
.tools {
	background-color: var(--bg-color);
}

.tools__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 20px;
	max-width: 900px;
	margin: 0 auto;
}

.tools__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 15px;
	padding: 25px;
	background-color: var(--white-color);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tools__item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.tools__item i {
	width: 40px;
	height: 40px;
	color: var(--primary-color);
}

.tools__name {
	font-size: 15px;
	font-weight: 500;
	color: var(--text-color);
}

/* =========== CASES SECTION =========== */
.cases__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
}

.cases__card {
	background-color: var(--white-color);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.cases__card-image {
	width: 100%;
	height: 220px;
	object-fit: cover;
}

.cases__card-content {
	padding: 25px;
}

.cases__card-title {
	font-size: 22px;
	margin-bottom: 10px;
}

.cases__card-description {
	font-size: 15px;
	color: var(--muted-color);
	margin-bottom: 20px;
}

.cases__card-list {
	list-style: none;
	padding: 0;
}

.cases__card-list li {
	margin-bottom: 8px;
	font-size: 14px;
	color: var(--text-color);
	position: relative;
	padding-left: 20px;
}

.cases__card-list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 6px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: var(--secondary-color);
}

/* =========== CONTACT SECTION =========== */
.contact {
	background-color: var(--white-color);
}

.contact__container {
	max-width: 600px;
	margin: 0 auto;
}

.contact__form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 40px;
	border-radius: 12px;
	border: 1px solid var(--border-color);
	background-color: var(--bg-color);
}

.contact__form-group {
	position: relative;
}

.contact__form-group input {
	width: 100%;
	padding: 15px 20px;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	font-family: var(--font-body);
	font-size: 16px;
	transition: border-color 0.3s ease;
}

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

.contact__form-group--checkbox {
	display: flex;
	align-items: center;
	gap: 10px;
}

.contact__form-group--checkbox input {
	width: auto;
	cursor: pointer;
}

.contact__form-group--checkbox label {
	font-size: 14px;
	color: var(--muted-color);
	line-height: 1.4;
}

.contact__form-group--checkbox label a {
	text-decoration: underline;
	font-weight: 500;
}

.contact__submit-btn {
	width: 100%;
}

.contact__message-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	background-color: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
	border-radius: 8px;
	padding: 30px;
	gap: 15px;
	opacity: 0;
	transition: opacity 0.5s ease;
}

.contact__message-success.visible {
	opacity: 1;
}

.contact__message-success i {
	width: 40px;
	height: 40px;
}

/* =========== COOKIE POPUP =========== */
.cookie-popup {
	position: fixed;
	bottom: -100%; /* Initially hidden */
	left: 0;
	width: 100%;
	background-color: var(--footer-bg);
	color: var(--footer-text);
	padding: 20px;
	z-index: 200;
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 20px;
	box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.1);
	transition: bottom 0.5s ease-in-out;
}

.cookie-popup.visible {
	bottom: 0;
}

.cookie-popup__text {
	font-size: 14px;
	color: var(--muted-color);
}

.cookie-popup__text a {
	color: var(--white-color);
	text-decoration: underline;
}

.cookie-popup__btn {
	padding: 8px 20px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-color);
	background-color: var(--white-color);
	border: none;
	border-radius: 6px;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 0.3s ease;
}

.cookie-popup__btn:hover {
	background-color: #e9ecef;
}

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

/* =========== POLICY & STATIC PAGES STYLES =========== */
.pages {
	padding: 120px 0 80px; /* Extra top padding to account for fixed header */
	background-color: var(--white-color);
}

.pages .container {
	max-width: 800px;
}

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

.pages h2 {
	font-size: 1.5rem;
	margin-top: 40px;
	margin-bottom: 20px;
}

.pages p {
	font-size: 16px;
	line-height: 1.8;
	color: var(--muted-color);
	margin-bottom: 20px;
}

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

.pages li {
	margin-bottom: 10px;
	color: var(--muted-color);
	line-height: 1.8;
}

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

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