/* ==================== 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: 4.5rem;

    /* Colors */
    --primary-color: #00f5a0;
    --background-color: #1a1a1a;
    --text-color: #f5f5f5;
    --container-color: #262626;
    --border-color: #444444;
    --text-color-light: #a3a3a3;

    /* Fonts and typography */
    --body-font: 'Inter', sans-serif;
    --title-font: 'Poppins', sans-serif;
    --biggest-font-size: 2.25rem;
    --h1-font-size: 1.75rem;
    --h2-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 & Paddings */
    --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 STYLES ==================== */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

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

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

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 1rem;
}

.section {
    padding: 6rem 0 2rem;
}

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

/* ==================== HEADER ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: var(--z-fixed);
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

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

.header__logo {
    font-family: var(--title-font);
    font-weight: var(--font-bold);
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s;
}

.header__logo:hover {
    color: var(--text-color);
}

.header__nav-list {
    display: flex;
    align-items: center;
    column-gap: 2.5rem;
}

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

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

.header__menu-button {
    display: none; /* Hide for now, will be used for mobile */
    background: none;
    border: none;
    color: var(--text-color);
    cursor: pointer;
}

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

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

.footer__logo {
    font-family: var(--title-font);
    font-weight: var(--font-bold);
    font-size: 1.5rem;
    color: var(--primary-color);
    display: inline-block;
    margin-bottom: var(--mb-0-5);
}

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

.footer__title {
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-1);
}

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

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

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

.footer__list--contacts li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

.footer__list--contacts i {
    color: var(--primary-color);
    width: 20px;
    height: 20px;
}

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

