/* ==========================================================================
   💎 ПРЕМІУМ-МОДУЛЬ ШАПКИ СТО CRM (ФІНАЛЬНИЙ ДИЗАЙНЕРСЬКИЙ СТИЛЬ)
   ========================================================================== */

/* 1. Головний базовий контейнер шапки сайту */
header.main-header, 
header {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: #ffffff !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important; /* М'яка преміальна тінь */
}

/* 2. Фірмове розділення рівнів (поверхів) шапки */
.header-tier {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

/* Верхній поверх ( tier-top ) — Робимо легкий димчастий фон */
.header-tier.tier-top {
    background-color: #f8fafc !important; /* Сучасний матовий світло-сірий */
    padding: 10px 20px !important;
    border-bottom: 1px solid #e2e8f0 !important; /* Тонка роздільна лінія */
    flex-wrap: wrap !important;
    gap: 15px !important;
}

/* Середній поверх ( tier-middle ) — Рівень контактів та соцмереж */
.header-tier.tier-middle {
    padding: 16px 20px !important;
    border-bottom: 1px solid #f1f5f9 !important; /* Друга тонка лінія */
}

/* Нижній поверх ( tier-bottom ) — Головне навігаційне меню */
.header-tier.tier-bottom {
    padding: 18px 20px !important;
}

/* 3. Горизонтальна сітка для всіх навігаційних списків */
.tier-menu ul, 
.tier-menu-main ul {
    display: flex !important;
    flex-direction: row !important;
    gap: 28px !important; /* Збільшено відстань між посиланнями */
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Чистий стиль посилань з плавним ефектом зміни кольору при наведенні */
.tier-menu ul li a, 
.tier-menu-main ul li a, 
.auth-link, 
.contact-item {
    text-decoration: none !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    color: #475569 !important; /* Шляхетний графітовий колір тексту */
    letter-spacing: 0.3px !important;
    transition: color 0.2s ease-in-out !important;
}

/* Головне велике меню робимо трохи виразнішим */
.tier-menu-main ul li a {
    color: #1e293b !important;
    font-size: 13.5px !important;
}

/* Ефект наведення на посилання — спалахують фірмовим червоним кольором СТО */
.tier-menu ul li a:hover, 
.tier-menu-main ul li a:hover, 
.auth-link:hover {
    color: #e53935 !important;
}

/* Збираємо функціональні блоки в одну лінію */
.tier-auth-wrap, 
.tier-contacts, 
.lang-switcher, 
.tier-auth, 
.tier-socials {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 16px !important;
}

/* 4. 🔴 ВИДІЛЕННЯ АКТИВНОЇ МОВИ СТО (ПРЕМІУМ КАРТКА) 🔴 */
.lang-switcher {
    gap: 4px !important; /* Прибираємо великі дірки між мовами */
}

.lang-btn {
    font-size: 12px !important;
    font-weight: 800 !important;
    color: #64748b !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

/* Активна мова горить яскравим червоним на білій підкладці з легкою тінню */
.lang-btn.active {
    color: #ffffff !important;
    background-color: #e53935 !important; /* Фірмовий червоний колір СТО */
    box-shadow: 0 2px 6px rgba(229, 57, 53, 0.25) !important;
}

/* Прибираємо старі некрасиві вертикальні палички між мовами */
.lang-divider, .divider {
    color: #cbd5e1 !important;
    font-weight: 400 !important;
}

/* 5. Повний фікс та стилізація іконок месенджерів */
.tier-socials .soc-link, 
.tier-socials .soc-link svg {
    display: inline-flex !important;
    width: 20px !important;
    height: 20px !important;
    color: #334155 !important;
    fill: currentColor !important;
    transition: transform 0.2s ease, color 0.2s ease !important;
}

.tier-socials .soc-link:hover svg {
    color: #e53935 !important; /* Яскравість при наведенні */
    transform: scale(1.15) !important;
}

/* Текст великого логотипу STOCRM */
.logo-text {
    font-size: 26px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    color: #1e293b !important;
}
.logo-text span { 
    color: #e53935 !important; /* Виділяємо слово CRM червоним */
}

/* ==========================================================================
   ⚙️ БЕГУЧИЙ РЯДОК: СУЧАСНИЙ МАТОВИЙ ДИЗАЙН (АКЦІЇ)
   ========================================================================== */
.top-ticker {
    display: block !important;
    width: 100% !important;
    height: 36px !important;
    background-color: #0c0f19 !important; /* Фірмовий глибокий темний колір акцій */
    overflow: hidden !important;
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.ticker-wrap {
    display: flex !important;
    flex-direction: row !important;
    white-space: nowrap !important;
    align-items: center !important;
    height: 100% !important;
    width: max-content !important;
    padding-left: 100% !important;
    animation: crmRealTickerAnim 26s linear infinite !important;
}

.ticker-wrap:hover { animation-play-state: paused !important; }

.ticker-item {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #ffffff !important; /* Чистий білий неон на чорному тлі */
    padding-right: 60px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@keyframes crmRealTickerAnim {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}


/* ==========================================================================
   🎨 ІНТЕГРАЦІЯ 4 ДИЗАЙН-ТЕМ ДЛЯ ПРЕМІУМ ШАПКИ СТО (БЕЗ ЗМІНИ СІТКИ)
   ========================================================================== */

/* --- 1. ТЕМА: STANDART (Дефолтні кольори вашого сайту) --- */
body.theme-standart {
    --hd-bg: #ffffff;
    --hd-top-bg: #f8fafc;
    --hd-text: #1e293b;
    --hd-text-muted: #475569;
    --hd-accent: #e53935; /* Ваш рідний червоний автомобільний */
    --hd-border: #e2e8f0;
}

/* --- 2. ТЕМА: DARKSIDE (Глибокий космос + бірюзовий неон) --- */
body.theme-darkside {
    --hd-bg: #0b0f19;
    --hd-top-bg: #111827;
    --hd-text: #f8fafc;
    --hd-text-muted: #94a3b8;
    --hd-accent: #06b6d4; /* Бірюзовий неон */
    --hd-border: rgba(255, 255, 255, 0.08);
}

/* --- 3. ТЕМА: LAMBA (Чорний матовий + гоночний жовтий) --- */
body.theme-lamba {
    --hd-bg: #121212;
    --hd-top-bg: #1a1a1a;
    --hd-text: #ffffff;
    --hd-text-muted: #a3a3a3;
    --hd-accent: #eab308; /* Жовтий спорт */
    --hd-border: rgba(255, 255, 255, 0.05);
}

/* --- 4. ТЕМА: TABBACCO (Дороге дерево, елітна шкіра & метал) --- */
body.theme-tabbacco {
    --hd-bg: #1e1a18;
    --hd-top-bg: #2c2421;
    --hd-text: #fdf6e2;
    --hd-text-muted: #bbaaa6;
    --hd-accent: #d97706; /* Шляхетний янтар */
    --hd-border: rgba(217, 119, 6, 0.15);
}

/* 🔄 ДИНАМІЧНА ПРИВ'ЯЗКА ПАЛІТРИ ДО ВАШИХ ОРИГІНАЛЬНИХ КЛАСІВ */
header.main-header, header {
    background-color: var(--hd-bg, #ffffff) !important;
}
.header-tier.tier-top {
    background-color: var(--hd-top-bg, #f8fafc) !important;
    border-bottom-color: var(--hd-border, #e2e8f0) !important;
}
.header-tier.tier-middle {
    border-bottom-color: var(--hd-border, #f1f5f9) !important;
}
.tier-menu ul li a, .tier-menu-main ul li a, .auth-link, .contact-item, .logo-text {
    color: var(--hd-text, #1e293b) !important;
}
.logo-text span {
    color: var(--hd-accent, #e53935) !important;
}
.tier-menu ul li a:hover, .tier-menu-main ul li a:hover, .auth-link:hover, .contact-item:hover {
    color: var(--hd-accent, #e53935) !important;
}
.lang-btn {
    color: var(--hd-text-muted, #64748b) !important;
}
/* Картка активної мови спалахує кольором теми */
.lang-btn.active {
    color: #ffffff !important;
    background-color: var(--hd-accent, #e53935) !important;
    box-shadow: 0 2px 6px var(--hd-border, rgba(0,0,0,0.1)) !important;
}
.tier-socials .soc-link, .tier-socials .soc-link svg {
    color: var(--hd-text-muted, #334155) !important;
}
.tier-socials .soc-link:hover svg {
    color: var(--hd-accent, #e53935) !important;
}
.top-ticker {
    background-color: var(--hd-top-bg, #0c0f19) !important;
}

