/**
 * Ilm Services cards.
 *
 * Palette and shapes come from the centre's own nikah certificate: ink navy,
 * brass rules, parchment ground, and an arch — the certificate's illuminated
 * frame reduced to a single dome over each photograph.
 */

.ilm-svcs {
    --ilm-ink: #152C46;
    --ilm-accent: #A9814B;
    --ilm-ground: #F7F4EE;
    --ilm-card: #FFFFFF;
    --ilm-body: #5A6B7C;
    --ilm-hairline: #E4DDD0;

    background: var(--ilm-ground);
    padding: clamp(56px, 7vw, 104px) 20px;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    color: var(--ilm-ink);
    /* Own stacking/containing context so the theme can't leak into the cards. */
    position: relative;
    isolation: isolate;
}

.ilm-svcs__inner {
    max-width: 1140px;
    margin: 0 auto;
}

/* ── Section header ── */

.ilm-svcs__head {
    max-width: 620px;
    margin: 0 auto clamp(36px, 4.5vw, 60px);
    text-align: center;
}

.ilm-svcs .ilm-svcs__eyebrow.ilm-svcs__eyebrow {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ilm-accent);
}

/* A short brass rule under the eyebrow, the certificate's divider. */
.ilm-svcs .ilm-svcs__eyebrow.ilm-svcs__eyebrow::after {
    content: "";
    display: block;
    width: 34px;
    height: 1px;
    margin: 12px auto 0;
    background: var(--ilm-accent);
    opacity: .55;
}

.ilm-svcs .ilm-svcs__title.ilm-svcs__title {
    margin: 0;
    font-family: 'Petrona', Georgia, serif;
    font-weight: 500;
    font-size: clamp(30px, 4.2vw, 46px);
    line-height: 1.12;
    letter-spacing: -.01em;
    color: var(--ilm-ink);
}

.ilm-svcs .ilm-svcs__lede.ilm-svcs__lede {
    margin: 16px 0 0;
    font-size: clamp(15px, 1.4vw, 17px);
    line-height: 1.65;
    color: var(--ilm-body);
}

/* ── Card grid ── */

.ilm-svcs__grid {
    --ilm-cols: 3;
    display: grid;
    grid-template-columns: repeat(var(--ilm-cols), minmax(0, 1fr));
    gap: clamp(20px, 2.4vw, 34px);
    margin: 0;
    padding: 0;
    list-style: none;
}

.ilm-svc {
    display: flex;
}

.ilm-svc__link {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 18px 18px 26px;
    background: var(--ilm-card);
    border-radius: 20px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(21, 44, 70, .05), 0 18px 40px -28px rgba(21, 44, 70, .35);
    transition: transform .45s cubic-bezier(.2, .7, .3, 1), box-shadow .45s ease;
}

/* The brass keyline: drawn as an inset ring so it never shifts the layout. */
.ilm-svc__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: 1px solid var(--ilm-accent);
    opacity: 0;
    transition: opacity .45s ease;
    pointer-events: none;
}

a.ilm-svc__link:hover,
a.ilm-svc__link:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 2px 4px rgba(21, 44, 70, .06), 0 30px 60px -30px rgba(21, 44, 70, .45);
}

a.ilm-svc__link:hover::after,
a.ilm-svc__link:focus-visible::after {
    opacity: .75;
}

a.ilm-svc__link:focus-visible {
    outline: 2px solid var(--ilm-accent);
    outline-offset: 3px;
}

/* ── The arch ── */

.ilm-svc__frame {
    display: block;
    overflow: hidden;
    /* Half the card width of top radius = a true dome. */
    border-radius: 999px 999px 10px 10px;
    background: #EDE7DC;
}

.ilm-svc__img {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    /* Bias slightly above centre: faces and hands sit in the upper half. */
    object-position: 50% 42%;
    transform: scale(1.01);
    transition: transform .7s cubic-bezier(.2, .7, .3, 1);
}

a.ilm-svc__link:hover .ilm-svc__img {
    transform: scale(1.06);
}

/* ── Card text ── */

.ilm-svc__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: 22px 6px 0;
    text-align: center;
}

.ilm-svcs .ilm-svc__tag.ilm-svc__tag {
    display: block;
    margin-bottom: 9px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ilm-accent);
}

.ilm-svcs .ilm-svc__name.ilm-svc__name {
    display: block;
    font-family: 'Petrona', Georgia, serif;
    font-size: clamp(21px, 2vw, 25px);
    font-weight: 600;
    line-height: 1.2;
    color: var(--ilm-ink);
}

.ilm-svcs .ilm-svc__desc.ilm-svc__desc {
    display: block;
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 1.62;
    color: var(--ilm-body);
}

.ilm-svc__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: auto;
    padding-top: 20px;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: var(--ilm-ink);
}

.ilm-svc__arrow {
    color: var(--ilm-accent);
    transition: transform .4s cubic-bezier(.2, .7, .3, 1);
}

a.ilm-svc__link:hover .ilm-svc__arrow,
a.ilm-svc__link:focus-visible .ilm-svc__arrow {
    transform: translateX(5px);
}

/* ── Responsive ── */

@media (max-width: 980px) {
    /* Set the columns directly, not through --ilm-cols: Elementor writes the
       column count as .elementor-element-x .ilm-svcs__grid, which outranks a
       plain class here and would keep three columns on a phone. */
    .ilm-svcs .ilm-svcs__grid.ilm-svcs__grid {
        grid-template-columns: minmax(0, 1fr);
        max-width: 420px;
        margin-inline: auto;
    }

    /* One per row: a shallower arch keeps the card from becoming a tower. */
    .ilm-svc__img {
        aspect-ratio: 5 / 4;
    }

    .ilm-svc__frame {
        border-radius: 260px 260px 10px 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ilm-svc__link,
    .ilm-svc__img,
    .ilm-svc__arrow,
    .ilm-svc__link::after {
        transition: none;
    }

    a.ilm-svc__link:hover,
    a.ilm-svc__link:focus-visible {
        transform: none;
    }

    a.ilm-svc__link:hover .ilm-svc__img {
        transform: scale(1.01);
    }
}
