/* ==========================================================================
   1. СБРОС СТИЛЕЙ И ФИРМЕННЫЕ ПЕРЕМЕННЫЕ (Палитра на основе логотипа)
   ========================================================================== */
:root {
    /* Цвета, снятые точно с вашего логотипа logo.png */
    --color-primary: #001c3d;         /* Глубокий тёмно-синий (буквы Corporate) */
    --color-accent: #216070;          /* Фирменный бирюзовый (буква T и слово Hub) */
    --color-accent-hover: #16434f;    /* Более темный бирюзовый для ховеров кнопок */
    
    /* Нейтральные тона для баланса интерфейса */
    --color-text: #334155;            /* Аспидно-серый для основного текста */
    --color-text-light: #64748b;      /* Светло-серый для описаний */
    --color-bg-light: #f8fafc;        /* Фон для чередования секций */
    --color-white: #ffffff;
    
    /* Шрифты и сетка */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --container-width: 1200px;
    --transition: all 0.3s ease;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-family: var(--font-main);
    color: var(--color-primary);
    line-height: 1.5;
}

body {
    background-color: var(--color-white);
    overflow-x: hidden;
}

ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition); }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   2. БАЗОВЫЕ КОМПОНЕНТЫ (UI Elements)
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn--primary {
    background-color: var(--color-accent);
    color: var(--color-white);
    box-shadow: 0 4px 14px rgba(33, 96, 112, 0.25);
}

.btn--primary:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-1px);
}

.btn--secondary {
    background-color: transparent;
    color: var(--color-accent);
    border: 2px solid var(--color-accent);
}

.btn--secondary:hover {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px auto;
}

.section-title {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.section-subtitle {
    font-size: 15px;
    color: var(--color-text-light);
}

/* ==========================================================================
   3. ШАПКА САЙТА (Header с адаптивным логотипом и кнопкой WhatsApp)
   ========================================================================== */
.main-header {
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
    background-color: var(--color-white);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
}

.logo__img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

.main-nav { display: none; }
.header-contacts { display: flex; align-items: center; gap: 15px; }
.phone-link { font-weight: 600; font-size: 15px; }
.phone-link:hover { color: var(--color-accent); }

/* Кнопка-иконка WhatsApp в шапке (для мобильных) */
/* Кнопка WhatsApp в шапке */
.whatsapp-header-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff; /* Белый фон на мобильных, чтобы зеленый логотип выделялся */
    border: 1px solid #e2e8f0;  /* Легкая рамка для аккуратности */
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.whatsapp-header-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
}

.whatsapp-header-link .wa-img-icon {
    width: 24px;  /* Размер самой картинки внутри кружка */
    height: 24px;
    object-fit: contain;
    display: block;
}

.whatsapp-header-link .wa-text {
    display: none; /* Скрываем текст на мобильных */
}

