/* The original WordPress navigation and callback still own their interactions. */
header.wp-block-template-part.studio-header {
    --utility-height: 54px;
    --toolbar: var(--wp-admin--admin-bar--height, 0px);
    position: sticky !important;
    top: calc(var(--toolbar) - var(--utility-height)) !important;
    z-index: 100;
    color: #162c41;
    font-family: "SF UI Display", Arial, sans-serif;
}
.studio-header .studio-header-utility {
    --nav-size: 15px;
    --nav-weight: 400;
    --nav-color: #405969;
    position: relative;
    z-index: 2;
    background: #eaf4f5;
    border-top: 2px solid #20343d;
    box-sizing: border-box;
    height: var(--utility-height);
}
.studio-header-main { background: white; border-bottom: 1px solid #dce9ea; }
.studio-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: min(94%, 1560px);
    margin-inline: auto;
    height: 100%;
}
.studio-header-main > .studio-header-row { min-height: 84px; }
.studio-header-compact .studio-header-main > .studio-header-row { min-height: 60px; }
.studio-header-compact .aku-brand__copy { gap: 0; }
/* Keep the tagline's intrinsic width while collapsing it vertically. */
.studio-header-compact .aku-brand__tagline { visibility: hidden; height: 0; overflow: hidden; }
.studio-header-compact .aku-brand__mark { width: 38px !important; height: 38px !important; }
@media (min-width: 1201px) {
    /* Reserve the 10px released when the desktop mark shrinks from 48px to 38px. */
    .studio-header-compact .aku-brand { padding-inline-end: 10px; }
}
.studio-header :is(.studio-header-tools,.studio-header-social), .studio-header-social {
    display: flex; align-items: center; gap: 6px;
}
.studio-header-tools, .studio-mobile-links { color: #255561; font-size: 15px; }
.studio-header-tools > a, .studio-header-tools summary, .studio-header-social a {
    box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding-inline: 7px; gap: 6px; white-space: nowrap; text-decoration: none;
}
.studio-header summary, .studio-mobile-links summary { cursor: pointer; list-style: none; }
.studio-header summary::-webkit-details-marker, .studio-mobile-links summary::-webkit-details-marker { display: none; }
.studio-header summary::before, .studio-mobile-links summary::before {
    content: ""; display: inline-block; width: 16px; height: 16px; vertical-align: middle;
    background: currentColor;
    mask: url("../icons/service-navigation/chevron-down.svg") center / contain no-repeat;
    transition: transform .18s ease;
}
:is(.studio-header,.studio-mobile-links) details[open] > summary::before { transform: rotate(180deg); }
.studio-mobile-links summary::before { margin-inline-end: 6px; }
.studio-header-tools details, .studio-header-email { position: relative; }
.studio-header-panel, .studio-header-hint {
    position: absolute; top: 100%; right: 0; background: white; border-radius: 8px;
    padding: 14px 17px; width: max-content; max-width: 280px; box-shadow: 0 6px 24px #17354024;
    border: 1px solid #c7dfe2; color: #193947; font-size: 15px; line-height: 1.45;
}
.studio-header-panel p { margin: 4px 0; }
.studio-header-panel a { display: block; padding: 6px 0; }
.studio-phone-control { position: relative; display: inline-flex; align-items: center; white-space: nowrap; border-radius: 7px; }
.studio-phone-control:is(:hover,:focus-within,:has(details[open])) { background-color: #dfedef; }
.studio-phone-control .studio-phone-primary {
    display: inline-flex; align-items: center; min-height: 44px; padding-inline: 0 7px;
    text-decoration: none;
}
.studio-header-tools .studio-phone-control :is(.studio-phone-primary,summary):hover {
    background-color: transparent !important; text-decoration: none;
}
.studio-phone-control .studio-header-phones { position: static; order: -1; }
.studio-phone-control .studio-header-phones summary { min-width: 26px; padding-inline: 6px 4px; }
/* The shared header controller sequences the exit and entry animations.
   Core hover/focus CSS must not independently expose a second service panel. */
@media (min-width: 993px) {
    header.studio-header nav.ticss-01a232a8 .wp-block-navigation__responsive-container:not(.is-menu-open)
    .wp-block-navigation__container > .has-child > .wp-block-navigation__submenu-container[data-studio-panel] {
        display: none !important;
        visibility: visible !important;
        opacity: 1 !important;
        transition: none !important;
    }
    header.studio-header nav.ticss-01a232a8 .wp-block-navigation__responsive-container:not(.is-menu-open)
    .wp-block-navigation__container > .has-child > [aria-expanded="true"] ~ [data-studio-panel] {
        display: grid !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    :is(.studio-header,.studio-mobile-links) summary::before { transition: none; }
}
.studio-header-phones > .studio-header-panel { padding: 6px; border-radius: 12px; }
.studio-header-phones .studio-phone-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 7px;
    white-space: nowrap;
    text-decoration: none;
}
.studio-phone-link::before {
    content: "";
    width: 20px;
    height: 20px;
    background-color: currentColor;
    mask: url("/wp-content/uploads/2025/02/vector-12-3bee50.svg") center / contain no-repeat;
}
.studio-phone-link[href^="tel:+79"]::before {
    mask-image: url("../icons/service-navigation/device-mobile.svg");
}
.studio-header-phones .studio-phone-link:is(:hover, :focus-visible) {
    background-color: #dfedef !important;
    color: #174f59 !important;
    text-decoration: none;
}
.studio-header-office > .studio-header-panel {
    box-sizing: border-box;
    width: 320px;
    max-width: calc(100vw - 24px);
    padding: 0;
    border-radius: 12px;
    text-align: start;
}
.studio-office-info {
    display: grid;
    gap: 15px;
    margin: 0;
    padding: 18px;
}
.studio-office-info > div {
    display: grid;
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 2px 10px;
}
.studio-office-info > div::before {
    content: "";
    grid-row: span 2;
    width: 20px;
    height: 20px;
    background: #246575;
    mask: var(--office-icon) center / contain no-repeat;
}
.studio-office-address { --office-icon: url("../icons/service-navigation/map-pin.svg"); }
.studio-office-hours {
    --office-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}
.studio-office-info dt { margin: 0; font-size: 13px; line-height: 20px; color: #506772; }
.studio-office-info dd { margin: 0; font-size: 15px; line-height: 1.4; color: #193947; }
.studio-office-address dd { font-weight: 500; }
.studio-header-panel a.studio-office-directions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 0 18px;
    border-top: 1px solid #d7e6e8;
    border-radius: 0 0 11px 11px;
    background: #edf6f6;
    color: #195a64;
    font-weight: 500;
    text-decoration: none;
}
.studio-office-directions::after {
    content: "";
    width: 18px;
    height: 18px;
    background: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15m-6-6 6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.studio-header-panel .studio-office-directions:is(:hover, :focus-visible) {
    background: #dbecee;
    text-decoration: none;
}
.studio-header-tools .studio-header-social a, .studio-mobile-links .studio-header-social a {
    min-width: 44px; color: #186977 !important; border-radius: 8px;
}
.studio-header-telegram svg { width: 21px; height: 21px; fill: currentColor; }
.studio-header-max::before, .studio-header-email::before {
    content: ""; display: block; width: 19px; height: 19px; background: currentColor;
    mask: url("../images/brand/max-mark-mask.svg") center / contain no-repeat;
}
.studio-header-email::before {
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='1.7' d='M2 5h20v14H2zM3 6l9 7 9-7'/%3E%3C/svg%3E");
}
.studio-header-tools .studio-header-email { width: 44px; }
.studio-header-hint { display: none; padding: 5px 10px; }
.studio-header-email:is(:hover,:focus-visible) .studio-header-hint { display: block; }
body .studio-header .studio-header-tools .studio-header-account { color: #255561 !important; border-left: 1px solid #c4d9dc; }
.studio-header-tools .studio-header-account:is(:hover, :focus-visible) {
    background-color: #cce3e6 !important;
    border-radius: 0 7px 7px 0;
    text-decoration: none;
}
.studio-header-account img { width: 15px !important; vertical-align: middle; }
.studio-header-tools :is(a,summary):hover { background-color: #daebed; }
.studio-header :is(a,button,summary):focus-visible { outline: 2px solid #087383 !important; outline-offset: 2px; }
.studio-header-main nav :is(li, a, button):focus:not(:focus-visible) { outline: none; }
.studio-header .studio-header-row nav .wp-block-navigation__container {
    gap: clamp(10px, 1.5vw, 26px) !important;
}
.studio-header .studio-header-row nav .wp-block-navigation__container > li {
    font: var(--nav-weight, 500) var(--nav-size, 16px)/1.25 "SF UI Display",Arial,sans-serif !important; text-transform: none !important;
}
.studio-header .studio-header-row nav .wp-block-navigation__container > li > .wp-block-navigation-item__content {
    color: var(--nav-color, #162c41) !important; font: inherit !important; text-transform: none !important; border: 0 !important;
    text-decoration: none !important; position: relative; white-space: nowrap; padding-block: 12px !important;
}
.studio-header .wp-block-navigation__container > li > .wp-block-navigation-item__content::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 5px; height: 2px; background: #02bef2;
    transform: scaleX(0); transform-origin: left; transition: transform 160ms ease-out;
}
.studio-header .wp-block-navigation__container > li:is(:hover,:focus-within) > .wp-block-navigation-item__content::after { transform: scaleX(1); }
.studio-header .studio-header-callback { flex: none; margin: 0; white-space: nowrap; }
.studio-mobile-links { padding: 10px 5%; display: grid; gap: 6px; }
.studio-mobile-links > a, .studio-mobile-links summary { display: block; padding-block: 10px; }
.studio-mobile-links .studio-header-panel { position: static; width: auto; box-shadow: none; }
@media (min-width: 1201px) and (max-width: 1280px) {
    .studio-header-main > .studio-header-row { width: 97%; gap: 8px; }
}
@media (min-width: 993px) and (max-width: 1200px) {
    .studio-header-row { width: 97%; gap: 8px; }
    .studio-header .studio-header-row nav .wp-block-navigation__container { gap: 9px !important; }
    .studio-header .studio-header-row nav .wp-block-navigation__container > li { font-size: 14px !important; }
    .studio-header-tools, .studio-header-social { gap: 2px; }
    .studio-header .aku-brand__name { font-size: 18px; }
    .studio-header .aku-brand__mark { width: 38px !important; height: 38px !important; }
}
@media (max-width: 992px) {
    header.wp-block-template-part.studio-header { position: fixed !important; top: 0 !important; }
    body.admin-bar header.wp-block-template-part.studio-header.admin { top: var(--toolbar) !important; }
    .studio-header-utility, .studio-header-main nav { display: none !important; }
    .studio-header-main > .studio-header-row { min-height: 60px; padding-inline: 54px 0; box-sizing: border-box; }
    .studio-header .aku-brand__tagline { display: none; }
    .studio-header .aku-brand__mark { width: 34px !important; height: 34px !important; }
    .studio-header .aku-brand__name { font-size: 17px; }
    .studio-header-callback { --aku-button-padding-inline: 11px; }
}
@media (max-width: 380px) {
    .studio-header .aku-brand__name { white-space: normal; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
    .studio-header .wp-block-navigation__container > li > .wp-block-navigation-item__content::after { transition: none; }
}
.studio-header .studio-header-mobile-social { display: none; }
.studio-header .studio-header-telegram svg, .studio-mobile-links .studio-header-telegram svg { width: 28px; height: 28px; }
.studio-header-max::before { width: 22px; height: 22px; }
.studio-header .aku-brand__name > span { color: inherit; }
@media (min-width: 993px) and (max-width: 1090px) {
    .studio-header .studio-header-main .aku-brand__copy { max-width: 118px; }
    .studio-header .studio-header-main .aku-brand__name { white-space: normal; }
    .studio-header .studio-header-main .aku-brand__tagline { display: none; }
}
@media (max-width: 992px) {
    .studio-header .studio-header-mobile-social { display: flex; margin-left: auto; gap: 0; }
    .studio-header .studio-header-main > .studio-header-row { gap: 6px; }
    .studio-header .studio-header-mobile-social a { min-width: 42px; }
}
@media (max-width: 559px) {
    .studio-header .studio-header-main > .studio-header-row { width: 98%; padding-inline: 46px 4px; gap: 3px; }
    .studio-header .studio-header-main .aku-brand { gap: 5px; }
    .studio-header .studio-header-main .aku-brand__copy { max-width: 74px; }
    .studio-header .studio-header-main .aku-brand__name { font-size: 15px; white-space: normal; line-height: 1.05; }
    .studio-header .studio-header-mobile-social a { width: 38px; min-width: 38px; padding: 0; }
    .studio-header-callback { --aku-button-padding-inline: 8px; }
}
@media (max-width: 369px) {
    .studio-header .studio-header-mobile-social { display: none; }
}
@media (min-width: 370px) and (max-width: 389px) {
    .studio-header .studio-header-main > .studio-header-row { gap: 1px; padding-inline-start: 44px; }
    .studio-header .studio-header-mobile-social a { width: 35px; min-width: 35px; }
    .studio-header-callback { --aku-button-padding-inline: 4px; }
}
