/* ==================== GLOBAL STYLES ==================== */
:root {
	--bg-color: #111827;
	--surface-color: #1f2937;
	--primary-color: #22d3ee;
	--text-color: #f9fafb;
	--text-secondary-color: #9ca3af;

	--font-family-headings: 'Exo 2', sans-serif;
	--font-family-body: 'Inter', sans-serif;

	--header-height: 5rem;
}

*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

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

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

ul {
	list-style: none;
}

a {
	text-decoration: none;
	color: inherit;
}

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

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

/* ==================== HEADER ==================== */
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 100;
	background-color: rgba(17, 24, 39, 0.8);
	backdrop-filter: blur(10px);
	transition: background-color 0.3s ease;
}

.header__container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: var(--header-height);
}

.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--font-family-headings);
	font-weight: 600;
	font-size: 1.25rem;
	color: var(--primary-color);
}

.header__menu {
	display: flex;
	align-items: center;
	gap: 2.5rem;
}

.header__menu-link {
	position: relative;
	font-weight: 500;
	color: var(--text-color);
	transition: color 0.3s ease;
}

.header__menu-link::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--primary-color);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

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

.header__menu-link:hover::after {
	transform: scaleX(1);
	transform-origin: left;
}

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

.header__burger .lucide-x {
	display: none;
}

/* ==================== FOOTER ==================== */
.footer {
	background-color: var(--surface-color);
	padding: 4rem 0 2rem;
	margin-top: 5rem;
}

.footer__container {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 3rem;
}

.footer__column--info {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.footer__copyright {
	font-size: 0.875rem;
	color: var(--text-secondary-color);
	margin-top: 1.5rem;
}

.footer__title {
	font-size: 1.125rem;
	margin-bottom: 1.25rem;
	font-weight: 600;
}

.footer__list li:not(:last-child) {
	margin-bottom: 0.75rem;
}

.footer__link {
	color: var(--text-secondary-color);
	transition: color 0.3s ease, padding-left 0.3s ease;
	position: relative;
}

.footer__link:hover {
	color: var(--primary-color);
	padding-left: 5px;
}

.footer__list--contacts li {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.footer__list--contacts .lucide {
	flex-shrink: 0;
	margin-top: 4px;
	color: var(--primary-color);
}

/* ==================== MOBILE & TABLET ADAPTIVE ==================== */
@media screen and (max-width: 992px) {
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 768px) {
	.header__nav {
		position: fixed;
		top: var(--header-height);
		right: -100%;
		width: 100%;
		height: calc(100vh - var(--header-height));
		background-color: var(--bg-color);
		transition: right 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
		padding: 2rem;
	}

	.header__nav.is-active {
		right: 0;
	}

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

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

	.header__burger {
		display: block;
	}

	.header__burger.is-active .lucide-menu {
		display: none;
	}

	.header__burger.is-active .lucide-x {
		display: block;
	}
}

@media screen and (max-width: 576px) {
	.footer__container {
		grid-template-columns: 1fr;
	}
	.footer__column--info {
		order: 4; /* Move logo to the end */
		align-items: center;
		text-align: center;
	}
}

/* ==================== BUTTONS ==================== */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 2rem;
	border-radius: 8px;
	font-family: var(--font-family-headings);
	font-weight: 600;
	font-size: 1rem;
	border: 2px solid transparent;
	cursor: pointer;
	transition: all 0.3s ease;
}

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

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

/* ==================== HERO ==================== */
.hero {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	overflow: hidden; /* Для корректной работы AOS */
}

.hero__container {
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	align-items: center;
	gap: 3rem;
}

.hero__title {
	font-size: 2rem;
	line-height: 1.2;
	margin-bottom: 1.5rem;
}

.hero__description {
	font-size: 1.125rem;
	line-height: 1.7;
	color: var(--text-secondary-color);
	margin-bottom: 2.5rem;
	max-width: 550px;
}

.hero__image-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
}

.hero__image {
	width: 100%;
	height: auto;
	border-radius: 1rem;
}

/* ==================== ADAPTIVE FOR HERO ==================== */
@media screen and (max-width: 992px) {
	.hero__title {
		font-size: 1.5rem;
	}
	.hero__description {
		font-size: 1rem;
	}
}

@media screen and (max-width: 768px) {
	.hero {
		padding-top: calc(var(--header-height) + 2rem);
		padding-bottom: 2rem;
	}
	.hero__container {
		grid-template-columns: 1fr;
		text-align: center;
	}
	.hero__content {
		order: 2; /* Текст будет под картинкой */
	}
	.hero__image-wrapper {
		order: 1;
		margin-bottom: 2rem;
	}
	.hero__description {
		margin-left: auto;
		margin-right: auto;
	}
}

