/* Шапка и подвал сайта (вынесено из header.php/footer.php, кешируется браузером). */

/* ── Шапка ── */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1d1d1d;
    border-radius: 0px;
}

::-webkit-scrollbar-thumb {
    background: #5A5A5A;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E57431;
}

    
.wall23 {
    background: url('/wp-content/themes/macrolook_wp/images/back_pattern.svg');
    width: 100vw;
    height: 100vh;
    background-color: var(--main-back);
    background-size: 19vw;
    background-position: 50% 50%;
    position: fixed;
    z-index: -50;
}


.headerlogotext, .go, .go2 {
    font-family: 'Montserrat', sans-serif;
}

.headerwow a {
    text-decoration: none !important;
    color: white;
}

.headerwow a:hover {
    color: var(--orange);
}

.headerwow {
        width: calc(70% + 120px);
    height: auto;
    position: fixed;
    top: 0;
    left: 0;
    padding-left: 60px;
    padding-right: 60px;
    padding-top: 15px;
    padding-bottom: 15px;
    margin: 0 calc(15% - 60px);
    z-index: 50;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    box-sizing: border-box;
    transition: background 0.3s ease;
    border-radius: 0 0 80px 80px;
}

.logocontainerhead {
    margin-left: 0;
    display: flex;
    align-items: center;
    height: 50px;
    cursor: pointer;
    width: 50px;
}

.headerlogo, .headerlogo1, .headerlogo2, .headerlogo3 {
    width: 50px;
    height: auto;
    padding: 0;
    margin-left: 0;
    transition: all 0.2 ease;
    max-width: fit-content;
}

.headerlogo1, .headerlogo2, .headerlogo3 {
    position: absolute;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.61, 0.7, 1);
}

.headerlogo1 { z-index: -1; }
.headerlogo2 { z-index: -2; }
.headerlogo3 { z-index: -3; }

.logocontainerhead:hover .headerlogo1 {
    margin-left: -3px;
    opacity: 1;
}

.logocontainerhead:hover .headerlogo2 {
    margin-left: -6px;
    opacity: 1;
}

.logocontainerhead:hover .headerlogo3 {
    margin-left: -9px;
    opacity: 1;
}

.headerlogotext {
    font-size: 20px;
    color: white;
    margin-left: 20px;
    white-space: nowrap;
}

.headermenulist, .headermenulist2 {
    display: flex;
    align-items: center;
    gap: 30px;
    width: auto;
    justify-content: flex-end;
}

.headermenulist {
    height: 50px;
}

/* СТИЛИ ДЛЯ АНИМАЦИИ МЕНЮ */
.headermenulist2 {
    flex-wrap: wrap;
    padding-left: 40px;
    width: auto;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0; /* Changed from 18px to avoid jump, handled by padding if needed */
    
    /* Скрытое состояние */
    overflow: hidden;
    height: 0;
    opacity: 0;
    visibility: hidden; /* Чтобы не перекрывало клики */
    
    /* Плавная анимация */
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease-in-out, 
                visibility 0.4s;
    will-change: height, opacity;
}

.headermenulist2.active {
    opacity: 1;
    visibility: visible;
    margin-bottom: 18px; /* Возвращаем отступ, когда открыто */
    /* Height выставляется через JS */
}

.go, .go2 {
    font-size: 20px;
    color: white;
    transition: color 0.25s ease;
    cursor: pointer;
}

.go:hover, .go2:hover {
    color: #E57431;
}

#goall {
    color: white;
    display: flex;
    align-items: center;
}

#goall:hover {
    color: #E57431;
}

.burger-icon rect {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    transform-origin: center;
}

#goall.burger-open .burger-line1 {
    transform: translateY(6.75px) rotate(45deg);
}
#goall.burger-open .burger-line2 {
    opacity: 0;
}
#goall.burger-open .burger-line3 {
    transform: translateY(-6.75px) rotate(-45deg);
}

@media screen and (max-width: 1200px) {
    #goask { display: none; }
}

@media screen and (min-width: 1200px) {
    #goask2 { display: none; }
}

@media screen and (min-width: 1100px) {
    #gocontact2 { display: none; }
}

@media screen and (max-width: 1100px) {
    #gocontact { display: none; }
}

@media screen and (max-width: 714px) {
    .headerlogotext {
        display: none;
    }
    
}

@media screen and (max-width: 380px) {
    #mainpagelink {
        display: none;
    }
    
}

@media screen and (max-width: 550px) {
    .go, .go2 {
        font-size: 14px;
    }
    
    .headermenulist, .headermenulist2 {
        gap: 19px;
    }
    
    .headerlogo, .headerlogo1, .headerlogo2, .headerlogo3 {
        width: 30px;
    }
    
    .headerwow {
        padding-top: 10px;
        padding-bottom: 10px;
    }
}



@media screen and (max-width: 767px) {
    .headerwow {
        padding-right: 8%;
        padding-left: 8%;
        margin: 0;
        width: 100%;
        border-radius: 0 0 30px 30px;
    }
    
    .headermenulist2 {
        flex-wrap: wrap;
        padding-left: 70%;
        margin-top: 0;
        width: auto;
        display: flex;
        justify-content: flex-end;
    }
    
    .wall23 {
        background-size: 29vw;
    }
}

/* ── Подвал ── */
.footerwow a {
    text-decoration: none !important;
}

.orginfofooter {
    color: #363636;
}

