/* Service page rebuild: mobile-first component styles. */
.service-page {
    background: var(--color-surface);
}

.service-page .nav-dropdown--current > button::after {
    transform: scaleX(1);
}

.service-page .drawer-disclosure--current > button {
    color: var(--color-blue);
}

@media (max-width: 70rem) {
    .service-page .menu-toggle {
        display: block;
        flex: 0 0 2.75rem;
    }
}

.service-hero {
    position: relative;
    z-index: 0;
    overflow: hidden;
    isolation: isolate;
    padding-block: clamp(3rem, 9vw, 6.75rem);
    background: #eff9ff;
}

.service-hero--has-image::after {
    position: absolute;
    inset: 0;
    z-index: 1;
    content: "";
    background: linear-gradient(90deg, #eff9ff 0%, #eff9ff 36%, rgba(239, 249, 255, 0.96) 48%, rgba(239, 249, 255, 0.62) 62%, rgba(239, 249, 255, 0.12) 78%, transparent 100%);
}

.service-hero__inner {
    position: relative;
    z-index: 2;
}

.service-hero__copy,
.service-hero__media {
    min-width: 0;
}

.service-hero__copy {
    max-width: 38rem;
}

.service-hero h1 {
    margin-bottom: var(--space-5);
    font-size: clamp(2.25rem, 9vw, 4.15rem);
    line-height: 1.02;
}

.service-hero__lead {
    margin-bottom: var(--space-6);
    color: #315376;
    font-size: clamp(0.96rem, 2vw, 1.08rem);
    line-height: 1.65;
}

.service-hero__quote {
    width: 100%;
    min-height: 3.75rem;
    padding-inline: var(--space-8);
    font-size: 0.92rem;
    box-shadow: 0 10px 24px rgba(7, 42, 90, 0.24);
}

.service-hero__quick-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-2);
    margin-top: var(--space-3);
}

.service-hero__quick-actions a {
    display: flex;
    min-width: 0;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.55rem 0.35rem;
    border: 1px solid var(--color-blue);
    border-radius: var(--radius-control);
    color: var(--color-blue);
    background: rgba(255, 255, 255, 0.85);
    font-size: clamp(0.72rem, 2.7vw, 0.82rem);
    font-weight: 800;
}

.service-hero__quick-actions .icon {
    font-size: 1.1rem;
}

.service-hero__phone {
    display: flex;
    width: 100%;
    align-items: flex-start;
    justify-content: center;
    gap: var(--space-3);
    margin: var(--space-5) auto 0;
    color: var(--color-blue);
}

.service-hero__phone > .icon {
    margin-top: 0.18rem;
    font-size: 1.25rem;
}

.service-hero__phone span {
    display: grid;
}

.service-hero__phone strong {
    font-size: 1.12rem;
    font-weight: 800;
}

.service-hero__phone small {
    color: var(--color-muted);
    font-size: 0.7rem;
    font-weight: 600;
}

.service-hero__media {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: 0;
    width: 74%;
    margin: 0;
}

.service-hero__media picture,
.service-hero__media img {
    display: block;
    width: 100%;
    max-width: 100%;
}

.service-hero__media img {
    height: 100%;
    object-fit: cover;
    object-position: 56% center;
}

.service-hero__media figcaption {
    position: absolute;
    right: clamp(var(--space-3), 4vw, var(--space-8));
    bottom: clamp(var(--space-3), 4vw, var(--space-8));
    display: flex;
    max-width: 12rem;
    align-items: center;
    gap: var(--space-2);
    padding: 0.7rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-control);
    color: var(--color-navy);
    background: rgba(255, 255, 255, 0.91);
    box-shadow: var(--shadow-card);
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.35;
    backdrop-filter: blur(8px);
}

.service-hero__media figcaption .icon {
    color: var(--color-blue);
    font-size: 1.3rem;
}

@media (max-width: 47.99rem) {
    /* The caption card would sit over the contact line in the compact hero. */
    .service-hero__media figcaption {
        display: none;
    }
}

.service-section {
    padding-block: clamp(3rem, 5.5vw, 5rem);
    background: var(--color-surface);
}

