.so-cabecalho {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(11, 31, 58, 0.08);
    backdrop-filter: blur(14px);
}

.admin-bar .so-cabecalho {
    top: 32px;
}

.so-cabecalho__interno {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    min-height: 78px;
}

.so-cabecalho__marca {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    max-width: 260px;
    text-decoration: none;
}

.so-cabecalho__logo {
    display: block;
    width: auto;
    height: 48px;
    max-width: 260px;
    object-fit: contain;
}

.so-cabecalho__logo-texto {
    display: block;
    color: var(--so-azul-escuro);
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.03em;
}

.so-cabecalho__descricao {
    display: block;
    margin-top: 7px;
    color: var(--so-texto-secundario);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
}

.so-cabecalho__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex: 1;
}

.so-cabecalho__link {
    color: var(--so-azul-escuro);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: color 0.2s ease;
}

.so-cabecalho__link:hover {
    color: var(--so-laranja);
}

.so-cabecalho__item {
    position: relative;
}

.so-cabecalho__link--servicos::after {
    content: "▾";
    display: inline-block;
    margin-left: 6px;
    font-size: 10px;
    transform: translateY(-1px);
}

.so-cabecalho__mega {
    position: absolute;
    top: calc(100% + 22px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 28px;
    width: min(900px, calc(100vw - 48px));
    padding: 28px;
    border: 1px solid var(--so-borda);
    border-radius: 26px;
    background: var(--so-branco);
    box-shadow: 0 28px 80px rgba(11, 31, 58, 0.16);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

.so-cabecalho__item--mega:hover .so-cabecalho__mega,
.so-cabecalho__item--mega:focus-within .so-cabecalho__mega {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.so-cabecalho__mega::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -24px;
    height: 24px;
}

.so-cabecalho__mega-coluna {
    display: grid;
    gap: 10px;
    align-content: start;
}

.so-cabecalho__mega-coluna strong {
    display: block;
    margin-bottom: 8px;
    color: var(--so-azul-escuro);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
}

.so-cabecalho__mega-coluna a {
    display: block;
    padding: 8px 10px;
    margin-left: -10px;
    border-radius: 12px;
    color: var(--so-texto-secundario);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.25;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background 0.2s ease;
}

.so-cabecalho__mega-coluna a:hover {
    background: var(--so-gelo);
    color: var(--so-laranja);
}

.so-cabecalho__acoes {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.so-cabecalho__telefone {
    color: var(--so-azul-escuro);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: color 0.2s ease;
}

.so-cabecalho__telefone:hover {
    color: var(--so-laranja);
}

.so-cabecalho__botao {
    min-height: 42px;
    padding: 12px 18px;
    font-size: 14px;
}

.so-cabecalho__mobile-cta {
    display: none;
}

.so-cabecalho__toggle {
    display: none !important;
}

@media (max-width: 1180px) {
    .so-cabecalho__logo {
        height: 42px;
        max-width: 220px;
    }

    .so-cabecalho__nav {
        gap: 18px;
    }
}

@media (max-width: 1080px) {
    .so-cabecalho__interno {
        min-height: 72px;
    }

    .so-cabecalho__marca {
        max-width: 230px;
    }

    .so-cabecalho__logo {
        height: 40px;
        max-width: 220px;
    }

    .so-cabecalho__nav,
    .so-cabecalho__acoes {
        display: none;
    }

    .so-cabecalho__toggle {
        display: inline-flex !important;
        position: relative;
        z-index: 1001;
        align-items: center;
        justify-content: center;
        width: 46px;
        height: 46px;
        padding: 0;
        border: 1px solid var(--so-laranja);
        border-radius: 10px;
        background: var(--so-laranja);
        cursor: pointer;
        box-shadow: 0 12px 30px rgba(255, 138, 0, 0.18);
    }

    .so-cabecalho__toggle span {
        position: absolute;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: var(--so-branco);
        transition: transform 0.2s ease, opacity 0.2s ease;
    }

    .so-cabecalho__toggle span:nth-child(1) {
        transform: translateY(-6px);
    }

    .so-cabecalho__toggle span:nth-child(3) {
        transform: translateY(6px);
    }

    .so-cabecalho__toggle em {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .so-cabecalho.menu-aberto .so-cabecalho__toggle {
        background: var(--so-laranja);
        border-color: var(--so-laranja);
    }

    .so-cabecalho.menu-aberto .so-cabecalho__toggle span:nth-child(1) {
        transform: rotate(45deg);
    }

    .so-cabecalho.menu-aberto .so-cabecalho__toggle span:nth-child(2) {
        opacity: 0;
    }

    .so-cabecalho.menu-aberto .so-cabecalho__toggle span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .so-cabecalho.menu-aberto .so-cabecalho__nav {
        display: flex;
        position: absolute;
        left: 14px;
        right: 14px;
        top: calc(100% + 8px);
        width: auto;
        max-width: calc(100vw - 28px);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 0;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        overflow-x: hidden;
        padding: 16px;
        border: 1px solid var(--so-borda);
        border-radius: 24px;
        background: var(--so-branco);
        box-shadow: 0 24px 70px rgba(11, 31, 58, 0.16);
        box-sizing: border-box;
    }

    .so-cabecalho.menu-aberto .so-cabecalho__link {
        padding: 15px 14px;
        border-radius: 16px;
        font-size: 16px;
        line-height: 1.2;
    }

    .so-cabecalho.menu-aberto .so-cabecalho__link:hover {
        background: var(--so-gelo);
    }

    .so-cabecalho__item {
        position: static;
        width: 100%;
    }

    .so-cabecalho__link--servicos::after {
        content: none;
    }

    .so-cabecalho__mega {
        position: static;
        transform: none;
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
        width: 100%;
        min-width: 0;
        max-width: 100%;
        margin: 6px 0 12px;
        padding: 16px;
        border-radius: 18px;
        background: var(--so-gelo);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        border: 1px solid var(--so-borda);
        box-sizing: border-box;
        overflow: hidden;
    }

    .so-cabecalho__mega::before {
        content: none;
    }

    .so-cabecalho__mega-coluna {
        gap: 6px;
        min-width: 0;
    }

    .so-cabecalho__mega-coluna strong {
        margin: 8px 0 4px;
        font-size: 13px;
    }

    .so-cabecalho__mega-coluna a {
        margin-left: 0;
        padding: 9px 10px;
        border-radius: 12px;
        font-size: 14px;
        word-break: normal;
    }

    .so-cabecalho__mobile-cta {
        display: grid;
        gap: 12px;
        padding: 16px 0 0;
        margin-top: 10px;
        border-top: 1px solid var(--so-borda);
    }

    .so-cabecalho__mobile-telefone {
        color: var(--so-azul-escuro);
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
    }
}

@media (max-width: 782px) {
    .admin-bar .so-cabecalho {
        top: 46px;
    }
}

@media (max-width: 640px) {
    .so-cabecalho__marca {
        max-width: 220px;
    }

    .so-cabecalho__logo {
        height: 34px;
        max-width: 210px;
    }

    .so-cabecalho__toggle {
        width: 42px;
        height: 42px;
    }

    .so-cabecalho.menu-aberto .so-cabecalho__nav {
        left: 12px;
        right: 12px;
        max-width: calc(100vw - 24px);
        padding: 14px;
    }
}

.so-cabecalho__toggle,
.so-cabecalho__toggle:hover,
.so-cabecalho__toggle:focus,
.so-cabecalho__toggle:active,
.so-cabecalho.menu-aberto .so-cabecalho__toggle,
.so-cabecalho.menu-aberto .so-cabecalho__toggle:hover,
.so-cabecalho.menu-aberto .so-cabecalho__toggle:focus,
.so-cabecalho.menu-aberto .so-cabecalho__toggle:active {
    background: var(--so-laranja) !important;
    border-color: var(--so-laranja) !important;
    color: var(--so-branco) !important;
    outline: none !important;
    box-shadow: 0 12px 30px rgba(255, 138, 0, 0.18) !important;
}

.so-cabecalho__toggle span,
.so-cabecalho__toggle:hover span,
.so-cabecalho__toggle:focus span,
.so-cabecalho__toggle:active span,
.so-cabecalho.menu-aberto .so-cabecalho__toggle span {
    background: var(--so-branco) !important;
}

.so-cabecalho__toggle:focus-visible {
    outline: 3px solid rgba(255, 138, 0, 0.28) !important;
    outline-offset: 3px;
}

@media (max-width: 1080px) {
    .so-cabecalho.menu-aberto .so-cabecalho__item--mega:hover .so-cabecalho__mega,
    .so-cabecalho.menu-aberto .so-cabecalho__item--mega:focus-within .so-cabecalho__mega {
        position: static !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    .so-cabecalho.menu-aberto .so-cabecalho__mega {
        position: static !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        transform: none !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .so-cabecalho.menu-aberto .so-cabecalho__mega-coluna,
    .so-cabecalho.menu-aberto .so-cabecalho__mega-coluna a {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}