/* ======== GLOBAL STYLES (ETAP 0) ======== */

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

/* --- CSS Variables --- */
:root {
    --bg-color: #fdfdff;
    --text-color: #0d0c22;
    --primary-color: #5d5e8d;
    --secondary-color: #e0e0e0;
    --highlight-color: #4a47a3;
    --font-heading: 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

a:hover {
    color: var(--highlight-color);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======== HEADER STYLES (ETAP 1) ======== */
.header {
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--secondary-color);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
    background-color: rgba(253, 253, 255, 0.8);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}

.header__nav-list {
    display: flex;
    gap: 30px;
}

.header__nav-link {
    font-size: 16px;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

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

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

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

/* ======== FOOTER STYLES (ETAP 2) ======== */
.footer {
    background-color: #f1f1f5;
    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: 40px;
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 15px;
    display: inline-block;
}

.footer__description {
    font-size: 14px;
    color: #6c757d;
    max-width: 250px;
}

.footer__title {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer__list li {
    margin-bottom: 12px;
}

.footer__link, .footer__text {
    font-size: 15px;
    color: #6c757d;
}

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

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

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

.footer__bottom {
    border-top: 1px solid var(--secondary-color);
    text-align: center;
    padding: 20px 0;
    font-size: 14px;
    color: #6c757d;
}


/* --- Mobile-First: Responsive adjustments --- */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* JS будет управлять этим */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color);
        border-bottom: 1px solid var(--secondary-color);
    }

    .header__nav.is-active {
        display: block;
    }

    .header__nav-list {
        flex-direction: column;
        padding: 20px;
        align-items: center;
    }

    .header__toggle {
        display: block;
    }
    
    .footer__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer__column--main {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .footer__list--contact li {
       justify-content: center;
    }
}

/* ======== HERO SECTION STYLES (ETAP 3) ======== */
.hero {
    padding: 80px 0;
    min-height: calc(100vh - 85px); /* Высота экрана минус высота хедера */
    display: flex;
    align-items: center;
}

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

.hero__title {
    font-size: 48px;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero__subtitle {
    font-size: 18px;
    color: #6c757d;
    margin-bottom: 30px;
    max-width: 500px;
}

.button {
    display: inline-block;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 16px;
    color: #fff;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background-color: var(--highlight-color);
    color: #fff;
    transform: translateY(-3px);
}

.hero__image-wrapper {
    text-align: center;
}

.hero__image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* --- Responsive adjustments for Hero --- */
@media (max-width: 992px) {
    .hero__title {
        font-size: 40px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0;
        min-height: auto;
        text-align: center;
    }

    .hero__container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero__content {
        order: 2; /* Текст будет под картинкой на мобильных */
    }
    
    .hero__image-wrapper {
        order: 1;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}
/* ======== SCENARIOS SECTION STYLES ======== */
.scenarios {
    padding: 80px 0;
    background-color: #f7f7f9; /* Слегка отличный фон для выделения секции */
}

/* Общий стиль для заголовков секций */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-header__tagline {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--primary-color);
}

.section-header__title {
    font-size: 36px;
    margin-bottom: 15px;
}

.section-header__subtitle {
    font-size: 18px;
    color: #6c757d;
    line-height: 1.7;
}

/* Сетка карточек */
.scenarios__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.scenarios__card {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--secondary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

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

.scenarios__icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #eef0ff; /* Нежный фон для иконки */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.scenarios__icon-wrapper i {
    color: var(--highlight-color);
    width: 30px;
    height: 30px;
}

.scenarios__card-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.scenarios__card-description {
    font-size: 15px;
    color: #6c757d;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .scenarios {
        padding: 60px 0;
    }
    .section-header__title {
        font-size: 32px;
    }
    .section-header__subtitle {
        font-size: 16px;
    }
}

/* ======== TOOLS SECTION STYLES ======== */
.tools {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.tools__accordion {
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--secondary-color);
    border-radius: 12px;
    overflow: hidden; /* чтобы скруглить углы у дочерних элементов */
}

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

.tools__accordion-item:last-child {
    border-bottom: none;
}

.tools__accordion-header {
    width: 100%;
    padding: 20px 25px;
    background-color: var(--bg-color);
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-body);
    font-size: 18px;
    font-weight: 500;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.tools__accordion-header:hover {
    background-color: #f7f7f9;
}

.tools__accordion-icon {
    transition: transform 0.3s ease-in-out;
    flex-shrink: 0; /* предотвращает сжатие иконки */
}

.tools__accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    background-color: #f7f7f9;
}

