/* css/style.css */

/* Базовые стили и сброс */
:root {
    --primary-color: #6a11cb; /* Пример фиолетового */
    --secondary-color: #2575fc; /* Пример синего */
    --text-color: #333;
    --bg-color: #fff;
    --bg-alt-color: #f8f9fa;
    --header-height: 70px; /* Высота шапки для отступа в JS */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth; /* Включаем плавную прокрутку средствами CSS */
    overflow-y: scroll; /* Всегда показывать скроллбар для предотвращения "прыжка" */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; color: var(--primary-color); text-align: center; margin-bottom: 2rem;}
h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    /* vertical-align: middle; - Удалено */
}

ul {
    list-style: none;
}

/* Контейнер для центрирования контента */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Секции */
.section {
    padding: 60px 0;
    /* Базовый отступ для ВСЕХ секций при скролле к ним по якорю (кроме JS-скролла) */
    scroll-margin-top: var(--header-height, 70px);
}

/* Чередующийся фон для нечетных секций (кроме Hero) */
main section:not(#hero):nth-child(odd) {
     background-color: var(--bg-alt-color);
}

/* Шапка (Header) */
#header {
    background-color: var(--bg-color);
    border-bottom: 1px solid #eee;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}
.logo:hover {
    text-decoration: none;
    color: var(--secondary-color);
}

.logo-icon {
    height: 50px; /* Увеличен размер лого */
    width: 50px;  /* Увеличен размер лого */
    display: block;
    flex-shrink: 0; /* Не сжимать иконку */
}

.nav-links {
    display: flex;
}

.nav-links li {
    margin-left: 25px;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease;
}
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-buttons {
    display: flex;
    align-items: center;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    margin-left: 10px;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); color: #fff; }
