/* Both Sides of the Fence - public Caption control.
   This is also loaded in the admin preview: one source of presentation truth.
   Width of the outer .wpe-item is controlled by the CMS item width setting.
*/
.af-caption,
a.af-caption.af-caption--whole {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 240px;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
    background-size: cover;
    background-position: center;
    border: 3px solid #f5ebcf;
    border-radius: 28px;
    color: #103018;
    text-decoration: none;
}
.af-caption-overlay {
    position: relative;
    inset: auto;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
    padding: 24px 28px;
    color: #103018;
    transition: background-color .35s ease, filter .35s ease;
}
.af-caption:hover .af-caption-overlay {
    background-color: var(--af-bg-solid) !important;
    filter: brightness(.97);
}
.af-caption-text {
    position: relative;
    z-index: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
    overflow-wrap: break-word;
}
.af-caption .af-caption-text h3 {
    margin: 0 0 18px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: clamp(1.65rem, 2.4vw, 2.5rem);
    line-height: 1.08;
    font-weight: 700;
    text-align: center;
    color: #103018;
    text-shadow: none;
    overflow-wrap: break-word;
}
.af-caption .af-caption-text h4 {
    margin: 0 0 12px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: 600;
    color: #103018;
    text-shadow: none;
}
.af-caption .af-caption-details {
    margin: 0 0 18px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.25;
    font-weight: 400;
    color: #103018;
    text-align: left;
    text-shadow: none;
}
.af-caption-details ul,
.af-caption-details ol { margin: 0 0 14px; padding-left: 1.4em; }
.af-caption-details li { margin: 0 0 4px; }
.af-caption-details p { margin: 0 0 12px; }
.af-caption .af-caption-btn {
    position: relative;
    z-index: 2;
    display: inline-block;
    align-self: center;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    padding: 11px 24px;
    border-radius: 28px;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    color: #c69b2b;
    text-decoration: none;
    transition: filter .25s ease, transform .15s ease;
}
.af-caption .af-caption-btn:hover { filter: brightness(1.18); cursor: pointer; }
.af-caption--whole, .af-caption-wrapper, .wpe-link-wrapper .af-caption {
    text-decoration: none;
}
@media (max-width: 600px) {
    .af-caption-overlay { padding: 20px; }
    .af-caption .af-caption-text h3 { font-size: 1.75rem; }
    .af-caption .af-caption-details { font-size: 1rem; }
    .af-caption .af-caption-btn { font-size: 1.05rem; }
}

/* ============================================
   Both Sides of the Fence - Caption typography
   ============================================ */

/* Heading: prevent overlapping lines */
.af-caption .af-caption-text h3 {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: 0;
    color: #103018 !important;
    text-shadow: none;
    text-align: center;
    margin: 0 0 18px;
    overflow-wrap: normal;
}

/* Optional subtitle */
.af-caption .af-caption-text h4 {
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 22px;
    line-height: 1.25;
    color: #103018 !important;
    text-shadow: none;
}

/* Details and CKEditor content */
.af-caption .af-caption-details,
.af-caption .af-caption-details p,
.af-caption .af-caption-details ul,
.af-caption .af-caption-details ol,
.af-caption .af-caption-details li,
.af-caption .af-caption-details span {
    color: #103018 !important;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.3;
    text-shadow: none;
    text-align: left;
}

    /* Tighter bullet spacing */
    .af-caption .af-caption-details ul {
        margin: 0 0 12px;
        padding-left: 24px;
    }

    .af-caption .af-caption-details li {
        margin: 0 0 4px;
    }

        .af-caption .af-caption-details li p {
            margin: 0;
        }

/* Button */
.af-caption .af-caption-btn {
    background: #103018 !important;
    color: #C69B2B !important;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 22px;
    font-weight: 700;
    text-shadow: none;
    padding: 10px 25px;
    border-radius: 24px;
}

/* Equal-height caption panels */

.af-caption {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.af-caption-overlay {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.af-caption-text {
    flex: 1;
}

.af-caption-btn {
    margin-top: auto;
}

/* Slightly smaller caption headings */

.af-caption .af-caption-text h3 {
    font-size: 27px !important;
    line-height: 1.2 !important;
    font-weight: 700;
}