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

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

	/*========== Colors ==========*/
	--primary-color: #ff5733; /* Яркий оранжевый */
	--title-color: #0d1b2a; /* Темно-синий */
	--text-color: #415a77; /* Приглушенный синий */
	--text-color-light: #778da9; /* Серо-голубой */
	--body-color: #e0e1dd; /* Светло-серый */
	--container-color: #ffffff; /* Белый */

	/*========== Font and typography ==========*/
	--body-font: 'Manrope', sans-serif;
	--title-font: 'Roboto', sans-serif;
	--biggest-font-size: 2rem;
	--h1-font-size: 1.75rem;
	--h2-font-size: 1.25rem;
	--h3-font-size: 1rem;
	--normal-font-size: 0.938rem;
	--small-font-size: 0.813rem;
	--smaller-font-size: 0.75rem;

	/*========== Font weight ==========*/
	--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(--body-color);
	color: var(--text-color);
}

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

ul {
	list-style: none;
}

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

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

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

.main {
	overflow: hidden; /* For animations */
}

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

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

.logo {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--title-color);
	font-family: var(--title-font);
	font-weight: var(--font-bold);
	transition: color 0.3s;
}

.logo__icon {
	width: 28px;
	height: 28px;
	color: var(--primary-color);
}

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

.header__burger-btn {
	position: relative;
	z-index: 101;
	font-size: 1.25rem;
	color: var(--title-color);
	cursor: pointer;
	background: none;
	border: none;
}

/*=============== NAVIGATION ===============*/
@media screen and (max-width: 767px) {
	.nav {
		position: fixed;
		top: 0;
		right: -100%;
		width: 80%;
		height: 100%;
		background-color: #fff;
		box-shadow: -2px 0 12px hsla(0, 0%, 0%, 0.1);
		padding: 4rem 2rem 0;
		transition: right 0.4s ease-in-out;
		z-index: var(--z-fixed);
	}
}

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

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

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

.nav__link::after {
	content: '';
	position: absolute;
	bottom: -5px;
	left: 0;
	width: 0;
	height: 2px;
	background-color: var(--primary-color);
	transition: width 0.3s ease;
}

.nav__link:hover::after {
	width: 100%;
}

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

/* Add shadow to header on scroll */
.header--scroll {
	box-shadow: 0 1px 12px hsla(0, 0%, 0%, 0.1);
}

/*=============== FOOTER ===============*/
.footer {
	background-color: #fff;
	padding: 4rem 0 2rem;
}

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

.footer__column--about .logo {
	margin-bottom: 1rem;
}

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

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

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

.footer__link {
	transition: color 0.3s;
}

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

.footer__list--contact {
	gap: 1rem;
}

.footer__list--contact li {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

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

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

@media screen and (min-width: 767px) {
	.header__burger-btn {
		display: none;
	}
	.nav {
		all: unset; /* Reset mobile styles */
	}
	.nav__list {
		flex-direction: row;
		gap: 2.5rem;
	}
}

/* For large devices */
@media screen and (min-width: 1024px) {
	.container {
		padding: 0 1rem;
	}
	.footer__container {
		grid-template-columns: 1.5fr repeat(3, 1fr);
	}
}

/*=============== BUTTONS ===============*/
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background-color: var(--primary-color);
	color: #fff;
	padding: 1rem 1.75rem;
	border-radius: 0.5rem;
	font-weight: var(--font-medium);
	transition: all 0.4s;
	border: none;
	cursor: pointer;
}

.button:hover {
	background-color: #d94a28; /* Slightly darker orange */
	transform: translateY(-2px);
	box-shadow: 0 4px 15px hsla(12, 90%, 50%, 0.3);
}

.button i {
	transition: transform 0.3s ease;
}

.button:hover i {
	transform: translateX(4px);
}

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

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

.hero__title {
	font-size: 1.75rem;
	margin-bottom: 1.5rem;
	line-height: 1.2;
	font-family: var(--title-font);
	word-wrap: break-word; /* Правильный перенос слов */
	overflow-wrap: break-word; /* Дополнительная поддержка */
}

/* Анимация заголовка */
.hero__title span {
	display: inline-block;
	opacity: 0;
	transform: translateY(20px);
	animation: fadeInLetter 0.5s forwards;
	white-space: nowrap; /* Предотвращаем разрыв слов по буквам */
}

