/* ART DEVOPS — FLOATING HEADER */
header.ad-header,header.ad-header *,
.ad-h-mobile,.ad-h-mobile *{box-sizing:border-box}
header.ad-header{
position:fixed;top:14px;left:16px;right:16px;bottom:auto;
width:auto;max-width:1380px;height:auto;min-height:0;margin:0 auto;
padding:0;z-index:1200;background:transparent;
border:0;border-radius:0;box-shadow:none;backdrop-filter:none;
overflow:visible;isolation:isolate}
header.ad-header .ad-h-frame{
position:relative;display:flex;align-items:center;gap:22px;
min-height:76px;padding:12px 20px;
background:rgba(12,8,25,.92);
border:1px solid var(--border-glass);border-radius:20px;
box-shadow:0 12px 40px rgba(0,0,0,.18);
backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);
transition:box-shadow .25s,border-color .25s}
[data-theme="light"] header.ad-header .ad-h-frame{
background:rgba(255,255,255,.94);
box-shadow:0 10px 30px rgba(15,23,42,.07)}
header.ad-header.is-scrolled .ad-h-frame{
border-color:var(--neon-accent);
box-shadow:0 12px 40px rgba(0,0,0,.2)}
header.ad-header .ad-h-brand{
display:flex;align-items:center;flex:0 1 170px;
min-width:80px;max-width:170px;text-decoration:none}
header.ad-header #siteDynamicLogo{
display:block;width:100%!important;height:48px!important;
max-width:170px!important;object-fit:contain!important}
header.ad-header .ad-h-nav{
display:flex;align-items:center;justify-content:center;
gap:4px;flex:1;min-width:0}
header.ad-header .ad-h-nav-link,
header.ad-header .ad-h-services>summary{
display:flex;align-items:center;gap:7px;padding:11px 12px;
background:transparent;color:var(--text-muted);
border:0;border-radius:10px;font:700 12px/1.5 var(--font-body);
text-decoration:none;white-space:nowrap;cursor:pointer;
transition:background .2s,color .2s}
header.ad-header .ad-h-services>summary{list-style:none}
header.ad-header summary::-webkit-details-marker{display:none}
header.ad-header .ad-h-nav-link:hover,
header.ad-header .ad-h-nav-link[aria-current="page"],
header.ad-header .ad-h-services[open]>summary{
background:var(--border-glass);color:var(--text-pure)}
header.ad-header .ad-h-services>summary i{
font-size:10px;transition:transform .2s}
header.ad-header .ad-h-services[open]>summary i{transform:rotate(180deg)}
header.ad-header .ad-h-actions{display:flex;align-items:center;gap:10px;flex-shrink:0}
header.ad-header .ad-h-tool{
display:flex;align-items:center;justify-content:center;
width:42px;height:42px;padding:0;margin:0;
background:transparent;color:var(--text-pure);
border:1px solid var(--border-glass);border-radius:12px;
font-size:19px;cursor:pointer;list-style:none}
header.ad-header .ad-h-settings[open]>.ad-h-tool{
border-color:var(--neon-accent);color:var(--neon-accent)}
header.ad-header .ad-h-cta{
display:flex;align-items:center;gap:14px;min-height:42px;padding:10px 16px;
background:var(--bg-surface,var(--bg-main));color:var(--text-pure);
border:1px solid var(--neon-accent);border-radius:12px;
font:800 12px/1.5 var(--font-body);text-decoration:none;
box-shadow:inset 0 -2px 0 var(--neon-accent);
transition:transform .2s,box-shadow .2s}
header.ad-header .ad-h-cta i{color:var(--neon-accent)}
header.ad-header .ad-h-cta:hover{transform:translateY(-2px)}
header.ad-header .ad-h-menu-button{display:none}
header.ad-header .ad-h-mega{
position:absolute;top:calc(100% + 12px);left:0;
width:min(880px,100%);padding:26px;background:var(--bg-surface,var(--bg-main));
color:var(--text-pure);border:1px solid var(--border-glass);
border-radius:22px;box-shadow:0 22px 60px rgba(0,0,0,.23);
max-height:calc(100dvh - 120px);overflow:auto}
header.ad-header .ad-h-mega-heading{
display:flex;align-items:center;justify-content:space-between;
flex-wrap:wrap;gap:18px;margin-bottom:20px}
header.ad-header .ad-h-caption{
color:var(--neon-accent);font:700 10px/1.5 var(--font-mono);letter-spacing:.1em}
header.ad-header .ad-h-mega-heading p{
margin:7px 0 0;color:var(--text-muted);font:13px/1.7 var(--font-body)}
header.ad-header .ad-h-mega-heading>a{
display:flex;gap:12px;color:var(--text-pure);
font:700 12px/1.6 var(--font-body);text-decoration:none}
header.ad-header .ad-h-mega-heading>a span{color:var(--neon-accent)}
header.ad-header .ad-h-mega-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
header.ad-header .ad-h-service-link{
display:flex;align-items:flex-start;gap:14px;min-width:0;padding:18px;
background:var(--bg-card);color:var(--text-pure);
border:1px solid var(--border-glass);border-radius:14px;text-decoration:none;
transition:border-color .2s,transform .2s}
header.ad-header .ad-h-service-link:hover{
border-color:var(--neon-accent);transform:translateY(-2px)}
header.ad-header .ad-h-service-link>span:last-child{min-width:0}
header.ad-header .ad-h-service-icon{
display:flex;align-items:center;justify-content:center;flex:0 0 36px;
width:36px;height:36px;color:var(--neon-accent);
border:1px solid var(--border-glass);border-radius:10px;font-size:19px}
header.ad-header .ad-h-service-link strong{
display:block;font:800 13px/1.6 var(--font-body);overflow-wrap:anywhere}
header.ad-header .ad-h-service-description{
display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
overflow:hidden;margin-top:7px;color:var(--text-muted);
font:12px/1.7 var(--font-body)}
header.ad-header .ad-h-settings-panel{
position:absolute;top:calc(100% + 12px);right:0;
width:min(320px,calc(100vw - 32px));max-height:calc(100dvh - 120px);
overflow:auto;padding:24px;background:var(--bg-surface,var(--bg-main));
color:var(--text-pure);border:1px solid var(--border-glass);
border-radius:20px;box-shadow:0 22px 60px rgba(0,0,0,.23)}
header.ad-header .ad-h-settings-title{
padding-bottom:18px;border-bottom:1px solid var(--border-glass);
font:800 15px/1.6 var(--font-body)}
header.ad-header .ad-h-setting-group{display:grid;gap:13px;margin-top:22px}
header.ad-header .ad-h-label{color:var(--text-muted);font:12px/1.7 var(--font-body)}
header.ad-header .ad-h-languages{display:flex;gap:7px}
header.ad-header .ad-h-languages a{
display:flex;align-items:center;justify-content:center;
min-width:56px;min-height:40px;padding:8px 12px;
color:var(--text-muted);border:1px solid var(--border-glass);border-radius:10px;
font:700 12px/1.5 var(--font-mono);text-decoration:none}
header.ad-header .ad-h-languages a[aria-current]{
color:var(--text-pure);border-color:var(--neon-accent);
box-shadow:inset 0 -2px 0 var(--neon-accent)}
header.ad-header .ad-h-palette{display:flex;gap:10px;flex-wrap:wrap;padding:4px}
header.ad-header .ad-h-palette .color-dot{
display:block;flex:0 0 22px;width:22px;height:22px;padding:0;margin:0;
border:1px solid rgba(128,128,128,.45);border-radius:50%;cursor:pointer}
header.ad-header .ad-h-palette .dot-purple{background:#a855f7}
header.ad-header .ad-h-palette .dot-blue{background:#3b82f6}
header.ad-header .ad-h-palette .dot-lime{background:#84cc16}
header.ad-header .ad-h-palette .dot-crimson{background:#f43f5e}
header.ad-header .ad-h-palette .dot-amber{background:#f59e0b}
header.ad-header .ad-h-palette .dot-cyan{background:#06b6d4}
header.ad-header .ad-h-palette .dot-white{background:#fff}
header.ad-header .ad-h-palette .color-dot[aria-pressed="true"]{
outline:2px solid var(--text-pure);outline-offset:3px}
header.ad-header .ad-h-theme-row{display:flex;align-items:center;justify-content:space-between}
header.ad-header #themeToggleBtn{
display:flex;align-items:center;justify-content:center;
width:42px;height:42px;padding:0;color:var(--text-pure);
background:var(--bg-card);border:1px solid var(--border-glass);
border-radius:12px;cursor:pointer}
header.ad-header .ad-h-progress{
position:absolute;bottom:0;left:20px;right:20px;height:2px;
pointer-events:none;overflow:hidden}
header.ad-header .ad-h-progress span{
display:block;width:100%;height:100%;background:var(--neon-accent);
transform:scaleX(0);transform-origin:left}
header.ad-header a:focus-visible,
header.ad-header button:focus-visible,
header.ad-header summary:focus-visible,
.ad-h-mobile a:focus-visible,.ad-h-mobile button:focus-visible{
outline:3px solid var(--neon-accent);outline-offset:4px}
.ad-h-mobile{
position:fixed;inset:0;width:min(520px,calc(100% - 28px));
max-width:none;max-height:calc(100dvh - 40px);margin:auto;padding:24px;
background:var(--bg-surface,var(--bg-main));color:var(--text-pure);
border:1px solid var(--border-glass);border-radius:24px;
box-shadow:0 25px 80px rgba(0,0,0,.3);overflow:auto}
.ad-h-mobile::backdrop{
background:rgba(0,0,0,.65);backdrop-filter:blur(8px)}
.ad-h-mobile .ad-h-mobile-top{
display:flex;align-items:center;justify-content:space-between;gap:20px;
padding-bottom:20px;border-bottom:1px solid var(--border-glass)}
.ad-h-mobile .ad-h-mobile-top>span{
font:700 12px/1.7 var(--font-mono);letter-spacing:.08em}
.ad-h-mobile .ad-h-mobile-close{
display:flex;align-items:center;justify-content:center;width:42px;height:42px;
background:var(--bg-card);color:var(--text-pure);
border:1px solid var(--border-glass);border-radius:12px;cursor:pointer}
.ad-h-mobile nav{display:grid;gap:8px;margin:20px 0}
.ad-h-mobile nav>a{
display:flex;align-items:center;gap:14px;min-height:52px;padding:14px;
color:var(--text-pure);border:1px solid transparent;border-radius:12px;
font:700 15px/1.6 var(--font-body);text-decoration:none}
.ad-h-mobile nav>a:hover{background:var(--bg-card);border-color:var(--border-glass)}
.ad-h-mobile nav>a>i{color:var(--neon-accent);font-size:20px}
.ad-h-mobile nav>a>span:last-child{margin-left:auto;color:var(--text-muted)}
.ad-h-mobile .ad-h-mobile-cta{
display:flex;align-items:center;justify-content:space-between;gap:16px;
padding:16px;color:var(--text-pure);background:var(--bg-card);
border:1px solid var(--neon-accent);border-radius:13px;
font:800 14px/1.7 var(--font-body);text-decoration:none}
@media(max-width:1150px){
header.ad-header .ad-h-cta{display:none}}
@media(max-width:1000px){
header.ad-header .ad-h-nav{display:none}
header.ad-header .ad-h-actions{margin-left:auto}
header.ad-header .ad-h-menu-button{display:flex}
header.ad-header .ad-h-frame{min-height:70px}}
@media(max-width:600px){
header.ad-header{top:10px;left:10px;right:10px}
header.ad-header .ad-h-frame{padding:10px 12px;gap:12px;border-radius:17px}
header.ad-header .ad-h-brand{max-width:160px;flex-basis:160px}
header.ad-header #siteDynamicLogo{height:42px!important}
header.ad-header .ad-h-actions{gap:8px}
header.ad-header .ad-h-tool{width:42px;height:42px}
header.ad-header .ad-h-settings-panel{padding:22px}
.ad-h-mobile{padding:20px}}
@media(prefers-reduced-motion:reduce){
header.ad-header *, .ad-h-mobile *{transition:none!important}}

/* BEGIN AD HEADER GEOMETRY FIX */

/* Внешняя панель: фиксированная ширина относительно окна,
   без сжатия до размеров содержимого. */
header#adSiteHeader.ad-header {
    position: fixed !important;
    top: 16px !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;

    display: block !important;
    width: calc(100% - 48px) !important;
    max-width: 1280px !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
    padding: 0 !important;
    transform: translateX(-50%) !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

/* Три самостоятельные зоны:
   логотип / навигация / действия. */
header#adSiteHeader .ad-h-frame {
    position: relative;
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;

    width: 100%;
    min-width: 0;
    min-height: 80px;
    margin: 0;
    padding: 14px 24px;
    border-radius: 20px;
    box-sizing: border-box;
}

header#adSiteHeader .ad-h-brand {
    width: 180px;
    min-width: 0;
    max-width: 180px;
    margin: 0;
}

header#adSiteHeader #siteDynamicLogo {
    width: 180px !important;
    max-width: 100% !important;
    height: 50px !important;
    object-fit: contain !important;
}

header#adSiteHeader .ad-h-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
}

header#adSiteHeader .ad-h-nav-link,
header#adSiteHeader .ad-h-services > summary {
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
}

header#adSiteHeader .ad-h-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    min-width: 0;
    margin: 0;
}

