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

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

	/*========== Colors ==========*/
	--primary-color: #0d1b2a;
	--secondary-color: #415a77;
	--background-color: #f4f4f9;
	--text-color: var(--primary-color);
	--text-color-light: #778da9;
	--accent-color: #ff6b6b;
	--border-color: #e0e1dd;
	--white-color: #ffffff;

	/*========== Font and typography ==========*/
	--body-font: 'Manrope', sans-serif;
	--h1-font-size: 2.25rem;
	--h2-font-size: 1.5rem;
	--h3-font-size: 1.25rem;
	--normal-font-size: 1rem;
	--small-font-size: 0.875rem;
	--smaller-font-size: 0.813rem;

	--font-medium: 500;
	--font-bold: 700;

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

/*=============== BASE ===============*/
* {
	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(--background-color);
	color: var(--text-color);
}

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

ul {
	list-style: none;
}

a {
	text-decoration: none;
}

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

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

/*=============== HEADER ===============*/
.header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	background-color: transparent;
	z-index: var(--z-fixed);
	transition: background-color 0.4s, box-shadow 0.4s;
}

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

.header__logo {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: var(--font-bold);
	color: var(--primary-color);
}

.header__logo-img {
	width: 28px;
	height: 28px;
}

.header__toggle {
	font-size: 1.25rem;
	cursor: pointer;
	color: var(--primary-color);
}

/* Nav (Mobile) */
@media screen and (max-width: 767px) {
	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		background-color: var(--background-color);
		width: 80%;
		height: 100%;
		box-shadow: -2px 0 12px hsla(228, 24%, 15%, 0.1);
		padding: 4rem 2rem 0;
		transition: right 0.4s;
	}
}

.nav__list {
	display: flex;
	flex-direction: column;
	row-gap: 2rem;
}

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

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

.nav__link--button {
	background-color: var(--accent-color);
	color: var(--white-color);
	padding: 0.5rem 1rem;
	border-radius: 0.25rem;
}

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

.nav__close {
	position: absolute;
	top: 1rem;
	right: 1.5rem;
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--primary-color);
}

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

/* Header scroll effect */
.header--scroll {
	background-color: var(--white-color);
	box-shadow: 0 2px 8px hsla(228, 24%, 15%, 0.1);
}

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

.footer__container {
	display: flex;
	flex-direction: column;
	gap: 3rem;
}

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

.footer__logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: var(--h3-font-size);
	font-weight: var(--font-bold);
	color: var(--primary-color);
	margin-bottom: 1rem;
}

.footer__logo-img {
	width: 28px;
}

.footer__description {
	color: var(--text-color-light);
	font-size: var(--small-font-size);
	max-width: 250px;
}

.footer__title {
	font-size: var(--h3-font-size);
	margin-bottom: 1rem;
}

.footer__links {
	display: grid;
	row-gap: 0.75rem;
}

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

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

.footer__contacts {
	display: grid;
	row-gap: 1rem;
}

.footer__contact-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	color: var(--text-color-light);
}

.footer__contact-item a {
	color: var(--text-color-light);
	transition: color 0.3s;
}
.footer__contact-item a:hover {
	color: var(--accent-color);
}
.footer__contact-icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 0.15rem;
}

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

/*=============== BREAKPOINTS ===============*/
/* For medium devices */
@media screen and (min-width: 768px) {
	.nav {
		display: block;
	}
	.nav__list {
		flex-direction: row;
		align-items: center;
		gap: 2.5rem;
	}
	.header__toggle,
	.nav__close {
		display: none;
	}
}

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

/* Добавить в конец файла */

/*=============== REUSABLE CSS CLASSES (дополнение) ===============*/
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background-color: var(--accent-color);
	color: var(--white-color);
	padding: 1rem 1.75rem;
	border-radius: 0.5rem;
	font-weight: var(--font-medium);
	transition: background-color 0.3s, transform 0.3s;
}

.button:hover {
	background-color: #ff5252; /* Slightly lighter accent */
	transform: translateY(-2px);
}

.button__icon {
	width: 20px;
	height: 20px;
}

/*=============== HERO ===============*/
.hero {
	position: relative;
	padding-top: calc(var(--header-height) + 4rem);
	padding-bottom: 4rem;
	overflow: hidden;
}

.hero__canvas {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: -1;
}

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

.hero__content {
	animation: fadeIn-up 0.8s ease-out 0.2s forwards;
	opacity: 0;
}

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

.hero__title {
	font-size: 1.5rem;
	margin-bottom: 1.5rem;
	line-height: 1.3;
}

