/* === GLOBAL STYLES === */
:root {
	--font-primary: 'Manrope', sans-serif;
	--color-text: #111827;
	--color-text-secondary: #6b7280;
	--color-background: #ffffff;
	--color-accent: #4f46e5;
	--color-border: #e5e7eb;
	--container-width: 1200px;
	--container-padding: 1rem;
}

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

html {
	scroll-behavior: smooth;
}

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

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

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.3s ease;
}

ul {
	list-style: none;
}

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

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

.logo__img {
	width: 28px;
	height: 28px;
	color: var(--color-accent);
}

/* === HEADER === */
.header {
	background-color: var(--color-background);
	border-bottom: 1px solid var(--color-border);
	padding: 1rem 0;
	position: sticky;
	top: 0;
	z-index: 100;
}

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

.header__nav {
	position: fixed;
	top: 0;
	right: 0;
	width: 80%;
	height: 100vh;
	background-color: var(--color-background);
	transform: translateX(100%);
	transition: transform 0.3s ease-in-out;
	padding-top: 5rem;
	border-left: 1px solid var(--color-border);
}

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

.header__list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2rem;
}

.header__link {
	font-weight: 500;
	font-size: 1.25rem;
}

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

.header__link--button {
	background-color: var(--color-accent);
	color: var(--color-background);
	padding: 0.5rem 1rem;
	border-radius: 6px;
}

.header__link--button:hover {
	color: var(--color-background);
	opacity: 0.9;
}

.header__burger {
	display: flex;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	cursor: pointer;
	z-index: 101;
}

.header__burger-line {
	width: 25px;
	height: 2px;
	background-color: var(--color-text);
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.header__burger--active .header__burger-line:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}
.header__burger--active .header__burger-line:nth-child(2) {
	opacity: 0;
}
.header__burger--active .header__burger-line:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

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

.footer__container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2.5rem;
}

.footer__column--main {
	grid-column: 1 / -1;
}

.footer .logo {
	margin-bottom: 1rem;
}

.footer__description {
	max-width: 300px;
}

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

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

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

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

.footer__icon {
	width: 16px;
	height: 16px;
	margin-top: 4px;
	flex-shrink: 0;
}

.footer__bottom {
	margin-top: 4rem;
	padding: 1.5rem 0;
	border-top: 1px solid var(--color-border);
	text-align: center;
}

.footer__copyright {
	font-size: 0.875rem;
}

/* === MEDIA QUERIES === */
@media (min-width: 768px) {
	.header__nav {
		position: static;
		height: auto;
		width: auto;
		transform: none;
		padding-top: 0;
		border: none;
	}

	.header__list {
		flex-direction: row;
		align-items: center;
		gap: 1.5rem;
	}

	.header__link {
		font-size: 1rem;
	}

	.header__burger {
		display: none;
	}

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

	.footer__column--main {
		grid-column: 1 / 3;
	}
}

@media (min-width: 1024px) {
	.footer__container {
		grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
		gap: 3rem;
	}
	.footer__column--main {
		grid-column: auto;
	}
}

/* === BUTTON (Reusable) === */
.button {
	display: inline-block;
	background-color: var(--color-accent);
	color: var(--color-background);
	padding: 0.875rem 2rem;
	border-radius: 6px;
	font-weight: 500;
	text-align: center;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	border: 1px solid transparent;
}

.button:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

/* === HERO SECTION === */
.hero {
	padding: 4rem 0;
	overflow: hidden; /* Для корректной работы AOS */
}

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

.hero__title {
	font-size: 2.5rem;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: 1.5rem;
	color: var(--color-text);
}

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

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

.hero__image {
	border-radius: 12px;
	width: 100%;
	max-width: 500px;
	object-fit: cover;
}

/* MEDIA QUERIES for Hero */
@media (min-width: 768px) {
	.hero {
		padding: 6rem 0;
	}

	.hero__title {
		font-size: 3rem;
	}
}

@media (min-width: 1024px) {
	.hero__container {
		grid-template-columns: 1fr 1fr;
		text-align: left;
	}

	.hero__content {
		order: 1;
	}

	.hero__image-wrapper {
		order: 2;
	}
}

/* === SECTION HEADER (Reusable) === */
.section-header {
	text-align: center;
	max-width: 700px;
	margin: 0 auto 4rem;
}

.section-header__title {
	font-size: 2.25rem;
	font-weight: 700;
	margin-bottom: 1rem;
	line-height: 1.2;
}

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

/* === SERVICES SECTION === */
.services {
	padding: 4rem 0;
	background-color: #f8f9fa; /* Light gray background to separate sections */
}

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

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

.services__card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.services__card-icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background-color: #eef2ff; /* Light indigo background for icon */
	margin-bottom: 1.5rem;
}

.services__card-icon i {
	color: var(--color-accent);
	width: 32px;
	height: 32px;
}

.services__card-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
}

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

