.subpage-banner {
    position: relative;
    overflow: visible;
}

/* Keep the primary navigation readable over internal-page banner images. */
@media (min-width: 992px) {
    /* Mobile keeps the original brand mark and navigation treatment. */
    body:has(.subpage-banner) #main-header:not(.is-scrolled) .navbar-brand img {
        content: url('/images/logo/hsgeo_logo_clean_white-a6195b6c5ff14bfeef58f7d465efef6d.png');
    }

    body:has(.subpage-banner) #main-header:not(.is-scrolled) .navbar-nav > .nav-item > .nav-link,
    body:has(.subpage-banner) #main-header:not(.is-scrolled) .navbar-nav > .nav-item > .dropdown-toggle {
        color: #fff;
    }

    body:has(.subpage-banner) #main-header:not(.is-scrolled) .navbar-nav > .nav-item:hover > .nav-link,
    body:has(.subpage-banner) #main-header:not(.is-scrolled) .navbar-nav > .nav-item.active > .nav-link {
        color: #fff;
        opacity: .78;
    }
}

.subpage-banner .container {
    position: relative;
    z-index: 2;
}

.subpage-banner__main {
    padding-bottom: 0;
}

.subpage-banner__nav {
    position: absolute;
    right: 12px;
    bottom: 38px;
    left: 12px;
    z-index: 5;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.subpage-banner__breadcrumb {
    display: flex;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 13px;
    color: rgba(255, 255, 255, .78);
    font-size: 17px;
    font-weight: 600;
    list-style: none;
}

.subpage-banner__breadcrumb li {
    display: flex;
    align-items: center;
    gap: 13px;
    white-space: nowrap;
}

.subpage-banner__breadcrumb li:not(:last-child)::after {
    width: 8px;
    height: 8px;
    margin-right: 2px;
    border-top: 1.5px solid rgba(255, 255, 255, .58);
    border-right: 1.5px solid rgba(255, 255, 255, .58);
    content: "";
    transform: rotate(45deg);
}

.subpage-banner__breadcrumb a,
.subpage-banner__breadcrumb span {
    color: inherit;
}

.subpage-banner__breadcrumb a:hover,
.subpage-banner__breadcrumb [aria-current="page"] {
    color: #fff;
}

.subpage-banner__home {
    font-size: 19px;
}

.subpage-banner__select {
    position: relative;
    width: min(310px, 31vw);
    margin: 0;
    color: #fff;
    anchor-name: --subpage-banner-select;
}

.subpage-banner__trigger {
    position: relative;
    display: flex;
    width: 100%;
    min-height: 62px;
    padding: 0 56px 0 25px;
    align-items: center;
    border: 0;
    border-radius: 999px;
    background: rgba(9, 18, 27, .9);
    box-shadow: 0 14px 35px rgba(0, 0, 0, .2);
    color: inherit;
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.subpage-banner__trigger::after {
    position: absolute;
    top: 50%;
    right: 27px;
    width: 9px;
    height: 9px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: translateY(-65%) rotate(45deg);
    transition: transform .25s ease;
}

.subpage-banner__select:has(.subpage-banner__options:popover-open) .subpage-banner__trigger::after {
    transform: translateY(-20%) rotate(225deg);
}

.subpage-banner__options {
    position: fixed;
    position-anchor: --subpage-banner-select;
    top: calc(anchor(bottom) + 10px);
    right: auto;
    bottom: auto;
    left: anchor(left);
    width: anchor-size(width);
    margin: 0;
    padding: 13px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 22px;
    background: rgba(9, 18, 27, .9);
    box-shadow: 0 22px 48px rgba(0, 0, 0, .32);
    list-style: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: visibility .2s ease, opacity .2s ease, transform .2s ease;
    backdrop-filter: blur(16px);
}

.subpage-banner__options:popover-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.subpage-banner__options a {
    display: flex;
    min-height: 43px;
    padding: 0 14px;
    align-items: center;
    border-radius: 10px;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    font-weight: 500;
    transition: color .2s ease, background-color .2s ease;
}

.subpage-banner__options a:hover,
.subpage-banner__options a.is-current {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

@media (max-width: 991px) {
    .subpage-banner__main {
        padding-bottom: 145px;
    }

    .subpage-banner__select {
        width: 280px;
    }
}

@media (max-width: 575px) {
    .subpage-banner__main {
        min-height: 500px;
        padding-bottom: 190px;
    }

    .subpage-banner__nav {
        right: 15px;
        bottom: 28px;
        left: 15px;
        align-items: stretch;
        flex-direction: column;
        gap: 18px;
    }

    .subpage-banner__breadcrumb,
    .subpage-banner__breadcrumb li {
        gap: 9px;
    }

    .subpage-banner__breadcrumb {
        overflow-x: auto;
        font-size: 14px;
    }

    .subpage-banner__select {
        width: 100%;
    }

    .subpage-banner__trigger {
        min-height: 56px;
        font-size: 14px;
    }
}
