﻿/* =========================================================
   SERVICES GRID
========================================================= */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    width: 100%;
}


/* =========================================================
   SERVICE CARD
========================================================= */

.service-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1.18 / 1;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    color: #fff;
    background: var(--color-primary);
    border: 1px solid rgba(23, 22, 20, .08);
    border-radius: 14px;
    text-decoration: none;
    box-shadow: 0 5px 18px rgba(23, 22, 20, .05), 0 1px 2px rgba(23, 22, 20, .025);
    isolation: isolate;
    transition: transform var(--transition), box-shadow var(--transition);
}

    .service-card:hover {
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 12px 30px rgba(23, 22, 20, .10), 0 2px 5px rgba(23, 22, 20, .035);
    }


    /* =========================================================
   SERVICE IMAGE
========================================================= */

    .service-card img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        object-position: center;
        z-index: -3;
        filter: saturate(.88);
        transition: transform 600ms cubic-bezier(.2, .8, .2, 1), filter 600ms ease;
    }

    .service-card:hover img {
        transform: scale(1.025);
        filter: saturate(1);
    }


/* =========================================================
   SERVICE OVERLAY
========================================================= */

.service-overlay {
    position: absolute;
    inset: 0;
    z-index: -2;
    background: linear-gradient( to top, rgba(10, 10, 9, .92) 0%, rgba(10, 10, 9, .65) 32%, rgba(10, 10, 9, .18) 65%, rgba(10, 10, 9, 0) 100% );
}


/* =========================================================
   SERVICE CONTENT
========================================================= */

.service-content {
    width: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

    .service-content h2 {
        width: 100%;
        margin: 0;
        overflow: hidden;
        color: #fff;
        font-size: 1.05rem;
        font-weight: 700;
        letter-spacing: -.02em;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }


/* =========================================================
   SERVICE META
========================================================= */

.service-meta {
    display: flex;
    align-items: center;
    margin-top: .6rem;
}

    .service-meta span:first-child {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        color: rgba(255, 255, 255, .82);
        font-size: .72rem;
        font-weight: 500;
    }

    .service-meta i {
        font-size: .68rem;
    }

.meta-divider {
    width: 1px;
    height: 13px;
    margin: 0 .55rem;
    background: rgba(255, 255, 255, .28);
}

.service-meta strong {
    color: #d1ad78;
    font-size: .82rem;
    font-weight: 700;
}


/* =========================================================
   ACCESSIBILITY
========================================================= */

.service-card:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 4px;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .9rem;
    }

    .service-card {
        aspect-ratio: 1.15 / 1;
    }

    .service-content {
        padding: .95rem;
    }

        .service-content h2 {
            font-size: 1rem;
        }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 560px) {

    .services-grid {
        grid-template-columns: 1fr;
        gap: .75rem;
    }

    .service-card {
        aspect-ratio: 1.55 / 1;
        border-radius: 13px;
    }

    .service-content {
        padding: 1rem;
    }

        .service-content h2 {
            font-size: 1.05rem;
        }

    .service-meta {
        margin-top: .55rem;
    }
}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .service-card {
        aspect-ratio: 1.45 / 1;
    }

    .service-content {
        padding: .9rem;
    }

        .service-content h2 {
            font-size: 1rem;
        }

    .service-meta span:first-child {
        font-size: .7rem;
    }

    .service-meta strong {
        font-size: .8rem;
    }
}