@keyframes fadeInLetter {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hero__description {
	font-size: var(--h3-font-size);
	line-height: 1.6;
	margin-bottom: 2.5rem;
	color: var(--text-color);
}

.hero__image-wrapper {
	position: relative;
	justify-self: center;
}

.hero__image {
	border-radius: 1rem;
	position: relative;
	z-index: 2;
}

.hero__image-bg {
	position: absolute;
	width: 100%;
	height: 100%;
	background-color: var(--text-color-light);
	top: -1rem;
	right: -1rem;
	border-radius: 1rem;
	z-index: 1;
	transition: transform 0.4s;
}

.hero__image-wrapper:hover .hero__image-bg {
	transform: translate(-0.5rem, -0.5rem);
}

/*=============== BREAKPOINTS (Hero) ===============*/
/* For medium devices */
@media screen and (min-width: 767px) {
	.hero__container {
		grid-template-columns: 1fr 1fr;
	}
	.hero__title {
		font-size: 2.5rem;
	}
}

/* For large devices */
@media screen and (min-width: 1024px) {
	:root {
		--biggest-font-size: 3rem;
	}
	.hero {
		min-height: 100vh;
		display: flex;
		align-items: center;
		padding-top: var(--header-height);
		padding-bottom: 0;
	}
	.hero__container {
		gap: 5rem;
	}
	.hero__title {
		font-size: 2.5rem;
	}
	.hero__image {
		width: 400px;
	}
}

/*=============== REUSABLE SECTION STYLES ===============*/
.section__header {
	text-align: center;
	margin-bottom: 3rem;
}

.section__title {
	font-size: var(--h1-font-size);
	margin-bottom: 0.75rem;
}

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

/*=============== FEATURES ===============*/
.features {
	padding: 4rem 0;
}

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

.features__card {
	background-color: var(--container-color);
	padding: 2.5rem 2rem;
	border-radius: 1rem;
	text-align: center;
	box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.05);
	transition: transform 0.3s, box-shadow 0.3s;
}

.features__card:hover {
	transform: translateY(-8px);
	box-shadow: 0 8px 20px hsla(0, 0%, 0%, 0.1);
}

.features__card-icon {
	display: inline-flex;
	padding: 1rem;
	background-color: hsla(12, 90%, 61%, 0.1); /* Light orange background */
	border-radius: 50%;
	margin-bottom: 1.5rem;
}

.features__card-icon i {
	width: 28px;
	height: 28px;
	color: var(--primary-color);
}

.features__card-title {
	font-size: var(--h2-font-size);
	margin-bottom: 0.5rem;
}

.features__card-description {
	line-height: 1.6;
}