.hero__description {
	font-size: var(--normal-font-size);
	color: var(--text-color-light);
	margin-bottom: 2.5rem;
	max-width: 500px;
	line-height: 1.6;
}

.hero__image-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
	animation: fadeIn 0.8s ease-out 0.4s forwards;
	opacity: 0;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

.hero__image {
	width: 300px;
	border-radius: 0.75rem;
}

/*=============== BREAKPOINTS (дополнение) ===============*/
/* For medium devices */
@media screen and (min-width: 768px) {
	.hero__container {
		grid-template-columns: 1fr 1fr;
	}
	.hero__title {
		font-size: 2rem;
	}
}

/* For large devices */
@media screen and (min-width: 1024px) {
	.hero {
		padding-top: calc(var(--header-height) + 5rem);
		padding-bottom: 5rem;
	}
	.hero__title {
		font-size: 2.5rem;
	}
	.hero__description {
		font-size: 1.125rem;
	}
	.hero__image {
		width: 450px;
	}
}

/* Добавить в конец файла */

/*=============== REUSABLE CSS CLASSES (дополнение) ===============*/
.section {
	padding: 5rem 0 3rem;
}

.section__header {
	text-align: center;
	margin-bottom: 3rem;
}

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

.section__subtitle {
	color: var(--text-color-light);
	max-width: 600px;
	margin: 0 auto;
	line-height: 1.6;
}

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

/*=============== SERVICES ===============*/
.services {
	background-color: var(--white-color);
}

.services__container {
	grid-template-columns: 1fr;
}

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

.services__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 24px hsla(228, 24%, 15%, 0.1);
}

.services__card-icon {
	color: var(--accent-color);
	margin-bottom: 1.5rem;
}

.services__card-icon i {
	width: 32px;
	height: 32px;
}

.services__card-title {
	font-size: var(--h3-font-size);
	margin-bottom: 1rem;
}

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

