/* Services: photo cards with the title, summary and a "learn more" pill over a bottom fade. The homepage slider sits
 * inside the container (three per frame) on a primary band that runs into the featured review below.
 * Archive and detail pages reuse the same card in a grid / contained slider. */
.ocf-services {
    --dakota-card-height: var(--ocf-service-image-height);
    background: var(--ocf-bg);
}

.ocf-services--home {
    padding-bottom: 0;
}

.ocf-services--home > .container-global {
    position: relative;
    z-index: 1;
}

/* Featured review: the primary band starts under the lower half of the cards and carries one centered quote. */
.ocf-featured-review {
    margin-top: calc(var(--dakota-card-height) * -0.45);
    padding: calc(var(--dakota-card-height) * 0.45 + var(--ocf-grid-gap) * 3) 0 calc(var(--ocf-grid-gap) * 4.333);
    background: var(--ocf-primary);
    color: var(--ocf-primary-contrast);
}

.ocf-featured-review__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--ocf-grid-gap) * 1);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.ocf-featured-review__mark {
    position: absolute;
    top: -0.32em;
    left: 0;
    color: color-mix(in srgb, var(--ocf-primary) 55%, #000);
    font-family: var(--ocf-font-heading), system-ui, sans-serif;
    font-size: clamp(6rem, 11vw, 11rem);
    line-height: 1;
    pointer-events: none;
}

.ocf-featured-review__stars { color: var(--dakota-star); font-size: 20px; letter-spacing: 0.18em; }

.ocf-featured-review blockquote {
    position: relative;
    margin: 0;
    color: inherit;
    font-size: clamp(1.1875rem, 1.6vw, 1.375rem);
    line-height: 1.52;
}

.ocf-featured-review figcaption {
    color: color-mix(in srgb, currentColor 80%, transparent);
    font-size: var(--font-body-size);
}

.ocf-featured-review figcaption strong { color: currentColor; font-weight: var(--font-weight-bold); }

.ocf-featured-review:not(:has(figure)) { padding-bottom: 0; }

.ocf-services .ocf-slider-actions { gap: calc(var(--ocf-grid-gap) * 0.5); }
.ocf-services .ocf-slider-nav { gap: 12px; margin-right: calc(var(--ocf-grid-gap) * 0.5); }

/* Slider stays inside the container: three cards per frame on desktop, two on tablet, one on mobile. */
.ocf-svc-track {
    --slider-per-view: 3;
}

.ocf-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ocf-grid-gap);
}

.ocf-svc-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: var(--dakota-card-height);
    overflow: hidden;
    border: 0;
    border-radius: var(--card-radius);
    background: var(--dakota-band);
    color: var(--ocf-heading-alt);
    isolation: isolate;
}

.ocf-svc-card-img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ocf-svc-card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent 15%, color-mix(in srgb, var(--dakota-overlay-color) 62%, transparent) 55%, color-mix(in srgb, var(--dakota-overlay-color) 88%, transparent) 100%);
}

.ocf-svc-card-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 28px;
}

.ocf-svc-card-body h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    color: inherit;
    font-size: clamp(1.375rem, 1.8vw, 1.625rem);
    line-height: 1.2;
}

.ocf-svc-card-body p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    color: color-mix(in srgb, var(--ocf-heading-alt) 88%, transparent);
    font-size: calc(var(--font-body-size) * 0.94);
    line-height: 1.55;
}

.ocf-svc-card-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 7px 14px;
    border: 1px solid color-mix(in srgb, var(--ocf-heading-alt) 35%, transparent);
    border-radius: var(--radius-full);
    background: color-mix(in srgb, var(--ocf-heading-alt) 16%, transparent);
    color: var(--ocf-heading-alt);
    font-size: var(--ocf-font-small-size);
    font-weight: var(--font-weight-semibold);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.ocf-svc-card-pill::after {
    content: "";
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: var(--dakota-arrow) center / contain no-repeat;
    mask: var(--dakota-arrow) center / contain no-repeat;
    transition: transform var(--duration) var(--ease);
}

.ocf-svc-card:hover .ocf-svc-card-pill { background: var(--ocf-secondary); border-color: var(--ocf-secondary); color: var(--ocf-secondary-contrast); }
.ocf-svc-card:hover .ocf-svc-card-pill::after { transform: translateX(3px); }

@media (max-width: 1023px) {
    .ocf-services { --dakota-card-height: 400px; }
    .ocf-svc-track { --slider-per-view: 2; }
    .ocf-svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
    .ocf-svc-track { --slider-per-view: 1; }
    .ocf-svc-grid { grid-template-columns: minmax(0, 1fr); }
    .ocf-services .ocf-slider-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 16px;
    }
}