.footerwow {
    flex-direction: column;
    width: 100%;
    background-color: #111111;
    padding-top: 50px;
    padding-left: 15%;
    padding-right: 15%;
    padding-bottom: 50px;
    z-index: 50;
    display: flex;
    position: relative;
    box-sizing: border-box;
    margin-top: auto; /* добавлено для отталкивания от других элементов */
    bottom: 0;
    border-radius: 30px 30px 0 0;
}

.punktcont {
    margin-top: 50px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 50px;
}

.footertext {
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    color: gray;
}

.footerpunkt {
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    color: gray;
    transition: all 0.2s ease;
    cursor: pointer;
}

.footerpunkt:hover {
    color: #E57431;
}

.logofootercont2 {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 350px;
    margin: 50px 0 0 0;
}

.footerlogo {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.footerlogo .ml-soc-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.footerlogo .ml-soc-svg,
.footerlogo .ml-soc-svg * {
    transition: fill 0.25s ease;
}

.footerlogo:hover .ml-soc-svg,
.footerlogo:hover .ml-soc-svg * {
    fill: var(--orange);
}

.footermail {
    font-family: Montserrat, sans-serif;
    font-size: 15px;
    color: white;
}

@media screen and (max-width: 1024px) and (min-width: 767px) {
    .footerwow {
        padding-right: 10%;
        padding-left: 10%;
    }

    .punktcont {
        flex-direction: column;
        gap: 20px;
    }
}

@media screen and (max-width: 767px) {
    .footermail {
        font-size: 12px;
    }

    .footerwow {
        padding-right: 8%;
        padding-left: 8%;
    }

    .footertext {
        font-size: 12px;
    }

    .punktcont {
        flex-direction: column;
        gap: 20px;
    }
}
.orginfofooter {
    display: flex;
    text-align: center;
    align-self: center;
}

/* ── Кнопка «записаться» в шапке: как основная кнопка записи (.orange_butt) ── */
.headerwow a.ml-header-cta {
    display: inline-flex;
    align-items: center;
    padding: 5px 16px;
    border: none;
    border-radius: 100px;
    background: var(--orange, #E57431);
    font-size: 17px;
    line-height: 1.2;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    max-width: 240px;
    transition: background-color 0.1s ease, color 0.1s ease,
        opacity 0.35s ease, transform 0.35s ease, max-width 0.45s ease,
        padding 0.45s ease, margin 0.45s ease;
}
/* Кнопки записи на странице видны — в шапке она не нужна: плавно уходит */
.headerwow a.ml-header-cta.is-away {
    opacity: 0;
    transform: scale(0.9);
    max-width: 0;
    padding-left: 0;
    padding-right: 0;
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .headerwow a.ml-header-cta { transition: background-color 0.1s ease, color 0.1s ease; }
}
.headerwow a.ml-header-cta:hover,
.headerwow a.ml-header-cta:focus-visible {
    background: var(--white, #fff);
    color: var(--orange, #E57431);
}
@media screen and (max-width: 550px) {
    .headerwow a.ml-header-cta { font-size: 13px; padding: 4px 12px; }
    /* На телефоне «главная» дублирует логотип — уступает место кнопке записи */
    .headermenulist #mainpagelink { display: none; }
}
/* С кнопкой записи меню шире: «главная» (дублирует логотип) и подпись
   «macrolook» уходят раньше, чтобы пункты не наезжали на логотип. */
@media screen and (max-width: 1400px) {
    .headermenulist #mainpagelink { display: none; }
}
@media screen and (max-width: 960px) {
    .headerlogotext { display: none; }
}
@media screen and (max-width: 420px) {
    .headermenulist { gap: 12px; }
    .headermenulist .go { font-size: 13px; }
    .headerwow a.ml-header-cta { padding: 4px 10px; font-size: 12.5px; }
}
/* Узкие телефоны: боковые отступы 8% съедали место, и на 320px меню
   вплотную упиралось в логотип. Отступ — как у страницы (16px). */
@media screen and (max-width: 380px) {
    .headerwow { padding-left: 16px; padding-right: 16px; }
    .headermenulist { gap: 10px; }
    .headermenulist .go { font-size: 12.5px; }
}
@media screen and (max-width: 340px) {
    .headermenulist { gap: 8px; }
    .headermenulist .go { font-size: 12px; }
    .headerwow a.ml-header-cta { padding: 4px 9px; font-size: 12px; }
}

/* ── Большие мониторы (>1920px): шапка растёт вместе с экраном, но по меньшей
   из сторон (ультраширокие ведут себя как 1440p). До Full HD — без изменений. */
@media screen and (min-width: 1921px) {
    .headerwow { --hs: clamp(20px, min(0.94vw, 1.67vh), 26px); }
    .headerwow .go, .headerwow .go2, .headerlogotext { font-size: var(--hs); }
    .headermenulist, .headermenulist2 { gap: calc(var(--hs) * 1.5); }
    .headerlogo, .headerlogo1, .headerlogo2, .headerlogo3, .logocontainerhead { width: calc(var(--hs) * 2.5); }
    .logocontainerhead { height: calc(var(--hs) * 2.5); }
    .headerwow a.ml-header-cta { font-size: calc(var(--hs) * .85); padding: calc(var(--hs) * .25) calc(var(--hs) * .8); }
}

/* macrolook.art: пункты строки шапки по мере сужения экрана переезжают в бургер
   (там их дубли #goquality2/#goanalysis2 — видны только когда пункта нет в строке). */
#goquality2, #goanalysis2 { display: none; }
@media screen and (max-width: 1100px) {
    .headermenulist #goquality { display: none; }
    #goquality2 { display: inline; }
}
@media screen and (max-width: 560px) {
    .headermenulist #goanalysis { display: none; }
    #goanalysis2 { display: inline; }
}
