/* ====================
   GLOBAL STYLES & SETUP
   ==================== */

/* --- Variables --- */
:root {
	--bg-main: #ffffff;
	--bg-footer: #f8f9fa;
	--text-primary: #212529;
	--text-secondary: #6c757d;
	--accent-primary: #0052ff;
	--accent-hover: #0044d6;
	--border-color: #dee2e6;

	--font-primary: 'Poppins', sans-serif;
	--font-secondary: 'Roboto', sans-serif;

	--header-height: 80px;
	--container-width: 1200px;
	--container-padding: 1rem;
}

/* --- Base & Reset --- */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
	scroll-behavior: smooth;
}

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

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

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

a:hover {
	color: var(--accent-hover);
}

ul {
	list-style: none;
}

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

button {
	cursor: pointer;
	border: none;
	background: none;
	font-family: inherit;
}

/* --- Utility Classes --- */
.container {
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-padding);
	padding-right: var(--container-padding);
}

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

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

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

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

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

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

.nav__link {
	font-family: var(--font-primary);
	font-weight: 500;
	font-size: 1rem;
	color: var(--text-secondary);
	position: relative;
	padding: 5px 0;
}

.nav__link::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--accent-primary);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform 0.3s ease-in-out;
}

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

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

.header__burger {
	display: none;
	color: var(--text-primary);
}

/* --- Header Responsive --- */
@media (max-width: 768px) {
	.header__nav {
		position: fixed;
		top: var(--header-height);
		left: 0;
		width: 100%;
		height: calc(100vh - var(--header-height));
		background-color: var(--bg-main);
		transform: translateX(-100%);
		transition: transform 0.3s ease-in-out;
		padding-top: 2rem;
	}

	.header__nav--open {
		transform: translateX(0);
	}

	.nav__list {
		flex-direction: column;
		gap: 1.5rem;
		align-items: center;
	}

	.nav__link {
		font-size: 1.2rem;
	}

	.header__burger {
		display: block;
	}
}

/* ====================
   FOOTER
   ==================== */
.footer {
	background-color: var(--bg-footer);
	border-top: 1px solid var(--border-color);
	padding: 4rem 0;
	color: var(--text-secondary);
}

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

.footer__column--brand {
	grid-column: span 1;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.footer__logo {
	font-size: 1.25rem;
}

.footer__copyright {
	font-size: 0.9rem;
}

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

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

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

.footer__link:hover {
	color: var(--accent-primary);
	text-decoration: underline;
}

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

/* --- Footer Responsive --- */
@media (max-width: 992px) {
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
		gap: 3rem;
	}
}

@media (max-width: 576px) {
	.footer__container {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}

	.footer {
		padding: 3rem 0;
	}
}

/* ====================
   HERO SECTION
   ==================== */
.hero {
	padding-top: calc(var(--header-height) + 2rem);
	display: flex;
	align-items: center;
	min-height: 90vh;
	background-color: var(--bg-main);
	padding-bottom: 4rem;
}

.hero__container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	gap: 3rem;
}

