/* ============================================
   HEADER STYLES - DevSEO (одна строка, по ширине)
   ============================================ */

/* === HEADER === */
.header {
    position: relative;
    z-index: 100;
    background: var(--devseo-black-bg);
    transition: background-color var(--devseo-transition);
}

/* === TOP BAR === */
.header__top-bar {
    background: var(--devseo-darker-bg);
    border-bottom: 1px solid var(--devseo-stroke-color);
    font-size: 14px;
    color: var(--devseo-secondary-text);
}

.header__top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 44px;
    gap: 20px;
}

.header__top-text a {
    color: var(--devseo-title-text);
    border-bottom: 1px dotted;
}

.header__top-text a:hover {
    color: var(--devseo-base-color);
    border-color: var(--devseo-base-color);
}

.header__top-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.header__top-menu {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header__top-menu a {
    color: var(--devseo-title-text);
    font-size: 14px;
    font-weight: 500;
}

/* === MAIN HEADER (стеклянная полоса на всю ширину) === */
.header__main {

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    margin: 8px auto;
    max-width: calc(var(--devseo-page-width) + var(--devseo-page-width-padding) * 2);
}

.header__main-inner {
    display: flex;
    align-items: center;
    height: 80px;
    padding: 0 32px;
    gap: 24px;
}

/* === ЛОГОТИП === */

.header__logo {
    display: flex;
    flex-direction: row-reverse;
}
.header__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.header__logo img {
    max-height: 50px;
    width: auto;
}

.header__logo-text {
    font-family: var(--devseo-font-title-family);
    font-size: 24px;
    font-weight: 700;
    color: var(--devseo-base-color);
}

/* === КНОПКА ПОДДЕРЖКИ 24/7 === */
.header__support {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header__support-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px 10px 25px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dcedf7 4%, #ffffff 100%);
    color: var(--devseo-title-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}

.header__support-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(136, 193, 233, 0.57);
    color: var(--devseo-title-text);
}

.header__support-dot {
    position: relative;
    width: 10px;
    height: 10px;
}

.header__support-dot i {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #24d5d5;
    box-shadow: 0 0 8px rgba(15, 170, 229, 0.9);
}

.header__support-dot i::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #12ff7e;
    animation: devseoDot 1.8s ease-out infinite;
}

@keyframes devseoDot {
    0% { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0; transform: scale(3); }
}

.header__support-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header__support-label {
    font-size: 13px;
    font-weight: 600;
}

.header__support-sub {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--devseo-secondary-text);
}

.header__support-arrow {
    margin-left: 4px;
    transition: transform 0.3s;
}

.header__support-btn:hover .header__support-arrow {
    transform: translateX(3px);
}

.header__slogan {
    font-size: 14px;
    color: var(--devseo-secondary-text);
    white-space: nowrap;
    font-style: italic;
}

/* === РАСПОРКА (занимает все свободное место) === */
.header__spacer {
    flex: 1;
    display: flex;
    gap: 16px;
    flex-shrink: 0;
    justify-content: center;
}

/* === ПРАВАЯ ЧАСТЬ (иконки в ряд) === */
.header__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Телефон */
.header__phone-link {
    font-size: 18px;
    font-weight: 600;
    font-family: var(--devseo-font-title-family);
    color: var(--devseo-title-text);
    text-decoration: none;
    white-space: nowrap;
}

.header__phone-link:hover {
    color: var(--devseo-base-color);
}

/* Иконки (Max, глаз, тема, поиск) */
.header__icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--devseo-fill-dark-light);
    padding: 8px;
    border-radius: 8px;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header__icon-btn:hover {
    background: var(--devseo-darker-bg);
}

.header__icon-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

body.theme-dark .icon-sun { display: none; }
body:not(.theme-dark) .icon-moon { display: none; }

/* Кнопка-стрелка */
.header__arrow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: var(--devseo-base-color);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.header__arrow-btn:hover {
    background: #0d4a75;
    transform: scale(1.05);
}

.header__arrow-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* === НАВИГАЦИЯ === */
.header__nav {
    background: var(--devseo-black-bg);
    border-top: 1px solid var(--devseo-stroke-color);
    background: rgba(178, 189, 222, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50px;
    margin: 8px auto;
    max-width: calc(var(--devseo-page-width) + var(--devseo-page-width-padding) * 2);
}


.header__nav-list {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    height: 56px;
}

.header__nav-list > li {
    position: relative;
}

.header__nav-list > li > a {
    display: flex;
    align-items: center;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 500;
    color: var(--devseo-title-text);
    white-space: nowrap;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.header__nav-list > li > a:hover {
    background: var(--devseo-darker-bg);
    color: var(--devseo-base-color);
}

/* Dropdown */
.header__nav-list .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--devseo-card-bg);
    border: 1px solid var(--devseo-stroke-color);
    border-radius: var(--devseo-outer-border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 8px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.header__nav-list > li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__nav-list .sub-menu a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--devseo-title-text);
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.header__nav-list .sub-menu a:hover {
    background: var(--devseo-darker-bg);
    color: var(--devseo-base-color);
}

/* === БУРГЕР === */
.header__burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.header__burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--devseo-title-text);
    border-radius: 2px;
    transition: all 0.3s;
}

