/* Public site branding, independent of /admin/admin.css */
:root { --green:#102f17; --gold:#c79a28; --cream:#f3e8c7; }
html,body { margin:0; padding:0; }
body { background:var(--green); color:var(--cream); font-family: 'DM Sans', Arial, sans-serif; }
*,*::before,*::after { box-sizing:border-box; }
main { min-height:40vh; }
main img { max-width:100%; }
main .wpe-row { width:100%; margin:0 auto; }
main .wpe-row-inner { margin:0 auto; }
main .wpe-column { min-width:0; }
.bsf-service-card { background:var(--gold); color:var(--green); border:2px solid var(--cream); border-radius:24px; padding:25px; height:100%; }
.bsf-service-card h2 { color:var(--green); text-align:center; }
.bsf-service-card a { color:var(--green); }
.bsf-intro { padding:25px; }
.bsf-intro h2 { color:var(--gold); }
@media(max-width:768px) { main .wpe-columns { flex-wrap:wrap!important; } main .wpe-column { flex:0 0 100%!important; max-width:100%!important; } }


/* Both Sides of the Fence: shared public typography */
html, body, button, input, select, textarea {
    font-family: 'DM Sans', Arial, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Sans', Arial, sans-serif;
}

/* Home-page image and rich-text refinements */
.af-photo img {
    border-radius: 18px;
    display: block;
    max-width: 100%;
    height: auto;
}

.af-text ul,
.af-text ol {
    padding-left: 28px;
    margin: 16px 0 24px;
}

.af-text li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.af-text li:last-child { margin-bottom: 0; }

.af-text h2 { margin-bottom: 26px; }
.af-text h3 { margin-top: 30px; margin-bottom: 18px; }

/* Public headings: gold on dark green; preserve dark headings on gold cards */
main h1, main h2, main h3,
.af-text h1, .af-text h2, .af-text h3 {
    color: var(--gold);
}

.bsf-service-card h1, .bsf-service-card h2, .bsf-service-card h3,
.af-caption .af-caption-text h3,
.af-caption .af-caption-text h4 {
    color: var(--green);
}

.af-text h2 {
    margin-top: 0;
}

/* Stretch captions to equal height within a flowing column */

.wpe-col-items.flow,
.af-column-items.flow {
    align-items: stretch;
}

/* ============================================
   Equal-height captions in flowing columns
   ============================================ */

/* Stretch items to the height of the tallest */
.wpe-column--flow {
    align-items: stretch !important;
}

    /* Allow each item wrapper to stretch */
    .wpe-column--flow > .wpe-item {
        display: flex;
        flex-direction: column;
    }

        /* Make the caption fill its wrapper */
        .wpe-column--flow > .wpe-item > .af-caption {
            flex: 1;
            width: 100%;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
        }

    /* Stretch the overlay to fill the caption */
    .wpe-column--flow .af-caption-overlay {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    /* Allow text to occupy available vertical space */
    .wpe-column--flow .af-caption-text {
        flex: 1;
    }

    /* Keep buttons at the bottom */
    .wpe-column--flow .af-caption-btn {
        margin-top: auto;
    }

/* ============================================
   Equal-height captions in two-column rows
   ============================================ */

/* Stretch columns to the same height */
.wpe-row:has(.af-caption) .wpe-column {
    display: flex;
    flex-direction: column;
    align-self: stretch;
}

/* Stretch item wrappers */
.wpe-row:has(.af-caption) .wpe-item {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Caption fills available height */
.wpe-row:has(.af-caption) .af-caption {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

/* Gold background extends to bottom */
.wpe-row:has(.af-caption) .af-caption-overlay {
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Text occupies remaining space */
.wpe-row:has(.af-caption) .af-caption-text {
    flex: 1;
}

/* Buttons align at the bottom */
.wpe-row:has(.af-caption) .af-caption-btn {
    margin-top: auto;
}