/* Service pages have more, shorter sections than the homepage. */
.service-page .service-faq {
    padding-block: clamp(3rem, 5.5vw, 5rem);
}

.service-section--tint,
.service-before-after,
.service-coverage {
    background: linear-gradient(180deg, #eef8fd 0%, #f8fcff 100%);
}

.service-heading {
    max-width: 49rem;
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.service-page .service-faq .section-heading {
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.service-heading--center {
    margin-inline: auto;
    text-align: center;
}

.service-heading h2,
.service-overview h2,
.service-coverage h2 {
    margin-bottom: var(--space-3);
    font-size: clamp(1.85rem, 6vw, 2.75rem);
}

.service-heading p,
.service-coverage p {
    margin-bottom: 0;
    color: var(--color-muted);
    font-size: 0.94rem;
    line-height: 1.7;
}

.service-tile-grid,
.service-reason-grid,
.service-benefit-grid,
.service-process {
    margin: 0;
    padding: 0;
    list-style: none;
}

.service-tile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.service-tile-grid li,
.service-reason-grid li,
.service-benefit-grid li {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: var(--space-3);
    border: 1px solid #cfe2ef;
    border-radius: var(--radius-control);
    color: var(--color-navy);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 13px rgba(7, 42, 90, 0.05);
    font-weight: 700;
    line-height: 1.35;
}

.service-tile-grid li {
    min-height: 4.8rem;
    padding: var(--space-3);
    font-size: 0.76rem;
}

.service-tile-grid .icon,
.service-reason-grid .icon,
.service-benefit-grid .icon {
    color: #0876df;
    font-size: 1.7rem;
}

.service-reason-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
}

.service-reason-grid li {
    min-height: 4.3rem;
    padding: var(--space-4);
    font-size: 0.82rem;
}

.service-overview,
.service-why,
.service-coverage__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(var(--space-8), 6vw, var(--space-16));
    align-items: center;
}

.service-overview__copy p {
    color: #315376;
    font-size: 0.95rem;
    line-height: 1.75;
}

.service-overview__copy p:last-child {
    margin-bottom: 0;
}

.service-overview--text-only .service-overview__copy {
    width: 100%;
    max-width: 52rem;
    margin-inline: auto;
}

.service-overview__copy > h2:not(:first-child),
.service-overview__copy > h3:not(:first-child) {
    margin-top: 2rem;
}

.service-overview__copy h3 {
    font-size: clamp(1.25rem, 3vw, 1.6rem);
    margin-bottom: var(--space-3);
}

.service-overview__copy ul,
.service-overview__copy ol {
    padding-left: 1.5rem;
    margin-block: 1rem;
    color: #315376;
    line-height: 1.75;
}
.service-overview__copy ul { list-style: disc; }
.service-overview__copy ol { list-style: decimal; }
.service-overview__copy img { max-width: 100%; height: auto; border-radius: var(--radius-media); }
.service-overview__copy .wp-caption { max-width: 100%; }
.service-overview__copy .aligncenter { display: block; margin-inline: auto; }
.service-overview__copy { min-width: 0; overflow-wrap: anywhere; display: flow-root; }

.service-overview__media,
.service-why__media {
    display: block;
    overflow: hidden;
    border-radius: var(--radius-media);
    box-shadow: var(--shadow-elevated);
}

.service-overview__media img,
.service-why__media img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
}

.service-process {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    counter-reset: service-process;
}

.service-process li {
    position: relative;
    display: grid;
    min-height: 9rem;
    grid-template-columns: 2.65rem minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: var(--space-2) var(--space-4);
    align-content: center;
    padding: 2.75rem var(--space-5) var(--space-5);
    border: 1px solid #cfe2ef;
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.94);
    counter-increment: service-process;
}

.service-process li::before {
    position: absolute;
    top: var(--space-3);
    right: auto;
    left: var(--space-3);
    display: grid;
    width: 1.65rem;
    height: 1.65rem;
    place-items: center;
    border-radius: 50%;
    border: 1px solid rgba(18, 102, 157, 0.16);
    color: var(--color-muted);
    background: rgba(18, 102, 157, 0.08);
    content: counter(service-process);
    font-size: 0.67rem;
    font-weight: 800;
}

