/* Shared public-site header. Keep page-specific layout rules out of this file. */
.site-header,
.site-header *,
.site-header *::before,
.site-header *::after {
    box-sizing: border-box;
}

.site-header {
    --site-header-height: 78px;
    --site-header-rail-width: 270px;
    --site-header-text: #101a38;
    --site-header-gradient: linear-gradient(128deg, #006cff 0%, #5950e8 52%, #b334d2 100%);
    --site-header-gradient-hot: linear-gradient(128deg, #006cff 0%, #7047eb 48%, #ec3da5 100%);
    --site-header-edge: linear-gradient(90deg, #00b8ff, #5255ea 52%, #ec3da5);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    width: 100%;
    min-height: var(--site-header-height);
    align-items: center;
    padding: 0.82rem 0;
    border-bottom: 1px solid rgba(84, 113, 168, 0.22);
    background: linear-gradient(110deg, rgba(255, 255, 255, 0.97), rgba(245, 249, 255, 0.88) 62%, rgba(248, 243, 255, 0.92));
    box-shadow: 0 11px 34px rgba(33, 54, 101, 0.12);
    backdrop-filter: blur(22px) saturate(155%);
    -webkit-backdrop-filter: blur(22px) saturate(155%);
}

.site-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.72);
    background:
        linear-gradient(90deg, rgba(0, 184, 255, 0.1), transparent 34%, transparent 66%, rgba(180, 51, 210, 0.09)),
        linear-gradient(rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.site-header::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 2px;
    background: var(--site-header-edge);
    opacity: 0.72;
    box-shadow: 0 0 18px rgba(0, 108, 255, 0.3);
    pointer-events: none;
}

.site-header__container {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.45rem;
}

.site-header__logo {
    z-index: 10;
    display: flex;
    min-width: calc(var(--site-header-rail-width) - 1.45rem);
    flex-direction: row;
    align-items: center;
    gap: 0.68rem;
    text-decoration: none;
}

.site-header__logo::before {
    content: '';
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    transform: rotate(45deg);
    border: 3px solid rgba(255, 255, 255, 0.95);
    border-radius: 4px;
    background: var(--site-header-gradient-hot);
    box-shadow: 0 0 0 2px rgba(0, 108, 255, 0.2), 0 7px 18px rgba(75, 70, 205, 0.28);
}

.site-header__logo span {
    width: fit-content;
    color: transparent;
    background: linear-gradient(112deg, #101a38 2%, #006cff 40%, #7047eb 70%, #d62d92 100%);
    background-size: 180% 180%;
    background-clip: text;
    -webkit-background-clip: text;
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-size: 1.78rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.035em;
    text-shadow: 0 7px 22px rgba(66, 65, 171, 0.12);
    animation: siteHeaderLogoEnergy 6s ease-in-out infinite;
}

@keyframes siteHeaderLogoEnergy {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.site-header__search {
    position: absolute;
    top: 50%;
    right: calc(var(--site-header-rail-width) + 1.45rem);
    left: calc(var(--site-header-rail-width) + 1.45rem);
    transform: translateY(-50%);
}

.site-header__search form {
    position: relative;
    display: flex;
    min-height: 49px;
    isolation: isolate;
}

.site-header__search form::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: 16px;
    background: linear-gradient(110deg, rgba(0, 108, 255, 0.48), rgba(112, 71, 235, 0.18), rgba(236, 61, 165, 0.34));
    opacity: 0.42;
    transition: opacity 0.22s ease, filter 0.22s ease;
}

.site-header__search form:focus-within::before {
    opacity: 0.9;
    filter: drop-shadow(0 8px 15px rgba(0, 108, 255, 0.15));
}

.site-header__search-input {
    width: 100%;
    min-height: 49px;
    padding: 0.78rem 3.75rem 0.78rem 1.08rem;
    color: var(--site-header-text);
    border: 1px solid transparent;
    border-radius: 15px;
    outline: none;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 255, 0.96));
    box-shadow: inset 0 1px 0 #ffffff, 0 7px 20px rgba(38, 57, 101, 0.09);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font: inherit;
    font-size: 1rem;
    transition: color 0.22s ease, background-color 0.22s ease, box-shadow 0.22s ease, outline-color 0.22s ease;
}

.site-header__search-input::placeholder {
    color: #74819c;
    opacity: 1;
}

.site-header__search-input:hover {
    color: var(--site-header-text);
    background: #ffffff;
}

.site-header__search-input:focus,
.site-header__search-input:focus-visible {
    color: var(--site-header-text);
    border-color: transparent;
    outline: 3px solid rgba(0, 108, 255, 0.16);
    outline-offset: 3px;
    background: #ffffff;
    box-shadow: inset 0 1px 0 #ffffff, 0 10px 28px rgba(0, 108, 255, 0.14);
}

.site-header__search-button {
    position: absolute;
    top: 50%;
    right: 0.34rem;
    display: grid;
    width: 41px;
    height: 41px;
    place-items: center;
    padding: 0;
    transform: translateY(-50%);
    color: #ffffff;
    border: 1px solid rgba(32, 26, 109, 0.12);
    border-radius: 12px;
    background: var(--site-header-gradient);
    box-shadow: 0 8px 17px rgba(63, 68, 195, 0.27), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    font: inherit;
    cursor: pointer;
    transition: transform 0.22s ease, filter 0.22s ease, box-shadow 0.22s ease;
}

.site-header__search-button:hover {
    transform: translateY(-50%) scale(1.045);
    filter: saturate(1.08) brightness(1.04);
    box-shadow: 0 11px 24px rgba(63, 68, 195, 0.34), 0 0 0 4px rgba(0, 108, 255, 0.09);
}

.site-header__search-button:focus-visible {
    outline: 3px solid #00aeea;
    outline-offset: 3px;
}

.site-header__title {
    position: absolute;
    top: 50%;
    right: 1.45rem;
    z-index: 10;
    max-width: calc(var(--site-header-rail-width) - 2rem);
    margin: 0;
    overflow: hidden;
    transform: translateY(-50%);
    color: #596987;
    font-family: 'Orbitron', 'Inter', sans-serif;
    font-size: 0.63rem;
    font-weight: 700;
    line-height: 1.45;
    letter-spacing: 0.14em;
    text-align: right;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .site-header {
        --site-header-rail-width: 238px;
    }

    .site-header__container {
        padding: 0 1rem;
    }

    .site-header__search {
        right: calc(var(--site-header-rail-width) + 1rem);
        left: calc(var(--site-header-rail-width) + 1rem);
    }

    .site-header__title {
        right: 1rem;
    }
}

@media (max-width: 1024px) {
    .site-header {
        min-height: auto;
        padding: 0.72rem 0;
    }

    .site-header__container {
        display: grid;
        grid-template-columns: auto minmax(240px, 1fr);
        gap: 1rem;
        padding: 0 1.05rem;
    }

    .site-header__logo {
        min-width: 0;
    }

    .site-header__search {
        position: static;
        width: auto;
        transform: none;
    }

    .site-header__title {
        display: none;
    }
}

@media (max-width: 640px) {
    .site-header__container {
        grid-template-columns: minmax(0, 1fr);
        gap: 0.7rem;
        padding: 0 0.78rem;
    }

    .site-header__logo {
        justify-content: center;
    }

    .site-header__logo::before {
        width: 11px;
        height: 11px;
        flex-basis: 11px;
        border-width: 2px;
    }

    .site-header__logo span {
        font-size: 1.48rem;
    }

    .site-header__search {
        width: 100%;
    }

    .site-header__search form,
    .site-header__search-input {
        min-height: 47px;
    }

    .site-header__search-button {
        width: 39px;
        height: 39px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .site-header *,
    .site-header *::before,
    .site-header *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
