/* ==========================================================================
   Global styles
   ========================================================================== */

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

:root {
    --background-color: #111827;
    --text-color: #E5E7EB;
    --primary-color: #2DD4BF;
    --secondary-color: #374151;
    --header-height: 70px;
    --font-main: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

ul {
    list-style: none;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #fff;
}

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

.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* ==========================================================================
   Header
   ========================================================================== */
.header {
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--secondary-color);
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

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

.header__logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

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

.header__nav-link {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding: 5px 0;
}

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

.header__nav-link:hover::after {
    width: 100%;
}

.header__nav-link--button {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.header__nav-link--button:hover {
    background-color: #fff;
    color: var(--background-color);
}

.header__nav-link--button::after {
    display: none;
}

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

/* Mobile styles for Header */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* Will be handled by JS */
    }
    .header__burger {
        display: block;
    }
}


/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: #0d121c;
    padding-top: 60px;
    border-top: 1px solid var(--secondary-color);
}

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

.footer__column--about {
    max-width: 300px;
}

.footer__logo {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    margin-bottom: 1rem;
}

.footer__description {
    color: #9CA3AF; /* A bit lighter gray for description */
    font-size: 14px;
}

.footer__heading {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.footer__list li {
    margin-bottom: 0.75rem;
}

.footer__link {
    color: #9CA3AF;
    font-size: 14px;
}

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

.footer__list--contacts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer__list--contacts .lucide {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    color: var(--primary-color);
}

.footer__text {
    color: #9CA3AF;
    font-size: 14px;
}

.footer__bottom {
    border-top: 1px solid var(--secondary-color);
    padding: 20px 0;
    text-align: center;
}

.footer__bottom p {
    font-size: 14px;
    color: #9CA3AF;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    min-height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.hero__container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 40px;
}

.hero__title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #fff;
    min-height: 115px; /* Резервируем место под заголовок */
}

/* Эффект печатающей машинки с мигающим курсором */
.hero__title::after {
    content: '|';
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    from, to { color: transparent; }
    50% { color: var(--primary-color); }
}

/* Плавное появление для контента после заголовка */
.hero__description, .hero__cta {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.hero__description.visible, .hero__cta.visible {
    opacity: 1;
    transform: translateY(0);
}


.hero__description {
    font-size: 18px;
    max-width: 500px;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.hero__cta {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero__cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(45, 212, 191, 0.2);
    color: var(--background-color);
}

.hero__image {
    border-radius: 12px;
    object-fit: cover;
}

/* Адаптивность для Hero */
@media (max-width: 992px) {
    .hero__title {
        font-size: 36px;
        min-height: 88px;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 40px 0;
        text-align: center;
    }
    .hero__container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    .hero__text-content {
        order: 2; /* Текст будет под картинкой */
    }
    .hero__visual-content {
        order: 1;
    }
    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ==========================================================================
   Shared Section Header
   ========================================================================== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-header__title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

.section-header__subtitle {
    font-size: 18px;
    color: var(--text-color);
    line-height: 1.7;
}


/* ==========================================================================
   Examples Section
   ========================================================================== */
.examples {
    padding: 80px 0;
}

.examples__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.examples__card {
    background-color: var(--secondary-color);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.examples__card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
}

.examples__card-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    border-radius: 8px;
    margin-bottom: 20px;
}

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

.examples__card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.examples__card-description {
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.6;
}

/* Адаптивность для заголовков и карточек */
@media (max-width: 768px) {
    .section-header__title {
        font-size: 30px;
    }
    .section-header__subtitle {
        font-size: 16px;
    }
    .examples {
        padding: 60px 0;
    }
}

/* ==========================================================================
   Tools Section
   ========================================================================== */
.tools {
    padding: 80px 0;
    background-color: #0d121c; /* Slightly different bg to create separation */
}

.tools__tabs-container {
    max-width: 800px;
    margin: 0 auto;
}

.tools__tabs-nav {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}

.tools__tab-button {
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 500;
    padding: 10px 20px;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.tools__tab-button:hover {
    background-color: #4B5563; /* Slightly lighter gray */
}

.tools__tab-button.is-active {
    background-color: var(--primary-color);
    color: var(--background-color);
    font-weight: 700;
}

.tools__tab-panel {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tools__tab-panel.is-active {
    display: block;
}

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

.tools__item {
    display: flex;
    align-items: center;
    gap: 20px;
    background-color: var(--secondary-color);
    padding: 20px;
    border-radius: 12px;
}

.tools__item:not(:last-child) {
    margin-bottom: 20px;
}

.tools__item-logo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.tools__item-content {
    flex-grow: 1;
}

.tools__item-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 5px;
}

.tools__item-description {
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.6;
}

.tools__item-link {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--background-color);
    border-radius: 50%;
    color: var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* ==========================================================================
   How It Works Section
   ========================================================================== */
.how-it-works {
    padding: 80px 0;
}

.how-it-works__steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

/* Соединительные линии между блоками */
.how-it-works__step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50px; /* На уровне центра иконок */
    right: -45px; /* Выходит за пределы блока */
    width: 50px;
    height: 2px;
    background-image: url("data:image/svg+xml,%3csvg width='100%25' height='100%25' xmlns='http://www.w3.org/2000/svg'%3e%3crect width='100%25' height='100%25' fill='none' stroke='%23374151' stroke-width='4' stroke-dasharray='6%2c 14' stroke-dashoffset='0' stroke-linecap='square'/%3e%3c/svg%3e");
    transform: translateY(-50%);
    z-index: -1;
}


.how-it-works__step {
    text-align: center;
    position: relative;
}

.how-it-works__step-icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 25px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--secondary-color);
    transition: border-color 0.3s ease;
}

