/* ==========================================================================
   THEME VARIABLES (ЗМІННІ ТЕМ ОФОРМЛЕННЯ)
   ========================================================================== */
:root {
    /* Темна тема (За замовчуванням) */
    --bg-main: #0d1624;
    --bg-section: #0a111c;
    --bg-card: #121f32;
    --bg-input: #1a2a42;
    --text-main: #ffffff;
    --text-muted: rgba(255, 255, 255, 0.7);
    --text-sub: rgba(255, 255, 255, 0.4);
    --border-color: rgba(255, 255, 255, 0.05);
    --bg-control-btn: rgba(255, 255, 255, 0.05);

    /* Незмінні брендові кольори */
    --brand-orange: #ff7315;
    --brand-orange-hover: #ff812d;
}

[data-theme="light"] {
    /* Світла тема */
    --bg-main: #f4f6f9;
    --bg-section: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #eaeef3;
    --text-main: #1a2536;
    --text-muted: #4a5568;
    --text-sub: #718096;
    --border-color: rgba(0, 0, 0, 0.08);
    --bg-control-btn: rgba(0, 0, 0, 0.03);
}

/* --- Базові налаштування документу --- */
html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   BLOCK: HEADER (ШАПКА САЙТУ)
   ========================================================================== */
.header {
    width: 100%;
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.header-inner {
    display: table;
    width: 100%;
    height: 70px;
}

.logo-wrapper,
.nav-wrapper {
    display: table-cell;
    vertical-align: middle;
}

.nav-wrapper {
    text-align: right;
}

.nav-elements {
    display: inline-block;
    vertical-align: middle;
}

/* Убираем дефолтные стили ссылки для логотипа */
.logo-link {
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    outline: none;
}

/* Эффект легкого интерактива: при наведении логотип будет чуть-чуть ярче */
.logo-link:hover .logo-domain {
    color: #ffffff;
    /* .com становится чисто белым при наведении */
    transition: color 0.2s ease;
}

/* Логотип бренду */
.logo {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    text-align: left;
}

.logo .logo-brand {
    color: var(--brand-orange);
    text-transform: uppercase;
}

.logo .logo-domain {
    color: var(--text-main);
    text-transform: lowercase;
    font-weight: 600;
    transition: color 0.3s ease;
}

/* Навігаційне меню (Уплотненное для ноутбуков) */
.nav-menu {
    display: inline-block;
    list-style: none;
    margin-right: 15px;
    /* Сжали отступ от меню до кнопки входа */
    vertical-align: middle;
    padding: 0;
}

.nav-menu li {
    display: inline-block;
    margin-right: 14px;
    /* Уменьшили шаг между пунктами, чтобы всё влезло в линию */
}

.nav-menu li:last-child {
    margin-right: 0;
}

.nav-menu a {
    font-size: 13px;
    /* Уменьшили шрифт на 1px — визуально незаметно, но спасает верстку */
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
    /* Запрещаем пунктам переноситься на две строчки */
}

.nav-menu a:hover {
    color: var(--brand-orange);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--brand-orange);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* Кнопка авторизації */
.btn-login {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    border: 1px solid var(--brand-orange);
    border-radius: 4px;
    margin-right: 20px;
    vertical-align: middle;
    background: transparent;
}

.btn-login:hover {
    background-color: var(--brand-orange);
    color: #ffffff;
}

/* Контейнер для кнопок налаштувань (Тема + Мова) */
.controls-group {
    display: inline-block;
    vertical-align: middle;
    background-color: var(--bg-control-btn);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px;
}

.theme-switcher,
.lang-switcher {
    display: inline-block;
    vertical-align: middle;
}

/* Кнопки теми та мов */
.theme-btn,
.lang-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.2s ease;
    outline: none;
}

.theme-btn:hover,
.lang-btn:hover {
    color: var(--text-main);
}

.lang-btn.active {
    background-color: var(--brand-orange);
    color: #ffffff;
}

/* ==========================================================================
   BLOCK: HERO SECTION (ПЕРВЫЙ ЭКРАН)
   ========================================================================== */
.hero-section {
    position: relative;
    padding: 160px 0 120px 0;
    min-height: 100vh;
    display: table;
    width: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(13, 22, 36, 0.2) 0%, var(--bg-main) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    display: table-cell;
    vertical-align: middle;
}

.hero-content h1 {
    font-size: 44px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
    color: #ffffff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.85);
    max-width: 720px;
    margin: 0 auto 45px auto;
    font-weight: 400;
    line-height: 1.6;
}

