/* ==========================================================================
   FTG Services Grid — [ftg_services]
   /wp-content/themes/ftg-child/css/services-grid.css
   ========================================================================== */

.ftg-svc-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px;
    margin: 0;
    padding: 0;
}

/* Card — the whole tile is the link */
.ftg-svc-grid .ftg-svc-card {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 6px;
    background: #1f2a3a; /* shows behind images while loading / placeholder */
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Featured image fills the card */
.ftg-svc-grid .ftg-svc-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.ftg-svc-grid .ftg-svc-img--placeholder {
    background: linear-gradient(135deg, #2b3a50 0%, #1f2a3a 100%);
}

/* Semi-transparent black band over the bottom of the card */
.ftg-svc-grid .ftg-svc-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 36px 16px 14px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.75) 0%,
        rgba(0, 0, 0, 0.6) 55%,
        rgba(0, 0, 0, 0) 100%
    );
    transition: background 0.3s ease;
}

/* Bold white title */
.ftg-svc-grid .ftg-svc-title {
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    line-height: 1.25 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* Hover / keyboard focus */
.ftg-svc-grid .ftg-svc-card:hover .ftg-svc-img,
.ftg-svc-grid .ftg-svc-card:focus-visible .ftg-svc-img {
    transform: scale(1.05);
}

.ftg-svc-grid .ftg-svc-card:hover .ftg-svc-overlay,
.ftg-svc-grid .ftg-svc-card:focus-visible .ftg-svc-overlay {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.85) 0%,
        rgba(0, 0, 0, 0.7) 55%,
        rgba(0, 0, 0, 0) 100%
    );
}

.ftg-svc-grid .ftg-svc-card:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -3px;
}

/* Tablet: 2-across */
@media (max-width: 1024px) {
    .ftg-svc-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }
}

/* Mobile: 1-across */
@media (max-width: 600px) {
    .ftg-svc-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .ftg-svc-grid .ftg-svc-card {
        aspect-ratio: 16 / 9;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ftg-svc-grid .ftg-svc-img,
    .ftg-svc-grid .ftg-svc-overlay {
        transition: none;
    }
}

/* Editor-only notice when the parent page can't be found */
.ftg-svc-notice {
    padding: 12px 16px;
    border-left: 4px solid #d63638;
    background: #fcf0f1;
}