/* The card keeps its height while the active description opens and its image recedes. */
.hl-page :is(#secretarial, #accounting, #taxation) .hl-service-feature-card .hl-card[data-hl-service-copy] {
    height: 400px !important;
    gap: 0 !important;
    transition: background-color .45s ease;
}

.hl-page :is(#secretarial, #accounting, #taxation) .hl-service-feature-card .hl-card[data-hl-service-copy] .hl-card-title {
    flex: 0 0 auto;
}

.hl-page :is(#secretarial, #accounting, #taxation) .hl-service-feature-card .hl-card[data-hl-service-copy] .hl-card-description {
    order: -1;
    box-sizing: border-box;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0 14px;
    border-top: 1px solid transparent;
    color: rgba(255, 255, 255, .78);
    font-size: 15px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(24px);
    visibility: hidden;
    transition: max-height .5s ease, padding .5s ease, border-color .5s ease,
        opacity .35s ease, transform .5s ease, visibility .5s;
}

.hl-page :is(#secretarial, #accounting, #taxation) .hl-service-feature-card .hl-card[data-hl-service-copy] .hl-card-photo {
    flex: 1 1 auto;
    height: 0 !important;
    min-height: 0;
    aspect-ratio: auto !important;
    margin-top: 0 !important;
    transition: height .5s ease;
}

/* Keep heads visible when these portraits fill the short active-card frame. */
.hl-page #secretarial .hl-service-feature-card .hl-card-photo:is(
    [src*="routine-secretarial-filing-and-monitoring-of-filing-deadlines"],
    [src*="provision-of-a-company-secretary-for-your-company"]
) {
    object-position: 50% 20%;
}

.hl-page :is(#secretarial, #accounting, #taxation) .swiper-slide-active .hl-card[data-hl-service-copy] .hl-card-description {
    max-height: 120px;
    padding: 14px 14px 18px;
    border-top-color: rgba(255, 255, 255, .32);
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.hl-page :is(#secretarial, #accounting, #taxation) .swiper-slide-active .hl-card[data-hl-service-copy] .hl-card-title {
    font-weight: 700;
}

@media (max-width: 767px) {
    .hl-page :is(#secretarial, #accounting, #taxation) .hl-service-feature-card .hl-card[data-hl-service-copy] {
        height: 420px !important;
    }
    .hl-page :is(#secretarial, #accounting, #taxation) .hl-service-feature-card .hl-card[data-hl-service-copy] .hl-card-description {
        font-size: 14px;
        line-height: 1.45;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hl-page :is(#secretarial, #accounting, #taxation) .hl-service-feature-card .hl-card[data-hl-service-copy],
    .hl-page :is(#secretarial, #accounting, #taxation) .hl-service-feature-card .hl-card[data-hl-service-copy] .hl-card-description,
    .hl-page :is(#secretarial, #accounting, #taxation) .hl-service-feature-card .hl-card[data-hl-service-copy] .hl-card-photo {
        transition-duration: .01ms;
    }
}
