.rh-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, #f5f3ef 94%, transparent);
    color: #111413;
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #cacbc6;
}

.rh-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--red);
    transform: scaleX(var(--scroll-progress));
    transform-origin: left center;
    will-change: transform;
}

body.admin-bar .rh-header {
    top: 32px;
}

.rh-header__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 74px;
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--pad);
}

.rh-logo {
    display: block;
    flex: 0 0 auto;
    line-height: 0;
    text-decoration: none;
}

.rh-logo:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 5px;
}

.rh-logo img {
    display: block;
    width: clamp(148px, 16vw, 204px);
    height: auto;
}

.rh-nav {
    display: flex;
}

.rh-nav__list {
    display: flex;
    gap: clamp(11px, 1.4vw, 22px);
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.rh-nav__list a {
    position: relative;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding-block: 8px;
}

.rh-nav__list a:hover {
    text-decoration: underline;
    text-underline-offset: 6px;
}

.rh-nav__list a:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 3px;
}

.rh-nav__list a[aria-current="page"] {
    color: #111413;
}

.rh-nav__list a[aria-current="page"]::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1px;
    height: 3px;
    background: var(--red);
}

.rh-nav__list a[aria-current="page"]:hover {
    text-decoration: none;
}

.rh-search-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    background: transparent;
    border: 1px solid transparent;
    color: #111413;
    cursor: pointer;
    flex: 0 0 auto;
    padding: 0;
}

.rh-search-toggle svg {
    width: 22px;
    height: 22px;
    display: block;
}

.rh-search-toggle:hover {
    border-color: #cacbc6;
    background: rgba(255, 255, 255, 0.55);
}

.rh-search-toggle:focus-visible {
    outline: 3px solid var(--red);
    outline-offset: 2px;
}

.rh-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border: 0;
    background: var(--red);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.25s var(--motion-ease), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rh-cta::after {
    content: "\2192";
}

.rh-cta:hover {
    background: var(--red-dark);
}

.rh-cta:active {
    transform: translateY(1px);
}

.rh-menu-toggle {
    display: none;
    border: 1px solid #626865;
    background: transparent;
    color: #111413;
    padding: 9px 12px;
    cursor: pointer;
}

@media (max-width: 900px) {
    .rh-logo img {
        width: 120px;
    }

    .rh-header__bar {
        gap: 8px;
    }

    .rh-cta {
        display: none;
    }

    .rh-search-toggle {
        margin-left: auto;
        width: 38px;
        height: 38px;
    }

    .rh-menu-toggle {
        display: block;
    }

    .rh-nav {
        display: none;
        position: absolute;
        top: 74px;
        left: 0;
        right: 0;
        background: #f5f3ef;
        color: #111413;
        padding: 24px var(--pad);
        border-bottom: 1px solid #cacbc6;
        box-shadow: 0 18px 30px rgba(16, 20, 19, 0.14);
        flex-direction: column;
        align-items: flex-start;
    }

    .rh-nav.is-open {
        display: flex;
    }

    .rh-nav__list {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 782px) {
    body.admin-bar .rh-header {
        top: 46px;
    }
}

@media (max-width: 480px) {
    .rh-header__bar {
        gap: 7px;
    }

    .rh-logo img {
        width: 100px;
    }

    .rh-menu-toggle {
        padding: 8px 9px;
    }

    .rh-search-toggle {
        width: 36px;
        height: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rh-header::after {
        display: none;
    }
}
