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

/* =========== CSS VARIABLES =========== */
:root {
	--header-height: 5rem;

	/* Colors */
	--primary-color: #1a2e4c;
	--secondary-color: #2e5a88;
	--accent-color: #00bfa6;
	--accent-color-hover: #00a38e;
	--text-color: #333;
	--text-color-light: #f8f9fa;
	--body-color: #ffffff;
	--container-color: #f8f9fa;

	/* Fonts */
	--body-font: 'Inter', sans-serif;
	--title-font: 'Poppins', sans-serif;

	--big-font-size: 2.5rem;
	--h1-font-size: 2.25rem;
	--h2-font-size: 1.5rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;

	/* Font weight */
	--font-medium: 500;
	--font-semibold: 600;
	--font-bold: 700;

	/* Margins */
	--mb-0-5: 0.5rem;
	--mb-1: 1rem;
	--mb-1-5: 1.5rem;
	--mb-2: 2rem;

	/* Z-index */
	--z-tooltip: 10;
	--z-fixed: 100;
}

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

html {
	scroll-behavior: smooth;
}

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

h1,
h2,
h3 {
	font-family: var(--title-font);
	color: var(--primary-color);
	font-weight: var(--font-semibold);
}

ul {
	list-style: none;
}

a {
	text-decoration: none;
}

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

/* =========== REUSABLE CSS CLASSES =========== */
.container {
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

.button {
	display: inline-block;
	background-color: var(--accent-color);
	color: var(--text-color-light);
	padding: 0.9rem 2rem;
	border-radius: 0.5rem;
	font-weight: var(--font-medium);
	transition: background-color 0.3s;
	border: 2px solid var(--accent-color);
}

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

.button--outline {
	background-color: transparent;
	color: var(--accent-color);
}

.button--outline:hover {
	background-color: var(--accent-color);
	color: var(--text-color-light);
}

/* =========== HEADER =========== */
.header {
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: var(--z-fixed);
	background-color: var(--body-color);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--title-font);
	font-size: 1.25rem;
	font-weight: var(--font-bold);
	color: var(--primary-color);
}

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

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

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

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

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

/* =========== FOOTER =========== */
.footer {
	background-color: var(--primary-color);
	color: var(--text-color-light);
	padding: 4rem 0 2rem;
}

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

.footer__logo {
	color: var(--text-color-light);
	margin-bottom: var(--mb-1);
}

.footer__copyright {
	font-size: var(--small-font-size);
	opacity: 0.8;
}

.footer__title {
	color: var(--text-color-light);
	font-size: var(--h3-font-size);
	margin-bottom: var(--mb-1);
}

.footer__list li {
	margin-bottom: var(--mb-0-5);
}

.footer__link {
	color: var(--text-color-light);
	opacity: 0.8;
	transition: opacity 0.3s, color 0.3s;
}

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

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

.footer__list--contacts i {
	flex-shrink: 0;
	margin-top: 4px;
}

/* =========== MEDIA QUERIES =========== */
@media screen and (min-width: 768px) {
	.footer__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

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

@media screen and (max-width: 767px) {
	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 70%;
		height: 100vh;
		background-color: var(--primary-color);
		padding: 4rem 2rem;
		z-index: var(--z-fixed);
		transition: right 0.4s;
	}

	.nav.show-menu {
		right: 0;
	}

	.nav__list {
		flex-direction: column;
		gap: 2.5rem;
		align-items: flex-start;
	}

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

	.nav__link.button--outline {
		border-color: var(--text-color-light);
		color: var(--text-color-light);
	}

	.nav__link.button--outline:hover {
		background-color: var(--accent-color);
		border-color: var(--accent-color);
	}

	.header__burger {
		position: relative;
		z-index: 999;
		display: block;
	}

	.header__burger i {
		width: 28px;
		height: 28px;
	}

	/* Change burger color to white when menu is open */
	.nav.show-menu ~ .header__burger {
		color: var(--text-color-light);
	}

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

	.footer__list--contacts li {
		justify-content: center;
	}

	.logo {
		justify-content: center;
	}
}

/* =========== HERO SECTION =========== */
.hero {
	padding-top: calc(var(--header-height) + 2rem);
	padding-bottom: 2rem;
}

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

.hero__data {
	text-align: center;
}

.hero__title {
	font-size: var(--h2-font-size);
	font-weight: var(--font-bold);
	margin-bottom: var(--mb-1);
	line-height: 1.3;
}