.header__burger.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.header__burger.is-active span:nth-child(2) {
    opacity: 0;
}

.header__burger.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* === МОБИЛЬНОЕ МЕНЮ === */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100vh;
    background: var(--devseo-black-bg);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.4s ease;
    overflow-y: auto;
    padding: 20px;
    visibility: hidden;
}

.mobile-menu.is-open {
    transform: translateX(0);
    visibility: visible;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.mobile-menu-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.mobile-menu__close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--devseo-darker-bg);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: var(--devseo-title-text);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu__close:hover {
    background: var(--devseo-base-color);
    color: #fff;
}

.mobile-menu__logo {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--devseo-stroke-color);
}

.mobile-menu__logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.mobile-menu__logo img {
    max-height: 40px;
}

.mobile-menu__logo span {
    font-family: var(--devseo-font-title-family);
    font-size: 20px;
    font-weight: 700;
    color: var(--devseo-base-color);
}

.mobile-menu__contacts {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--devseo-stroke-color);
}

.mobile-menu__contacts a {
    font-size: 18px;
    font-weight: 600;
    color: var(--devseo-title-text);
    text-decoration: none;
}

.mobile-menu__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu__list a {
    display: block;
    padding: 12px 0;
    font-size: 16px;
    color: var(--devseo-title-text);
    border-bottom: 1px solid var(--devseo-stroke-color);
    text-decoration: none;
}

.mobile-menu__list a:hover {
    color: var(--devseo-base-color);
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 1400px) {
    .header__slogan { display: none; }
}

@media (max-width: 1200px) {
    .header__top-bar { display: none; }
    .header__support { display: none; }
    .header__nav { display: none; }
    .header__burger { display: flex; }
    .header__main-inner { height: 64px; padding: 0 20px; }
}

@media (max-width: 768px) {
    .header__phone-link { display: none; }
    .header__icon-btn:not(.js-theme-toggle):not(.js-search-toggle) { display: none; }
}

@media (max-width: 600px) {
    .header__main { border-radius: 20px; margin: 4px 12px; }
    .header__main-inner { padding: 0 16px; gap: 12px; }
}

/* === ТЁМНАЯ ТЕМА === */
body.theme-dark .header__support-btn {
    background: linear-gradient(135deg, #1e3a5f 4%, #2a2a2a 100%);
    color: #fff;
}

body.theme-dark .header__top-menu a {
    color: #fff;
}

body.theme-dark .header__nav-list > li > a {
    color: #fff;
}

/* === MOBILE FIX: шапка без переполнения === */
@media (max-width: 991px) {
    .header__main {
        margin: 4px 8px;
        border-radius: 20px;
    }
    .header__main-inner {
        gap: 10px;
        padding: 0 16px;
    }
}
@media (max-width: 600px) {
    .header__phone-link { font-size: 14px; }
    .header__icon-btn { padding: 6px; }
}

/* === Кнопка поддержки: онлайн / офлайн === */
.veoc-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 16px 10px 25px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dcedf7 4%, #ffffff 100%);
    color: var(--devseo-title-text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.25s, box-shadow 0.25s;
    position: relative;
}
.veoc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(136, 193, 233, 0.57);
    color: var(--devseo-title-text);
}
.veoc-btn__dot { position: relative; width: 10px; height: 10px; }
.veoc-btn__dot i {
    position: absolute; inset: 0;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, .7);
}
.veoc-btn__dot i::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: 50%;
    background: #ff8f8f;
    animation: veocPulse 1.8s ease-out infinite;
}
@keyframes veocPulse {
    0%   { opacity: 0.8; transform: scale(1); }
    100% { opacity: 0;   transform: scale(3); }
}
.veoc-btn__txt { display: flex; flex-direction: column; gap: 2px; }
.veoc-btn__label { font-size: 13px; font-weight: 600; }
.veoc-btn__sub { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--devseo-secondary-text); }
.veoc-btn__ico { margin-left: 4px; transition: transform 0.3s; }
.veoc-btn__ico svg { width: 16px; height: 16px; stroke: currentColor; fill: none; }
.veoc-btn:hover .veoc-btn__ico { transform: translateX(3px); }

/* Онлайн */
.veoc-btn.is-online .veoc-btn__dot i {
    background: #24d5d5;
    box-shadow: 0 0 8px rgba(15, 170, 229, .9);
}
.veoc-btn.is-online .veoc-btn__dot i::before { background: #12ff7e; }

/* Офлайн */
.veoc-btn.is-offline {
    background: linear-gradient(135deg, #fdecec 4%, #ffffff 100%);
}
.veoc-btn.is-offline .veoc-btn__dot i {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, .55);
}
.veoc-btn.is-offline .veoc-btn__dot i::before { display: none; }
.veoc-btn.is-offline .veoc-btn__sub { color: #b91c1c; }

body.theme-dark .veoc-btn { background: linear-gradient(135deg, #1e3a5f 4%, #2a2a2a 100%); color: #fff; }
body.theme-dark .veoc-btn.is-offline { background: linear-gradient(135deg, #3a2626 4%, #2b2b2b 100%); }
body.theme-dark .veoc-btn.is-offline .veoc-btn__sub { color: #fca5a5; }