.xd-programs-degrees {
    position: relative;
    width: 100%;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 60%, rgba(120, 60, 200, 0.35) 0%, rgba(120, 60, 200, 0) 45%),
        radial-gradient(circle at 75% 30%, rgba(90, 40, 160, 0.2) 0%, rgba(90, 40, 160, 0) 38%),
        linear-gradient(160deg, #1e0a40 0%, #3d1472 45%, #2a0e58 100%);
    padding: clamp(72px, 8vw, 120px) clamp(24px, 5vw, 80px) clamp(64px, 7vw, 104px);
    box-sizing: border-box;
    isolation: isolate;
}

.xd-programs-degrees::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200' viewBox='0 0 200 200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    opacity: 0.3;
    mix-blend-mode: soft-light;
    pointer-events: none;
    z-index: 0;
}

.xd-programs-degrees__inner {
    position: relative;
    z-index: 1;
    display: flex;
    padding-top: 100px;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.xd-programs-degrees__eyebrow {
    margin: 0 0 16px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.xd-programs-degrees__heading {
    margin: 0 0 clamp(32px, 3.5vw, 52px);
    color: #ffffff;
    font-size: clamp(4rem, 7vw, 9rem);
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.04em;
}

/* ── Facet wrapper ───────────────────────────────────────────────────── */

.xd-programs-degrees__facet-wrap {
    width: 100%;
    max-width: 660px;
}

/* Override WP Grid Builder search facet styles to match design */

/* Hide the visible facet title heading — keep sr-only legend for a11y */
.xd-programs-degrees__facet-wrap h4.wpgb-facet-title {
    display: none !important;
}

/* Strip fieldset chrome */
.xd-programs-degrees__facet-wrap fieldset {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    min-width: 0 !important;
    width: 100% !important;
}

.xd-programs-degrees__facet-wrap .wpgb-facet,
.xd-programs-degrees__facet-wrap [class*="wpgb-"] form,
.xd-programs-degrees__facet-wrap .wpgb-input-facet {
    width: 100%;
}

.wpgb-facet .wpgb-search-facet .wpgb-input {
    margin-left: -15px !important;
}

.wpgb-facet .wpgb-search-facet .wpgb-input::placeholder {
    color: black !important;
}

.xd-programs-degrees__facet-wrap .wpgb-input-facet,
.xd-programs-degrees__facet-wrap .wpgb-search-facet {
    display: flex;
    align-items: stretch;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.25);
}

/* Label wrapping the input should expand to fill */
.xd-programs-degrees__facet-wrap .wpgb-search-facet > label {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.xd-programs-degrees__facet-wrap input[type="search"],
.xd-programs-degrees__facet-wrap input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 16px 20px;
    border: none !important;
    background: transparent !important;
    color: #111111 !important;
    font-size: 1.1rem !important;
    line-height: 1.4 !important;
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

.xd-programs-degrees__facet-wrap input[type="search"]::placeholder,
.xd-programs-degrees__facet-wrap input[type="text"]::placeholder {
    color: #888888 !important;
}

/* Hide WPGB's own clear button */
.xd-programs-degrees__facet-wrap .wpgb-clear-button {
    display: none !important;
}

/* Injected Submit button */
.xd-programs-degrees__facet-wrap .xd-pd-submit {
    flex-shrink: 0;
    margin: 7px 10px;
    padding: 8px 24px !important;
    border: none !important;
    border-radius: 5px !important;
    background: #f3bd45 !important;
    color: #111111 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    transition: background 0.2s ease !important;
    box-shadow: none !important;
    font-family: inherit !important;
}

.xd-programs-degrees__facet-wrap .xd-pd-submit:hover {
    background: #f7c44e !important;
}

/* ── Responsive ─────────────────────────────────────────────────────── */

@media (max-width: 767px) {
    .xd-programs-degrees {
        padding: 80px 20px 64px;
    }

    .xd-programs-degrees__heading {
        font-size: clamp(3.2rem, 12vw, 5rem);
    }

    .xd-programs-degrees__eyebrow {
        font-size: 1.6rem;
    }
}
