/**
 * Promo Banner — pricing CTA.
 *
 * Pure CSS: no images, no SVG, no icon fonts. Every decorative layer is a
 * pseudo-element, so the banner is fluid at any width and adds zero requests
 * beyond this file.
 *
 * Palette follows style.css: #006FC0 primary, #FFC000 accent, #0F1B31 dark.
 */

/* Self-contained box model: the full-width children (body, CTA) carry their own
   padding, so without this they depend on the theme's global border-box reset. */
.lexpb-slot,
.lexpb,
.lexpb *,
.lexpb *::before,
.lexpb *::after {
    box-sizing: border-box;
}

.lexpb {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    overflow: hidden;
    width: 100%;
    min-height: 130px;
    margin: 24px 0;
    padding: 26px 30px;
    border-left: 4px solid #FFC000;
    border-radius: 12px;
    background-image:
        radial-gradient(circle at 88% 18%, rgba(255, 192, 0, .22), transparent 60%),
        linear-gradient(105deg, #0F1B31 0%, #0b356b 46%, #006FC0 100%);
    color: #ffffff;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease;
}

/**
 * Alignment slot for the lawyer listing.
 *
 * Cards and sponsor panels there both sit 10px inside their container (10px
 * margin on .archive-eqheight / .sponsored-lawyers-section), so the slot indents
 * the banner by the same amount and every edge in the listing lines up.
 */
.lexpb-slot {
    padding: 0 10px;
}

/**
 * From 992px the cards are floated .col-md-12, so a plain block slot would start
 * at the same y as the card above and overlap it — the banner alone escaped that
 * because it is a flex container, but the wrapper still sat on top of the card
 * and could swallow clicks meant for it. Joining the float flow, exactly as
 * #regular-lawyers-container > .sponsored-lawyers-section does, puts the slot on
 * its own row. Below 992px Bootstrap stops floating the cards, so neither does this.
 */
@media (min-width: 992px) {
    .lexpb-slot {
        float: left;
        clear: both;
        width: 100%;
    }
}

.lexpb-slot .lexpb {
    margin: 14px 0;
}

/**
 * Slot used below the Load More button, outside #regular-lawyers-container.
 * Nothing is floated down there, so this one must not float either: a floated
 * slot would escape .regular-lawyers-section and overlap whatever follows.
 * Doubled class so it outranks the float rule in the media query above.
 */
.lexpb-slot.lexpb-slot--flow {
    float: none;
    clear: both;
    width: auto;
}

.lexpb:hover,
.lexpb:focus,
.lexpb:active,
.lexpb:visited {
    color: #ffffff;
    text-decoration: none;
}

.lexpb:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15, 27, 49, .18);
}

.lexpb:focus-visible {
    outline: 3px solid #FFC000;
    outline-offset: 3px;
}

/* Angled colour break — the diagonal energy of a swoosh without any artwork. */
.lexpb::before {
    content: "";
    position: absolute;
    top: -40%;
    right: -6%;
    width: 46%;
    height: 180%;
    transform: skewX(-14deg);
    background: rgba(255, 255, 255, .06);
    pointer-events: none;
}

/* Fine diagonal texture across the whole field. */
.lexpb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .05) 0 1px, transparent 1px 14px);
    pointer-events: none;
}

/* Everything real sits above the two decorative layers. */
.lexpb__badge,
.lexpb__body,
.lexpb__cta {
    position: relative;
    z-index: 1;
}

/* ---------- Credential badge (CSS-drawn checkmark) ---------- */

.lexpb__badge {
    flex: 0 0 auto;
    display: block;
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 16px;
    background: rgba(255, 255, 255, .12);
}

.lexpb__badge::after {
    content: "";
    display: block;
    width: 12px;
    height: 22px;
    margin: 13px auto 0;
    border-right: 3px solid #FFC000;
    border-bottom: 3px solid #FFC000;
    transform: rotate(45deg);
}

/* ---------- Copy ---------- */

.lexpb__body {
    flex: 1 1 auto;
    min-width: 0;
}

.lexpb__eyebrow {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .72);
}

.lexpb__headline {
    display: block;
    margin: 0 0 8px;
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
}

/* Gold mark sits behind the text, not under it as a plain underline. */
.lexpb__mark {
    box-shadow: inset 0 -.35em 0 rgba(255, 192, 0, .45);
}

.lexpb__sub {
    display: block;
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .78);
}

/* ---------- CTA pill ---------- */

.lexpb__cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 999px;
    background: #FFC000;
    color: #0F1B31;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transition: box-shadow .18s ease, transform .18s ease;
}

.lexpb:hover .lexpb__cta {
    box-shadow: 0 6px 18px rgba(255, 192, 0, .38);
}

/* Chevron drawn from two borders. */
.lexpb__arrow {
    display: block;
    width: 7px;
    height: 7px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .18s ease;
}

.lexpb:hover .lexpb__arrow {
    transform: rotate(45deg) translate(3px, -3px);
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
    .lexpb {
        flex-wrap: wrap;
        gap: 18px;
        min-height: 0;
        padding: 24px 24px;
    }

    .lexpb__body {
        flex: 1 1 240px;
    }

    .lexpb__cta {
        margin-left: auto;
    }
}

@media (max-width: 767px) {
    /* Everything stacks and centres: badge, copy, then a full-width CTA. */
    .lexpb {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        /* Right padding carries the 4px gold rail, so the content box — and with
           it everything centred inside — is symmetric within the visible box. */
        padding: 24px 22px 24px 18px;
        border-radius: 10px;
        text-align: center;
    }

    .lexpb__badge {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .lexpb__badge::after {
        width: 9px;
        height: 17px;
        margin-top: 10px;
    }

    .lexpb__body {
        flex: 0 0 auto;
        width: 100%;
    }

    .lexpb__sub {
        font-size: 13px;
    }

    .lexpb__cta {
        justify-content: center;
        width: 100%;
        margin-left: 0;
        padding: 13px 20px;
    }

    /* The skewed panel crowds the copy once everything stacks. */
    .lexpb::before {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    .lexpb,
    .lexpb__cta,
    .lexpb__arrow {
        transition: none;
    }

    .lexpb:hover {
        transform: none;
    }

    .lexpb:hover .lexpb__arrow {
        transform: rotate(45deg);
    }
}
