/* =====================================================================
   Services
   Cards render from live DB data (see pages/home.php). animations.js
   drives a subtle 3D tilt on mousemove via GSAP quickTo (inline
   transform) — the CSS :hover transform below is the no-JS/touch
   fallback only, which is why transform is excluded from the
   transition list (a CSS transition on the same property JS is
   continuously setting would fight the tilt's own easing).
   ===================================================================== */

.services__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    /* Judgment call: the page container is edge-to-edge now (CLAUDE.md
       §3), but 8 cards at 4-across would balloon into oversized, sparse
       tiles on ultrawide monitors. Soft cap keeps card size sane while
       the section background still spans full width. */
    max-width: var(--content-max-width-wide);
    margin-inline: auto;
}

@media (min-width: 640px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1280px) {
    .services__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    transition: box-shadow var(--duration-base) var(--ease-base),
                border-color var(--duration-base) var(--ease-base);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 48px rgba(11, 35, 68, 0.1);
    border-color: transparent;
}

.service-card__media {
    margin-bottom: var(--space-lg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background-color: var(--color-bg-light);
}

.service-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-base) var(--ease-base);
}

.service-card:hover .service-card__image {
    transform: scale(1.06);
}

.service-card__icon {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
    font-family: var(--font-heading);
    font-weight: var(--fw-bold);
    font-size: 2.5rem;
}

.service-card__title {
    font-size: var(--fs-h4);
    margin-bottom: var(--space-sm);
}

.service-card__description {
    font-size: var(--fs-body);
    color: var(--color-text-grey);
    line-height: var(--lh-body);
}

.service-card__link {
    margin-top: auto;
    padding-top: var(--space-lg);
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--fs-small);
    font-weight: var(--fw-semibold);
    color: var(--color-accent);
    transition: gap var(--duration-fast) var(--ease-base);
}

.service-card__link:hover {
    gap: var(--space-sm);
}

/* ---- Full listing page (pages/services.php) ---------------------------- */

.services__view-all {
    margin-top: var(--space-2xl);
    text-align: center;
}