.how-it-works__step:hover .how-it-works__step-icon-wrapper {
    border-color: var(--primary-color);
}

.how-it-works__step-icon-wrapper .lucide {
    width: 40px;
    height: 40px;
    color: var(--primary-color);
}

.how-it-works__step-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.how-it-works__step-description {
    font-size: 15px;
    color: var(--text-color);
    line-height: 1.6;
    max-width: 300px;
    margin: 0 auto;
}

/* Адаптивность для How It Works */
@media (max-width: 992px) {
    .how-it-works__step:not(:last-child)::after {
       display: none; /* Скрываем линии на планшетах и мобильных */
    }
     .how-it-works__steps-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq {
    padding: 80px 0;
}

.faq__accordion {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--secondary-color);
}

.faq__item {
    border-bottom: 1px solid var(--secondary-color);
}

.faq__question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: 500;
    color: #fff;
}

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

.faq__icon {
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--text-color);
}

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

.faq__answer p {
    padding-bottom: 0;
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.7;
    max-width: 720px;
}

/* Active state for accordion item */
.faq__item.is-active .faq__question {
    color: var(--primary-color);
}

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

.faq__item.is-active .faq__answer {
    max-height: 300px; /* Adjust if answers are longer */
    padding-bottom: 25px; /* Add padding only when open */
}

/* ==========================================================================
   Contact Section
   ========================================================================== */
.contact {
    padding: 80px 0;
    background-color: #0d121c;
}

.contact__wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
}

.contact__info-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #fff;
}

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

.contact__info-list {
    list-style: none;
    padding: 0;
}

.contact__info-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1rem;
}

.contact__info-list .lucide {
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact__info-list a {
    color: var(--text-color);
    font-size: 16px;
}
.contact__info-list a:hover {
    color: #fff;
}

.contact__form-container {
    background-color: var(--secondary-color);
    padding: 40px;
    border-radius: 12px;
}

.contact__form-group {
    margin-bottom: 20px;
}

.contact__form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color);
}

.contact__form-input {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--background-color);
    border: 1px solid #4B5563;
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-main);
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact__form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.2);
}

/* Custom Checkbox */
.contact__form-group--checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact__form-checkbox {
    display: none;
}

.contact__form-checkbox-label {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-color);
}

.contact__form-checkbox-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    background-color: var(--background-color);
    border: 1px solid #4B5563;
    border-radius: 4px;
}

.contact__form-checkbox-label::after {
    content: '\2713'; /* Checkmark character */
    position: absolute;
    left: 4px;
    top: 3px;
    font-size: 16px;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.contact__form-checkbox:checked + .contact__form-checkbox-label::after {
    opacity: 1;
}

.contact__form-checkbox-label a {
    text-decoration: underline;
}

.contact__form-submit {
    width: 100%;
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 10px;
}

.contact__form-submit:hover {
    background-color: #fff;
}

.contact__form-message {
    display: none; /* Hidden by default */
    text-align: center;
    padding: 20px;
}

.contact__form-message h4 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .contact__wrapper {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Cookie Pop-up
   ========================================================================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--secondary-color);
    border-top: 1px solid #4B5563;
    padding: 20px;
    z-index: 2000;
    transform: translateY(0);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup.is-hidden {
    transform: translateY(100%);
}

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

.cookie-popup__text {
    color: var(--text-color);
    font-size: 14px;
}

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

.cookie-popup__button {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.cookie-popup__button:hover {
    background-color: #fff;
}

@media (max-width: 768px) {
    .cookie-popup__content {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
}


/* ==========================================================================
   Policy & Text Pages (privacy.html, terms.html, etc.)
   ========================================================================== */
.pages {
    padding: 60px 0;
}

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

.pages h1, .pages h2 {
    color: #fff;
    font-weight: 700;
}

.pages h1 {
    font-size: 36px;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 1rem;
}

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

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

.pages a {
    text-decoration: underline;
}

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

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

.pages li {
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.pages strong {
    color: #fff;
    font-weight: 500;
}