#htd-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(110deg, #075779 0%, #086778 46%, #08744b 100%);
    color: #fff;
    font-family: 'Open Sans', Arial, sans-serif;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
#htd-header * { box-sizing: border-box; }
#htd-header .htd-h-inner {
    max-width: 1260px;
    min-height: 104px;
    margin: 0 auto;
    padding: 20px 12px;
    display: flex;
    align-items: center;
    gap: 25px;
}
#htd-header .htd-h-logo { flex: 0 0 168px; min-height: 44px; display: flex; align-items: center; line-height: 0; }
#htd-header .htd-h-logo img { display: block; width: 168px; height: auto; }
#htd-header a { text-decoration: none; color: #fff; }
#htd-header .htd-h-nav { margin-left: auto; }
#htd-header .htd-h-links { display: flex; align-items: center; gap: 3px; margin: 0; padding: 0; list-style: none; }
#htd-header .htd-h-links > li { margin: 0; padding: 0; list-style: none; }
#htd-header .htd-h-nav a {
    position: relative;
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 0 11px;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    line-height: 1.4;
    color: rgba(255, 255, 255, .88);
}
#htd-header .htd-h-nav a:hover,
#htd-header .htd-h-nav a[aria-current] { color: #fff; }
#htd-header .htd-h-nav a[aria-current]::after {
    content: '';
    position: absolute;
    left: 11px;
    right: 11px;
    bottom: 1px;
    height: 2px;
    background: #fff;
}
#htd-header .htd-h-quote {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 19px;
    background: #fff;
    color: #075779;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}
#htd-header .htd-h-quote:hover { background: #eaf3f2; }
#htd-header .htd-h-tools { display: flex; align-items: center; gap: 1px; }
#htd-header .htd-h-tool {
    display: inline-flex;
    width: 44px;
    height: 44px;
    padding: 0;
    margin: 0;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #fff;
    border: 0;
    border-radius: 7px;
    box-shadow: none;
    font: 500 13px 'Open Sans', Arial, sans-serif;
    cursor: pointer;
}
#htd-header .htd-h-tool:hover { background: rgba(255, 255, 255, .1); }
#htd-header svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; }
#htd-header .htd-h-menu { display: none; }
#htd-header :is(a, button, input):focus-visible { outline: 2px solid #fff !important; outline-offset: 4px; }
#htd-header .htd-h-quote:focus-visible { outline-offset: 5px; }
#htd-header .htd-h-search {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0 12px 20px;
}
#htd-header .htd-h-search label { display: block; margin: 0 0 8px; color: #fff; font-size: 14px; }
#htd-header .htd-h-search div { display: flex; gap: 10px; }
#htd-header .htd-h-search input { flex: 1; min-width: 0; height: 44px; margin: 0; border-radius: 6px; background: #fff; color: #203749; }
#htd-header .htd-h-search button { min-width: 84px; margin: 0; padding: 8px 18px; background: #fff; color: #075779; border-radius: 6px; box-shadow: none; }
#htd-header [hidden] { display: none !important; }
@media (max-width: 1199px) {
    #htd-header .htd-h-inner { gap: 12px; padding-inline: 24px; }
    #htd-header .htd-h-nav a { padding-inline: 7px; font-size: 14px; }
    #htd-header .htd-h-logo { flex-basis: 148px; }
    #htd-header .htd-h-logo img { width: 148px; }
}
@media (max-width: 1050px) {
    #htd-header .htd-h-inner { min-height: 88px; flex-wrap: wrap; gap: 14px; padding: 16px 24px; }
    #htd-header .htd-h-logo { margin-right: auto; }
    #htd-header .htd-h-nav { display: none; order: 5; flex: 0 0 100%; margin: 4px 0 0; padding: 12px 0 0; border-top: 1px solid rgba(255,255,255,.18); }
    #htd-header[data-menu-open] .htd-h-nav { display: block; }
    #htd-header .htd-h-links { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
    #htd-header .htd-h-nav a { padding: 8px 0; min-height: 48px; font-size: 16px; }
    #htd-header .htd-h-nav a[aria-current]::after { left: 0; right: auto; width: 28px; bottom: 3px; }
    #htd-header .htd-h-menu { display: inline-flex; }
    #htd-header .htd-h-tools { display: none; order: 6; flex: 0 0 100%; border-top: 1px solid rgba(255,255,255,.18); padding-top: 12px; gap: 10px; }
    #htd-header[data-menu-open] .htd-h-tools { display: flex; }
    #htd-header .htd-h-search { padding-inline: 24px; }
}
@media (max-width: 480px) {
    #htd-header .htd-h-inner { min-height: 84px; padding: 16px 20px; gap: 12px; }
    #htd-header .htd-h-logo { flex-basis: 126px; }
    #htd-header .htd-h-logo img { width: 126px; }
    #htd-header .htd-h-quote { font-size: 13px; padding-inline: 14px; min-height: 44px; }
    #htd-header .htd-h-menu { width: 44px; }
}
@media (max-width: 359px) {
    #htd-header .htd-h-inner { padding-inline: 14px; gap: 8px; }
    #htd-header .htd-h-logo { flex-basis: 112px; }
    #htd-header .htd-h-logo img { width: 112px; }
    #htd-header .htd-h-quote { padding-inline: 10px; }
}
/* Keep the approved diagonal line below the controls. */
#htd-header { padding-bottom: 24px; }
#htd-header::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 28px;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%201440%2028%22%20preserveAspectRatio%3D%22none%22%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22line%22%3E%3Cstop%20stop-color%3D%22%2376cfe8%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%2370d7ab%22%2F%3E%3C%2FlinearGradient%3E%3Cfilter%20id%3D%22glow%22%20x%3D%22-10%25%22%20y%3D%22-200%25%22%20width%3D%22120%25%22%20height%3D%22500%25%22%3E%3CfeGaussianBlur%20stdDeviation%3D%223%22%2F%3E%3C%2Ffilter%3E%3C%2Fdefs%3E%3Cpath%20d%3D%22M-5%2023L1445%205%22%20fill%3D%22none%22%20stroke%3D%22url%28%23line%29%22%20stroke-width%3D%225%22%20opacity%3D%22.28%22%20filter%3D%22url%28%23glow%29%22%2F%3E%3Cpath%20d%3D%22M-5%2023L1445%205%22%20fill%3D%22none%22%20stroke%3D%22url%28%23line%29%22%20stroke-width%3D%221.4%22%20opacity%3D%22.8%22%2F%3E%3C%2Fsvg%3E") center / 100% 100% no-repeat;
}

/* Keep an expanded menu usable on short screens. */
#htd-header { max-height: 100dvh; overflow-y: auto; }
.admin-bar #htd-header { top: 32px; max-height: calc(100dvh - 32px); }
@media (max-width: 782px) {
    .admin-bar #htd-header { top: 46px; max-height: calc(100dvh - 46px); }
}
@media (max-width: 600px) {
    .admin-bar #htd-header { top: 0; max-height: 100dvh; }
}

/* Let each homepage background reach both edges of the slider. */
body.home #htd-header { padding-bottom: 0; box-shadow: none; }
body.home #htd-header::after { display: none; }
body.home #rev_slider_3_1 rs-layer-wrap:has(> rs-layer[id$="-layer-1"]) {
    left: 0 !important;
    width: 100%;
}
body.home #rev_slider_3_1 rs-layer[id$="-layer-1"] {
    width: 100% !important;
}
@media (max-width: 480px) {
    body.home #htd-hero .a { min-width: 0; }
    body.home #htd-hero :is(.b1, .b2) {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        white-space: normal;
        text-wrap: balance;
    }
}
