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

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

	/* Colors */
	--primary-color: #2563eb;
	--primary-color-hover: #1d4ed8;
	--background-color: #ffffff;
	--section-background: #f7fafc;
	--text-color: #1a202c;
	--text-color-light: #a0aec0;
	--border-color: #e2e8f0;

	/* Fonts */
	--body-font: 'Inter', sans-serif;
	--heading-font: 'Poppins', sans-serif;
	--h1-font-size: 2.5rem;
	--h2-font-size: 1.75rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;

	/* Z-index */
	--z-header: 100;
	--z-menu: 110;
}

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

html {
	scroll-behavior: smooth;
}

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

h1,
h2,
h3 {
	font-family: var(--heading-font);
	font-weight: 700;
}

ul {
	list-style: none;
}

a {
	text-decoration: none;
	color: var(--text-color);
}

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

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

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

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

.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var(--heading-font);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--text-color);
}

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

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

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

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

.nav__link--button {
	background-color: var(--primary-color);
	color: #fff;
	padding: 0.75rem 1.5rem;
	border-radius: 6px;
	transition: background-color 0.3s;
}

.nav__link--button:hover {
	background-color: var(--primary-color-hover);
	color: #fff;
}

.header__burger {
	position: relative;
	z-index: 999;
	display: block;
	cursor: pointer;
	background: none;
	border: none;
	color: var(--text-color);
}

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

/* Mobile Menu Styles */
@media screen and (max-width: 767px) {
	.header__nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 70%;
		height: 100vh;
		background-color: var(--background-color);
		box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
		transition: right 0.4s ease;
		z-index: var(--z-menu);
	}
}

.nav--show {
	right: 0;
}

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

