/* =========================================================
   Hero Image Banner (builder/canvas)
   ========================================================= */

.pb-hero-image-banner {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    min-height: 280px;
    box-sizing: border-box;

    /* When no image is set yet, provide a nice surface */
    background: var(--sb-surface-2);
    border: 1px solid var(--sb-border);

    /* Default overlay + text */
    --pb-hero-overlay: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.55) 0%,
        rgba(0, 0, 0, 0.35) 45%,
        rgba(0, 0, 0, 0.65) 100%
    );
    --pb-hero-text: #fff;
}

/* In dark theme, avoid super-bright glare */
html[data-theme="dark"] .pb-hero-image-banner {
    --pb-hero-text: rgba(255, 255, 255, 0.92);
}

/* Picture + image fill the banner */
.pb-hero-image-banner-picture,
.pb-hero-image-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.pb-hero-image-banner-img {
    object-fit: cover;
}

/* Overlay over image */
.pb-hero-image-banner-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--pb-hero-overlay);
}

/* Content above overlay */
.pb-hero-image-banner-inner {
    position: relative;
    z-index: 2;
    color: var(--pb-hero-text);
    padding: 1.25rem;
}

/* Text niceties */
.pb-hero-image-banner-kicker {
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.pb-hero-image-banner-heading {
    text-shadow: 0 0.1rem 0.35rem rgba(0, 0, 0, 0.45);
}

.pb-hero-image-banner-subheading {
    text-shadow: 0 0.05rem 0.25rem rgba(0, 0, 0, 0.35);
}

/* =========================================================
   Buttons inside banner (the "can't read button section" fix)
   - Works for typical Bootstrap button classes used in banner content
   ========================================================= */

.pb-hero-image-banner-inner .btn {
    box-shadow: none;
}

/* Solid buttons: keep readable on overlay */
.pb-hero-image-banner-inner .btn-primary,
.pb-hero-image-banner-inner .btn-success,
.pb-hero-image-banner-inner .btn-danger,
.pb-hero-image-banner-inner .btn-warning,
.pb-hero-image-banner-inner .btn-info {
    filter: saturate(1.02);
}

/* Outline buttons: give them a subtle glassy backplate so text pops */
.pb-hero-image-banner-inner .btn-outline-light,
.pb-hero-image-banner-inner .btn-outline-secondary,
.pb-hero-image-banner-inner .btn-outline-primary,
.pb-hero-image-banner-inner .btn-outline-success,
.pb-hero-image-banner-inner .btn-outline-danger,
.pb-hero-image-banner-inner .btn-outline-warning,
.pb-hero-image-banner-inner .btn-outline-info {
    background: rgba(0, 0, 0, 0.22);
    border-color: rgba(255, 255, 255, 0.55);
    color: rgba(255, 255, 255, 0.95);
}

.pb-hero-image-banner-inner .btn-outline-light:hover,
.pb-hero-image-banner-inner .btn-outline-secondary:hover,
.pb-hero-image-banner-inner .btn-outline-primary:hover,
.pb-hero-image-banner-inner .btn-outline-success:hover,
.pb-hero-image-banner-inner .btn-outline-danger:hover,
.pb-hero-image-banner-inner .btn-outline-warning:hover,
.pb-hero-image-banner-inner .btn-outline-info:hover {
    background: rgba(0, 0, 0, 0.32);
    border-color: rgba(255, 255, 255, 0.70);
}

/* If someone uses a "light" solid button inside, keep it from blinding */
.pb-hero-image-banner-inner .btn-light {
    background: rgba(255, 255, 255, 0.88);
    border-color: rgba(255, 255, 255, 0.70);
    color: rgba(0, 0, 0, 0.78);
}

/* =========================================================
   Optional: if banner has no image, show a subtle hint
   ========================================================= */

.pb-hero-image-banner-img[src=""],
.pb-hero-image-banner-img:not([src]) {
    display: none;
}

.pb-hero-image-banner:not(:has(.pb-hero-image-banner-img[src]:not([src=""])))::after {
    content: "Hero Image Banner";
    position: absolute;
    inset: auto 1rem 1rem 1rem;
    z-index: 3;
    color: var(--sb-text-muted);
    font-weight: 600;
    text-shadow: none;
    background: rgba(0,0,0,0);
}
