/* ================= PAGE INTRO ================= */

.services-page-intro {
    padding: 40px 0 20px;
}

.services-page-intro h1 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.2;
    color: #1f1f1f;
    text-align: center;
}

.services-page-intro p {
    max-width: 860px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.7;
    color: #555555;
    text-align: center;
}

/* ================= SERVICES GRID ================= */

.services-cards-section {
    padding: 20px 0 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

/* ================= CARD ================= */

.service-card {
    background: #202020;
    border: 1px solid #d8d8d8;
    overflow: hidden;
}

/* whole card clickable */
.service-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: #ffffff;
    text-decoration: none;
}

/* ================= IMAGE (PORTRAIT) ================= */

.service-card-image {
    width: 100%;
    aspect-ratio: 1 / 1; /* portrait shape */
    overflow: hidden;
    background: #dcdcdc;
}

.service-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

/* subtle zoom on hover */
.service-card:hover .service-card-image img {
    transform: scale(1.05);
}

/* ================= CONTENT ================= */

.service-card-body {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex-grow: 1;
    min-height: 160px;
    padding: 18px 14px 16px;
    background: #202020;
    color: #ffffff;
    text-align: center;
}

.service-card-body h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 300;
    line-height: 1.3;
    color: #ffffff;

    /* optional: clamp long titles */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.service-card-body p {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.75);
    font-size: 14px;
    line-height: 1.5;
    color: #ffffff;
}

/* ================= INTERACTION ================= */

.service-card-link:hover .service-card-body h2,
.service-card-link:focus .service-card-body h2 {
    text-decoration: underline;
}

.service-card-link:focus {
    outline: 3px solid #000000;
    outline-offset: 3px;
}

/* ================= ACCESSIBILITY ================= */

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ================= RESPONSIVE ================= */

@media (max-width: 1100px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {

    .services-page-intro {
        padding: 30px 0 15px;
    }

    .services-page-intro h1 {
        font-size: 28px;
    }

    .services-page-intro p {
        font-size: 16px;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* slightly less tall on mobile */
    .service-card-image {
        aspect-ratio: 4 / 5;
    }

    .service-card-body {
        min-height: auto;
        padding: 16px 12px 14px;
    }

    .service-card-body h2 {
        font-size: 18px;
    }

    .service-card-body p {
        font-size: 14px;
    }
}