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

/* ===== CSS VARIABLES ===== */
:root {
	/* Colors */
	--background-color: #111827;
	--text-color: #f9fafb;
	--secondary-text-color: #9ca3af;
	--accent-color: #22c55e;
	--accent-color-hover: #16a34a;
	--surface-color: #1f2937;

	/* Typography */
	--header-font: 'Poppins', sans-serif;
	--body-font: 'Inter', sans-serif;

	/* Spacing */
	--header-height: 5rem;
}

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

html {
	scroll-behavior: smooth;
}

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

h1,
h2,
h3 {
	font-family: var(--header-font);
	font-weight: 600;
}

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

ul {
	list-style: none;
}

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

/* ===== REUSABLE CLASSES ===== */
.container {
	max-width: 1120px;
	margin-left: 1.5rem;
	margin-right: 1.5rem;
}

/* ===== LOGO ===== */
.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--header-font);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--text-color);
	transition: color 0.3s;
}

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

.logo__svg path {
	fill: var(--accent-color);
	transition: fill 0.3s;
}

.logo:hover .logo__svg path {
	fill: var(--text-color);
}

/* ===== HEADER ===== */
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: rgba(17, 24, 39, 0.8);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	z-index: 100;
	border-bottom: 1px solid var(--surface-color);
}

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

.header__burger {
	display: inline-flex;
	font-size: 1.5rem;
	cursor: pointer;
	background: none;
	border: none;
	color: var(--text-color);
}

@media screen and (max-width: 767px) {
	.nav {
		position: fixed;
		top: var(--header-height);
		right: -100%;
		width: 100%;
		height: calc(100vh - var(--header-height));
		background-color: var(--background-color);
		padding: 2rem;
		transition: right 0.4s ease;
	}
}

.nav__list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2rem;
	padding-top: 3rem;
}

.nav__link {
	font-weight: 500;
	color: var(--text-color);
	transition: color 0.3s;
}

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

/* Show menu */
.nav.nav--show {
	right: 0;
}

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

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

