/*
 * Dr. Bess Journal & Events Banner Finisher
 * Intentionally scoped to /journal/ and /events/ only.
 */

body.dbjebf-page .dbjebf-banner {
    width: min(2048px, calc(100vw - 32px));
    max-width: 2048px;
    margin: 0 50% clamp(26px, 3vw, 46px);
    transform: translateX(-50%);
    line-height: 0;
    overflow: hidden;
    position: relative;
    z-index: 1;
    background: #fff;
}

body.dbjebf-page .dbjebf-banner img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

/* The approved banners already contain their own visual framing, so no card
   border or drop shadow is added here. */
body.dbjebf-page .dbjebf-replaced-legacy-hero,
body.dbjebf-page .dbjebf-removed-empty-state {
    display: none !important;
}

/* Events Page Bridge makes its replacement main full width. Keep our banner
   aligned and prevent inherited page-template padding from squeezing it. */
body.dbjebf-page-events main.dbepb-replaced-main > .dbjebf-banner,
body.dbjebf-page-events .dbev-wrap > .dbjebf-banner {
    margin-top: 0;
}

@media (max-width: 782px) {
    body.dbjebf-page .dbjebf-banner {
        width: calc(100vw - 16px);
        margin-bottom: 24px;
    }
}