.cta-group {
    position: relative;
    display: inline-block;
}

.cta-group::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 110%;
    height: 110%;
    background: var(--brand-orange);
    border-radius: 4px;
    opacity: 0.15;
    filter: blur(15px);
    z-index: 0;
    animation: pulseGlow 3s infinite alternate;
    pointer-events: none;
}

.btn-primary {
    display: inline-block;
    background-color: var(--brand-orange);
    color: #ffffff;
    padding: 16px 45px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(255, 115, 21, 0.35);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    z-index: 1;
}

.btn-primary:hover {
    background-color: var(--brand-orange-hover);
    box-shadow: 0 8px 30px rgba(255, 115, 21, 0.5);
    transform: translateY(-2px);
}

@keyframes pulseGlow {
    0% {
        opacity: 0.1;
        filter: blur(10px);
    }

    100% {
        opacity: 0.25;
        filter: blur(20px);
    }
}

/* ==========================================================================
   BLOCK: MISSION SECTION (МІСІЯ ПРОЄКТУ)
   ========================================================================== */
.mission-section {
    padding: 100px 0;
    background-color: var(--bg-main);
    text-align: center;
    transition: background-color 0.3s ease;
}

/* --- Универсальные заголовки секций с левым выравниванием --- */
.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
    text-align: left;
    /* Сдвигаем все главные заголовки влево */
    color: var(--text-main);
}

.section-subtitle {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0 0 50px 0;
    /* Убрали 'margin: 0 auto', чтобы подзаголовок не центрировался, и задали отступ снизу */
    text-align: left;
    /* Сдвигаем все подзаголовки влево */
    font-weight: 400;
    line-height: 1.6;
}

.mission-grid {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 25px 0;
}

.mission-card {
    display: table-cell;
    width: 33.333%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px 30px;
    text-align: left;
    vertical-align: top;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.mission-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-main);
}

.mission-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
}

.mission-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-orange);
    box-shadow: 0 15px 35px rgba(255, 115, 21, 0.08);
}

.mission-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 115, 21, 0.06);
    border: 1px solid rgba(255, 115, 21, 0.15);
    border-radius: 50%;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mission-icon svg {
    width: 26px;
    height: 26px;
    color: rgba(255, 115, 21, 0.75);
    transition: all 0.3s ease;
}

.mission-card:hover .mission-icon {
    background-color: rgba(255, 115, 21, 0.15);
    border-color: var(--brand-orange);
    transform: scale(1.05);
}

.mission-card:hover .mission-icon svg {
    color: var(--brand-orange);
    filter: drop-shadow(0 0 8px rgba(255, 115, 21, 0.6));
}

/* ==========================================================================
   BLOCK: FEATURES & CONTACT (МАРКЕТИНГОВІ БЛОКИ ТА ФОРМА)
   ========================================================================== */
.features {
    position: relative;
    z-index: 3;
    margin-top: 40px;
    padding-bottom: 80px;
}

.features-table {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 20px 0;
}

