/* Kline QA adapted to Keller's JEM palette. */
.jem-header-call-button {
    margin: 0;
    flex-shrink: 0;
}

.jem-header-call-button a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .75rem 1.5rem;
    border-radius: var(--wp--custom--radius--s, 6px);
    background-color: var(--wp--preset--color--brand-tertiary);
    color: var(--wp--preset--color--base-0, #fff) !important;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    transition: background-color .2s ease;
}

.jem-header-call-button a:is(:hover, :focus-visible) {
    background-color: var(--wp--preset--color--base-0, #fff);
    color: var(--wp--preset--color--brand-primary) !important;
}

.jem-header-call-button a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* =========================================================
   FOOTER
   ========================================================= */

footer.wp-block-template-part .gform_wrapper
:is(
    .gfield_label,
    .gform-field-label,
    .gfield_consent_label,
    .gfield_description,
    .gform-field-label__text,
    .gfield_html
) {
    color: var(--wp--preset--color--base-0, #fff) !important;
}

footer.wp-block-template-part .gform_wrapper
:is(.gfield_consent_label, .gfield_description, .gfield_html)
:is(span, p, a) {
    color: var(--wp--preset--color--base-0, #fff) !important;
}

footer.wp-block-template-part .gform_wrapper .gform_footer
:is(input[type="submit"], button[type="submit"]),
footer.wp-block-template-part .gform_wrapper .gform-footer
:is(input[type="submit"], button[type="submit"]) {
    background-color: var(--wp--preset--color--brand-tertiary) !important;
    border-color: var(--wp--preset--color--brand-tertiary) !important;
    color: var(--wp--preset--color--base-0, #fff) !important;
}

footer.wp-block-template-part .gform_wrapper .gform_footer
:is(input[type="submit"], button[type="submit"]):is(:hover, :focus-visible),
footer.wp-block-template-part .gform_wrapper .gform-footer
:is(input[type="submit"], button[type="submit"]):is(:hover, :focus-visible) {
    background-color: var(--wp--preset--color--brand-primary) !important;
    border-color: var(--wp--preset--color--brand-primary) !important;
}

footer.wp-block-template-part .wp-block-button.is-style-outline
.wp-block-button__link:is(:hover, :focus-visible) {
    background-color: var(--wp--preset--color--brand-tertiary) !important;
    border-color: var(--wp--preset--color--brand-tertiary) !important;
    color: var(--wp--preset--color--base-0, #fff) !important;
}


@media (max-width:600px) {
 .jem-header-call-button a { padding:.65rem .85rem; font-size:14px; }
}
@media (prefers-reduced-motion:reduce) {
 .jem-header-call-button a { transition:none; }
}
/* Keller gold uses dark text for readable CTA contrast. */
.jem-header-call-button a,
footer.wp-block-template-part .gform_wrapper :is(.gform_footer,.gform-footer) :is(input[type="submit"],button[type="submit"]) {
 color:var(--wp--preset--color--brand-primary) !important;
}
footer.wp-block-template-part .gform_wrapper :is(.gform_footer,.gform-footer) :is(input[type="submit"],button[type="submit"]):is(:hover,:focus-visible) {
 color:var(--wp--preset--color--base-0) !important;
 border-color:var(--wp--preset--color--base-0) !important;
}
/* Shared form fixes, preserving each form's fields and settings. */
.gform_wrapper.gravity-theme .gform_fields { grid-row-gap:var(--wp--preset--spacing--m) !important; }
.gform_wrapper.gravity-theme .gfield_label { margin-bottom:4px; line-height:1.3; font-weight:500 !important; }
.gform_wrapper :is(.gform_footer,.gform-footer) :is(input[type="submit"],button[type="submit"]) {
 width:100%; min-height:44px; background-color:var(--wp--preset--color--brand-tertiary); color:var(--wp--preset--color--brand-primary); border:2px solid var(--wp--preset--color--brand-tertiary);
}
.gform_wrapper :is(.gform_footer,.gform-footer) :is(input[type="submit"],button[type="submit"]):is(:hover,:focus-visible) {
 background-color:var(--wp--preset--color--brand-primary); color:var(--wp--preset--color--base-0); border-color:var(--wp--preset--color--brand-primary);
}
.gform_wrapper :is(input,textarea,select,button):focus-visible { outline:2px solid var(--wp--preset--color--brand-tertiary); outline-offset:3px; }
footer.wp-block-template-part .gform_wrapper :is(input[type="text"],input[type="email"],input[type="tel"],input[type="url"],textarea,select) {
 background-color:var(--wp--preset--color--base-0); color:var(--wp--preset--color--brand-primary); border-color:var(--wp--preset--color--base-300);
}
footer.wp-block-template-part .gform_wrapper :is(input,textarea)::placeholder { color:var(--wp--preset--color--base-600); opacity:1; }
.jem-footer-call-button a { display:inline-flex; align-items:center; justify-content:center; min-height:44px; padding:.75rem 1.5rem; border:2px solid currentColor; border-radius:var(--wp--custom--radius--s,6px); color:inherit; text-decoration:none; }
.jem-footer-call-button a:is(:hover,:focus-visible) { background-color:var(--wp--preset--color--brand-tertiary); border-color:var(--wp--preset--color--brand-tertiary); color:var(--wp--preset--color--brand-primary); }
.jem-footer-call-button a:focus-visible { outline:2px solid currentColor; outline-offset:3px; }
@media (max-width:600px) {
 .jem-header-topbar > .wp-block-group { flex-wrap:wrap; gap:.75rem; }
 .jem-header-topbar .wp-block-site-tagline { font-size:var(--wp--preset--font-size--body); }
 .jem-header-main .wp-block-site-logo img { max-width:min(240px,60vw); height:auto; }
}
/* Homepage QA: Keller JEM colors. */
:is(.home, .page-id-10, .page-id-18) .wp-block-button .wp-block-button__link:is(:hover,:focus-visible) {
 background-color:var(--wp--preset--color--brand-tertiary) !important;
 color:var(--wp--preset--color--brand-primary) !important;
 border-color:var(--wp--preset--color--brand-tertiary) !important;
}
:is(.home, .page-id-10, .page-id-18) .wp-block-button .wp-block-button__link.has-brand-tertiary-background-color:is(:hover,:focus-visible) {
 background-color:var(--wp--preset--color--brand-primary) !important;
 color:var(--wp--preset--color--base-0) !important;
 border-color:var(--wp--preset--color--brand-primary) !important;
}
:is(.home, .page-id-10, .page-id-18) .wp-block-button .wp-block-button__link:is(:hover,:focus-visible) * { color:inherit !important; }
.home .jem-home-practice-box-grid > .wp-block-group { transition:background-color .2s,color .2s,border-color .2s; }
.home .jem-home-practice-box-grid > .wp-block-group:is(:hover,:focus-within) {
 background-color:var(--wp--preset--color--brand-tertiary) !important;
 border-color:var(--wp--preset--color--brand-tertiary) !important;
 color:var(--wp--preset--color--brand-primary) !important;
}
.home .jem-home-practice-box-grid > .wp-block-group:is(:hover,:focus-within) :is(h2,h3,p,a,.has-action-color,.wp-block-jem-toolkit-practice-icon) { color:var(--wp--preset--color--brand-primary) !important; }
.home .wp-block-jem-toolkit-post-carousel .jem-post-view--testimonial {
 background-color:var(--wp--preset--color--brand-primary);
 color:var(--wp--preset--color--base-0);
}
.home .wp-block-jem-toolkit-post-carousel .jem-post-view--testimonial :is(h2,h3,h4,p,a,.jem-testimonial-source-name,.jem-testimonial-source-title,.jem-testimonial-source-company) { color:inherit; }
.jem-testimonial-platform { margin-top:var(--wp--preset--spacing--m); }
.jem-testimonial-google-icon { display:block; width:32px; height:32px; }
.wp-block-jem-toolkit-practice-icon { display:block; flex-shrink:0; }
@media (prefers-reduced-motion:reduce) { .home .jem-home-practice-box-grid > .wp-block-group { transition:none; } }

.jem-term-icon { display:block; width:2rem; height:2rem; background-color:currentColor; -webkit-mask-position:center; mask-position:center; -webkit-mask-repeat:no-repeat; mask-repeat:no-repeat; -webkit-mask-size:contain; mask-size:contain; }
/* The gold Action buttons switch to the navy brand color on hover. */
:is(.home, .page-id-10, .page-id-18) .wp-block-button .wp-block-button__link.has-action-background-color:is(:hover,:focus-visible) {
 background-color:var(--wp--preset--color--brand-primary) !important;
 color:var(--wp--preset--color--base-0) !important;
 border-color:var(--wp--preset--color--brand-primary) !important;
}
/* Practice cards above the main grid use the same interactive states. */
.home .wp-block-column > .wp-block-group:has(> .wp-block-jem-toolkit-post-context):is(:hover,:focus-within) {
 background-color:var(--wp--preset--color--brand-secondary) !important;
 color:var(--wp--preset--color--base-0) !important;
}
.home .wp-block-column > .wp-block-group:has(> .wp-block-jem-toolkit-post-context):is(:hover,:focus-within) :is(h2,h3,p,a,.wp-block-jem-toolkit-practice-icon) { color:var(--wp--preset--color--base-0) !important; }


/* Contact directions button rendered by Toolkit. */
.page-id-18 .keller-directions-button a:is(:hover,:focus-visible) {
    background-color:var(--wp--preset--color--brand-tertiary);
    border-color:var(--wp--preset--color--brand-tertiary);
    color:var(--wp--preset--color--brand-primary) !important;
}

/* Mobile pagination on the dark attorneys section. */
@media (max-width: 781px) {
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) .swiper-pagination {
        --swiper-pagination-color: var(--wp--preset--color--base-0, #fff);
        --swiper-pagination-bullet-inactive-color: var(--wp--preset--color--base-0, #fff);
        --swiper-pagination-bullet-inactive-opacity: .55;
    }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) .swiper-pagination-bullet {
        background-color: var(--wp--preset--color--base-0, #fff) !important;
        opacity: .55;
    }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) .swiper-pagination-bullet-active {
        opacity: 1;
    }
}

/* Keep attorneys navigation below the slide on mobile. */
@media (max-width: 781px) {
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) .jem-swiper {
        display: block;
        position: relative;
        padding-bottom: 64px;
    }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) .swiper-pagination:not(.swiper-pagination-lock) {
        position: absolute;
        bottom: 16px;
        left: 50%;
        width: auto;
        transform: translateX(-50%);
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        z-index: 10;
    }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) :is(.swiper-button-prev,.swiper-button-next):not(.swiper-button-lock) {
        display: flex;
        position: absolute;
        top: auto;
        bottom: 10px;
        margin: 0;
        width: 44px;
        height: 44px;
        align-items: center;
        justify-content: center;
        color: var(--wp--preset--color--base-0, #fff);
        z-index: 11;
    }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) .swiper-button-prev { left: calc(50% - 100px); right: auto; }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) .swiper-button-next { right: calc(50% - 100px); left: auto; }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) :is(.swiper-button-prev,.swiper-button-next)::after {
        content: "";
        width: 12px;
        height: 12px;
        border-top: 2px solid currentColor;
        border-right: 2px solid currentColor;
        display: block;
    }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) .swiper-button-prev::after { transform: rotate(-135deg); }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) .swiper-button-next::after { transform: rotate(45deg); }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) :is(.swiper-button-prev,.swiper-button-next) svg { display: none; }
    .home .wp-block-jem-toolkit-post-carousel:has(.jem-post-view--team-member) :is(.swiper-button-prev,.swiper-button-next):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
}