.service-process .icon {
    grid-row: 1 / 3;
    align-self: center;
    color: #0876df;
    font-size: 2.45rem;
}

.service-process h3 {
    align-self: end;
    margin: 0;
    font-size: 0.98rem;
}

.service-process p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.77rem;
    line-height: 1.55;
}

.service-benefit-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
}

.service-benefit-grid li {
    min-height: 5.1rem;
    padding: var(--space-3);
    font-size: 0.75rem;
}

.service-tile-grid,
.service-reason-grid,
.service-benefit-grid {
    align-items: stretch;
}

/* Only described cards gain a secondary row; existing compact cards stay unchanged. */
.service-tile-grid li.service-item--described,
.service-reason-grid li.service-item--described,
.service-benefit-grid li.service-item--described {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: start;
}

.service-item--described > span {
    grid-column: 2;
    min-width: 0;
    overflow-wrap: anywhere;
}
/* A two-track card row shares one heading height and one description height. */
.service-tile-grid > li {
    grid-row: span 2;
}

.service-tile-grid > li.service-item--described {
    grid-template-rows: subgrid;
    align-items: center;
}

.service-tile-grid > li.service-item--described > .icon,
.service-tile-grid > li.service-item--described > span {
    grid-row: 1;
}

.service-tile-grid > li.service-item--described > .service-item-description {
    grid-row: 2;
    align-self: start;
}


.service-item-description {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.service-results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
}

.service-results-grid .results-photo {
    display: block;
    height: 100%;
}

.service-results-grid .comparison img {
    height: auto;
}

.service-before-after .section-action {
    margin-top: var(--space-8);
}

.service-reviews .reviews-panel {
    margin-top: 0;
}

.service-heading--split {
    display: grid;
    gap: var(--space-4);
    max-width: none;
}

.service-heading--split .button {
    width: 100%;
}

.service-reviews .review-card {
    min-width: 86%;
}

.service-map {
    width: min(100%, 27rem);
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(18, 102, 157, 0.22);
    border-radius: var(--radius-media);
    background: var(--color-surface);
    box-shadow: var(--shadow-card);
}

.service-map img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: center 57%;
}

.service-map figcaption {
    padding: 0.45rem var(--space-3);
    color: var(--color-muted);
    font-size: 0.62rem;
    text-align: right;
}

.service-map figcaption a {
    text-decoration: underline;
}

.service-faq .faq-grid {
    grid-template-columns: 1fr;
    max-width: 58rem;
    margin-inline: auto;
}

@media (min-width: 30rem) {
    .service-reason-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 48rem) {
    .service-hero__quote {
        width: min(100%, 22rem);
    }

    .service-hero__quick-actions,
    .service-hero__phone {
        width: min(100%, 22rem);
        margin-left: 0;
    }

    .service-reason-grid {
        grid-template-columns: repeat(var(--service-reasons-columns, 4), minmax(0, 1fr));
    }
    .service-tile-grid {
        grid-template-columns: repeat(var(--service-clean-columns, 4), minmax(0, 1fr));
    }

    .service-benefit-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .service-results-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .service-heading--split {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
    }

    .service-heading--split .button {
        width: auto;
    }

    .service-reviews .review-card {
        min-width: calc((100% - (var(--space-4) * 2)) / 3);
    }
}

@media (min-width: 55rem) {
    .service-overview--with-image {
        grid-template-columns: minmax(0, 1fr) minmax(22rem, 0.92fr);
    }

    .service-why {
        grid-template-columns: minmax(0, 1.1fr) minmax(21rem, 0.9fr);
    }

    .service-coverage__grid {
        grid-template-columns: minmax(0, 1.2fr) minmax(18rem, 0.8fr);
    }
}

