body.services-directory-page {
    background: #f5f7f7;
}

.services-page {
    width: min(1240px, calc(100% - 40px));
    margin: 0 auto;
    padding: 3rem 0 4.5rem;
}

.services-page-heading {
    position: static;
    top: auto;
    z-index: auto;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.75rem;
    border-radius: 8px;
    background: var(--primary-gradient);
}

.services-eyebrow {
    margin: 0 0 0.65rem;
    color: var(--heading-color-mode);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.services-page-heading h1 {
    margin: 0;
    color: var(--heading-color-mode);
    font-size: 2.35rem;
    line-height: 1.15;
}

.services-intro-copy {
    max-width: 38rem;
    margin: 0.75rem 0 0;
    color: var(--heading-color-mode);
    opacity: 0.9;
    font-size: 1rem;
    line-height: 1.6;
}

.services-contact-link {
    display: inline-flex;
    min-height: 2.75rem;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0 1rem;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    color: var(--primary-color);
    background: var(--heading-color-mode);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.services-page-heading .services-contact-link {
    color: var(--primary-color) !important;
}

.services-contact-link:hover {
    border-color: var(--heading-color-mode);
    color: var(--secondary-color);
}

.services-page-heading .services-contact-link:hover {
    color: var(--secondary-color) !important;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

.service-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #dce4e4;
    border-radius: 8px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    border-color: #b7cdca;
    box-shadow: 0 12px 28px rgba(19, 52, 56, 0.12);
}

.service-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #d9e4e1;
}

.service-card-image::after {
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(180deg, transparent, rgba(9, 24, 28, 0.58));
    content: "";
    pointer-events: none;
}

.service-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.service-card-image-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    font-size: 3rem;
}

.service-card:hover .service-card-image img {
    transform: scale(1.035);
}

.service-card-category {
    position: absolute;
    z-index: 1;
    right: 0.85rem;
    bottom: 0.75rem;
    left: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
}

.service-card-category i {
    color: #ff6c77;
}

.service-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.1rem 1.15rem 1rem;
}

.service-card-content h2 {
    margin: 0;
    color: #1d3137;
    font-size: 1.12rem;
    line-height: 1.35;
}

.service-card-content p {
    margin: 0.55rem 0 1.1rem;
    color: #617176;
    font-size: 0.9rem;
    line-height: 1.55;
}

.service-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px solid #edf1f1;
    color: #0f7967;
    font-size: 0.85rem;
    font-weight: 800;
}

.service-card-action i {
    color: #ed5274;
    transition: transform 0.2s ease;
}

.service-card:hover .service-card-action i {
    transform: translateX(3px);
}

.services-empty-state {
    grid-column: 1 / -1;
    padding: 2rem;
    color: #617176;
    text-align: center;
}

.service-detail-page {
    width: min(1120px, calc(100% - 40px));
    min-height: 40vh;
    margin: 0 auto;
    padding: 2.5rem 0 4rem;
}

.service-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

.service-detail {
    overflow: hidden;
    border: 1px solid #dce4e4;
    border-radius: 8px;
    background: #fff;
}

.service-detail-image {
    float: left;
    max-width: 600px;
    height: auto;
    min-height: 260px;
    max-height: 620px;
    margin:25px;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0.5rem 1.75rem 1rem 0.5rem0;
    border-radius: 24px 24px 24px 24px;
    shape-outside: inset(0 round 24px);
}

.service-detail-copy {
    padding: clamp(1.25rem, 4vw, 2.5rem);
    min-width: 0;
}

.service-detail-category {
    margin: 0 0 0.5rem;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.service-detail-copy h1 {
    margin: 0;
    color: #1d3137;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    line-height: 1.2;
}

.service-detail-summary {
    margin: 0.9rem 0 1.5rem;
    color: #52656a;
    font-size: 1.02rem;
    line-height: 1.65;
}

.service-rich-content {
    color: #33464b;
    font-size: 0.98rem;
    line-height: 1.8;
}

.service-rich-content h2,
.service-rich-content h3 {
    margin: 1.5rem 0 0.6rem;
    color: #1d3137;
    line-height: 1.3;
}

.service-rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.service-detail-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 1.4rem;
    color: var(--primary-color);
    font-weight: 800;
    text-decoration: none;
}

.service-detail-not-found {
    padding: 4rem 1rem;
    text-align: center;
}

.service-detail-not-found a {
    color: var(--primary-color);
    font-weight: 700;
}

@media (max-width: 980px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .services-page {
        width: min(100% - 28px, 520px);
        padding: 2rem 0 3rem;
    }

    .services-page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .services-page-heading h1 {
        font-size: 1.9rem;
    }

    .services-contact-link {
        min-height: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .service-card-image {
        aspect-ratio: 16 / 9;
    }

    .service-detail-page {
        width: min(100% - 28px, 520px);
        padding: 1.5rem 0 3rem;
    }

    .service-detail {
        display: block;
    }

    .service-detail-image {
        width: 100%;
        max-width: 100%;
        min-height: 0;
        aspect-ratio: 16 / 10;
    }
}

@media (prefers-reduced-motion: reduce) {
    .service-card,
    .service-card-image img,
    .service-card-action i {
        transition: none;
    }
}