/* MEDIA QUERIES for Services */
@media (min-width: 768px) {
	.services {
		padding: 6rem 0;
	}

	.services__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 1024px) {
	.services__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* === CASES SECTION === */
.cases {
	padding: 4rem 0;
	background-color: var(--color-background);
}

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

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

.cases__card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.cases__card-image-wrapper {
	width: 100%;
	height: 250px;
}

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

.cases__card-content {
	padding: 2rem;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
}

.cases__card-tag {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background-color: #eef2ff;
	color: var(--color-accent);
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 500;
	margin-bottom: 1rem;
	align-self: flex-start;
}

.cases__card-title {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 0.75rem;
}

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

/* MEDIA QUERIES for Cases */
@media (min-width: 768px) {
	.cases {
		padding: 6rem 0;
	}
}

@media (min-width: 1024px) {
	.cases__grid {
		grid-template-columns: 2fr 1.2fr;
		grid-template-rows: auto auto;
		/* Align items to prevent stretching */
		align-items: start;
	}

	.cases__card--featured {
		grid-row: 1 / 3;
	}
}

/* === BLOG SECTION === */
.blog {
	padding: 4rem 0;
	background-color: #f8f9fa; /* Light gray background */
}

.blog__grid {
	display: grid;
	/* This creates a responsive grid that shows 1, 2, or 3 columns depending on width */
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 2rem;
}

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

.blog__card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.07);
}

.blog__card-image-link {
	display: block;
	height: 220px;
}

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

.blog__card-content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1; /* Allows content to fill the card height */
}

.blog__card-meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 0.875rem;
	color: var(--color-text-secondary);
	margin-bottom: 1rem;
}

.blog__card-category {
	padding: 0.25rem 0.75rem;
	background-color: #fce7f3; /* Different color for blog tag */
	color: #db2777;
	border-radius: 999px;
	font-weight: 500;
}

.blog__card-title {
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
	margin-bottom: 1rem;
	flex-grow: 1; /* Pushes author to the bottom */
}

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

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

/* MEDIA QUERIES for Blog */
@media (min-width: 768px) {
	.blog {
		padding: 6rem 0;
	}
}

/* === ABOUT SECTION === */
.about {
	padding: 4rem 0;
	background-color: var(--color-background);
}

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

.about__image-wrapper {
	order: -1; /* Image appears on top on mobile */
}

.about__image {
	border-radius: 12px;
	width: 100%;
	object-fit: cover;
}

/* Modifier to align section header to the left */
.section-header--left-aligned {
	text-align: left;
	margin-left: 0;
	margin-right: 0;
}

.about__text {
	margin-top: 1.5rem;
	color: var(--color-text-secondary);
	line-height: 1.7;
}

.about__list {
	margin-top: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.about__list-item {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-weight: 500;
}

.about__list-icon {
	width: 20px;
	height: 20px;
	color: var(--color-accent);
	flex-shrink: 0;
}

/* MEDIA QUERIES for About */
@media (min-width: 768px) {
	.about {
		padding: 6rem 0;
	}

	.about__grid {
		grid-template-columns: 1fr 1fr;
		gap: 4rem;
	}

	.about__image-wrapper {
		order: 1; /* Image moves to the right on desktop */
	}
}

/* === CONTACT SECTION === */
.contact {
	padding: 4rem 0;
	background-color: #f8f9fa; /* Light gray background */
}

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

.contact .section-header__subtitle {
	max-width: 450px;
}

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

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

.form__label {
	font-weight: 500;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
}

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

.form__input:focus {
	outline: none;
	border-color: var(--color-accent);
	box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form__group--checkbox {
	flex-direction: row;
	align-items: flex-start;
	gap: 0.75rem;
	font-size: 0.875rem;
}

.form__checkbox {
	margin-top: 3px;
	flex-shrink: 0;
}

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

.form__button {
	width: 100%;
}

/* Success Message */
.contact__success-message {
	display: none; /* Hidden by default */
	padding: 2rem;
	border: 1px solid #a7f3d0;
	background-color: #f0fdf4;
	color: #064e3b;
	border-radius: 8px;
	text-align: center;
}

.contact__success-message i {
	width: 48px;
	height: 48px;
	margin-bottom: 1rem;
	color: #10b981;
}

/* MEDIA QUERIES for Contact */
@media (min-width: 768px) {
	.contact {
		padding: 6rem 0;
	}
}

@media (min-width: 1024px) {
	.contact__grid {
		grid-template-columns: 1fr 1fr;
		gap: 5rem;
	}
}

/* === COOKIE CONSENT POP-UP === */
.cookie-consent {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background-color: var(--color-text);
	color: var(--color-background);
	padding: 1rem 0;
	z-index: 200;
	transform: translateY(100%);
	transition: transform 0.5s ease-in-out;
}

.cookie-consent--active {
	transform: translateY(0);
}

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

.cookie-consent__text a {
	color: var(--color-background);
	text-decoration: underline;
}

.cookie-consent__button {
	background-color: var(--color-background);
	color: var(--color-text);
	border: none;
	padding: 0.6rem 1.5rem;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 500;
	transition: background-color 0.3s, color 0.3s;
}

.cookie-consent__button:hover {
	background-color: #f0f0f0;
}

@media (min-width: 768px) {
	.cookie-consent__container {
		flex-direction: row;
		justify-content: space-between;
		text-align: left;
	}
}

/* === STYLES FOR POLICY PAGES (.pages) === */
.pages {
	padding: 4rem 0;
}

.pages .container {
	max-width: 800px; /* Narrower container for better readability */
}

.pages h1,
.pages h2 {
	line-height: 1.3;
	margin-bottom: 1rem;
}

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

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

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

.pages ul,
.pages ol {
	padding-left: 20px;
	margin-bottom: 1.5rem;
	color: var(--color-text-secondary);
}

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

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

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

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