/* ==================== REUSABLE SECTION HEADER ==================== */
.section-header {
	text-align: center;
	margin-bottom: 4rem;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

.section-header__title {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.section-header__subtitle {
	font-size: 1.125rem;
	color: var(--text-secondary-color);
	line-height: 1.7;
}

/* ==================== PRACTICES ==================== */
.practices {
	padding: 5rem 0;
}

.practices__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.practices__card {
	background-color: var(--surface-color);
	border: 1px solid transparent;
	border-radius: 12px;
	padding: 2rem;
	text-align: center;
	transition: transform 0.3s ease, border-color 0.3s ease;
}

.practices__card:hover {
	transform: translateY(-8px);
	border-color: var(--primary-color);
}

.practices__card-icon {
	display: inline-flex;
	padding: 1rem;
	background-color: rgba(34, 211, 238, 0.1);
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

.practices__card-icon .lucide {
	width: 32px;
	height: 32px;
	color: var(--primary-color);
}

.practices__card-title {
	font-size: 1.5rem;
	margin-bottom: 1rem;
}

.practices__card-description {
	color: var(--text-secondary-color);
	font-size: 1rem;
	line-height: 1.6;
}

/* ==================== ADAPTIVE FOR PRACTICES ==================== */
@media screen and (max-width: 992px) {
	.practices__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (max-width: 768px) {
	.section-header__title {
		font-size: 2rem;
	}
}

@media screen and (max-width: 576px) {
	.practices {
		padding: 3rem 0;
	}
	.practices__grid {
		grid-template-columns: 1fr;
	}
}

/* ==================== TOOLS ==================== */
.tools {
	padding: 5rem 0;
	background-color: var(--surface-color);
}

.tools__container {
	display: grid;
	grid-template-columns: 0.8fr 1.2fr;
	align-items: flex-start;
	gap: 4rem;
}

.tools__info {
	text-align: left;
	max-width: 400px;
}

.tools__info .section-header__title,
.tools__info .section-header__subtitle {
	text-align: left;
}

.accordion__item {
	border-bottom: 1px solid rgba(156, 163, 175, 0.2);
}
.accordion__item:first-child {
	border-top: 1px solid rgba(156, 163, 175, 0.2);
}

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

.accordion__chevron {
	transition: transform 0.3s ease;
	flex-shrink: 0;
	margin-left: 1rem;
}

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

.accordion__description {
	padding: 0 1rem 1.5rem;
	color: var(--text-secondary-color);
	line-height: 1.7;
}

/* Accordion active state */
.accordion__item.is-active .accordion__chevron {
	transform: rotate(180deg);
}
.accordion__item.is-active .accordion__header {
	color: var(--primary-color);
}
.accordion__item.is-active .accordion__content {
	max-height: 200px; /* Достаточная высота для контента */
}

/* ==================== ADAPTIVE FOR TOOLS ==================== */
@media screen and (max-width: 992px) {
	.tools__container {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
	.tools__info {
		text-align: center;
		max-width: 700px;
		margin: 0 auto;
	}
	.tools__info .section-header__title,
	.tools__info .section-header__subtitle {
		text-align: center;
	}
}

/* ==================== IDEAS ==================== */
.ideas {
	padding: 5rem 0;
}

.ideas__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: minmax(200px, auto);
	gap: 1.5rem;
}

.ideas__item {
	background-color: var(--surface-color);
	border-radius: 12px;
	padding: 2rem;
	display: flex;
	flex-direction: column;
	justify-content: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.ideas__item-title {
	font-size: 1.5rem;
	margin-bottom: 0.75rem;
	color: var(--text-color);
}

.ideas__item p {
	color: var(--text-secondary-color);
	line-height: 1.6;
}

/* Specific grid item styles */
.ideas__item--large-text {
	grid-column: span 2;
	background: linear-gradient(45deg, var(--primary-color), #4f46e5);
	text-align: center;
}

.ideas__item--large-text .ideas__item-title {
	font-size: 2rem;
	color: var(--bg-color);
}

.ideas__item--large-text p {
	color: rgba(17, 24, 39, 0.8);
	max-width: 450px;
	margin: 0 auto;
}

.ideas__item--visual {
	padding: 0;
	overflow: hidden;
	position: relative;
	justify-content: flex-end;
	background-image: linear-gradient(to top, rgba(17, 24, 39, 0.8), transparent);
	color: var(--text-color);
	font-weight: 500;
}

.ideas__item-img {
	background-image: linear-gradient(to top, rgba(17, 24, 39, 0.8), transparent);
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.4s ease;
}

.ideas__item--visual:hover .ideas__item-img {
	transform: scale(1.05);
}

.ideas__item-caption {
	position: relative;
	z-index: 2;
	padding: 1rem 1.5rem;
	width: 100%;
	background: linear-gradient(to top, rgba(17, 24, 39, 0.8), transparent);
	color: var(--text-color);
	font-weight: 500;
}

/* ==================== ADAPTIVE FOR IDEAS ==================== */
@media screen and (max-width: 992px) {
	.ideas__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.ideas__item--large-text {
		grid-column: span 2;
	}
}

@media screen and (max-width: 576px) {
	.ideas__grid {
		grid-template-columns: 1fr;
	}
	.ideas__item--large-text {
		grid-column: span 1;
	}
}

/* ==================== FAQ ==================== */
.faq {
	padding: 5rem 0;
	background-color: var(--surface-color);
}

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

/* ==================== CONTACT ==================== */
.contact {
	padding: 5rem 0;
}

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

.contact__info .section-header__title,
.contact__info .section-header__subtitle {
	text-align: left;
}

/* Form Styles */
.contact__form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

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

.form__label {
	margin-bottom: 0.5rem;
	font-weight: 500;
	color: var(--text-secondary-color);
	font-size: 0.875rem;
}

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

.form__input::placeholder {
	color: #6b7280;
}

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

/* Custom Checkbox */
.form__group--checkbox {
	flex-direction: row;
	align-items: center;
	gap: 0.75rem;
	font-size: 0.875rem;
	color: var(--text-secondary-color);
}

.form__checkbox-input {
	display: none; /* Hide default checkbox */
}

.form__checkbox-label {
	cursor: pointer;
}

.form__checkbox-label::before {
	/* Custom checkbox box */
	display: inline-block;
	content: '';
	width: 20px;
	height: 20px;
	border: 1px solid var(--text-secondary-color);
	border-radius: 4px;
	background-color: var(--surface-color);
	transition: background-color 0.3s ease, border-color 0.3s ease;
	flex-shrink: 0;
}

.form__checkbox-label::after {
	/* Custom checkmark */
	content: '✓';
	position: absolute;
	font-size: 16px;
	color: var(--bg-color);
	left: 20px; /* Adjust position */
	opacity: 0;
	transition: opacity 0.3s ease;
}

.form__checkbox-input:checked + .form__checkbox-label::before {
	background-color: var(--primary-color);
	border-color: var(--primary-color);
}

.form__checkbox-input:checked + .form__checkbox-label::after {
	opacity: 1;
}

.form__checkbox-label a {
	color: var(--primary-color);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

.contact__form-button {
	width: 100%;
	margin-top: 1rem;
}

/* Success Message */
.form__success-message {
	display: none; /* Hidden by default */
	align-items: center;
	justify-content: center;
	gap: 1rem;
	padding: 2rem;
	background-color: var(--surface-color);
	border: 1px solid var(--primary-color);
	border-radius: 8px;
	color: var(--text-color);
	text-align: center;
	font-size: 1.125rem;
}

.form__success-message.is-visible {
	display: flex; /* Shown via JS */
}

.form__success-message .lucide {
	color: var(--primary-color);
}

/* ==================== ADAPTIVE FOR CONTACT ==================== */
@media screen and (max-width: 768px) {
	.contact__container {
		grid-template-columns: 1fr;
		gap: 3rem;
	}
	.contact__info {
		text-align: center;
	}
	.contact__info .section-header__title,
	.contact__info .section-header__subtitle {
		text-align: center;
	}
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
	position: fixed;
	bottom: 2rem;
	left: 2rem;
	max-width: 480px;
	z-index: 1000;

	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding: 1rem 1.5rem;

	background-color: var(--surface-color);
	border: 1px solid rgba(156, 163, 175, 0.2);
	border-radius: 12px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);

	transform: translateY(200%);
	opacity: 0;
	visibility: hidden;
	transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1),
		opacity 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), visibility 0.5s;
}

.cookie-popup.is-visible {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

.cookie-popup__text {
	font-size: 0.875rem;
	color: var(--text-secondary-color);
	line-height: 1.5;
}

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

.cookie-popup__button {
	padding: 0.5rem 1rem;
	flex-shrink: 0;
}

/* Adaptive for Cookie Popup */
@media screen and (max-width: 576px) {
	.cookie-popup {
		flex-direction: column;
		align-items: stretch;
		left: 1rem;
		right: 1rem;
		bottom: 1rem;
		max-width: none;
	}
	.cookie-popup__text {
		text-align: center;
	}
}

/* ==================== STATIC PAGES (PRIVACY, TERMS, etc.) ==================== */
.pages {
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 5rem;
}

.pages .container {
	max-width: 800px; /* Optimal width for reading text */
}

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

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

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

.pages ul {
	list-style-type: disc;
	padding-left: 1.5rem;
	margin-bottom: 1.5rem;
	color: var(--text-secondary-color);
}

.pages li {
	margin-bottom: 0.75rem;
	line-height: 1.8;
}

.pages a {
	color: var(--primary-color);
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.3s ease;
}

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

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