.btn-primary:hover { opacity: 0.9; color: #fff; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); }
.btn-secondary { background-color: transparent; color: var(--primary-color); border: 1px solid var(--primary-color); }
.btn-secondary:hover { background-color: var(--primary-color); color: #fff; }
.btn-large { padding: 15px 35px; font-size: 1.1rem; }

/* Кнопка мобильного меню */
.mobile-menu-button { display: none; background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--text-color); padding: 0; }

/* Секция Hero */
.hero-section {
    background-color: #e0e0f0;
    background-image: url('../images/hero-background.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    color: #fff;
    position: relative;
    z-index: 0;
    text-align: center;
    padding-top: calc(var(--header-height) + 80px);
    padding-bottom: 80px;
    min-height: 70vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}
.hero-section h1 { color: #fff; }
.hero-section p { font-size: 1.2rem; max-width: 600px; margin: 1rem auto 2rem auto; color: rgba(255, 255, 255, 0.9); }
.hero-section::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(15, 10, 40, 0.5); z-index: -1; }

/* Секция Преимущества (Features) */
.features-section {
     background-color: var(--bg-alt-color);
}
.features-section h2 {
    /* Отступ по умолчанию */
}
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; text-align: center; margin-top: 3rem; }
.feature-item img { width: 64px; height: 64px; margin: 0 auto 1rem auto; }
.feature-item h3 { color: var(--secondary-color); }

/* Секция Тарифы (Pricing) */
.pricing-section {
    /* Нет специфичного padding-top, т.к. отступ управляется margin у h2 */
}
.pricing-section h2 {
    /* Отступ по умолчанию */
}
.pricing-subtitle { text-align: center; margin-bottom: 3rem; color: #666; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; align-items: stretch; margin-bottom: 2rem; }
.pricing-card { background-color: #fff; border-radius: 12px; padding: 30px; box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05); border: 1px solid #e9ecef; text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; }
.pricing-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08); }
.pricing-card--highlighted { background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); color: #fff; border: none; transform: scale(1.05); z-index: 1; }
.pricing-card--highlighted:hover { transform: scale(1.05) translateY(-5px); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.card-duration { color: #6c757d; font-size: 0.9rem; }
.pricing-card--highlighted .card-duration { color: rgba(255, 255, 255, 0.8); }
.card-badge { background-color: var(--secondary-color); color: #fff; font-size: 0.75rem; font-weight: bold; padding: 3px 8px; border-radius: 5px; }
.pricing-card--highlighted .card-badge { background-color: rgba(255, 255, 255, 0.2); }
.card-price { font-size: 2.5rem; font-weight: bold; margin-bottom: 0.5rem; color: #212529; }
.pricing-card--highlighted .card-price { color: #fff; }
.price-unit { font-size: 1rem; font-weight: normal; color: #6c757d; }
 .pricing-card--highlighted .price-unit { color: rgba(255, 255, 255, 0.8); }
.card-price-original { color: #adb5bd; font-size: 0.9rem; height: 1.2em; margin-bottom: 1.5rem; }
.pricing-card--highlighted .card-price-original s { color: rgba(255, 255, 255, 0.7); text-decoration: line-through; }
.pricing-card:not(.pricing-card--highlighted) .card-price-original:not(:has(s)) { visibility: hidden; }
.card-description { color: #6c757d; font-size: 0.95rem; margin-bottom: 2rem; flex-grow: 1; }
 .pricing-card--highlighted .card-description { color: rgba(255, 255, 255, 0.9); }
.card-features { list-style: none; padding: 0; margin: 1.5rem 0 2rem 0; text-align: left; font-size: 0.9rem; flex-grow: 1; }
 .pricing-card--highlighted .card-features { color: #fff; }
.card-features li { margin-bottom: 0.8rem; display: flex; align-items: center; gap: 10px; }
.card-features img { width: 18px; height: 18px; opacity: 0.9; }
.card-button { width: 100%; padding: 12px 20px; font-weight: bold; margin-top: auto; }
.btn-outline { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline:hover { background-color: var(--primary-color); color: #fff; }
.btn-light { background-color: #fff; color: var(--primary-color); border: 2px solid #fff; }
 .btn-light:hover { background-color: rgba(255, 255, 255, 0.9); color: var(--primary-color); }
 .pricing-footer { text-align: center; margin-top: 2rem; font-size: 0.9rem; color: #6c757d; }

/* Секция "Как подключить" (How It Works) */
.how-it-works-section {
    /* фон наследуется, т.к. идет после нечетной секции pricing */
    padding-bottom: 25vh; /* Оставляем отступ снизу для скролла */
    text-align: center;
    /* !!! ДОБАВЛЕН ОТСТУП ПОСЛЕ СЕКЦИИ !!! */
    margin-bottom: 100px;
}
.steps-list { list-style: none; padding: 0; max-width: 600px; margin: 2rem auto; text-align: left; counter-reset: step-counter; }
.steps-list li { margin-bottom: 1.5rem; position: relative; padding-left: 50px; font-size: 1.1rem; }
.steps-list li span { counter-increment: step-counter; content: counter(step-counter); position: absolute; left: 0; top: 0; background-color: var(--primary-color); color: #fff; width: 35px; height: 35px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-weight: bold; font-size: 1rem; }

/* Секция Отзывы (Testimonials) */
.testimonials-section {
    background-color: var(--bg-color); /* Белый фон */
}

.testimonials-grid { margin-top: 3rem; display: flex; flex-direction: column; gap: 40px; }
.testimonial-card { display: flex; align-items: flex-start; gap: 20px; }
.testimonial-card--right { justify-content: flex-end; }
.testimonial-avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.testimonial-card--right .testimonial-avatar { order: 1; } /* Аватар справа */
.testimonial-card:not(.testimonial-card--right) .testimonial-avatar { order: -1; } /* Аватар слева */
.testimonial-bubble, .testimonial-bubble--right { background-color: #0d1a2e; color: #e0e0e0; padding: 20px 25px; border-radius: 15px; position: relative; max-width: 75%; }
/* Убираем хвостики */
.testimonial-bubble::before, .testimonial-bubble--right::after { display: none; }
.testimonial-author { font-weight: bold; color: var(--primary-color); margin-bottom: 0.5rem; font-size: 1.1rem; }
.testimonial-text { font-size: 0.95rem; line-height: 1.5; margin-bottom: 0.5rem; }
.testimonial-text:last-child { margin-bottom: 0; }

/* Секция FAQ (Часто Задаваемые Вопросы) */
.faq-section { background-color: var(--bg-alt-color); padding-bottom: 60px; }
.faq-list { max-width: 800px; margin: 3rem auto 0 auto; display: flex; flex-direction: column; gap: 15px; }
.faq-item { background-color: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); overflow: hidden; border: 1px solid transparent; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.faq-item.active { border-color: var(--primary-color); box-shadow: 0 4px 15px rgba(106, 17, 203, 0.1); } /* Выделение активного элемента */
.faq-question { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 18px 20px; background-color: transparent; border: none; cursor: pointer; text-align: left; font-size: 1.1rem; font-weight: 500; color: var(--text-color); transition: background-color 0.2s ease, color 0.2s ease, font-weight 0.2s ease; }
.faq-question:hover { background-color: #f1f3f5; }
.faq-item.active .faq-question { background-color: #f8f0ff; color: var(--primary-color); font-weight: 600; } /* Выделение активного вопроса */
.faq-icon { width: 20px; height: 20px; fill: var(--primary-color); transition: transform 0.3s ease; margin-left: 15px; flex-shrink: 0; }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-answer { padding: 0px 20px 20px 20px;
    font-size: 1rem; /* Увеличен размер */
    line-height: 1.6;
    color: #333; /* Сделан темнее */
    overflow: hidden; transition: max-height 0.4s ease-out, padding 0.4s ease-out, opacity 0.3s ease-out 0.1s; max-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; }
.faq-answer p { margin-bottom: 0.8rem; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-item.active .faq-answer { max-height: 500px; opacity: 1; padding-top: 10px; padding-bottom: 20px; }

/* Подвал (Footer) */
#footer {
    background-color: #190034; /* !!! ИЗМЕНЕНИЕ: Темно-синий фон !!! */
    color: #adb5bd;
    padding: 15px 0; /* !!! ИЗМЕНЕНИЕ: Уменьшены вертикальные отступы (делаем тоньше) !!! */
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    flex-grow: 1;
    text-align: left;
}
.footer-copyright p {
    margin-bottom: 0; /* Убираем отступ по умолчанию */
    font-size: 0.85rem;
    line-height: 1.4; /* Добавляем немного высоты строки */
}
 /* Небольшой отступ между строкой копирайта и строкой поддержки */
.footer-copyright p:first-child {
     margin-bottom: 5px;
}

.footer-support-link {
    color: #aaa; /* Стандартный цвет ссылок в подвале */
}
.footer-support-link:hover {
    color: #fff; /* Цвет при наведении */
    text-decoration: underline;
}

#footer p {
    margin-bottom: 0.8rem; /* Увеличим немного отступ между строками */
    font-size: 0.9rem; /* Можно чуть уменьшить текст копирайта/поддержки */
}
#footer a {
    color: #aaa;
    transition: color 0.2s ease;
}
#footer a:hover {
    color: #fff;
}

.footer-links {
    margin-bottom: 20px; /* Отступ под ссылками */
}

.footer-link {
    color: #bbb; /* Цвет ссылок */
    font-size: 0.9rem;
    text-decoration: none;
    margin: 0 10px; /* Отступы по бокам */
}
.footer-link:hover {
    color: #fff;
    text-decoration: underline;
}
.footer-link-separator {
    color: #666; /* Цвет разделителя */
    margin: 0 -5px; /* Уменьшаем лишние отступы вокруг разделителя */
}

/* Стили для блока иконок */
.footer-icons {
    display: flex;
    justify-content: center; /* Центрируем иконки */
    align-items: center;
    gap: 20px; /* Расстояние между иконками */
    margin-bottom: 25px; /* Отступ под иконками */
    flex-wrap: wrap; /* Перенос иконок на новую строку на мал. экранах */
}

.footer-icon {
    height: 28px; /* <<< Размер иконок (подстройте) */
    width: auto;   /* Авто-ширина для сохранения пропорций */
    opacity: 0.7;  /* Слегка прозрачные по умолчанию */
    transition: opacity 0.2s ease;
}
.footer-icon:hover {
    opacity: 1; /* Полная непрозрачность при наведении */
}


/* --- Адаптивность (Responsive Design) --- */
@media (max-width: 992px) { /* Планшеты и небольшие десктопы */
    h1 { font-size: 2.5rem; } h2 { font-size: 2rem; }
    .container { max-width: 90%; }
    .features-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
    .footer-container {
        flex-direction: column; /* Блоки друг под другом */
        gap: 15px; /* Отступ между блоками */
        text-align: center;
    }
    .footer-copyright,
    .footer-links,
    .footer-icons {
        width: 100%; /* Блоки на всю ширину */
        justify-content: center;
        text-align: center;
    }
    /* Копирайт */
    .footer-copyright {
        order: 3; /* Копирайт последним */
    }
    .footer-copyright p:first-child {
        margin-bottom: 5px; /* Небольшой отступ */
    }

    /* Ссылки */
    .footer-links {
        order: 1; /* Ссылки первыми */
        margin-bottom: 10px; /* Отступ под блоком ссылок */
        text-align: center; /* Центрируем текст */
    }
    .footer-link {
        display: block; /* Ссылка на всю строку */
        margin-bottom: 8px; /* Отступ между ссылками */
        white-space: normal; /* Разрешить перенос слов */
        font-size: 0.85rem;
        margin-left: 0;
        margin-right: 0;
    }
    .footer-link:last-child {
        margin-bottom: 0;
    }

    /* Иконки */
    .footer-icons {
        order: 2; /* Иконки между ссылками и копирайтом */
        gap: 15px;
    }
}

@media (max-width: 768px) { /* Мобильные устройства */
    h1 { font-size: 2.2rem; } h2 { font-size: 1.8rem; } p { font-size: 0.95rem; }
    /* Мобильное меню */
    #footer { padding: 10px 0; } /* Еще тоньше на совсем мобильных */
    .footer-copyright p,
    .footer-link {
        display: block; /* Делаем каждую ссылку блочной (на всю ширину) */
        margin-bottom: 8px; /* Отступ между ссылками */
        white-space: normal; /* Разрешаем перенос текста, если нужно */
        font-size: 0.85rem; /* Оставляем мобильный размер */
        /* Убираем горизонтальные margin, т.к. блок и так на всю ширину */
        margin-left: 0;
        margin-right: 0;
    }
    .footer-link:last-child {
        margin-bottom: 0;
    }
    .footer-icons { gap: 12px; }
    .footer-icon { height: 18px; }
    .footer-links {
        order: 1; /* Порядок оставляем */
        /* Убираем flex, элементы будут вести себя как блочные */
        /* display: flex; */
        /* flex-direction: column; */
        /* align-items: center; */
        /* gap: 8px; */
        margin-bottom: 10px; /* Добавляем отступ под блоком ссылок */
        text-align: center; /* Центрируем текст внутри блока */
    }
    .mobile-menu-button { display: block; z-index: 1001; position: relative; }
    .logo-icon { display: none; }
    .logo { gap: 0; }
    .nav-links { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: rgba(40, 30, 80, 0.98); backdrop-filter: blur(5px); z-index: 1000; opacity: 0; visibility: hidden; transform: translateX(-100%); transition: opacity 0.4s ease, visibility 0.4s ease, transform 0.4s ease; display: none; flex-direction: column; justify-content: center; align-items: center; padding: 20px; }
    .nav-links.active { display: flex; opacity: 1; visibility: visible; transform: translateX(0); }
    .nav-links li { margin: 15px 0; }
    .nav-links a { color: #fff; font-size: 1.5rem; font-weight: bold; padding: 10px; }
    .nav-links a::after { display: none; }
    .nav-links a:hover, .nav-links a.active { color: var(--secondary-color); }
    .nav-buttons { margin-left: auto; } /* Отодвигаем кнопки вправо */
    .nav-buttons .btn { padding: 8px 15px; font-size: 0.9rem; }
    #header nav { justify-content: space-between; }

    /* Адаптация секций */
    .hero-section { background-image: url('../images/hero-background-mobile.jpg'); padding-top: calc(var(--header-height) + 40px); padding-bottom: 40px; min-height: 50vh; }
    .hero-section h1 { margin-bottom: 0.8rem; }
    .hero-section p { font-size: 1rem; margin-bottom: 1.5rem; }
    .btn-large { padding: 12px 25px; font-size: 1rem; }
    .features-grid { grid-template-columns: 1fr; gap: 25px; }
    .feature-item { margin-bottom: 1rem; }
    .pricing-grid { grid-template-columns: 1fr; gap: 20px; }
    .pricing-card { min-height: auto; }
    .pricing-card--highlighted { transform: none; order: -1; }
    /* Адаптация отзывов */
    .testimonial-card, .testimonial-card--right { flex-direction: column; align-items: center; text-align: center; }
    .testimonial-avatar { width: 50px; height: 50px; margin-bottom: 10px; order: -1 !important; /* Аватар всегда сверху */ }
    .testimonial-bubble, .testimonial-bubble--right { max-width: 100%; border-radius: 15px !important; }
    .testimonial-bubble::before, .testimonial-bubble--right::after { display: none; }
    /* Адаптация FAQ */
    .faq-list { max-width: 100%; }
    .faq-question { font-size: 1rem; padding: 15px; }
    .faq-answer { padding: 0 15px 15px 15px; font-size: 0.9rem; color: #333; }
    .faq-item.active .faq-answer { padding-top: 10px; padding-bottom: 15px; }
    /* Адаптация секции "Как подключить" и отступа */
    .how-it-works-section {
         margin-bottom: 0; /* Убираем доп. отступ на мобильных */
         padding-top: 60px; /* Восстанавливаем стандартный отступ */
         padding-bottom: 15vh; /* Уменьшенный нижний отступ */
    }
    .steps-list { padding: 0 10px; }
    .steps-list li { padding-left: 45px; font-size: 1rem; }
    .steps-list li span { width: 30px; height: 30px; font-size: 0.9rem; }
}