/* Services: tall photo cards with the title, summary and a text link over a bottom fade, in a slider with arrows beside
 * an "all services" link and a progress bar underneath. Service archives use white tiles with an inset photo. */
.ocf-services {
    --lisbon-card-height: var(--ocf-service-image-height);
    background: transparent;
}

.ocf-services .ocf-section-heading { align-items: flex-end; }
.ocf-services .ocf-slider-actions { gap: 24px; }

.ocf-svc-card {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: var(--lisbon-card-height);
    overflow: hidden;
    border-radius: var(--card-radius);
    background: var(--lisbon-band);
    color: var(--ocf-heading-alt);
    isolation: isolate;
}

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

.ocf-svc-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, transparent 38%, color-mix(in srgb, var(--lisbon-overlay-color) 90%, transparent) 100%);
}

.ocf-svc-card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 30px;
}

.ocf-svc-card h3 {
    color: inherit;
    font-size: clamp(22px, 1.8vw, 26px);
    letter-spacing: -0.01em;
}

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

.ocf-svc-card .ocf-text-link { color: var(--ocf-heading-alt); }

/* Service archive tiles: white card, inset photo, dark copy. */
.ocf-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ocf-grid-gap);
}

.ocf-svc-card--tile {
    flex-direction: column;
    align-items: stretch;
    min-height: 0;
    padding: 8px;
    background: var(--lisbon-card);
    color: var(--ocf-heading);
}

.ocf-svc-card--tile::after { content: none; }

.ocf-svc-card-media {
    overflow: hidden;
    aspect-ratio: 400 / 250;
    border-radius: calc(var(--card-radius) - 8px);
}

.ocf-svc-card--tile .ocf-svc-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ocf-svc-card--tile .ocf-svc-card-body { flex: 1; padding: 22px 16px 18px; gap: 10px; }
.ocf-svc-card--tile h3 { color: var(--ocf-heading); font-size: clamp(21px, 1.6vw, 24px); }
.ocf-svc-card--tile p { color: var(--ocf-body); }
.ocf-svc-card--tile .ocf-text-link { margin-top: auto; padding-top: 4px; color: var(--ocf-link); }

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

@media (max-width: 639px) {
    .ocf-svc-grid { grid-template-columns: 1fr; }
    .ocf-services { --lisbon-card-height: 380px; }
    .ocf-services .ocf-slider-actions { justify-content: space-between; width: 100%; }
    .ocf-svc-card-body { padding: 24px; }
    /* One card per frame with a peek of the next. */
    .ocf-services .ocf-slider-track { --slider-per-view: 1; }
    .ocf-services .ocf-slider-track > * { flex-basis: 88%; }
}

/* OCF_AGENT_BLOCK:homepage-editorial-service-list START */
/* Homepage editorial service rows, scoped to this component. */
body:has(#hero) #services.ocf-services { background:#F4F0E6 !important; color:#4B5B51 !important; }
body:has(#hero) #services.ocf-services .ocf-slider-viewport { overflow:visible !important; }
body:has(#hero) #services.ocf-services .ocf-svc-track { display:grid !important; grid-template-columns:repeat(2,minmax(0,1fr)) !important; gap:0 48px !important; width:100% !important; transform:none !important; transition:none !important; counter-reset:sg-service; }
body:has(#hero) #services.ocf-services .ocf-svc-card { position:relative !important; display:block !important; min-width:0 !important; min-height:0 !important; padding:28px 0 30px 54px !important; border:0 !important; border-top:1px solid rgba(18,50,38,.2) !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; color:#123226 !important; overflow:visible !important; isolation:auto !important; counter-increment:sg-service; }
body:has(#hero) #services.ocf-services .ocf-svc-card::after { content:none !important; display:none !important; background:none !important; box-shadow:none !important; }
body:has(#hero) #services.ocf-services .ocf-svc-card::before { content:counter(sg-service,decimal-leading-zero) !important; display:block !important; position:absolute !important; top:28px !important; left:0 !important; padding:0 !important; border:0 !important; background:transparent !important; box-shadow:none !important; color:#176B4D !important; font-family:var(--ocf-font-heading),sans-serif !important; font-size:18px !important; font-weight:700 !important; line-height:1.3 !important; }
body:has(#hero) #services.ocf-services .ocf-svc-card-img { display:none !important; }
body:has(#hero) #services.ocf-services .ocf-svc-card-body { position:static !important; display:block !important; width:auto !important; padding:0 !important; border:0 !important; background:transparent !important; box-shadow:none !important; color:#4B5B51 !important; filter:none !important; }
body:has(#hero) #services.ocf-services .ocf-svc-card-body::before,
body:has(#hero) #services.ocf-services .ocf-svc-card-body::after,
body:has(#hero) #services.ocf-services .ocf-svc-card-body p::before,
body:has(#hero) #services.ocf-services .ocf-svc-card-body p::after { content:none !important; display:none !important; background:none !important; box-shadow:none !important; }
body:has(#hero) #services.ocf-services .ocf-svc-card-body h3 { margin:0 !important; padding:0 !important; border:0 !important; background:transparent !important; box-shadow:none !important; color:#123226 !important; font-size:21px !important; line-height:1.3 !important; transition:color 180ms ease; }
body:has(#hero) #services.ocf-services .ocf-svc-card-body p { display:block !important; margin:8px 0 0 !important; padding:0 !important; border:0 !important; border-radius:0 !important; background:transparent !important; box-shadow:none !important; color:#4B5B51 !important; font-size:15px !important; line-height:1.6 !important; text-shadow:none !important; filter:none !important; }
body:has(#hero) #services.ocf-services .ocf-svc-card:hover .ocf-svc-card-body h3,
body:has(#hero) #services.ocf-services .ocf-svc-card:focus-visible .ocf-svc-card-body h3 { color:#176B4D !important; }
body:has(#hero) #services.ocf-services .ocf-svc-card-pill,
body:has(#hero) #services.ocf-services .lisbon-progress,
body:has(#hero) #services.ocf-services .ocf-slider-nav { display:none !important; }
@media(max-width:760px) {
 body:has(#hero) #services.ocf-services .ocf-svc-track { grid-template-columns:minmax(0,1fr) !important; gap:0 !important; }
 body:has(#hero) #services.ocf-services .ocf-svc-card { padding-block:22px !important; }
 body:has(#hero) #services.ocf-services .ocf-svc-card::before { top:22px !important; }
}
/* OCF_AGENT_BLOCK:homepage-editorial-service-list END */
