:root {
    --hc_action_icon_gap: 23px;
    scroll-padding-block-start: var(--hc_header_scroll_offset, 0px);
}

.hc_header {
    --hc_header_rest_height: 106px;
    --hc_header_height: var(--hc_header_rest_height);
    --hc_header_space: var(--hc_header_rest_height);
    --hc_header_transition: .25s ease;
    position: sticky;
    top: 0;
    z-index: 5;
    margin-block-end: calc(var(--hc_header_space) - var(--hc_header_height));
    background: var(--hc_white);
}

.hc_header.hc_header_home {
    --hc_header_space: 0px;
    background: transparent;
}

.hc_header.hc_header_scrolled {
    --hc_header_height: 90px;
    background: rgb(255 255 255 / 95%);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

.hc_header_inner {
    width: min(100% - 2 * var(--hc_gutter), var(--hc_content_width));
    min-height: var(--hc_header_height);
    margin-inline: auto;
    display: flex;
    align-items: center;
    gap: clamp(20px, 5vw, 70px);
}

@media (prefers-reduced-motion: no-preference) {
    .hc_header {
        transition: margin-block-end var(--hc_header_transition), background-color var(--hc_header_transition), backdrop-filter var(--hc_header_transition);
    }
    .hc_header_inner { transition: min-height var(--hc_header_transition), padding-block var(--hc_header_transition); }
    .hc_header_nav { transition: margin-top var(--hc_header_transition); }
}

.hc_icon_button {
    display: inline-grid;
    place-items: center;
    padding: 4px;
    min-width: 36px;
    min-height: 40px;
    color: inherit;
    border: 0;
    background: transparent;
    text-decoration: none;
    cursor: pointer;
}

.hc_menu_toggle, .hc_header_shortlist { color: var(--hc_ink); }
:is(.hc_menu_toggle, .hc_header_shortlist):is(:hover, :focus-visible) { color: var(--hc_accent); }
@media (prefers-reduced-motion: no-preference) {
    .hc_menu_toggle { transition: color .22s ease; }
}
.hc_icon_circle {
    width: 44px;
    height: 44px;
    flex: none;
    padding: 0;
    border: 1px solid var(--hc_border_soft);
    border-radius: 22px;
    background: rgb(255 255 255 / 65%) padding-box;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    color: var(--hc_ink);
}

.hc_icon_circle:is(:hover, :focus-visible, [aria-pressed="true"]) { color: var(--hc_accent); }
.hc_icon_circle[aria-pressed="true"] .hc_icon_heart { fill: currentColor; }

.hc_header_nav { color: var(--hc_text_soft); }

.hc_header_nav, .hc_header_actions {
    display: flex;
    align-items: center;
    gap: clamp(16px, 5vw, 70px);
}

.hc_header_nav a { text-decoration: none; }
.hc_header_nav a:hover { color: var(--hc_ink); }
.hc_header_actions { margin-left: auto; gap: 34px; }
.hc_header_actions .hc_button { min-width: 170px; font-size: 14px; }
.hc_header_logo img { display: block; height: auto; }

.hc_drawer {
    position: fixed;
    inset: 0 auto 0 0;
    margin: 0;
    border: 0;
    width: min(375px, 90vw);
    max-width: none;
    height: 100dvh;
    max-height: none;
    padding: 24px;
    color: var(--hc_white);
    background: var(--hc_ink);
    --hc_focus_outer: var(--hc_white);
    --hc_focus_inner: var(--hc_ink);
}

.hc_drawer[open] { display: flex; flex-direction: column; animation: hc_drawer_in .26s ease-out; }
.hc_drawer::backdrop { background: var(--hc_popup_overlay); backdrop-filter: blur(var(--hc_popup_blur)); animation: hc_drawer_fade .26s ease-out; }
.hc_drawer.hc_drawer_closing { animation: hc_drawer_out .26s ease-in both; }
.hc_drawer.hc_drawer_closing::backdrop { animation: hc_drawer_fade_out .26s ease-in both; }
.hc_drawer_top { display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.hc_drawer_logo img { display: block; width: 120px; height: 44px; }
.hc_drawer_close { width: 44px; height: 44px; }
.hc_drawer nav { margin: 6px -14px 24px; padding: 6px; overflow: auto; overscroll-behavior: contain; }
.hc_drawer nav a {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: clamp(44px, 7.85dvh, 64px);
    padding-inline: 8px;
    font-size: var(--hc_body_size);
    font-weight: var(--hc_body_weight);
    text-decoration: none;
}
.hc_drawer nav .hc_drawer_primary { min-height: clamp(44px, 6.4dvh, 52px); font-weight: 500; }
.hc_drawer nav :not(.hc_drawer_primary) + .hc_drawer_primary,
.hc_drawer nav .hc_drawer_primary + :not(.hc_drawer_primary) { margin-top: 8px; }
.hc_drawer nav a[aria-current="page"] { color: var(--hc_heading_accent); }
.hc_drawer nav a::before {
    content: "";
    position: absolute;
    inset: max(4px, 50% - 22px) 0;
    z-index: -1;
    border-radius: var(--hc_radius);
    background: rgb(255 255 255 / .08);
    opacity: 0;
    transition: opacity .2s ease;
}
@media (hover: hover) {
    .hc_drawer nav a:hover::before { opacity: 1; }
    .hc_drawer nav a:hover:not([aria-current]) { color: var(--hc_white); }
}
.hc_drawer_cta { width: 100%; margin-top: auto; flex-shrink: 0; }
.hc_drawer_cta:hover:not(:disabled) { border-color: var(--hc_white); }

@keyframes hc_drawer_in { from { transform: translateX(-100%); } }
@keyframes hc_drawer_out { to { transform: translateX(-100%); } }
@keyframes hc_drawer_fade { from { opacity: 0; } }
@keyframes hc_drawer_fade_out { to { opacity: 0; } }

.hc_header_sell_mobile { display: none; }

@media (min-width: 601px) {
    .admin-bar .hc_header { top: var(--wp-admin--admin-bar--height, 32px); }
}

@media (max-width: 850px) {
    .hc_header { --hc_header_rest_height: 72px; }
    .hc_header_inner { gap: 16px; }
    .hc_header_home .hc_header_nav, .hc_header_sell_desktop { display: none; }
    .hc_header_sell_mobile { display: inline; }
    .hc_header_actions .hc_button { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .hc_drawer[open], .hc_drawer.hc_drawer_closing, .hc_drawer::backdrop, .hc_drawer.hc_drawer_closing::backdrop { animation: none; }
}

.hc_header_nav a[aria-current] { color: var(--hc_heading_accent); }

.hc_header_standard .hc_header_logo { position: relative; flex: 0 1 122px; }
.hc_header_standard .hc_header_logo img { width: 122px; }
.hc_header_standard .hc_header_logo::before { content: ''; position: absolute; top: 2px; left: 63%; width: 9%; aspect-ratio: 1; background: url('../img/houseco-plus.png') center / contain no-repeat; }
.hc_header_standard .hc_header_actions { column-gap: var(--hc_action_icon_gap); }
.hc_header_standard .hc_header_actions .hc_icon_button { min-width: 22px; min-height: 44px; padding-inline: 0; }
.hc_header_standard .hc_header_actions .hc_button { margin-inline-start: 11px; }
.hc_header_logo:is(:hover, :focus-visible)::before { animation: hc_logo_plus_spin .5s ease; }

@keyframes hc_logo_plus_spin {
    80% { transform: rotate(105deg); }
    100% { transform: rotate(90deg); }
}

@media (max-width: 850px) {
    .hc_header_standard { --hc_header_rest_height: 114px; }
    .hc_header_standard .hc_header_inner { flex-wrap: wrap; gap: 0 16px; padding-block: 12px; }
    .hc_header_standard .hc_header_nav { order: 1; flex: 0 0 100%; justify-content: space-between; gap: 12px; margin-top: 10px; }
    .hc_header_standard .hc_header_nav a { padding-block: 4px; }
    .hc_header_scrolled .hc_header_inner { padding-block: 4px; }
    .hc_header_scrolled .hc_header_nav { margin-top: 2px; }
}

@media (max-width: 420px) {
    .hc_header_standard .hc_header_inner { display: grid; grid-template-columns: minmax(0, 122px) auto; justify-content: space-between; }
    .hc_header_standard .hc_header_nav { grid-column: 1 / -1; }
}

@media (max-width: 360px) {
    :root { --hc_action_icon_gap: 15px; }
    .hc_header_standard .hc_header_actions .hc_button { margin-inline-start: 3px; }
}

@media (prefers-reduced-motion: reduce) {
    .hc_header_logo:is(:hover, :focus-visible)::before { animation: none; }
}

@media (min-width: 851px) {
    .hc_header_standard { --hc_header_rest_height: 118px; }
    .hc_header_standard .hc_header_inner { gap: clamp(30px, 4.6vw, 60px); }
}