/*=============== BREAKPOINTS (дополнение) ===============*/
/* For medium devices */
@media screen and (min-width: 576px) {
	.services__container {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* For large devices */
@media screen and (min-width: 992px) {
	.section {
		padding: 6rem 0 4rem;
	}
	.section__title {
		font-size: 2rem;
	}
	.services__container {
		grid-template-columns: repeat(4, 1fr);
	}
}

/* Добавить в конец файла */

/*=============== ANIMATION ON SCROLL ===============*/
.reveal {
	opacity: 0;
	transform: translateY(30px);
	transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/*=============== CASES ===============*/
.cases__container {
	row-gap: 4rem;
}

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

.case__image-wrapper {
	position: relative;
	border-radius: 0.75rem;
	overflow: hidden;
	box-shadow: 0 4px 16px hsla(228, 24%, 15%, 0.1);
}

.case__image {
	display: block;
}

.case__tag {
	display: inline-block;
	background-color: var(--accent-color);
	color: var(--white-color);
	padding: 0.25rem 0.75rem;
	border-radius: 1rem;
	font-size: var(--small-font-size);
	font-weight: var(--font-medium);
	margin-bottom: 1rem;
}

.case__title {
	font-size: 1.4rem;
	margin-bottom: 1rem;
}

.case__description {
	color: var(--text-color-light);
	line-height: 1.7;
	margin-bottom: 1.5rem;
}

.case__tech {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.case__tech-item {
	background-color: var(--border-color);
	color: var(--secondary-color);
	padding: 0.25rem 0.75rem;
	border-radius: 0.25rem;
	font-size: var(--smaller-font-size);
	font-weight: var(--font-medium);
}

/*=============== BREAKPOINTS (дополнение) ===============*/
@media screen and (min-width: 768px) {
	.case {
		grid-template-columns: 1fr 1fr;
		gap: 3rem;
	}

	.case--reversed .case__image-wrapper {
		order: 2;
	}
}

/* Добавить в конец файла */

/*=============== APPROACH ===============*/
.approach {
	background-color: var(--white-color);
}

.approach__container {
	max-width: 768px;
	margin: 0 auto;
}

.accordion__item {
	border: 1px solid var(--border-color);
	border-radius: 0.5rem;
	margin-bottom: 1rem;
	background-color: var(--background-color);
	transition: background-color 0.3s;
}

.accordion__header {
	display: flex;
	align-items: center;
	padding: 1.5rem;
	cursor: pointer;
	gap: 1rem;
}

.accordion__icon {
	color: var(--accent-color);
	width: 24px;
	height: 24px;
	flex-shrink: 0;
}

.accordion__title {
	font-size: var(--h3-font-size);
	font-weight: var(--font-medium);
}

.accordion__toggle {
	margin-left: auto;
	transition: transform 0.4s;
}

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

.accordion__content {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.accordion__description {
	padding: 0 1.5rem 1.5rem calc(1.5rem + 24px + 1rem); /* Align with title */
	color: var(--text-color-light);
	line-height: 1.6;
	font-size: var(--small-font-size);
}

/* Accordion open state */
.accordion__item--open {
	background-color: var(--white-color);
}

.accordion__item--open .accordion__toggle {
	transform: rotate(180deg);
}

/* Добавить в конец файла */

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

.blog__container {
	grid-template-columns: 1fr;
}

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

.blog__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 24px hsla(228, 24%, 15%, 0.1);
}

.blog__card-image-wrapper {
	height: 200px;
	overflow: hidden;
}

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

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

.blog__card-category {
	color: var(--accent-color);
	font-size: var(--small-font-size);
	font-weight: var(--font-medium);
	margin-bottom: 0.75rem;
}

.blog__card-title {
	font-size: 1.15rem;
	margin-bottom: 1rem;
	flex-grow: 1;
}

.blog__card-link-title {
	color: var(--primary-color);
	transition: color 0.3s;
}

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

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

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

.blog__card-link-icon {
	width: 16px;
	height: 16px;
}

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

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

/* Добавить в конец файла */

/*=============== CONTACT ===============*/
.contact {
	background-color: var(--white-color);
}

.contact__container {
	grid-template-columns: 1fr;
	gap: 3rem;
}

.contact__info-title {
	font-size: var(--h3-font-size);
	margin-bottom: 1rem;
}

.contact__info-description {
	color: var(--text-color-light);
	margin-bottom: 2rem;
}

.contact__info-list {
	display: grid;
	gap: 1.5rem;
}

.contact__info-item {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
}

.contact__info-item a {
	color: var(--text-color);
}

.contact__info-icon {
	width: 24px;
	height: 24px;
	color: var(--accent-color);
	margin-top: 0.25rem;
}

/* Form Styles */
.contact__form {
	display: grid;
	gap: 1.5rem;
}

.form__group {
	display: grid;
	gap: 0.5rem;
}

.form__label {
	font-size: var(--small-font-size);
	font-weight: var(--font-medium);
	color: var(--primary-color);
}

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

.form__input:focus {
	border-color: var(--secondary-color);
	box-shadow: 0 0 0 2px hsla(219, 33%, 54%, 0.2);
}

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

.form__checkbox-input {
	width: 1rem;
	height: 1rem;
	margin-top: 0.25rem;
	accent-color: var(--accent-color);
}

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

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

.contact__form-button {
	width: 100%;
	justify-self: start;
	max-width: 200px;
}

.contact__form-message {
	font-size: var(--small-font-size);
	color: var(--primary-color);
	background-color: #d1e7dd; /* Success color */
	border: 1px solid #badbcc;
	padding: 1rem;
	border-radius: 0.5rem;
	text-align: center;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
}

.contact__form-message.is-visible {
	max-height: 100px;
	opacity: 1;
	padding: 1rem;
}

/*=============== BREAKPOINTS (дополнение) ===============*/
@media screen and (min-width: 768px) {
	.contact__container {
		grid-template-columns: 0.8fr 1fr;
	}
}

/* Добавить в конец файла */

/*=============== COOKIE POPUP ===============*/
.cookie-popup {
	position: fixed;
	bottom: 2rem;
	left: 2rem;
	right: 2rem;
	max-width: 500px;
	background-color: var(--white-color);
	padding: 1.5rem;
	border-radius: 0.75rem;
	box-shadow: 0 8px 24px hsla(228, 24%, 15%, 0.15);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	z-index: var(--z-fixed);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.5s, transform 0.5s;
	pointer-events: none;
}

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

.cookie-popup__text {
	font-size: var(--small-font-size);
	color: var(--text-color-light);
}

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

.cookie-popup__button {
	padding: 0.75rem 1.5rem;
	flex-shrink: 0;
}

@media screen and (max-width: 576px) {
	.cookie-popup {
		flex-direction: column;
		text-align: center;
		bottom: 1rem;
		left: 1rem;
		right: 1rem;
	}
}

/* Добавить в конец файла */

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

.pages .container {
	max-width: 800px;
}

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

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

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

.pages ul {
	list-style-position: inside;
	margin-bottom: 1rem;
}

.pages li {
	list-style-type: disc;
	margin-left: 1rem;
	margin-bottom: 0.75rem;
}

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

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

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