.hero__content {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.hero__title {
	font-size: 2.5rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	line-height: 1.2;
	min-height: 144px; /* Резервируем место под заголовок */
}

/* --- Эффект курсора для анимации --- */
.hero__title::after {
	content: '|';
	animation: blink 1s step-end infinite;
	font-weight: 300;
	color: var(--text-secondary);
}

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

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

.button {
	display: inline-block;
	background-color: var(--accent-primary);
	color: #fff;
	font-family: var(--font-primary);
	font-weight: 500;
	font-size: 1rem;
	padding: 1rem 2rem;
	border-radius: 8px;
	transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
	background-color: var(--accent-hover);
	color: #fff;
	transform: translateY(-3px);
}

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

.hero__image {
	border-radius: 12px;
	width: 100%;
	height: auto;
}

/* --- Hero Responsive --- */
@media (max-width: 992px) {
	.hero__title {
		font-size: 2rem;
		min-height: 116px;
	}
}

@media (max-width: 768px) {
	.hero {
		min-height: auto;
		padding-top: calc(var(--header-height) + 2rem);
		padding-bottom: 3rem;
		text-align: center;
	}

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

	.hero__content {
		align-items: center;
		order: 2; /* Текст будет под картинкой */
	}

	.hero__image-wrapper {
		order: 1;
	}

	.hero__title {
		font-size: 1.5rem;
		min-height: 87px;
	}
}

/* ====================
   SHARED SECTION STYLES
   ==================== */
.section {
	padding: 5rem 0;
}

.section:nth-of-type(odd) {
	background-color: var(--bg-footer); /* Чередование фона для секций */
}

.section__header {
	text-align: center;
	margin-bottom: 4rem;
	max-width: 650px;
	margin-left: auto;
	margin-right: auto;
}

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

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

/* ====================
   PRINCIPLES SECTION
   ==================== */
.principles__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.principles__card {
	background-color: var(--bg-main);
	padding: 2.5rem 2rem;
	border-radius: 12px;
	border: 1px solid var(--border-color);
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.principles__icon-wrapper {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: var(--accent-primary);
	color: #fff;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 auto 1.5rem auto;
}

.principles__icon-wrapper i {
	width: 28px;
	height: 28px;
}

.principles__card-title {
	font-size: 1.5rem;
	margin-bottom: 0.75rem;
}

.principles__card-text {
	color: var(--text-secondary);
	line-height: 1.7;
}

/* --- Principles Responsive --- */
@media (max-width: 992px) {
	.principles__grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 768px) {
	.section {
		padding: 4rem 0;
	}
	.section__header {
		margin-bottom: 3rem;
	}
	.section__title {
		font-size: 2rem;
	}
}

/* ====================
   TOOLS SECTION
   ==================== */
.tools__tabs-nav {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-bottom: 3rem;
	flex-wrap: wrap;
}

.tools__tab-button {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.8rem 1.5rem;
	border-radius: 8px;
	font-family: var(--font-primary);
	font-size: 1rem;
	font-weight: 500;
	color: var(--text-secondary);
	background-color: transparent;
	border: 1px solid var(--border-color);
	transition: all 0.3s ease;
}

.tools__tab-button:hover {
	background-color: var(--bg-footer);
	color: var(--text-primary);
}

.tools__tab-button.active {
	background-color: var(--accent-primary);
	border-color: var(--accent-primary);
	color: #fff;
}

.tools__tab-button i {
	width: 20px;
	height: 20px;
}

.tools__tab-panel {
	display: none;
	animation: fadeIn 0.5s ease;
}

.tools__tab-panel.active {
	display: block;
}

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

.tools__list {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
	max-width: 900px;
	margin: 0 auto;
	padding-left: 2rem; /* Отступ для псевдоэлемента */
}

.tools__list-item {
	position: relative;
	padding-left: 2rem; /* Отступ для галочки */
	font-size: 1.05rem;
}

.tools__list-item::before {
	content: '✓';
	position: absolute;
	left: 0;
	top: 0;
	color: var(--accent-primary);
	font-weight: bold;
	font-size: 1.2rem;
}

/* --- Tools Responsive --- */
@media (max-width: 768px) {
	.tools__list {
		grid-template-columns: 1fr;
		gap: 1rem;
	}
	.tools__tabs-nav {
		gap: 0.5rem;
	}
	.tools__tab-button {
		padding: 0.6rem 1rem;
		font-size: 0.9rem;
	}
}

/* ====================
   CASES (ACCORDION) SECTION
   ==================== */
.cases__accordion {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.accordion__item {
	background-color: var(--bg-main);
	border: 1px solid var(--border-color);
	border-radius: 10px;
	overflow: hidden; /* Важно для анимации */
}

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

.accordion__icon {
	transition: transform 0.4s 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__text {
	padding: 0 1.5rem 1.5rem 1.5rem;
	color: var(--text-secondary);
	line-height: 1.7;
}

/* --- Active State for Accordion --- */
.accordion__header.active .accordion__icon {
	transform: rotate(180deg);
}

.accordion__header.active {
	color: var(--accent-primary);
}

/* ====================
   BLOG SECTION
   ==================== */
.blog__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2rem;
}

.blog__card {
	background-color: var(--bg-main);
	border-radius: 12px;
	border: 1px solid var(--border-color);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.blog__card-link-wrapper {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
}

.blog__card-link-wrapper:hover {
	color: inherit;
}

.blog__card-image {
	width: 100%;
	height: 200px;
	object-fit: cover;
}

.blog__card-content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1; /* Позволяет футеру карточки прижаться к низу */
}

.blog__card-category {
	display: inline-block;
	background-color: var(--bg-footer);
	color: var(--accent-primary);
	font-size: 0.8rem;
	font-weight: 500;
	padding: 0.25rem 0.75rem;
	border-radius: 20px;
	margin-bottom: 1rem;
	align-self: flex-start; /* Чтобы фон не растягивался */
}

.blog__card-title {
	font-size: 1.25rem;
	line-height: 1.4;
	margin-bottom: 0.75rem;
}

.blog__card-excerpt {
	color: var(--text-secondary);
	margin-bottom: 1.5rem;
	flex-grow: 1; /* Занимает все доступное пространство */
}

.blog__card-readmore {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--font-primary);
	font-weight: 500;
	color: var(--accent-primary);
	transition: color 0.3s ease;
}

.blog__card-readmore i {
	width: 18px;
	height: 18px;
	transition: transform 0.3s ease;
}

.blog__card:hover .blog__card-readmore i {
	transform: translateX(5px);
}

/* --- Blog Responsive --- */
@media (max-width: 992px) {
	.blog__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 576px) {
	.blog__grid {
		grid-template-columns: 1fr;
	}
}

/* ====================
   CONTACT SECTION
   ==================== */
.contact__wrapper {
	max-width: 700px;
	margin: 0 auto;
	background-color: var(--bg-main);
	padding: 3rem;
	border-radius: 12px;
	border: 1px solid var(--border-color);
}

.form__group {
	margin-bottom: 1.5rem;
}

.form__label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
}

.form__input {
	width: 100%;
	padding: 0.9rem 1rem;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	font-size: 1rem;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
	outline: none;
	border-color: var(--accent-primary);
	box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
}

.form__group--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	margin-bottom: 2rem;
}