.tools__accordion-content p {
    padding: 0 25px 20px 25px;
    font-size: 16px;
    color: #6c757d;
    line-height: 1.7;
    margin: 0;
}

/* Стили для активного состояния */
.tools__accordion-item.is-active .tools__accordion-header {
    background-color: #f7f7f9;
}

.tools__accordion-item.is-active .tools__accordion-icon {
    transform: rotate(180deg);
}

.tools__accordion-item.is-active .tools__accordion-content {
    max-height: 200px; /* Достаточная высота для контента */
}

/* ======== HOW-TO-START SECTION STYLES ======== */
.how-to-start {
    padding: 80px 0;
    background-color: #f7f7f9;
}

.how-to-start__steps-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.how-to-start__step {
    background-color: var(--bg-color);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden; /* Скрывает часть большой цифры */
    transition: border-color 0.3s ease;
}

.how-to-start__step:hover {
    border-color: var(--primary-color);
}

.how-to-start__step-number {
    position: absolute;
    top: -10px;
    right: 15px;
    font-family: var(--font-heading);
    font-size: 80px;
    font-weight: 700;
    color: var(--text-color);
    opacity: 0.05;
    z-index: 1;
    line-height: 1;
}

.how-to-start__icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #eef0ff;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.how-to-start__icon-wrapper i {
    color: var(--highlight-color);
    width: 30px;
    height: 30px;
}

.how-to-start__step-title {
    font-size: 20px;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.how-to-start__step-description {
    font-size: 15px;
    color: #6c757d;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}


/* --- Responsive adjustments for How-to-start --- */
@media (max-width: 992px) {
    .how-to-start__steps-wrapper {
        grid-template-columns: 1fr;
    }
}

/* ======== CONTACT SECTION STYLES ======== */
.contact {
    padding: 80px 0;
    background-color: var(--bg-color);
}

.contact__form-container {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid var(--secondary-color);
}

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

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 15px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--secondary-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: var(--font-body);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(93, 94, 141, 0.15);
}

.form-group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 25px;
}

.form-group--checkbox input[type="checkbox"] {
    margin-top: 4px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.form-group--checkbox label {
    font-size: 14px;
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 0;
}

.form-group--checkbox a {
    text-decoration: underline;
}

.contact__submit-button {
    width: 100%;
    padding: 15px;
    font-size: 18px;
}

.contact__success-message {
    display: none; /* Скрыто по умолчанию */
    text-align: center;
    padding: 40px;
}

.contact__success-message i {
    color: #28a745;
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.contact__success-message h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.contact__success-message p {
    font-size: 16px;
    color: #6c757d;
}

/* ======== COOKIE POPUP STYLES (ETAP 5) ======== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--text-color);
    color: var(--bg-color);
    padding: 20px 0;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup.is-visible {
    transform: translateY(0);
}

.cookie-popup__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-popup__text {
    margin: 0;
    font-size: 15px;
}

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

.cookie-popup__button {
    flex-shrink: 0; /* Чтобы кнопка не сжималась */
    background-color: var(--bg-color);
    color: var(--text-color);
}
.cookie-popup__button:hover {
    background-color: #e0e0e0;
    color: var(--text-color);
}


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

/* ======== GENERIC PAGES STYLES (privacy, terms, etc.) (ETAP 5) ======== */
.pages .container {
    max-width: 800px; /* Ограничиваем ширину для лучшей читабельности */
}

.pages h1 {
    font-size: 42px;
    margin-bottom: 30px;
}

.pages h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pages p, .pages li {
    font-size: 17px;
    line-height: 1.8;
    color: #343a40;
    margin-bottom: 20px;
}

.pages ul {
    list-style-type: disc;
    padding-left: 30px;
}

.pages a {
    text-decoration: underline;
    font-weight: 500;
}

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

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