/* Стили для анимации */
.hero__title span {
	display: inline-block;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero__title span.visible {
	opacity: 1;
	transform: translateY(0);
}

.hero__description {
	font-size: 1.125rem;
	margin-bottom: var(--mb-2);
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

.button--large {
	padding: 1rem 2.5rem;
	font-size: 1.1rem;
}

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

.hero__image img {
	/* max-width: 450px; */
	border-radius: 1rem;
}

/* --- MEDIA QUERIES (дополнения для Hero) --- */
@media screen and (min-width: 768px) {
	.hero {
		padding-top: calc(var(--header-height) + 4rem);
		padding-bottom: 4rem;
	}

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

	.hero__data {
		text-align: left;
	}

	.hero__title {
		font-size: 2.5rem;
	}

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

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

.section__title {
	font-size: var(--h2-font-size);
	text-align: center;
	margin-bottom: var(--mb-2);
}

/* =========== FEATURES SECTION =========== */
.features__container {
	display: grid;
	gap: 1.5rem;
	padding-top: 1rem;
}

.features__card {
	background-color: var(--container-color);
	padding: 2rem 1.5rem;
	border-radius: 0.75rem;
	text-align: center;
	border: 1px solid #e0e0e0;
	transition: transform 0.3s, box-shadow 0.3s;
}

.features__card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 24px rgba(26, 46, 76, 0.1);
}

.features__icon {
	display: inline-flex;
	padding: 0.75rem;
	border-radius: 50%;
	background-color: var(--accent-color);
	color: var(--text-color-light);
	margin-bottom: var(--mb-1);
}

.features__icon i {
	width: 32px;
	height: 32px;
}

.features__title {
	font-size: var(--h3-font-size);
	margin-bottom: var(--mb-0-5);
}

.features__description {
	font-size: var(--normal-font-size);
}

/* --- MEDIA QUERIES (дополнения для Features) --- */
@media screen and (min-width: 768px) {
	.section {
		padding: 6rem 0;
	}
	.section__title {
		font-size: var(--h1-font-size);
		margin-bottom: 3rem;
	}
	.features__container {
		grid-template-columns: repeat(3, 1fr);
		gap: 2rem;
	}
}

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

.how-it-works__container {
	display: grid;
	gap: 2rem;
	position: relative;
}

/* Timeline line */
.how-it-works__container::before {
	content: '';
	position: absolute;
	left: 49px;
	top: 2rem;
	bottom: 2rem;
	width: 2px;
	background-color: var(--accent-color);
	opacity: 0.3;
}

.how-it-works__step {
	display: flex;
	align-items: flex-start;
	gap: 1.5rem;
	position: relative;
}

.how-it-works__number {
	font-family: var(--title-font);
	font-size: 3rem;
	font-weight: var(--font-bold);
	color: var(--accent-color);
	line-height: 1;
	min-width: 100px;
	text-align: center;
	background-color: var(--body-color);
}

.how-it-works__title {
	font-size: var(--h3-font-size);
	margin-bottom: var(--mb-0-5);
}

/* --- MEDIA QUERIES (дополнения для How It Works) --- */
@media screen and (max-width: 767px) {
	.how-it-works__container::before {
		left: 24px;
	}
	.how-it-works__number {
		font-size: 2rem;
		min-width: 50px;
	}
	.how-it-works__step {
		gap: 1rem;
	}
}

@media screen and (min-width: 768px) {
	.how-it-works__container {
		gap: 3rem;
	}
	.how-it-works__step {
		max-width: 50%;
	}

	/* Alternate steps left and right */
	.how-it-works__step:nth-child(even) {
		margin-left: auto;
	}

	/* Adjust timeline line for desktop */
	.how-it-works__container::before {
		left: 50%;
		transform: translateX(-50%);
	}

	.how-it-works__step:nth-child(odd) {
		padding-right: 3rem;
	}

	.how-it-works__step:nth-child(even) {
		padding-left: 3rem;
		text-align: right;
		flex-direction: row-reverse;
	}
}

/* =========== STORIES (TESTIMONIALS) SECTION =========== */
.stories {
	background-color: var(--body-color);
}

.testimonials__slider {
	padding-bottom: 3rem; /* Space for pagination */
}

.testimonials__card {
	background-color: var(--container-color);
	padding: 2rem;
	border-radius: 0.75rem;
	border: 1px solid #e0e0e0;
	height: 100%;
	display: flex;
	flex-direction: column;
}

.testimonials__icon {
	color: var(--accent-color);
	width: 32px;
	height: 32px;
	margin-bottom: var(--mb-1);
}

.testimonials__quote {
	flex-grow: 1;
	margin-bottom: var(--mb-1-5);
}

.testimonials__author {
	border-top: 1px solid #e0e0e0;
	padding-top: var(--mb-1);
}

.testimonials__name {
	font-size: var(--h3-font-size);
}

.testimonials__role {
	font-size: var(--small-font-size);
	color: #6c757d;
}

/* Swiper pagination styles */
.swiper-pagination-bullet {
	background-color: #ccc;
	opacity: 1;
}

.swiper-pagination-bullet-active {
	background-color: var(--accent-color);
}

/* =========== BLOG SECTION =========== */
.blog {
	background-color: var(--container-color);
}

.blog__container {
	display: grid;
	gap: 1.5rem;
	padding-top: 1rem;
}

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

.blog__card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 24px rgba(26, 46, 76, 0.1);
}

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

.blog__content {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.blog__category {
	display: inline-block;
	background-color: rgba(0, 191, 166, 0.1);
	color: var(--accent-color);
	padding: 0.25rem 0.75rem;
	border-radius: 0.25rem;
	font-size: var(--small-font-size);
	font-weight: var(--font-medium);
	margin-bottom: var(--mb-1);
	align-self: flex-start;
}

.blog__title {
	font-size: 1.15rem;
	margin-bottom: var(--mb-1);
	flex-grow: 1;
}

.blog__title a {
	color: var(--primary-color);
	transition: color 0.3s;
}

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

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

.blog__readmore:hover {
	gap: 0.5rem;
}

.blog__readmore i {
	width: 16px;
	height: 16px;
}

/* --- MEDIA QUERIES (дополнения для Blog) --- */
@media screen and (min-width: 768px) {
	.blog__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

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

/* =========== CONTACT SECTION =========== */
.contact__container {
	display: grid;
	gap: 3rem;
}

.contact__description {
	font-size: 1.1rem;
	line-height: 1.7;
}

.contact__form-wrapper {
	position: relative;
}

.form__group {
	margin-bottom: 1.5rem;
}

.form__label {
	display: block;
	font-weight: var(--font-medium);
	margin-bottom: var(--mb-0-5);
}

.form__input {
	width: 100%;
	padding: 0.9rem 1rem;
	border-radius: 0.5rem;
	border: 1px solid #ccc;
	font-family: var(--body-font);
	font-size: var(--normal-font-size);
	transition: border-color 0.3s, box-shadow 0.3s;
}

.form__input:focus {
	outline: none;
	border-color: var(--accent-color);
	box-shadow: 0 0 0 2px rgba(0, 191, 166, 0.2);
}

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

.form__checkbox {
	margin-top: 5px;
	width: 1rem;
	height: 1rem;
}

.form__label--checkbox {
	font-weight: normal;
	font-size: var(--small-font-size);
}

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

.button--full {
	width: 100%;
	text-align: center;
	justify-content: center;
}

.contact__success-message {
	display: none; /* Hidden by default */
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: var(--body-color);
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
	padding: 2rem;
}

.contact__success-message.is-sent {
	display: flex; /* Shown via JS */
}

.contact__success-message i {
	color: var(--accent-color);
	width: 48px;
	height: 48px;
	margin-bottom: var(--mb-1);
}

/* --- MEDIA QUERIES (дополнения для Contact) --- */
@media screen and (min-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr 1fr;
		align-items: center;
	}
}

/* =========== COOKIE POPUP =========== */
.cookie-popup {
	position: fixed;
	bottom: -100%; /* Initially hidden */
	left: 0;
	right: 0;
	background-color: var(--primary-color);
	color: var(--text-color-light);
	padding: 1.5rem;
	box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 1.5rem;
	z-index: var(--z-fixed);
	transition: bottom 0.5s ease-in-out;
}

.cookie-popup.show {
	bottom: 0; /* Shown via JS */
}

.cookie-popup__text {
	margin: 0;
}

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

.cookie-popup__button {
	padding: 0.6rem 1.2rem;
	flex-shrink: 0;
}

/* =========== STYLES FOR LEGAL PAGES =========== */
.pages {
	padding-top: calc(var(--header-height) + 2rem);
	padding-bottom: 4rem;
}

.pages h1,
.pages h2 {
	font-family: var(--title-font);
	color: var(--primary-color);
	margin-bottom: var(--mb-1-5);
}

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

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

.pages p {
	line-height: 1.8;
	margin-bottom: var(--mb-1);
}

.pages ul {
	list-style-type: disc;
	padding-left: 2rem;
	margin-bottom: var(--mb-1);
}

.pages li {
	margin-bottom: var(--mb-0-5);
}

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

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