/* Content-driven layouts for service pages; the existing copy stays editable in ACF. */
/* Use the shared container width for both structured and editor-based service content. */
.sp-service-body-width,
#service-content .sp-single-content { width: 100%; max-width: none; }
.sp-service-details-header { margin-bottom: 2.75rem; }
.sp-service-details-header h2 { max-width: 940px; font-size: clamp(1.8rem, 3vw, 2.6rem); line-height: 1.22; margin: 0; }
.sp-service-details-header > p { max-width: 760px; color: var(--sp-muted); margin: 1.25rem 0 0; font-size: 1.05rem; }
.sp-detail-stack { display: grid; gap: 2rem; }
.sp-detail-block { min-width: 0; }
.sp-detail-heading { font-size: clamp(1.35rem, 2vw, 1.65rem); line-height: 1.3; letter-spacing: -.035em; margin: 0; }
.sp-detail-copy { min-width: 0; color: var(--sp-gray-800); font-size: 1rem; line-height: 1.8; overflow-wrap: break-word; }
.sp-detail-copy > p { margin: 0 0 1.15rem; }
.sp-detail-copy > :last-child { margin-bottom: 0; }
.sp-detail-copy strong { color: var(--sp-ink); font-weight: 600; }
.sp-detail-copy a { text-decoration: underline; text-underline-offset: 3px; }
.sp-detail-copy ul, .sp-detail-copy ol { margin: 0 0 1.5rem; padding-left: 1.3rem; }
.sp-detail-copy li { padding-left: .2rem; }
.sp-detail-copy li::marker { color: var(--sp-accent); }
.sp-detail-copy .sp-detail-description { display: block; margin-top: .35rem; color: var(--sp-muted); font-size: .96rem; line-height: 1.7; }
.sp-detail-image { margin: 2rem 0; overflow: hidden; border-radius: 14px; }
.sp-detail-image img { display: block; width: 100%; height: auto; }
.sp-detail-image:first-child { margin-top: 0; }
.sp-detail-image:last-child { margin-bottom: 0; }

/* Open text rows keep paragraphs readable while giving their headings a clear place. */
.sp-detail-block--text { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.65fr); gap: 3rem; padding: 2rem 0; border-top: 1px solid var(--sp-line); }
.sp-detail-block--text .sp-detail-heading { padding-top: .1rem; }

/* Labelled lists become feature or material cards, with descriptions kept with their labels. */
.sp-detail-block--features { padding: 2.25rem; border-radius: 16px; background: #fcf1f7; }
.sp-detail-block--features > .sp-detail-heading { margin-bottom: 1.6rem; }
.sp-detail-block--features .sp-detail-copy > ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; list-style: none; padding: 0; }
.sp-detail-block--features .sp-detail-copy > ul > li { min-width: 0; padding: 1.35rem 1.5rem; border: 1px solid #f0dce7; background: #fff; border-radius: 10px; }
.sp-detail-block--features .sp-detail-copy > ul > li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.sp-detail-block--features .sp-detail-copy > ul > li > strong { display: block; font: 700 1rem/1.4 var(--sp-font-heading); letter-spacing: -.02em; }
.sp-detail-block--features .sp-detail-copy > p { max-width: 850px; }

/* Short alternatives and specifications stay compact rather than becoming large cards. */
.sp-detail-block--choices { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1.65fr); gap: 3rem; padding: 2rem; background: #faf9fa; border: 1px solid var(--sp-line); border-radius: 14px; }
.sp-detail-block--choices .sp-detail-copy > ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 2rem; padding-left: 1.15rem; }

/* Keep processes as real ordered lists, displayed as a sequence on wide screens. */
.sp-detail-block--steps { padding: 2rem 0; border-top: 1px solid var(--sp-line); }
.sp-detail-block--steps > .sp-detail-heading { margin-bottom: 1.75rem; }
.sp-detail-block--steps .sp-detail-copy > ol { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 2rem; padding: 0; }
.sp-detail-block--steps .sp-detail-copy > ol > li { margin-left: 1.65rem; padding-left: .2rem; padding-top: .1rem; }
.sp-detail-block--steps .sp-detail-copy > ol > li::marker { font-weight: 700; font-size: 1.2rem; }
.sp-detail-block--steps .sp-detail-copy > ol > li > strong { display: block; font: 700 1rem/1.5 var(--sp-font-heading); }
.sp-detail-block--steps .sp-detail-copy .sp-detail-description { font-size: .9rem; }
.sp-detail-block--steps .sp-detail-copy > p { max-width: 850px; }
.sp-detail-block--with-image .sp-detail-image img { max-height: 600px; object-fit: cover; }
.sp-detail-copy table { display: block; overflow-x: auto; max-width: 100%; }

@media (min-width: 992px) {
    .sp-detail-block--features .sp-detail-copy > ul:has(> li:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .sp-detail-block--features .sp-detail-copy > ul:has(> li:nth-child(3):last-child) > li:last-child { grid-column: auto; }
}
@media (max-width: 991.98px) {
    .sp-detail-block--text, .sp-detail-block--choices { grid-template-columns: 1fr; gap: 1.25rem; }
    .sp-detail-block--features { padding: 1.75rem; }
    .sp-detail-block--steps .sp-detail-copy > ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
    .sp-service-details { padding-block: var(--sp-section-space); }
    .sp-service-details-header { margin-bottom: 1.75rem; }
    .sp-service-details-header h2 { font-size: 1.8rem; }
    .sp-detail-stack { gap: 1.25rem; }
    .sp-detail-heading { font-size: 1.35rem; }
    .sp-detail-block--text { padding-block: 1.5rem; }
    .sp-detail-block--features, .sp-detail-block--choices { padding: 1.4rem 1.2rem; }
    .sp-detail-block--features .sp-detail-copy > ul, .sp-detail-block--choices .sp-detail-copy > ul { grid-template-columns: 1fr; }
    .sp-detail-block--features .sp-detail-copy > ul > li { padding: 1.1rem; }
    .sp-detail-block--features .sp-detail-copy > ul > li:last-child:nth-child(odd) { grid-column: auto; }
    .sp-detail-block--steps { padding-block: 1.5rem; }
    .sp-detail-block--steps .sp-detail-copy > ol { grid-template-columns: 1fr; gap: 1.25rem; }
    .sp-detail-copy { font-size: .98rem; }
}