.footer__column--main {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.footer__copy {
	font-size: 0.875rem;
}

.footer__title {
	font-family: var(--header-font);
	color: var(--text-color);
	margin-bottom: 1rem;
	font-size: 1.125rem;
}

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

.footer__link {
	transition: color 0.3s;
}

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

.footer__link--icon {
	display: inline-flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.footer__icon {
	flex-shrink: 0;
	width: 18px;
	height: 18px;
	margin-top: 2px;
}

/* ===== BREAKPOINTS ===== */
/* For medium devices */
@media screen and (min-width: 768px) {
	.header__burger {
		display: none;
	}

	.nav {
		all: unset; /* Reset mobile styles */
	}

	.nav__list {
		flex-direction: row;
		gap: 2.5rem;
		padding-top: 0;
	}

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

/* For large devices */
@media screen and (min-width: 1150px) {
	.container {
		margin-left: auto;
		margin-right: auto;
	}
}

/* ===== BUTTON ===== */
.button {
	display: inline-block;
	background-color: var(--accent-color);
	color: var(--text-color);
	padding: 1rem 2rem;
	border-radius: 0.5rem;
	font-weight: 500;
	font-family: var(--header-font);
	transition: background-color 0.3s, transform 0.3s;
}

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

/* ===== HERO SECTION ===== */
.hero {
	padding: calc(var(--header-height) + 4rem) 0 4rem;
	overflow: hidden; /* Для предотвращения горизонтального скролла из-за анимаций */
}

.hero__container {
	display: grid;
	gap: 3rem;
	align-items: center;
}

.hero__data {
	text-align: center;
}

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

.hero__title span {
	color: var(--accent-color);
}

/* Стиль для курсора в анимации */
.typed-cursor {
	font-weight: normal;
	color: var(--accent-color);
	animation: typedjsBlink 0.7s infinite;
}
@keyframes typedjsBlink {
	50% {
		opacity: 0;
	}
}

.hero__subtitle {
	font-size: 1.125rem; /* 18px */
	color: var(--secondary-text-color);
	margin-bottom: 2.5rem;
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.hero__image img {
	width: 300px;
	margin: 0 auto;
	border-radius: 1rem;
}

/* ===== BREAKPOINTS (Hero Section) ===== */
@media screen and (min-width: 768px) {
	.hero__container {
		grid-template-columns: 1.2fr 0.8fr;
		gap: 2rem;
	}

	.hero__data {
		text-align: left;
	}

	.hero__subtitle {
		margin-left: 0;
		margin-right: 0;
	}

	.hero__image img {
		width: 100%;
	}
}

@media screen and (min-width: 1150px) {
	.hero {
		padding-top: calc(var(--header-height) + 5rem);
		padding-bottom: 5rem;
	}

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

	.hero__subtitle {
		font-size: 1.25rem; /* 20px */
	}
}

/* ===== REUSABLE SECTION STYLES ===== */
.section__title,
.section__subtitle {
	text-align: center;
}

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

.section__subtitle {
	font-size: 1.125rem;
	color: var(--secondary-text-color);
	max-width: 600px;
	margin: 0 auto 4rem auto;
}

/* ===== AREAS SECTION ===== */
.areas {
	padding: 5rem 0;
	background-color: var(
		--surface-color
	); /* Slight background change to separate sections */
}

.areas__grid {
	display: grid;
	gap: 1.5rem;
}

.areas__card {
	background-color: var(--background-color);
	padding: 2rem;
	border-radius: 0.75rem;
	border: 1px solid var(--surface-color);
	transition: transform 0.3s, border-color 0.3s;
}

.areas__card:hover {
	transform: translateY(-5px);
	border-color: var(--accent-color);
}

.areas__icon-wrapper {
	width: 50px;
	height: 50px;
	display: grid;
	place-items: center;
	border-radius: 0.5rem;
	background-color: var(--surface-color);
	margin-bottom: 1.5rem;
}

.areas__icon-wrapper i {
	width: 28px;
	height: 28px;
	color: var(--accent-color);
}

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

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

/* ===== BREAKPOINTS (Areas Section) ===== */
@media screen and (min-width: 576px) {
	.areas__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 992px) {
	.areas__grid {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* ===== CASES SECTION ===== */
.cases {
	padding: 5rem 0;
}

.cases__wrapper {
	display: grid;
	gap: 4rem;
}

.cases__item {
	display: grid;
	gap: 2rem;
	align-items: center;
}

.cases__image {
	border-radius: 0.75rem;
	overflow: hidden;
}

.cases__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.cases__tag {
	background-color: var(--surface-color);
	color: var(--accent-color);
	padding: 0.25rem 0.75rem;
	border-radius: 999px; /* Pill shape */
	font-size: 0.875rem;
	font-weight: 500;
}

.cases__title {
	font-size: 1.75rem;
	margin-bottom: 1rem;
}

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

/* ===== BREAKPOINTS (Cases Section) ===== */
@media screen and (min-width: 768px) {
	.cases__item {
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
	}

	/* Reverse layout for the second item */
	.cases__item--reversed .cases__image {
		order: 2;
	}
}

/* ===== BLOG SECTION ===== */
.blog {
	padding: 5rem 0;
	background-color: var(--surface-color);
}

.blog__grid {
	display: grid;
	gap: 2rem;
}

.blog__card {
	background-color: var(--background-color);
	border-radius: 0.75rem;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: transform 0.3s, box-shadow 0.3s;
}

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

.blog__image {
	aspect-ratio: 16 / 9;
}

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

.blog__content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1; /* Allows footer to stick to bottom */
}

.blog__category {
	color: var(--accent-color);
	font-weight: 500;
	font-size: 0.875rem;
	margin-bottom: 0.75rem;
}

.blog__title {
	font-size: 1.25rem;
	line-height: 1.4;
	margin-bottom: 1rem;
	flex-grow: 1; /* Pushes meta to the bottom */
}

.blog__title a {
	transition: color 0.3s;
}

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

.blog__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.875rem;
	color: var(--secondary-text-color);
	border-top: 1px solid var(--surface-color);
	padding-top: 1rem;
	margin-top: auto; /* Pushes itself to the bottom */
}

.blog__readmore {
	color: var(--text-color);
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	transition: color 0.3s, gap 0.3s;
}

.blog__readmore:hover {
	color: var(--accent-color);
	gap: 0.5rem;
}

.blog__readmore-icon {
	width: 16px;
	height: 16px;
}

/* ===== BREAKPOINTS (Blog Section) ===== */
@media screen and (min-width: 576px) {
	.blog__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media screen and (min-width: 992px) {
	.blog__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

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

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

.contact__description {
	color: var(--secondary-text-color);
	margin-top: 1rem;
}

.contact__form {
	display: grid;
	gap: 1.5rem;
}

.contact__form-group {
	display: grid;
	gap: 0.5rem;
}

.contact__form-label {
	font-weight: 500;
}

.contact__form-input {
	width: 100%;
	padding: 0.75rem 1rem;
	border-radius: 0.5rem;
	border: 1px solid var(--surface-color);
	background-color: var(--surface-color);
	color: var(--text-color);
	font-size: 1rem;
	outline: none;
	transition: border-color 0.3s, box-shadow 0.3s;
}

.contact__form-input:focus {
	border-color: var(--accent-color);
	box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.contact__form-group--checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
}

.contact__form-checkbox {
	margin-top: 5px;
	flex-shrink: 0;
}

.contact__form-checkbox-label {
	font-size: 0.875rem;
	color: var(--secondary-text-color);
}

.contact__form-checkbox-label a {
	color: var(--accent-color);
	text-decoration: underline;
}

.contact__form-button {
	width: 100%;
	justify-content: center;
	padding: 1rem;
}

/* Success Message */
.contact__success-message {
	display: none; /* Hidden by default */
	text-align: center;
	padding: 2rem;
	border: 1px solid var(--surface-color);
	border-radius: 0.5rem;
}

.contact__success-message.is-active {
	display: block; /* Shown with JS */
}

.contact__success-icon {
	width: 48px;
	height: 48px;
	color: var(--accent-color);
	margin: 0 auto 1rem auto;
}

.contact__success-title {
	font-size: 1.5rem;
	margin-bottom: 0.5rem;
}

/* ===== BREAKPOINTS (Contact Section) ===== */
@media screen and (min-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr 1.2fr;
		align-items: center;
	}
}

/* ===== COOKIE POP-UP ===== */
.cookie-popup {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--surface-color);
	border-top: 1px solid var(--background-color);
	padding: 1rem 0;
	z-index: 1000;

	/* Animation setup */
	transform: translateY(100%);
	opacity: 0;
	visibility: hidden;
	transition: transform 0.5s, opacity 0.5s, visibility 0.5s;
}

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

.cookie-popup__container {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 1rem;
	text-align: center;
}

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

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

.cookie-popup__button {
	background-color: var(--accent-color);
	color: var(--text-color);
	padding: 0.5rem 1.5rem;
	border-radius: 0.5rem;
	border: none;
	cursor: pointer;
	font-size: 0.875rem;
	font-weight: 500;
	transition: background-color 0.3s;
	flex-shrink: 0;
}

.cookie-popup__button:hover {
	background-color: var(--accent-color-hover);
}

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

/* ===== POLICY & TEXT PAGES ===== */
.pages {
	padding: calc(var(--header-height) + 4rem) 0 5rem;
}

.pages .container {
	max-width: 800px; /* Make content area narrower for better readability */
}

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

.pages h2 {
	font-size: 1.5rem;
	margin-top: 3rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid var(--surface-color);
	padding-bottom: 0.5rem;
}

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

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

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

.pages a {
	color: var(--accent-color);
	text-decoration: underline;
	transition: color 0.3s;
}

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

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