/* На десктопах (от 992px) */
@media (min-width: 992px) {
    .whatsapp-header-link {
        background-color: transparent; /* Убираем круглую подложку */
        border: none;
        width: auto;
        height: auto;
        gap: 8px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .whatsapp-header-link:hover {
        background-color: transparent;
        box-shadow: none;
        transform: translateX(4px);
    }
    
    .whatsapp-header-link .wa-img-icon {
        width: 20px; /* Чуть уменьшаем иконку для баланса с текстом */
        height: 20px;
    }
    
    .whatsapp-header-link .wa-text {
        display: inline; /* Показываем текст рядом с иконкой */
        font-size: 15px;
        font-weight: 600;
        color: #25d366; /* Зеленый цвет текста в тон иконке */
    }
}

/* ==========================================================================
   4. БЛОК 1: HERO SECTION (Главный экран)
   ========================================================================== */
.hero { padding: 40px 0; }
.hero-container { display: flex; flex-direction: column; gap: 40px; }
.hero__subtitle { display: inline-block; font-size: 14px; font-weight: 700; text-transform: uppercase; color: var(--color-accent); letter-spacing: 1px; margin-bottom: 12px; }
.hero__title { font-size: 32px; font-weight: 800; line-height: 1.2; letter-spacing: -1px; margin-bottom: 16px; }
.text-highlight { color: var(--color-accent); }
.hero__description { font-size: 16px; color: var(--color-text-light); margin-bottom: 24px; }

.hero-benefits { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.hero-benefits__item { display: flex; align-items: center; gap: 10px; }
.hero-benefits__icon { color: var(--color-accent); font-weight: bold; }
.hero-benefits__text { font-size: 15px; color: var(--color-text); font-weight: 500; }

.hero-actions { display: flex; flex-direction: column; gap: 12px; }
.hero-actions__note { font-size: 13px; color: var(--color-text-light); }

.hero__placeholder-img {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #162a3f 0%, var(--color-primary) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.15);
    font-size: 24px;
    font-weight: 700;
}

/* ==========================================================================
   5. БЛОК 2: SOLUTIONS (Боли бизнеса и решения)
   ========================================================================== */
.solutions { padding: 60px 0; background-color: var(--color-bg-light); }
.solutions-grid { display: flex; flex-direction: column; gap: 24px; }
.solution-card { background-color: var(--color-white); padding: 30px; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05); transition: var(--transition); }
.solution-card:hover { transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08); }
.solution-card__badge { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; margin-bottom: 12px; letter-spacing: 0.5px; }
.solution-card__badge--problem { background-color: #fee2e2; color: #ef4444; }
.solution-card__badge--success { background-color: #e0f2fe; color: var(--color-accent); margin-top: 16px; }
.solution-card__title { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.solution-card__text { font-size: 14px; color: var(--color-text-light); line-height: 1.6; }
.solution-card__divider { height: 1px; background-color: #f1f5f9; margin: 20px 0 0 0; }
.solution-card__solution { font-size: 15px; color: var(--color-primary); line-height: 1.6; }

/* ==========================================================================
   6. БЛОК 3: SERVICES (Услуги)
   ========================================================================== */
.services { padding: 60px 0; background-color: var(--color-white); }
.services-grid { display: flex; flex-direction: column; gap: 24px; }
.service-card { padding: 30px; border: 1px solid #e2e8f0; border-radius: 12px; background-color: var(--color-white); transition: var(--transition); }
.service-card:hover { border-color: var(--color-accent); box-shadow: 0 10px 25px -5px rgba(33, 96, 112, 0.1); }
.service-card__icon-wrapper { width: 48px; height: 48px; background-color: #f0f7f9; color: var(--color-accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.service-card__icon { width: 24px; height: 24px; }
.service-card__title { font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.service-card__text { font-size: 14px; color: var(--color-text-light); line-height: 1.6; }

/* ==========================================================================
   7. БЛОК 4: STEPS (Схема работы с красивой сквозной линией)
   ========================================================================== */
.steps { padding: 60px 0; background-color: var(--color-bg-light); }

.steps-container { 
    display: flex; 
    flex-direction: column; 
    gap: 32px; 
    position: relative; 
}

/* Элемент шага */
.step-item { 
    display: flex; 
    gap: 20px; 
    align-items: flex-start; 
    position: relative; 
    z-index: 2;
    flex: 1;
}

/* Номера шагов */
.step-item__number { 
    font-size: 36px; 
    font-weight: 800; 
    color: rgba(33, 96, 112, 0.15); 
    line-height: 1; 
    font-variant-numeric: lining-nums; 
    transition: var(--transition); 
    background-color: var(--color-bg-light); 
    padding-right: 10px;
    display: inline-block;
}

.step-item:hover .step-item__number { 
    color: var(--color-accent); 
}

.step-item__title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.step-item__text { font-size: 14px; color: var(--color-text-light); line-height: 1.6; }

/* Удаляем псевдоэлементы старых линий */
.step-item::after,
.step-item:not(:last-child)::after {
    display: none !important;
}

/* ==========================================================================
   8. БЛОК 5: AUDIT CTA (Лид-магнит)
   ========================================================================== */
.audit-cta { padding: 60px 0; background-color: var(--color-white); }
.audit-card { background-color: var(--color-primary); color: var(--color-white); padding: 40px 20px; border-radius: 16px; display: flex; flex-direction: column; gap: 40px; box-shadow: 0 20px 40px -15px rgba(0, 28, 61, 0.3); }
.audit-card__tag { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--color-accent); letter-spacing: 1px; margin-bottom: 12px; }
.audit-card__title { font-size: 26px; font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.audit-card__text { font-size: 15px; color: #94a3b8; line-height: 1.6; margin-bottom: 24px; }
.audit-list { display: flex; flex-direction: column; gap: 10px; }
.audit-list__item { font-size: 14px; color: #cbd5e1; position: relative; padding-left: 20px; }
.audit-list__item::before { content: "•"; position: absolute; left: 0; color: var(--color-accent); font-weight: bold; }

.form__group { margin-bottom: 20px; }
.form__label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form__input { width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 6px; font-family: inherit; font-size: 15px; transition: var(--transition); }
.form__input:focus { outline: 2px solid var(--color-accent); border-color: transparent; }
.form__input--dark { background-color: #0b2849; border: 1px solid #1e3d60; color: var(--color-white); }
.form__input--dark::placeholder { color: #537193; }
.form__input--dark:focus { background-color: #0b2849; }
.form__textarea { resize: vertical; min-height: 80px; font-family: inherit; }
.audit-form__submit { width: 100%; }

/* ==========================================================================
   9. БЛОК 6: FAQ (Вопросы и ответы)
   ========================================================================== */
.faq { padding: 60px 0; background-color: var(--color-bg-light); }
.faq-accordion { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
.faq-item { background-color: var(--color-white); border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; transition: var(--transition); }
.faq-item__trigger { width: 100%; padding: 20px 24px; background: none; border: none; text-align: left; font-family: inherit; font-size: 16px; font-weight: 700; color: var(--color-primary); cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.faq-item__icon { position: relative; width: 16px; height: 16px; flex-shrink: 0; }
.faq-item__icon::before, .faq-item__icon::after { content: ''; position: absolute; background-color: var(--color-accent); transition: transform 0.3s ease; }
.faq-item__icon::before { top: 7px; left: 0; width: 16px; height: 2px; }
.faq-item__icon::after { top: 0; left: 7px; width: 2px; height: 16px; }
.faq-item__trigger[aria-expanded="true"] .faq-item__icon::after { transform: rotate(90deg); opacity: 0; }
.faq-item__trigger[aria-expanded="true"] .faq-item__icon::before { transform: rotate(180deg); }
.faq-item__content { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; padding: 0 24px; }
.faq-item__text { padding-bottom: 20px; font-size: 14px; color: var(--color-text); line-height: 1.6; }

/* ==========================================================================
   10. FOOTER & MODAL WINDOWS (Обновленный многоколоночный футер)
   ========================================================================== */
.main-footer {
    background-color: var(--color-primary); 
    color: #94a3b8;
    padding: 60px 0 0 0;
    font-size: 14px;
    border-top: 1px solid #1e3d60;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo__img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.footer-brand-name {
    color: var(--color-white);
    font-weight: 800;
    line-height: 1.1;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-description {
    line-height: 1.6;
    max-width: 300px;
}

.footer-title {
    color: var(--color-white);
    font-size: 16px;
    font-weight: 700;
    position: relative;
    padding-bottom: 8px;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--color-accent); 
}

.footer-links, .footer-contacts-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a:hover, .footer-contact-link:hover {
    color: var(--color-white);
    transform: translateX(4px);
}

.footer-contact-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-contact-link--wa {
    color: #25d366; 
}
.footer-contact-link--wa:hover {
    color: #4ae084 !important;
}

/* Нижняя полоса */
.footer-bottom {
    background-color: #00142c; 
    padding: 20px 0;
    border-top: 1px solid #102a45;
    font-size: 13px;
}

.footer-bottom-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

/* Стили модальных окон */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1000; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal--open { opacity: 1; pointer-events: all; }
.modal__overlay { position: absolute; width: 100%; height: 100%; background: rgba(0, 28, 61, 0.6); backdrop-filter: blur(4px); }
.modal__window { position: relative; background: var(--color-white); padding: 40px; border-radius: 12px; width: 100%; max-width: 450px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1); z-index: 1001; transform: translateY(-20px); transition: transform 0.3s ease; }
.modal--open .modal__window { transform: translateY(0); }
.modal__close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 30px; cursor: pointer; color: var(--color-text-light); }
.modal__title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.modal__subtitle { font-size: 14px; color: var(--color-text-light); margin-bottom: 24px; }
.form__submit { width: 100%; margin-top: 10px; }

/* ==========================================================================
   11. MEDIA QUERIES (Адаптация под Десктоп от 768px и 992px)
   ========================================================================== */
@media (min-width: 768px) {
    .services-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
    
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        gap: 20px;
    }
    .footer-col { flex: 1; }
    .footer-col--brand { flex: 1.5; }
    .footer-bottom-container { flex-direction: row; justify-content: space-between; text-align: left; }
}

@media (min-width: 992px) {
    .main-header { padding: 20px 0; }
    .logo__img { height: 52px; }

    .main-nav { display: block; }
    .nav-list { display: flex; gap: 30px; }
    .nav-list__link { font-size: 15px; font-weight: 500; color: var(--color-text-light); }
    .nav-list__link:hover { color: var(--color-accent); }
    
    .hero { padding: 80px 0; }
    .hero-container { grid-template-columns: 1.2fr 0.8fr; display: grid; align-items: center; gap: 60px; }
    .hero__title { font-size: 46px; }
    .hero__description { font-size: 18px; }
    .hero-actions { flex-direction: row; align-items: center; gap: 20px; }
    .hero__placeholder-img { height: 420px; }

    .solutions { padding: 100px 0; }
    .section-title { font-size: 38px; }
    .solutions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }

    .services { padding: 100px 0; }
    .services-grid { grid-template-columns: repeat(4, 1fr); gap: 30px; }

    /* Новая сквозная горизонтальная линия в Блоке 4 на Десктопе */
    .steps { padding: 100px 0; }
    
    .steps-container { 
        display: grid; 
        grid-template-columns: repeat(4, 1fr); 
        gap: 30px; 
    }
    
    /* Общая сквозная линия, проходящая под всеми цифрами сразу */
    .steps-container::before {
        content: '';
        position: absolute;
        top: 24px; 
        left: 20px;
        right: 20px;
        height: 2px;
        background-color: #e2e8f0;
        z-index: 1;
    }
    
    .step-item { 
        flex-direction: column; 
        gap: 16px; 
    }
    
    .step-item__number { 
        font-size: 48px; 
        position: relative; 
        z-index: 2; 
        background-color: var(--color-bg-light); 
        padding-right: 15px; 
    }

    .audit-cta { padding: 80px 0; }
    .audit-card { padding: 60px; grid-template-columns: 1.1fr 0.9fr; display: grid; gap: 60px; align-items: center; }
    .audit-card__title { font-size: 36px; }

    .faq { padding: 100px 0; }
    .faq-item__trigger { font-size: 18px; }

    /* Раскрытие текстовой ссылки WhatsApp на ПК */
    .whatsapp-header-link {
        background-color: transparent; 
        color: #25d366 !important; 
        width: auto;
        height: auto;
        gap: 8px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .whatsapp-header-link:hover {
        background-color: transparent;
        color: #20ba56 !important;
        transform: translateX(4px);
    }
    
    .whatsapp-header-link .wa-svg-icon {
        width: 20px; 
        height: 20px;
    }
    
    .whatsapp-header-link .wa-text {
        display: inline; 
        font-size: 15px;
        font-weight: 600;
    }
}