.feature-card {
    display: table-cell;
    width: 33.333%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 35px 30px;
    text-align: center;
    vertical-align: top;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.feature-card h2 {
    font-size: 46px;
    color: var(--brand-orange);
    font-weight: 700;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ==========================================================================
   BLOCK: CONTACT & LEAD CAPTURE (КОМПАКТНЫЙ С 4 ПЛАШКАМИ И SVG)
   ========================================================================== */
.contact-section {
    padding: 50px 0;
    /* Минимальные отступы, чтобы блок гарантированно влезал */
    background-color: var(--bg-section);
    border-top: 1px solid var(--border-color);
    transition: background-color 0.3s ease;
}

.contact-container {
    display: flex;
    gap: 40px;
    align-items: stretch;
    /* Растягивает обе колонки в один уровень по высоте */
}

/* --- Левая колонка --- */
.contact-info-block {
    flex: 1.1;
    text-align: left;
}

.contact-info-block h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    letter-spacing: -0.3px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Ультра-компактный зазор между четырьмя плашками */
}

/* Интерактивные плашки контактов */
.contact-link-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 18px;
    /* Ужали высоту плашек */
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Квадратные контейнеры под SVG-иконки */
.contact-icon-box {
    width: 34px;
    height: 34px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Стилизация SVG внутри квадратов */
.contact-icon-box svg {
    width: 18px;
    height: 18px;
    color: var(--text-sub);
    /* Базовый цвет иконок */
    transition: color 0.2s ease;
}

.contact-text-box {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact-label {
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-sub);
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
    transition: color 0.2s ease;
}

/* --- Эффекты ховера и подсветки брендовых цветов SVG --- */
.contact-link-item:hover {
    transform: translateX(4px);
}

/* Телефон (Оранжевый) */
.phone-link:hover {
    border-color: var(--brand-orange);
}

.phone-link:hover .contact-value {
    color: var(--brand-orange);
}

.phone-link:hover .contact-icon-box svg {
    color: var(--brand-orange);
}

/* Telegram (Синий) */
.tg-link:hover {
    border-color: #0088cc;
}

.tg-link:hover .contact-value {
    color: #0088cc;
}

.tg-link:hover .contact-icon-box svg {
    color: #0088cc;
}

/* Viber (Фиолетовый) */
.viber-link:hover {
    border-color: #7360f2;
}

.viber-link:hover .contact-value {
    color: #7360f2;
}

.viber-link:hover .contact-icon-box svg {
    color: #7360f2;
}

/* Почта (Зеленый) */
.email-link:hover {
    border-color: #28a745;
}

.email-link:hover .contact-value {
    color: #28a745;
}

.email-link:hover .contact-icon-box svg {
    color: #28a745;
}


/* --- Правая колонка: Форма захвата --- */
.form-wrapper {
    flex: 1;
    max-width: 450px;
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Центрирует поля, чтобы высота совпадала с контактами */
}

.form-group {
    margin-bottom: 14px;
    text-align: left;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-main);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--brand-orange);
    background-color: var(--bg-card);
}

textarea.form-input {
    resize: vertical;
    /* Разрешаем растягивать форму только по вертикали (вниз) */
    min-height: 80px;
    /* Стабильная минимальная высота */
    max-height: 150px;
    /* Ограничение, чтобы форма не улетела за пределы карточки */
    font-family: inherit;
    /* Наследуем системный шрифт сайта, а не дефолтный браузерный */
}

.btn-submit {
    width: 100%;
    background-color: var(--brand-orange);
    color: #ffffff;
    border: none;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 115, 21, 0.15);
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background-color: var(--brand-orange-hover);
}


/* --- Адаптив --- */
@media (max-width: 992px) {
    .contact-container {
        flex-direction: column;
        gap: 30px;
    }

    .form-wrapper {
        max-width: 100%;
        width: 100%;
        padding: 25px 20px;
    }
}

.footer {
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-sub);
    text-align: center;
}

/* ==========================================================================
   BLOCK: RESPONSIVE (АДАПТИВНІСТЬ)
   ========================================================================== */
@media (max-width: 768px) {
    .header-inner {
        display: block;
        height: auto;
        padding: 15px 0;
        text-align: center;
    }

    .logo-wrapper,
    .nav-wrapper {
        display: block;
        text-align: center;
        width: 100%;
    }

    .logo {
        margin-bottom: 15px;
        text-align: center;
    }

    .nav-menu {
        display: block;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .nav-menu li {
        margin: 0 10px;
    }

    .btn-login {
        margin-right: 0;
        margin-bottom: 15px;
        display: inline-block;
    }

    .controls-group {
        display: inline-block;
        margin-top: 5px;
    }

    .hero-content h1 {
        font-size: 30px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .mission-grid,
    .features-table {
        display: block;
    }

    .mission-card,
    .feature-card {
        display: block;
        width: 100%;
        margin-bottom: 20px;
        border-spacing: 0;
    }

    .form-wrapper {
        padding: 25px 20px;
    }
}

/* ==========================================================================
   BLOCK: EFFICIENCY SECTION (ЕФЕКТИВНІСТЬ БІЗНЕСУ)
   ========================================================================== */
.features-section {
    position: relative;
    z-index: 3;
    padding: 100px 0;
    /* Выравниваем паддинги, чтобы блок дышал так же, как миссия */
    background-color: var(--bg-main);
    text-align: center;
    /* Центрируем заголовки */
    transition: background-color 0.3s ease;
}

.features-table {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 25px 0;
}

.feature-card {
    display: table-cell;
    width: 33.333%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 50px 35px;
    text-align: center;
    vertical-align: middle;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* Эффект «живой» карточки при наведении */
.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--brand-orange);
    box-shadow: 0 20px 40px rgba(255, 115, 21, 0.08);
}

.feature-card h2 {
    font-size: 54px;
    /* Сделали чуть крупнее и солиднее */
    color: var(--brand-orange);
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
    /* Предотвращает дергание текста при анимации */
}

.feature-card p {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.5;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .features-section {
        padding: 60px 0 40px 0;
    }

    .features-table {
        display: block;
    }

    .feature-card {
        display: block;
        width: 100%;
        margin-bottom: 25px;
        padding: 40px 25px;
    }
}

/* ==========================================================================
   BLOCK: HARDWARE SECTION (ПІДТРИМУВАНЕ ОБЛАДНАННЯ)
   ========================================================================== */
.hardware-section {
    position: relative;
    z-index: 3;
    padding: 100px 0;
    background-color: var(--bg-main);
}

.hardware-grid {
    display: flex;
    gap: 25px;
    margin-bottom: 50px;
}

/* Общая карточка */
.hw-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 40px;
    position: relative;
    transition: all 0.3s ease;
}