@media (min-width: 64rem) {
    .service-hero {
        min-height: clamp(39rem, 48vw, 49rem);
        display: grid;
        align-items: center;
    }

    .service-hero--has-image::after {
        background: linear-gradient(90deg, #eff9ff 0%, #eff9ff 29%, rgba(239, 249, 255, 0.98) 38%, rgba(239, 249, 255, 0.78) 49%, rgba(239, 249, 255, 0.28) 63%, transparent 78%);
    }

    .service-hero__copy {
        max-width: 38rem;
    }

    .service-hero h1 {
        font-size: clamp(3.25rem, 4.3vw, 4.4rem);
    }

    .service-hero__lead {
        max-width: 34.5rem;
        font-size: clamp(1rem, 1.35vw, 1.2rem);
    }

    .service-hero__media img {
        object-position: 54% center;
    }

    .service-process {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: var(--space-3);
    }

    .service-process li {
        min-height: 14.5rem;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto 1fr;
        align-content: start;
        padding: 3.25rem var(--space-4) var(--space-5);
        text-align: center;
    }

    .service-process li:not(:last-child)::after {
        position: absolute;
        top: 50%;
        left: calc(100% + 0.18rem);
        z-index: 2;
        color: #72a9ce;
        content: "\2192";
        font-size: 1.2rem;
        transform: translateY(-50%);
    }

    .service-process .icon {
        grid-row: auto;
        justify-self: center;
    }

    .service-process h3 {
        align-self: auto;
    }
}

/* Illustrated listing icons: 1.5x artwork and 1.2x original title sizes. */
.service-tile-grid > li:has(> .icon--illustrated) {
    font-size: 0.912rem; /* 0.76rem x 1.2. */
}
.service-reason-grid > li:has(> .icon--illustrated) {
    font-size: 0.984rem;
}
.service-benefit-grid > li:has(> .icon--illustrated) {
    font-size: 0.9rem;
}
.service-tile-grid > li > .icon--illustrated,
.service-reason-grid > li > .icon--illustrated,
.service-benefit-grid > li > .icon--illustrated {
    width: 2.55rem;
    height: 2.55rem;
    flex: 0 0 2.55rem;
    font-size: 2.55rem; /* 1.7rem x 1.5 on both axes. */
}

/* Give longer room names the full card width on small phones. */
@media (max-width: 26rem) {
    :is(.service-tile-grid, .service-benefit-grid) > li:has(> .icon--illustrated):not(.service-item--described) {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 0.5rem;
    }
}

/* Keep heading and description baselines aligned across each illustrated row. */
.service-reason-grid > li:has(> .icon--illustrated),
.service-benefit-grid > li:has(> .icon--illustrated) {
    grid-row: span 2;
}
.service-reason-grid > .service-item--described:has(> .icon--illustrated),
.service-benefit-grid > .service-item--described:has(> .icon--illustrated) {
    grid-template-rows: subgrid;
    align-items: center;
}
:is(.service-reason-grid, .service-benefit-grid) > .service-item--described:has(> .icon--illustrated) > :is(.icon, span) {
    grid-row: 1;
}
:is(.service-reason-grid, .service-benefit-grid) > .service-item--described:has(> .icon--illustrated) > .service-item-description {
    grid-row: 2;
    align-self: start;
}
/* Two narrow columns still give long furniture titles the full card width. */
@media (max-width: 26rem) {
    :is(.service-tile-grid, .service-benefit-grid) > .service-item--described:has(> .icon--illustrated) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: subgrid;
        grid-row: span 3;
        text-align: center;
    }
    :is(.service-tile-grid, .service-benefit-grid) > .service-item--described > .icon--illustrated {
        grid-column: 1;
        grid-row: 1;
        justify-self: center;
    }
    :is(.service-tile-grid, .service-benefit-grid) > .service-item--described:has(> .icon--illustrated) > span {
        grid-column: 1;
        grid-row: 2;
    }
    :is(.service-tile-grid, .service-benefit-grid) > .service-item--described:has(> .icon--illustrated) > .service-item-description {
        grid-row: 3;
    }
}

:is(.service-tile-grid, .service-reason-grid, .service-benefit-grid) > li:has(> .icon--illustrated) > span {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* Dedicated Process illustrations: larger than the 2.55rem listing artwork. */
.service-process li:has(> .icon--illustrated) { grid-template-columns: 3.6rem minmax(0, 1fr); }
.service-process .icon--illustrated { width: 3.6rem; height: 3.6rem; font-size: 3.6rem; }
@media (min-width: 64rem) {
    .service-process li:has(> .icon--illustrated) { grid-template-columns: 1fr; }
}