header#adSiteHeader .ad-h-tool {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

header#adSiteHeader .ad-h-cta {
    min-height: 44px;
    padding: 11px 18px;
    font-size: 13px;
    white-space: nowrap;
}

header#adSiteHeader .ad-h-progress {
    left: 24px;
    right: 24px;
}

/* На промежуточной ширине освобождаем место навигации. */
@media (min-width: 1001px) and (max-width: 1200px) {
    header#adSiteHeader .ad-h-frame {
        grid-template-columns: 155px minmax(0, 1fr) auto;
        gap: 16px;
        padding: 12px 20px;
    }

    header#adSiteHeader .ad-h-brand {
        width: 155px;
        max-width: 155px;
    }

    header#adSiteHeader .ad-h-nav {
        gap: 2px;
    }

    header#adSiteHeader .ad-h-nav-link,
    header#adSiteHeader .ad-h-services > summary {
        padding: 11px 9px;
        font-size: 12px;
    }

    header#adSiteHeader .ad-h-cta {
        display: none;
    }
}

/* Планшеты и телефоны: логотип слева, две кнопки справа. */
@media (max-width: 1000px) {
    header#adSiteHeader .ad-h-frame {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 16px;
        min-height: 72px;
        padding: 12px 18px;
    }

    header#adSiteHeader .ad-h-nav {
        display: none;
    }

    header#adSiteHeader .ad-h-cta {
        display: none;
    }

    header#adSiteHeader .ad-h-menu-button {
        display: flex;
    }

    header#adSiteHeader .ad-h-brand {
        width: 170px;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    header#adSiteHeader.ad-header {
        top: 10px !important;
        width: calc(100% - 24px) !important;
    }

    header#adSiteHeader .ad-h-frame {
        grid-template-columns: minmax(0, 1fr) auto;
        min-height: 68px;
        gap: 12px;
        padding: 10px 12px;
        border-radius: 17px;
    }

    header#adSiteHeader .ad-h-brand {
        width: 150px;
        max-width: 100%;
    }

    header#adSiteHeader #siteDynamicLogo {
        width: 150px !important;
        height: 44px !important;
    }

    header#adSiteHeader .ad-h-actions {
        gap: 8px;
    }

    header#adSiteHeader .ad-h-tool {
        width: 42px;
        height: 42px;
    }

    header#adSiteHeader .ad-h-progress {
        left: 16px;
        right: 16px;
    }
}

/* END AD HEADER GEOMETRY FIX */