.footer__bottom-container {
    text-align: center;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* ==================== BUTTONS ==================== */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 1rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: var(--font-bold);
    font-family: var(--title-font);
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

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

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

.button:hover i {
    transform: translateX(0.25rem);
}


/* ==================== HERO ==================== */
.hero {
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

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

@media screen and (min-width: 768px) {
    .hero__container {
        grid-template-columns: 1.2fr 0.8fr;
    }
}

.hero__data {
    text-align: center;
}

@media screen and (min-width: 768px) {
    .hero__data {
        text-align: left;
    }
}

.hero__title {
    font-size: var(--biggest-font-size);
    font-weight: var(--font-bold);
    margin-bottom: var(--mb-1-5);
    line-height: 1.2;
    min-height: 115px; /* Резервируем место под 2 строки заголовка */
}

/* Эффект печатания */
.hero__title::after {
    content: '|';
    animation: blink-caret 0.75s step-end infinite;
    color: var(--primary-color);
    font-weight: 300;
}

@keyframes blink-caret {
    from, to { opacity: 1 }
    50% { opacity: 0 }
}

.hero__description {
    font-size: var(--h2-font-size);
    color: var(--text-color-light);
    margin-bottom: var(--mb-2);
    opacity: 0; /* Изначально скрыт */
    transform: translateY(10px); /* Изначально смещен */
    transition: opacity 0.5s ease 0.5s, transform 0.5s ease 0.5s; /* Плавное появление с задержкой */
}

.button {
    transform: translateY(10px); /* Изначально смещен */
    transition: opacity 0.5s ease 0.7s, transform 0.5s ease 0.7s; /* Плавное появление с большей задержкой */
}

/* Класс для отображения скрытых элементов */
.hero__data--loaded .hero__description,
.hero__data--loaded .button {
    opacity: 1;
    transform: translateY(0);
}

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

.hero__image {
    width: 280px;
    height: 280px;
    border-radius: 1.5rem;
    object-fit: cover;
    border: 3px solid var(--border-color);
    padding: 0.5rem;
}

@media screen and (min-width: 768px) {
    .hero__title {
        min-height: 135px;
    }
    .hero__image {
        width: 350px;
        height: 350px;
    }
}

@media screen and (min-width: 1024px) {
    .hero__title {
        font-size: 3.5rem;
        min-height: 170px;
    }
}

/* ==================== EXAMPLES ==================== */
.examples__container {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.examples__card {
    background-color: var(--container-color);
    padding: 2rem 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    /* Начальное состояние для анимации появления */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.examples__card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 8px 24px rgba(0, 245, 160, 0.1);
}

.examples__card-icon {
    display: inline-flex;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: var(--background-color);
    margin-bottom: var(--mb-1-5);
}

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

.examples__card-title {
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-0-5);
}

.examples__card-description {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* ==================== TOOLS ==================== */
.tools__container {
    display: grid;
    gap: 3rem;
}

@media screen and (min-width: 768px) {
    .tools__container {
        grid-template-columns: 0.7fr 1.3fr;
        gap: 4rem;
    }
}

.tools__tabs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tools__tab-button {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.75rem;
    cursor: pointer;
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--title-font);
    font-size: var(--normal-font-size);
    font-weight: var(--font-semibold);
    transition: background-color 0.3s, color 0.3s;
}

.tools__tab-button i {
    color: var(--text-color-light);
    transition: color 0.3s;
}

.tools__tab-button:hover,
.tools__tab-button--active {
    background-color: var(--primary-color);
    color: var(--background-color);
    border-color: var(--primary-color);
}

.tools__tab-button:hover i,
.tools__tab-button--active i {
    color: var(--background-color);
}

.tools__content-pane {
    display: none;
    animation: fadeIn 0.5s;
}

.tools__content-pane--active {
    display: grid;
    gap: 1.5rem;
}

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

.tools__item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.tools__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

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

.tools__item-title {
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-0-5);
}

.tools__item-description {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

/* ==================== REUSABLE CSS CLASSES (Addition) ==================== */
.section__subtitle {
    text-align: center;
    color: var(--text-color-light);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ==================== HOW IT WORKS ==================== */
.how-it-works__container {
    display: grid;
    gap: 3rem 1.5rem;
}

.how-it-works__step {
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    padding: 2rem 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    position: relative;

    /* Начальное состояние для анимации */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.how-it-works__step.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.how-it-works__icon {
    display: inline-flex;
    padding: 0.75rem;
    border-radius: 50%; /* Круглая иконка */
    background-color: var(--background-color);
    margin-bottom: var(--mb-1-5);
}

.how-it-works__icon i {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

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

.how-it-works__description {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

@media screen and (min-width: 768px) {
    .how-it-works__container {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .how-it-works__step:not(:last-child)::after {
        content: '';
        position: absolute;
        width: 60%;
        height: 2px;
        background-image: linear-gradient(to right, var(--border-color) 50%, transparent 50%);
        background-size: 10px 2px;
        background-repeat: repeat-x;
        top: 3.25rem; /* На уровне центра иконки */
        left: 100%;
        transform: translateX(-15%);
    }
}
/* ==================== FAQ ==================== */
.faq__container {
    max-width: 768px;
    display: grid;
    gap: 1rem;
}

.faq__item {
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    transition: padding 0.3s;
}

.faq__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
}

.faq__question {
    font-size: var(--normal-font-size);
    font-weight: var(--font-medium);
}

.faq__icon {
    transition: transform 0.4s;
    color: var(--primary-color);
}

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

.faq__answer {
    padding-top: 1rem;
    font-size: var(--small-font-size);
    color: var(--text-color-light);
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
}

/* Active state for accordion */
.faq__item.faq__item--active {
    padding-bottom: 1.5rem;
}

.faq__item.faq__item--active .faq__icon {
    transform: rotate(180deg);
}

.faq__item.faq__item--active .faq__content {
    max-height: 200px; /* Достаточно большое значение для любого контента */
}

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

@media screen and (min-width: 768px) {
    .contact__container {
        grid-template-columns: repeat(2, 1fr);
        align-items: flex-start;
    }
}

.contact__info-title {
    font-size: var(--h1-font-size);
    margin-bottom: var(--mb-1);
}
.contact__info-description {
    color: var(--text-color-light);
    margin-bottom: var(--mb-2);
}

.contact__info-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact__info-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: var(--font-medium);
}

.contact__info-list i {
    color: var(--primary-color);
}

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

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

.contact__form-label {
    margin-bottom: var(--mb-0-5);
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.contact__form-input {
    width: 100%;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
    background-color: var(--container-color);
    color: var(--text-color);
    font-size: var(--normal-font-size);
    outline: none;
    transition: border-color 0.3s;
}

.contact__form-input:focus {
    border-color: var(--primary-color);
}

.contact__form-group--captcha {
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    background-color: var(--container-color);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}
.contact__form-group--captcha .contact__form-input {
    width: 80px;
    padding: 0.5rem;
    text-align: center;
}

.contact__form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-size: var(--small-font-size);
}
.contact__form-group--checkbox label {
    color: var(--text-color-light);
}
.contact__form-group--checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact__message {
    font-size: var(--small-font-size);
    display: none; /* Hidden by default */
}
.contact__message.success {
    color: var(--primary-color);
}
.contact__message.error {
    color: #ff7675;
}

.contact__button {
    justify-self: start;
    width: 100%;
}
@media screen and (min-width: 576px) {
    .contact__button {
        width: auto;
    }
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    right: 2rem;
    max-width: 450px;
    background-color: var(--container-color);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    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.cookie-popup--active {
    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(--primary-color);
    text-decoration: underline;
}

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

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

/* ==================== STYLES FOR POLICY PAGES ==================== */
.pages {
    padding-top: calc(var(--header-height) + 4rem); /* Отступ от фиксированного хедера */
    padding-bottom: 4rem;
    min-height: 80vh;
}

.pages .container {
    max-width: 800px; /* Более узкий контейнер для лучшей читаемости */
}

.pages h1 {
    font-size: var(--biggest-font-size);
    margin-bottom: var(--mb-2);
}

.pages h2 {
    font-size: var(--h1-font-size);
    margin-top: 2.5rem;
    margin-bottom: var(--mb-1);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.pages p {
    margin-bottom: var(--mb-1-5);
    line-height: 1.7;
    color: var(--text-color-light);
}

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

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

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

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