/*
|--------------------------------------------------------------------------
| Cabeçalho público
|--------------------------------------------------------------------------
*/

.ds-public-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid #e6e8eb;
    box-shadow: 0 5px 22px rgba(34, 38, 43, 0.08);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
}

.ds-public-header *,
.ds-public-header *::before,
.ds-public-header *::after {
    box-sizing: border-box;
}

.ds-public-header__accent {
    width: 100%;
    height: 5px;
    background:
        linear-gradient(
            90deg,
            #7d1425 0%,
            #b3243d 45%,
            #df536a 100%
        );
}

.ds-public-header__container {
    width: 100%;
    max-width: 1240px;
    min-height: 82px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

/*
|--------------------------------------------------------------------------
| Marca
|--------------------------------------------------------------------------
*/

.ds-public-header__brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #24272b;
    text-decoration: none;
}

.ds-public-header__brand-mark {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #a51f37,
            #711426
        );
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 8px 18px rgba(125, 20, 37, 0.24);
}

.ds-public-header__brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ds-public-header__brand-text strong {
    color: #6f1324;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.2;
}

.ds-public-header__brand-text small {
    overflow: hidden;
    color: #636a73;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/*
|--------------------------------------------------------------------------
| Navegação
|--------------------------------------------------------------------------
*/

.ds-public-header__menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.ds-public-header__link {
    min-height: 42px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    color: #464c54;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition:
        color 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.ds-public-header__link:hover {
    color: #7d1425;
    background: #f8edf0;
}

.ds-public-header__link:focus-visible {
    outline: 3px solid rgba(179, 36, 61, 0.3);
    outline-offset: 3px;
}

.ds-public-header__link--primary {
    margin-left: 5px;
    padding-right: 20px;
    padding-left: 20px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #a51f37,
            #7d1425
        );
    box-shadow: 0 8px 18px rgba(125, 20, 37, 0.19);
}

.ds-public-header__link--primary:hover {
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #b42641,
            #8b172b
        );
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(125, 20, 37, 0.25);
}

/*
|--------------------------------------------------------------------------
| Botão do menu móvel
|--------------------------------------------------------------------------
*/

.ds-public-header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid #dddfe3;
    border-radius: 9px;
    color: #5f1725;
    background: #ffffff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.ds-public-header__toggle-icon {
    width: 21px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ds-public-header__toggle-icon i {
    width: 100%;
    height: 2px;
    display: block;
    border-radius: 10px;
    background: currentColor;
    transition:
        transform 0.2s ease,
        opacity 0.2s ease;
}

.ds-public-header__toggle[aria-expanded="true"]
.ds-public-header__toggle-icon i:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.ds-public-header__toggle[aria-expanded="true"]
.ds-public-header__toggle-icon i:nth-child(2) {
    opacity: 0;
}

.ds-public-header__toggle[aria-expanded="true"]
.ds-public-header__toggle-icon i:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/*
|--------------------------------------------------------------------------
| Link de acessibilidade
|--------------------------------------------------------------------------
*/

.ds-public-header__skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 9999;
    padding: 11px 16px;
    border-radius: 7px;
    color: #ffffff;
    background: #24272b;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform 0.2s ease;
}

.ds-public-header__skip-link:focus {
    transform: translateY(0);
}

/*
|--------------------------------------------------------------------------
| Âncoras
|--------------------------------------------------------------------------
*/

#conteudo-principal,
#campanha,
#inscricao {
    scroll-margin-top: 110px;
}

/*
|--------------------------------------------------------------------------
| Responsividade
|--------------------------------------------------------------------------
*/

@media (max-width: 820px) {
    .ds-public-header__container {
        position: relative;
        min-height: 74px;
        padding-right: 18px;
        padding-left: 18px;
    }

    .ds-public-header__brand-mark {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
        border-radius: 12px;
        font-size: 14px;
    }

    .ds-public-header__brand-text strong {
        font-size: 17px;
    }

    .ds-public-header__brand-text small {
        max-width: 270px;
        font-size: 12px;
    }

    .ds-public-header__toggle {
        display: inline-flex;
    }

    .ds-public-header__menu {
        position: absolute;
        top: calc(100% + 1px);
        right: 16px;
        left: 16px;
        display: none;
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
        border: 1px solid #e1e3e6;
        border-radius: 0 0 14px 14px;
        background: #ffffff;
        box-shadow: 0 18px 30px rgba(28, 31, 35, 0.16);
    }

    .ds-public-header__menu.is-open {
        display: flex;
    }

    .ds-public-header__link {
        width: 100%;
        justify-content: flex-start;
        padding-right: 16px;
        padding-left: 16px;
    }

    .ds-public-header__link--primary {
        margin: 5px 0 0;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .ds-public-header__brand-text small {
        display: none;
    }

    .ds-public-header__brand-text strong {
        font-size: 16px;
    }

    .ds-public-header__toggle-text {
        display: none;
    }

    .ds-public-header__toggle {
        width: 44px;
        padding: 0 11px;
    }
}

@media print {
    .ds-public-header,
    .ds-public-header__skip-link {
        display: none;
    }
}