/* Стилизация Teltonika (Фокус) */
.hw-main-focus {
    flex: 1.3;
    /* Занимает больше места */
    border-color: rgba(255, 115, 21, 0.3);
    box-shadow: 0 10px 30px rgba(255, 115, 21, 0.03);
}

.hw-main-focus:hover {
    border-color: var(--brand-orange);
    box-shadow: 0 15px 35px rgba(255, 115, 21, 0.08);
}

.hw-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: rgba(255, 115, 21, 0.1);
    color: var(--brand-orange);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

/* Стилизация Cargo и Bitrek */
.hw-secondary-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.hw-secondary {
    padding: 25px 35px;
}

.hw-secondary:hover {
    border-color: var(--text-muted);
}

/* Шрифты внутри карточек оборудования */
.hw-brand-name {
    font-size: 28px;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.hw-main-focus .hw-brand-name {
    font-size: 36px;
    color: var(--brand-orange);
    /* Выделяем цветом главный бренд */
}

.hw-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Баннер Интернет-магазина --- */
.shop-banner {
    background: linear-gradient(135deg, #16222f 0%, #0d1620 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 45px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.shop-banner h3 {
    font-size: 24px;
    color: #ffffff;
    font-weight: 700;
    margin-bottom: 12px;
}

.shop-banner p {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 700px;
    margin: 0 auto 25px auto;
    line-height: 1.5;
}

/* Кнопка магазина */
.btn-shop {
    display: inline-block;
    background-color: transparent;
    color: var(--brand-orange);
    border: 2px solid var(--brand-orange);
    padding: 14px 35px;
    font-weight: 700;
    font-size: 15px;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-shop:hover {
    background-color: var(--brand-orange);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(255, 115, 21, 0.25);
    transform: translateY(-2px);
}

/* Адаптивность */
@media (max-width: 992px) {
    .hardware-grid {
        flex-direction: column;
    }

    .shop-banner {
        padding: 30px;
    }
}

/* --- Сетка в один горизонтальный ряд --- */
.hardware-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: stretch;
    /* Карточки будут одинаковой высоты независимо от текста */
}

/* ==========================================================================
   BLOCK: HARDWARE SECTION (КОМПАКТНАЯ СЕТКА ОБОРУДОВАНИЯ)
   ========================================================================== */
.hardware-section {
    position: relative;
    z-index: 3;
    padding: 60px 0;
    /* Уменьшили внешние отступы секции, чтобы поджать её в экран */
    background-color: var(--bg-main);
}

/* Сетка в один горизонтальный ряд */
.hardware-grid {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    /* Сжали отступ до баннера магазина */
    align-items: stretch;
    /* Карточки строго одной высоты */
}

/* Общие правила для всех карточек оборудования */
.hw-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px 25px;
    /* Сжали паддинги для максимальной компактности */
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* Teltonika — занимает 1.5 части пространства */
.hw-main-focus {
    flex: 1.5;
    border-color: rgba(255, 115, 21, 0.25);
    box-shadow: 0 10px 30px rgba(255, 115, 21, 0.02);
}

.hw-main-focus:hover {
    border-color: var(--brand-orange);
    box-shadow: 0 15px 35px rgba(255, 115, 21, 0.06);
}

/* Bitrek и Cargo — занимают по 1 части пространства */
.hw-secondary {
    flex: 1;
}

.hw-secondary:hover {
    border-color: var(--brand-orange);
}

/* Контейнеры логотипов (Идеальное вертикальное центрирование) */
.hw-logo-wrap {
    display: flex;
    align-items: center;
    /* Центруем картинку по вертикали */
    justify-content: flex-start;
    margin-bottom: 15px;
    height: 35px;
    /* Сжали высоту контейнера, чтобы убрать лишний воздух */
}

/* Ограничиваем ширину контейнера лидера, чтобы не спорить с бейджем */
.logo-teltonika {
    height: 42px;
    /* Компактный размер для Teltonika */
    max-width: 60%;
    /* Защита от наезда на бейдж */
}

.hw-brand-img {
    max-height: 100%;
    /* Картинка никогда не вылезет за рамки 35px/42px */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.hw-card:hover .hw-brand-img {
    opacity: 1;
}

/* Текст описания оборудования */
.hw-card p {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
    flex-grow: 1;
    /* Равномерно распределяет контент, выравнивая низ карточек */
}

/* Бейдж на Teltonika */
.hw-badge {
    position: absolute;
    top: 15px;
    right: 20px;
    background-color: rgba(255, 115, 21, 0.1);
    color: var(--brand-orange);
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    white-space: nowrap;
    /* Запрещаем перенос слов */
}

/* --- Коррекция адаптивности для мобилок --- */
@media (max-width: 992px) {
    .hardware-grid {
        flex-direction: column;
    }
}

/* ==========================================================================
   BLOCK: CONNECT SECTION (КОМПАКТНЫЕ СЦЕНАРИИ ПОДКЛЮЧЕНИЯ)
   ========================================================================== */
.connect-section {
    padding: 60px 0;
    /* Поджали внешние отступы секции сверху и снизу */
    background-color: var(--bg-main);
    transition: background-color 0.3s ease;
}

.connect-grid {
    display: flex;
    gap: 20px;
    align-items: stretch;
}

.connect-card {
    flex: 1;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 22px 20px;
    /* Уменьшили внутренние паддинги карточек для экономии высоты */
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Выделение карточки со своим оборудованием */
.connect-card.highlight-card {
    border-color: rgba(255, 115, 21, 0.25);
    box-shadow: 0 15px 35px rgba(255, 115, 21, 0.03);
}

.connect-card:hover {
    transform: translateY(-4px);
}

.connect-card.highlight-card:hover {
    border-color: var(--brand-orange);
    box-shadow: 0 15px 35px rgba(255, 115, 21, 0.08);
}

.connect-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    /* Существенно сжали отступ под заголовком */
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
    /* Уменьшили внутренний зазор до линии */
}

.scenario-icon {
    font-size: 20px;
    /* Чуть уменьшили размер эмодзи */
    background: var(--bg-input);
    width: 40px;
    /* Компактный размер иконки хедера */
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.connect-card-header h3 {
    font-size: 15.5px;
    /* Слегка уменьшили шрифт, чтобы заголовки ложились аккуратнее */
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

/* Пошаговый список */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Заметно уменьшили расстояние между шагами 01, 02, 03 */
    flex-grow: 1;
    margin-bottom: 25px;
    /* Сжали расстояние от списка до кнопки */
}

.step-item {
    display: flex;
    gap: 12px;
    /* Уменьшили горизонтальный зазор между цифрой и текстом */
    align-items: flex-start;
}

.step-num {
    font-size: 12px;
    font-weight: 800;
    color: var(--brand-orange);
    background: rgba(255, 115, 21, 0.1);
    padding: 3px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.step-item p {
    font-size: 13px;
    /* Оптимальный b2b размер для высокой читаемости и компактности */
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

/* Ссылки и кнопки внутри карточек */
.inline-link {
    color: var(--brand-orange);
    font-weight: 600;
    border-bottom: 1px dashed var(--brand-orange);
}

.inline-link:hover {
    color: var(--brand-orange-hover);
    border-bottom-style: solid;
}

.btn-connect-shop {
    display: block;
    text-align: center;
    padding: 12px;
    /* Компактная высота кнопки */
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 600;
    border-radius: 6px;
    background: var(--bg-input);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 13.5px;
}

.btn-connect-shop:hover {
    background: var(--bg-main);
    border-color: var(--brand-orange);
    color: var(--brand-orange);
}

/* Фокусная кнопка для Сценария 3 */
.btn-connect-action {
    display: block;
    text-align: center;
    padding: 12px;
    /* Сбалансированная высота кнопки */
    background: var(--brand-orange);
    color: #ffffff;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(255, 115, 21, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 13.5px;
}

.btn-connect-action:hover {
    background: var(--brand-orange-hover);
    box-shadow: 0 6px 20px rgba(255, 115, 21, 0.35);
    transform: translateY(-1px);
}

/* Адаптивность */
@media (max-width: 992px) {
    .connect-section {
        padding: 40px 0;
    }

    .connect-grid {
        flex-direction: column;
        gap: 20px;
    }
}

/* --- Базовый бургер (скрыт на десктопе) --- */
.menu-burger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 26px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ==========================================================================
   АДАПТИВ ДЛЯ ПЛАНШЕТОВ И МОБИЛЬНЫХ (BREAKPOINT: 992px)
   ========================================================================== */
@media (max-width: 992px) {

    /* Кнопка бургера — показываем на мобильных */
    .menu-burger {
        display: flex;
    }

    /* Превращаем контейнер элементов в выезжающую шторку */
    .nav-elements {
        position: fixed;
        top: 0;
        right: -100%;
        /* Спрятана за правым краем экрана */
        width: 290px;
        height: 100vh;
        background-color: var(--bg-card);
        border-left: 1px solid var(--border-color);
        box-shadow: -15px 0 35px rgba(0, 0, 0, 0.2);

        /* Выстраиваем элементы внутри шторки вертикально */
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;

        /* Оптимальные b2b отступы под 4 плашки меню, кнопку и языки */
        padding: 80px 24px 40px 24px;
        gap: 25px;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    /* Активация шторки через JS */
    .nav-elements.active {
        right: 0;
    }

    /* Перестраиваем ссылки меню в вертикальный стек */
    .nav-menu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        display: block;
        width: 100%;
        font-size: 16px;
        padding: 8px 0;
        border-bottom: 1px solid var(--bg-input);
    }

    /* Кнопка входа внутри шторки растягивается на всю ширину */
    .btn-login {
        width: 100%;
        text-align: center;
        margin-top: 5px;
    }

    /* Стилизация блока языков и темы НА САМОМ НИЗУ мобильной шторки */
    .controls-group {
        margin-top: auto;
        /* Выталкивает блок на самый низ Flexbox-контейнера */
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 20px;
        border-top: 1px solid var(--border-color);
        /* Отделяющая b2b-линия */
    }

    /* Анимация превращения полосок бургера в аккуратный крестик */
    .menu-burger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: var(--brand-orange);
    }

    .menu-burger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .menu-burger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: var(--brand-orange);
    }

    /* Блокировка прокрутки основного сайта при открытом меню */
    body.no-scroll {
        overflow: hidden;
    }
}

/* ==========================================================================
   POPUP: CALLBACK MARKETING WINDOW (ОКНО ОБРАТНОГО ЗВОНКА)
   ========================================================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(6, 14, 23, 0.85);
    /* Затемнение в цвет фона сайта */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 2000;
    /* Выше шапки и шторки */
    padding: 20px;
}

/* Класс активации попапа через JS */
.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    max-width: 440px;
    width: 100%;
    padding: 40px 30px 35px 30px;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    transform: translateY(-30px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.popup-overlay.show .popup-content {
    transform: translateY(0);
}

/* Кнопка Закрыть (Крестик) */
.popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-sub);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
    padding: 5px;
}

.popup-close:hover {
    color: var(--brand-orange);
}

.popup-content h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 12px;
    letter-spacing: -0.4px;
    line-height: 1.3;
}

.popup-content p {
    font-size: 14px;
    color: var(--text-sub);
    line-height: 1.5;
    margin-bottom: 25px;
}

/* Корректировка отступа внутри группы попапа */
.popup-content .form-group {
    margin-bottom: 15px;
}

/* ==========================================================================
   TOAST NOTIFICATION (КАСТОМНОЕ УВЕДОМЛЕНИЕ В СТИЛЕ СТРАНИЦЫ)
   ========================================================================== */
.toast-overlay {
    position: fixed;
    bottom: -100px;
    /* Изначально спрятано снизу */
    right: 30px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-orange);
    /* Фирменный оранжевый акцент */
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3000;
    /* Самый высокий приоритет видимости */
    max-width: 380px;
    width: calc(100% - 60px);
}

/* Класс активации: выезжает и плавно проявляется */
.toast-overlay.show {
    bottom: 30px;
    visibility: visible;
    opacity: 1;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.toast-text-box {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.toast-text-box h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.toast-text-box p {
    font-size: 13px;
    color: var(--text-sub);
    margin: 0;
    line-height: 1.4;
}

/* Мобильный адаптив для уведомления */
@media (max-width: 768px) {
    .toast-overlay {
        top: -100px;
        bottom: auto;
        right: 15px;
        left: 15px;
        width: calc(100% - 30px);
        max-width: 100%;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .toast-overlay.show {
        top: 20px;
        bottom: auto;
    }
}