.footer__container {
	display: grid;
	gap: 3rem;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.footer__title {
	font-size: 1.125rem;
	color: #fff;
	margin-bottom: 1rem;
}

.footer__description {
	margin-top: 1rem;
	line-height: 1.6;
}

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

.footer__link {
	color: var(--text-color-light);
	transition: color 0.3s, padding-left 0.3s;
	display: inline-block;
}

.footer__link:hover {
	color: #fff;
	padding-left: 5px;
}

.footer__link--icon {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.footer__link--icon i {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

.footer__bottom {
	margin-top: 4rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border-color);
	text-align: center;
	font-size: var(--small-font-size);
}

/* === DESKTOP STYLES === */
@media screen and (min-width: 768px) {
	:root {
		--h1-font-size: 3.5rem;
		--h2-font-size: 2rem;
		--normal-font-size: 1.125rem;
	}

	.container {
		margin-left: auto;
		margin-right: auto;
	}

	.header__burger {
		display: none;
	}

	.header__nav {
		position: static;
		height: auto;
		width: auto;
		background: none;
		box-shadow: none;
	}

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

/* === HERO SECTION === */
.hero {
	padding: calc(var(--header-height) + 4rem) 0 4rem;
	overflow: hidden; /* Важно для анимаций */
}

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

.hero__content {
	text-align: center;
}

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

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

.hero__description {
	font-size: var(--normal-font-size);
	color: var(--text-color-light);
	line-height: 1.7;
	margin: 0 auto 2.5rem;
	max-width: 600px;
	/* Стили для анимации */
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.8s ease 0.5s, transform 0.8s ease 0.5s; /* Задержка для появления после заголовка */
}

.hero__button {
	display: inline-block;
	background-color: var(--primary-color);
	color: #fff;
	padding: 1rem 2.5rem;
	border-radius: 8px;
	font-weight: 600;
	font-family: var(--heading-font);
	transition: background-color 0.3s, transform 0.3s;
	/* Стили для анимации */
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.8s ease 0.7s, transform 0.8s ease 0.7s; /* Задержка */
}

.hero__button:hover {
	background-color: var(--primary-color-hover);
	transform: translateY(-3px);
}

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

.hero__image {
	width: 100%;
	border-radius: 16px;
	/* Стили для анимации */
	opacity: 0;
	transform: scale(0.9);
	transition: opacity 0.8s ease 0.9s, transform 0.8s ease 0.9s; /* Задержка */
}

/* Стили для элементов, когда они становятся видимыми */
.hero--animated .hero__title span,
.hero--animated .hero__description,
.hero--animated .hero__button,
.hero--animated .hero__image {
	opacity: 1;
	transform: none;
}

/* === DESKTOP STYLES FOR HERO === */
@media screen and (min-width: 768px) {
	.hero__container {
		grid-template-columns: 1fr 1fr;
		gap: 2rem;
		text-align: left;
	}

	.hero__content {
		text-align: left;
	}

	.hero__description {
		margin: 0 0 2.5rem;
	}
}

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

.section:nth-child(even) {
	/* Чередование фона секций */
	background-color: var(--section-background);
}

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

.section__subtitle {
	display: block;
	font-size: var(--small-font-size);
	font-weight: 600;
	color: var(--primary-color);
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}

.section__title {
	font-size: var(--h2-font-size);
	margin-bottom: 1rem;
}

.section__description {
	color: var(--text-color-light);
	line-height: 1.7;
}

/* === SERVICES SECTION === */
.services__grid {
	display: grid;
	gap: 2rem;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

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

.service-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.service-card__icon {
	display: inline-flex;
	justify-content: center;
	align-items: center;
	width: 60px;
	height: 60px;
	background-color: #ebf2ff; /* Light blue background */
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

.service-card__icon i {
	width: 32px;
	height: 32px;
	color: var(--primary-color);
}

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

.service-card__description {
	color: var(--text-color-light);
	line-height: 1.6;
	font-size: var(--small-font-size);
}

/* === ANIMATION STYLES === */
.animate-on-scroll {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* DESKTOP STYLES FOR SECTIONS */
@media screen and (min-width: 768px) {
	.section {
		padding: 7rem 0;
	}
}

/* === STAGES (TIMELINE) SECTION === */
.timeline {
	position: relative;
	max-width: 800px;
	margin: 2rem auto;
	padding: 2rem 0;
}

/* The vertical line */
.timeline::before {
	content: '';
	position: absolute;
	top: 0;
	left: 20px;
	height: 100%;
	width: 3px;
	background-color: var(--border-color);
}

.timeline__item {
	position: relative;
	margin-bottom: 3rem;
	padding-left: 55px; /* Space for the point and line */
}

.timeline__item:last-child {
	margin-bottom: 0;
}

.timeline__point {
	position: absolute;
	left: 0;
	top: -30px;
	width: 42px;
	height: 42px;
	background-color: var(--primary-color);
	color: #fff;
	border: 4px solid var(--background-color);
	border-radius: 50%;
	display: flex;
	justify-content: center;
	align-items: center;
	box-shadow: 0 0 0 3px var(--border-color);
	z-index: 1;
}

.timeline__point i {
	width: 20px;
	height: 20px;
}

.timeline__content {
	background-color: var(--background-color);
	border: 1px solid var(--border-color);
	padding: 1.5rem;
	border-radius: 12px;
}

.timeline__title {
	font-size: 1.25rem;
	margin-bottom: 0.5rem;
}

.timeline__description {
	color: var(--text-color-light);
	line-height: 1.6;
	font-size: var(--small-font-size);
}

/* === DESKTOP STYLES FOR TIMELINE === */
@media screen and (min-width: 768px) {
	.timeline::before {
		left: 50%;
		transform: translateX(-50%);
	}

	.timeline__item {
		width: 50%;
		padding-left: 0;
		padding-right: 40px; /* Space from the center line */
	}

	/* Position items on the right side */
	.timeline__item:nth-child(even) {
		left: 50%;
		padding-left: 40px;
		padding-right: 0;
	}

	.timeline__point {
		left: 50%;
		transform: translateX(-50%);
	}
}

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

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

.post-card:hover {
	transform: translateY(-8px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
}

.post-card__image-link {
	display: block;
	overflow: hidden;
}

.post-card__image {
	width: 100%;
	height: 220px;
	object-fit: cover;
	transition: transform 0.4s;
}

.post-card:hover .post-card__image {
	transform: scale(1.05);
}

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

.post-card__tag {
	display: inline-block;
	background-color: #ebf2ff;
	color: var(--primary-color);
	padding: 0.25rem 0.75rem;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	margin-bottom: 1rem;
	align-self: flex-start;
}

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

.post-card__title a {
	color: var(--text-color);
	transition: color 0.3s;
}

.post-card__title a:hover {
	color: var(--primary-color);
}

.post-card__excerpt {
	color: var(--text-color-light);
	line-height: 1.6;
	font-size: var(--small-font-size);
	margin-bottom: 1.5rem;
	flex-grow: 1;
}

.post-card__read-more {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--primary-color);
	font-weight: 600;
	transition: gap 0.3s;
}

.post-card__read-more:hover {
	gap: 0.75rem;
}

.post-card__read-more i {
	width: 18px;
	height: 18px;
}

/* === DESKTOP STYLES FOR BLOG === */
@media screen and (min-width: 768px) {
	.blog__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

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

/* === REVIEWS (SLIDER) SECTION === */
.slider {
	position: relative;
	max-width: 800px;
	margin: 0 auto;
	overflow: hidden;
}

.slider__wrapper {
	display: flex;
	transition: transform 0.5s ease-in-out;
}

.review-card {
	flex: 0 0 100%; /* Каждый слайд занимает 100% ширины контейнера */
	width: 100%;
	padding: 2rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	background-color: var(--background-color);
	border-radius: 12px;
}

.review-card__avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 1.5rem;
	border: 3px solid var(--border-color);
}

.review-card__text {
	font-size: 1.125rem;
	line-height: 1.7;
	font-style: italic;
	color: var(--text-color);
	margin-bottom: 2rem;
	max-width: 650px;
}

.review-card__name {
	display: block;
	font-weight: 600;
	font-family: var(--heading-font);
}

.review-card__title {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
}

/* Slider Navigation */
.slider__nav {
	display: flex;
	justify-content: center;
	gap: 1rem;
	margin-top: 2rem;
}

.slider__button {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--border-color);
	background-color: var(--background-color);
	color: var(--text-color);
	display: flex;
	justify-content: center;
	align-items: center;
	cursor: pointer;
	transition: background-color 0.3s, color 0.3s;
}

.slider__button:hover {
	background-color: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
}

.slider__button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background-color: var(--section-background);
}

/* On desktop, hide nav buttons and show them on hover of the slider */
@media screen and (min-width: 1024px) {
	.slider__button {
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		opacity: 0;
		transition: opacity 0.3s, background-color 0.3s, color 0.3s;
	}

	.slider:hover .slider__button {
		opacity: 1;
	}

	.slider__button--prev {
		left: -60px;
	}

	.slider__button--next {
		right: -60px;
	}

	.slider__nav {
		display: block; /* Override flexbox layout */
	}
}

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

.contact__content .section__header {
	text-align: left;
	margin: 0;
	max-width: none;
}

.form__group {
	margin-bottom: 1.5rem;
}

.form__label {
	display: block;
	font-weight: 500;
	margin-bottom: 0.5rem;
	font-size: var(--small-font-size);
}

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

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

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

.form__checkbox {
	margin-top: 0.15rem;
	width: 1.15em;
	height: 1.15em;
}

.form__checkbox-label {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
	line-height: 1.5;
}

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

.form__button {
	width: 100%;
	background-color: var(--primary-color);
	color: #fff;
	padding: 1rem 2.5rem;
	border-radius: 8px;
	font-weight: 600;
	font-family: var(--heading-font);
	border: none;
	cursor: pointer;
	transition: background-color 0.3s, transform 0.3s;
}

.form__button:hover {
	background-color: var(--primary-color-hover);
	transform: translateY(-3px);
}

/* Success Message */
.success-message {
	display: none; /* Скрыто по умолчанию */
	text-align: center;
	padding: 2rem;
	border: 1px solid #bee3be;
	background-color: #f0fff0;
	border-radius: 12px;
}

.success-message.is-visible {
	display: block; /* Показываем, когда нужно */
}

.success-message__icon {
	color: #38a169; /* Green color */
	margin-bottom: 1rem;
}

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

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

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

/* DESKTOP STYLES FOR CONTACT */
@media screen and (min-width: 992px) {
	.contact__container {
		grid-template-columns: 1fr 1fr;
		align-items: center;
	}
}

/* === COOKIE POP-UP === */
.cookie-popup {
	position: fixed;
	bottom: -100%; /* Initially hidden */
	left: 0;
	width: 100%;
	background-color: var(--text-color);
	color: #fff;
	padding: 1rem;
	box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
	z-index: 200;
	transition: bottom 0.5s ease-in-out;
}

.cookie-popup.is-visible {
	bottom: 0;
}

.cookie-popup__content {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	max-width: 1200px;
	margin: 0 auto;
}

.cookie-popup__text {
	font-size: var(--small-font-size);
	text-align: center;
}

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

.cookie-popup__button {
	background-color: var(--primary-color);
	color: #fff;
	padding: 0.5rem 1.5rem;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-weight: 500;
	white-space: nowrap;
	transition: background-color 0.3s;
}

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

@media screen and (min-width: 768px) {
	.cookie-popup {
		padding: 1.5rem;
	}
	.cookie-popup__content {
		flex-direction: row;
	}
	.cookie-popup__text {
		text-align: left;
	}
}

/* === STYLES FOR STATIC PAGES (PRIVACY, TERMS, ETC.) === */
.pages {
	padding: calc(var(--header-height) + 4rem) 0 4rem;
}

.pages .container {
	padding-inline: 16px;
	max-width: 800px; /* Ограничиваем ширину для лучшей читаемости */
	margin: 0 auto;
}

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

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

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

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

.pages li {
	margin-bottom: 1rem;
	line-height: 1.8;
	color: var(--text-color-light);
}

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

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

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