/* Services: square cards with a hairline border — photo, condensed title, short description, primary text link. */
.ocf-svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ocf-grid-gap); }

.ocf-svc-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: var(--card-border-width) solid var(--ocf-border);
    border-radius: var(--card-radius);
    background: var(--ocf-bg);
    color: var(--ocf-body);
}

.ocf-svc-card:hover { border-color: var(--ocf-heading); }

.ocf-svc-card-img { width: 100%; height: var(--ocf-service-image-height); object-fit: cover; }

.ocf-svc-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: calc(var(--ocf-space-unit) * 0.625);
    min-height: var(--ocf-service-card-body-height);
    padding: calc(var(--ocf-space-unit) * 1.625) calc(var(--ocf-space-unit) * 1.625) calc(var(--ocf-space-unit) * 1.75);
}

.ocf-svc-card-body h3 { color: var(--ocf-heading); }

.ocf-svc-card-body p {
    color: var(--ocf-body);
    font-size: calc(var(--font-body-size) * 0.889);
    line-height: 1.625;
}

.ocf-svc-card-body .ocf-text-link { margin-top: auto; padding-top: calc(var(--ocf-space-unit) * 0.25); }


.ocf-services-archive { background: var(--cardinal-bg-alt); }

.ocf-catalog-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: calc(var(--ocf-grid-gap) * 0.75);
    margin-bottom: var(--ocf-grid-gap);
    padding: calc(var(--ocf-grid-gap) * 0.875) var(--ocf-grid-gap);
    background: var(--cardinal-band);
    color: var(--ocf-heading-alt);
}

.ocf-catalog-help a { color: inherit; }
.ocf-catalog-help a:hover { color: inherit; text-decoration: underline; }

@media (max-width: 1000px) { .ocf-svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

@media (max-width: 600px) {
    .ocf-svc-grid { grid-template-columns: 1fr; }
    .ocf-svc-card-body { min-height: 0; }
    .ocf-catalog-help { flex-direction: column; align-items: start; }
}

/* OCF_AGENT_BLOCK:rooted-black-service-cards START */
#services .ocf-svc-card { background:#111111; border-color:#3D463E; }
#services .ocf-svc-card-body { background:#111111; }
#services .ocf-svc-card-body h3, #services .ocf-svc-card-body p { color:#FFFFFF; }
#services .ocf-svc-card:hover { border-color:var(--ocf-secondary); }
/* OCF_AGENT_BLOCK:rooted-black-service-cards END */

/* OCF_AGENT_BLOCK:rbm-services-archive-refresh START */
.ocf-page-header:has([data-ocf-field="services_page_title"])::before { background-size: cover; background-position: center; }
.ocf-page-header:has([data-ocf-field="services_page_title"])::after { background: linear-gradient(90deg,rgba(23,32,24,.82),rgba(23,32,24,.65) 50%,rgba(23,32,24,.22)); }
.ocf-page-header:has([data-ocf-field="services_page_title"]) .ocf-page-header__content { max-width: 660px; }
.ocf-page-header:has([data-ocf-field="services_page_title"]) .ocf-page-header__headline { font-size: clamp(34px,4vw,52px); }
#services-archive .ocf-svc-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.rbm-archive-intro { max-width: 1000px; margin: 0 auto 32px; font-size: 18px; line-height: 1.7; }
.rbm-archive-overview { max-width: 1000px; margin: 56px auto 0; }
.rbm-archive-overview :is(h2,h3) { color: var(--ocf-secondary); margin: 28px 0 14px; }
.rbm-archive-overview p { line-height: 1.75; margin-bottom: 20px; }
.rbm-archive-overview a { color: var(--ocf-secondary); text-decoration: underline; }
@media (max-width: 600px) { #services-archive .ocf-svc-grid { grid-template-columns: 1fr; } }
/* OCF_AGENT_BLOCK:rbm-services-archive-refresh END */

/* OCF_AGENT_BLOCK:rbm-home-services-two-rows START */
@media (min-width: 641px) {
  body.home #services .ocf-svc-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: var(--ocf-grid-gap);
    --slider-per-view: 4;
    transform: none !important;
  }
  body.home #services .ocf-svc-card { width: auto; min-width: 0; height: 100%; }
  body.home #services [data-slider-nav] { display: none; }
}
@media (max-width: 640px) {
  body.home #services .ocf-svc-track { --slider-per-view: 1; }
}
/* OCF_AGENT_BLOCK:rbm-home-services-two-rows END */
