.portal-site-header,
.portal-site-header * {
    box-sizing: border-box;
}

.portal-site-header {
    position: sticky;
    top: 0;
    z-index: 2000;
    width: 100%;
    color: #e7edf5;
    background: rgba(5, 18, 25, 0.96);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html.portal-header-fixed .portal-site-header {
    position: fixed;
    right: 0;
    left: 0;
}

.portal-site-header__nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    width: min(100% - 40px, 1140px);
    min-height: 84px;
    margin: 0 auto;
}

.portal-site-header__brand {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    color: #f3f6fa;
    text-decoration: none;
}

.portal-site-header__brand:hover,
.portal-site-header__brand:focus-visible {
    color: #fff;
}

.portal-site-header__mark {
    position: relative;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    overflow: hidden;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffb347, #ff7417);
    box-shadow: 0 8px 24px rgba(255, 122, 24, 0.2);
}

.portal-site-header__mark::before,
.portal-site-header__mark::after {
    content: "";
    position: absolute;
    top: 8px;
    width: 3px;
    height: 22px;
    border-radius: 2px;
    background: #182028;
    transform: skew(-12deg);
}

.portal-site-header__mark::before { left: 13px; }
.portal-site-header__mark::after { left: 22px; }

.portal-site-header__brand-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}

.portal-site-header__title {
    color: #f3f6fa;
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.portal-site-header__subtitle {
    margin-top: 5px;
    color: #93a4b4;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.portal-site-header__menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-left: auto;
}

.portal-site-header__link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: #cbd3dc;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.portal-site-header__link:hover,
.portal-site-header__link:focus-visible,
.portal-site-header__link[aria-current="page"] {
    color: #fff;
    border-color: rgba(255, 122, 24, 0.38);
    background: rgba(255, 122, 24, 0.08);
}

.portal-site-header__link--participar {
    color: #ffb15c;
}

.portal-site-header__toggle {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 122, 24, 0.32);
    border-radius: 10px;
    color: #fff;
    background: rgba(255, 122, 24, 0.08);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

html.portal-header-layout-centered body {
    grid-template-rows: auto minmax(0, 1fr);
    padding: 0 !important;
    place-items: stretch center;
}

html.portal-header-layout-centered body > main {
    align-self: center;
    padding: 24px;
}

html.portal-header-layout-app body {
    display: flex;
    flex-direction: column;
}

html.portal-header-layout-app .app-shell {
    width: 100%;
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
}

@media (max-width: 900px) {
    .portal-site-header__nav {
        position: relative;
        flex-wrap: wrap;
        gap: 0;
        width: min(100% - 28px, 1140px);
        min-height: 72px;
    }

    .portal-site-header__subtitle { display: none; }
    .portal-site-header__toggle { display: inline-flex; }

    .portal-site-header__menu {
        display: none;
        width: 100%;
        margin: 0;
        padding: 8px 0 14px;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 4px;
    }

    .portal-site-header.is-menu-open .portal-site-header__menu {
        display: flex;
    }
}

@media (max-width: 520px) {
    .portal-site-header__nav { width: min(100% - 20px, 1140px); }
    .portal-site-header__title { font-size: 0.92rem; }
    .portal-site-header__mark { width: 34px; height: 34px; flex-basis: 34px; }
    .portal-site-header__mark::before,
    .portal-site-header__mark::after { top: 7px; height: 20px; }
    .portal-site-header__mark::before { left: 11px; }
    .portal-site-header__mark::after { left: 20px; }
    .portal-site-header__link { min-height: 38px; padding: 8px 10px; font-size: 0.8rem; }
}

@media (prefers-reduced-motion: reduce) {
    .portal-site-header__link { transition: none; }
}