/*=============== BREAKPOINTS (Features) ===============*/
/* For medium devices */
@media screen and (min-width: 576px) {
	.features__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* For large devices */
@media screen and (min-width: 992px) {
	.features {
		padding: 6rem 0;
	}
	.features__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}


/*=============== HOW IT WORKS ===============*/
.how-it-works {
    padding: 4rem 0;
    background-color: #fff; /* White background to contrast */
}

.how-it-works__container {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.how-it-works__steps {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* The connecting line */
.how-it-works__steps::before {
    content: '';
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    width: 2px;
    height: calc(100% - 3rem);
    background-color: var(--primary-color);
    opacity: 0.2;
}

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

.how-it-works__step-number {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    font-family: var(--title-font);
    color: var(--primary-color);
    background-color: #fff;
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    z-index: 2;
}

.how-it-works__step-title {
    font-size: var(--h2-font-size);
    margin-bottom: .5rem;
}

.how-it-works__step-description a {
    color: var(--primary-color);
    font-weight: var(--font-medium);
    text-decoration: underline;
}

.how-it-works__image-wrapper {
    justify-self: center;
}

.how-it-works__image {
    border-radius: 1rem;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.1);
}

/*=============== BREAKPOINTS (How It Works) ===============*/
@media screen and (min-width: 767px) {
    .how-it-works__container {
        grid-template-columns: 1fr 1fr;
    }
}

@media screen and (min-width: 1024px) {
    .how-it-works {
        padding: 6rem 0;
    }
    .how-it-works__container {
        gap: 5rem;
    }
}

/*=============== USE CASES (TABS) ===============*/
.use-cases {
    padding: 4rem 0;
}

.use-cases__tabs-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.use-cases__tab-button {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    border-radius: 2rem;
    border: 1px solid var(--text-color-light);
    background-color: transparent;
    color: var(--text-color);
    font-weight: var(--font-medium);
    cursor: pointer;
    transition: all .3s;
}

.use-cases__tab-button:hover {
    background-color: hsla(12, 90%, 61%, 0.1);
    border-color: var(--primary-color);
}

.use-cases__tab-button--active {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.use-cases__tab-content {
    display: none; /* Hidden by default */
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.use-cases__tab-content--active {
    display: grid; /* Show active tab */
    animation: fadeIn .5s;
}

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

.use-cases__content-title {
    font-size: var(--h1-font-size);
    margin-bottom: 1rem;
}

.use-cases__content-description {
    line-height: 1.7;
    margin-bottom: 2rem;
}

.use-cases__content-link {
    color: var(--primary-color);
    font-weight: var(--font-medium);
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    transition: gap .3s;
}

.use-cases__content-link:hover {
    gap: .75rem;
}

.use-cases__content-image-wrapper {
    justify-self: center;
}

.use-cases__content-image {
    border-radius: 1rem;
    max-width: 100%;
}

/*=============== BREAKPOINTS (Use Cases) ===============*/
@media screen and (min-width: 767px) {
    .use-cases__tab-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    .use-cases__content-text {
        order: 1; /* By default text is on the left */
    }
    
    /* Alternate image and text */
    .use-cases__tab-content[data-content="2"] .use-cases__content-text {
        order: 2;
    }
}

@media screen and (min-width: 1024px) {
    .use-cases {
        padding: 6rem 0;
    }
}

/*=============== FAQ (ACCORDION) ===============*/
.faq {
    padding: 4rem 0;
    background-color: #fff;
}

.faq__container {
    max-width: 768px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq__item {
    background-color: var(--body-color);
    border-radius: .5rem;
    border: 1px solid transparent;
    transition: border .3s;
}

.faq__item[open] {
    border-color: var(--primary-color);
}

.faq__question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    font-weight: var(--font-medium);
    color: var(--title-color);
    list-style: none; /* Remove default marker */
}

/* Remove default marker for Webkit browsers */
.faq__question::-webkit-details-marker {
  display: none;
}

.faq__icon {
    width: 20px;
    height: 20px;
    transition: transform 0.4s;
}

.faq__item[open] .faq__icon {
    transform: rotate(180deg);
}

.faq__answer {
    padding: 0 1.5rem 1.25rem 1.5rem;
    line-height: 1.6;
    overflow: hidden;
    animation: slideDown .3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/*=============== BREAKPOINTS (FAQ) ===============*/
@media screen and (min-width: 1024px) {
    .faq {
        padding: 6rem 0;
    }
}

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

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

.contact__content .section__title,
.contact__content .section__subtitle {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.contact__notice {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--text-color);
}

.contact__notice i {
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact__form-wrapper {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.1);
}

.contact__form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact__form-group {
    display: flex;
    flex-direction: column;
}

.contact__form-label {
    margin-bottom: .5rem;
    font-weight: var(--font-medium);
    color: var(--title-color);
}

.contact__form-input {
    width: 100%;
    padding: .9rem 1rem;
    border-radius: .5rem;
    border: 1px solid var(--text-color-light);
    background-color: var(--body-color);
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    transition: border-color .3s, box-shadow .3s;
}

.contact__form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px hsla(12, 90%, 61%, 0.2);
}

.contact__form-group--checkbox {
    flex-direction: row;
    align-items: flex-start;
    gap: .75rem;
}

.contact__form-checkbox {
    margin-top: 3px;
    width: 1em;
    height: 1em;
}

.contact__form-checkbox-label {
    font-size: var(--small-font-size);
    line-height: 1.5;
}

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

.contact__form-button {
    width: 100%;
}

.contact__form-message {
    display: none; /* Hidden by default */
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: .5rem;
    text-align: center;
    font-weight: var(--font-medium);
}

.contact__form-message--success {
    display: block; /* Shown via JS */
    background-color: hsl(142, 40%, 95%);
    color: hsl(142, 80%, 25%);
}

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

@media screen and (min-width: 1024px) {
    .contact {
        padding: 6rem 0;
    }
}

/*=============== COOKIE POPUP ===============*/
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden */
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 -4px 16px hsla(0, 0%, 0%, 0.1);
    padding: 1.5rem;
    z-index: var(--z-fixed);
    transition: bottom .5s ease-in-out;
}

.cookie-popup--show {
    bottom: 0;
}

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

.cookie-popup__text {
    color: var(--text-color);
}

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

.cookie-popup__button {
    padding: .75rem 1.5rem; /* Smaller button */
}


/*=============== STYLES FOR POLICY PAGES (privacy.html etc.) ===============*/
.pages {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
    background-color: #fff;
}

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

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

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

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

.pages .container a:hover {
    color: #d94a28;
}

.pages .container ul {
    list-style-type: disc;
    padding-left: 2rem;
}

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

/*=============== BREAKPOINTS (Cookie & Pages) ===============*/
@media screen and (min-width: 767px) {
    .cookie-popup__content {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media screen and (min-width: 1024px) {
    .pages {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}