/* One uninterrupted surface for each transparent object and its description. */
.service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px 28px;
    align-items: stretch;
}

.service-grid .service-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
    min-width: 0;
    min-height: 0;
    padding: 24px 28px 30px;
    border: 0;
    border-radius: 0;
    background: var(--cream, #f5efe3);
    box-shadow: 0 6px 24px rgba(35, 44, 30, .06);
    transform: none;
}

.service-grid .service-card::before,
.service-grid .service-card::after {
    content: "";
    position: absolute;
    width: 46px;
    height: 46px;
    /* Each SVG is one solid 4px L-shaped contour with continuous bevel edges. */
    border: 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    filter: drop-shadow(1px 2px 2px rgba(86, 62, 25, .20));
    pointer-events: none;
}

.service-grid .service-card::before {
    /* Centre the 4px gold contour on the card edge. */
    top: -2px;
    left: -2px;
    background-image: url('images/corner-gold-top-left.svg');
}

.service-grid .service-card::after {
    right: -2px;
    bottom: -2px;
    background-image: url('images/corner-gold-bottom-right.svg');
}

.service-grid .service-card .service-art {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.service-grid .service-card .service-art img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 10px 12px;
    min-height: 0;
    object-fit: contain;
    transform: none;
    transition: none;
}

.service-grid .service-card .service-card-copy {
    min-width: 0;
    padding: 20px 0 0;
}

.service-grid .service-card h3 {
    margin: 0 0 11px;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -.025em;
    color: var(--green, #16382c);
    transition: color .2s;
}

.service-grid .service-card .service-card-copy p {
    max-width: none;
    margin: 0;
    font-size: 18px;
    line-height: 1.55;
}

.service-grid .service-card:hover h3 {
    color: var(--gold-ink, #85662f);
}

/* Start the sticky consultation card beside the title and follow the full article. */
.service-detail-layout {
    padding-top: 40px;
}

.service-detail-layout .page-heading,
.service-detail-layout .detail-section:first-of-type {
    padding-top: 0;
}

@media (max-width: 700px) {
    .service-detail-layout { padding-top: 25px; }
}

/* Compact, coloured stages break up the service detail text. */
.treatment-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 0;
    margin: 0;
    list-style: none;
}

@media (min-width: 641px) {
    .treatment-steps--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.treatment-step {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    padding: 22px 20px;
    background: var(--green, #16382c);
    color: var(--cream, #f5efe3);
}

.treatment-step:nth-child(4n + 2) {
    background: #dce2d6;
    color: var(--green, #16382c);
}

.treatment-step:nth-child(4n + 3) {
    background: #cfb581;
    color: #fff;
}

.treatment-step:nth-child(4n) {
    background: #486957;
    color: #fff;
}

.treatment-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.treatment-step-top .icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.treatment-step-number {
    font-size: 28px;
    font-weight: 500;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.treatment-step-text {
    font-size: 19px;
    font-weight: 500;
    line-height: 1.4;
    overflow-wrap: break-word;
}

@media (max-width: 640px) {
    .treatment-steps { grid-template-columns: 1fr; gap: 10px; }
    .treatment-step { flex-direction: row; align-items: center; gap: 20px; padding: 20px; }
    .treatment-step-top { flex-direction: column; gap: 6px; flex-shrink: 0; }
    .treatment-step-top .icon { width: 32px; height: 32px; }
    .treatment-step-number { font-size: 22px; }
    .treatment-step-text { font-size: 18px; }
}

/* Text tabs avoid adding a second row of filled controls. */
.service-tabs {
    display: flex;
    align-items: stretch;
    gap: 32px;
    padding: 0;
    border: 0;
    background: transparent;
}

.service-tabs button {
    min-height: 46px;
    padding: 9px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted, #64675e);
    font-size: 20px;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    transition: color .2s, border-color .2s;
}

.service-tabs button:hover,
.service-tabs button.is-active {
    color: var(--green, #16382c);
}

.service-tabs button.is-active {
    border-bottom-color: var(--green, #16382c);
}

@media (max-width: 1080px) {
    .service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 30px 24px;
    }

    .service-grid .service-card h3 {
        font-size: 28px;
    }
}

@media (max-width: 640px) {
    .service-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .service-grid .service-card {
        padding: 22px 24px 28px;
    }

    .service-grid .service-card .service-art img {
        padding: 8px;
    }

    .service-grid .service-card .service-card-copy {
        padding-top: 21px;
    }

    .service-grid .service-card h3 {
        font-size: 28px;
        margin-bottom: 10px;
    }

    .service-grid .service-card .service-card-copy p {
        font-size: 17px;
    }

    .service-tabs {
        width: 100%;
        gap: 24px;
    }

    .service-tabs button {
        flex: 1;
        min-width: 0;
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-grid .service-card h3,
    .service-tabs button {
        transition: none;
    }
}