.form__checkbox {
	margin-top: 4px;
	width: 18px;
	height: 18px;
	accent-color: var(--accent-primary);
}

.form__checkbox-label {
	font-size: 0.9rem;
	color: var(--text-secondary);
	line-height: 1.5;
}

.form__checkbox-label a {
	text-decoration: underline;
}

.contact__button {
	width: 100%;
	padding: 1rem;
	font-size: 1.1rem;
}

/* --- Success Message --- */
.contact__success-message {
	display: none; /* Скрыто по умолчанию */
	text-align: center;
	padding: 2rem;
	animation: fadeIn 0.5s ease;
}

.contact__success-message.visible {
	display: block;
}

.success-message__icon {
	color: var(--accent-primary);
	margin-bottom: 1.5rem;
}

.success-message__icon i {
	width: 60px;
	height: 60px;
}

.success-message__title {
	font-size: 2rem;
	margin-bottom: 0.5rem;
}

.success-message__text {
	font-size: 1.1rem;
	color: var(--text-secondary);
}

/* --- Contact Responsive --- */
@media (max-width: 576px) {
	.contact__wrapper {
		padding: 2rem;
	}
}

/* ====================
   COOKIE POP-UP
   ==================== */
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--text-primary);
	color: #fff;
	padding: 1.5rem 2rem;
	z-index: 2000;

	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1.5rem;

	transform: translateY(150%);
	transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__text {
	font-size: 0.95rem;
}

.cookie-popup__text a {
	color: #fff;
	text-decoration: underline;
}

.cookie-popup__text a:hover {
	text-decoration: none;
}

.cookie-popup__button {
	background-color: #fff;
	color: var(--text-primary);
	padding: 0.7rem 1.5rem;
	border-radius: 6px;
	flex-shrink: 0; /* Кнопка не будет сжиматься */
}

.cookie-popup__button:hover {
	background-color: var(--bg-footer);
	color: var(--text-primary);
}

/* --- Cookie Pop-up Responsive --- */
@media (max-width: 768px) {
	.cookie-popup {
		flex-direction: column;
		text-align: center;
		padding: 1.5rem 1rem;
	}

	.cookie-popup__button {
		width: 100%;
	}
}

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

.pages .container {
	max-width: 800px; /* Делаем текстовый блок уже для лучшей читаемости */
}

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

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

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

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

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

.pages a {
	text-decoration: underline;
}

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

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