/* =============================================================
   SATC Card Block — Stylesheet
   ============================================================= */

.satc-card-container {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #d8dde0;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #ffffff;
}

.satc-card-title {
    padding: 1rem;
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.3;
    margin: 0;
}

.satc-card-image {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    overflow: hidden;
}

.satc-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.satc-card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.satc-card-link {
    padding: 0 1.5rem 1.5rem;
}

.satc-card-link a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 600;
    color: #005eb8;
}

.satc-card-link a:hover {
    text-decoration: underline;
    color: #003d78;
}

/* Focus state — WCAG 2.4.7 / 2.4.11 */
.satc-card-link a:focus,
.satc-card-link a:focus-visible {
    outline: 4px solid #ffeb3b;
    outline-offset: 2px;
    background-color: #ffeb3b;
    color: #212b32;
    text-decoration: none;
}

.satc-card-link a svg {
    width: 1rem;
    height: 1rem;
    margin-left: 0.5rem;
}

/* Grid layout */
.satc-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 1.5rem;
    grid-auto-rows: 1fr;
    width: 100%;
}

@media (max-width: 991px) {
    .satc-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .satc-cards-grid {
        grid-template-columns: 1fr;
    }
}

.wp-block-nightingale-child-satc-card {
    break-inside: avoid;
    height: 100%;
    width: 100%;
    display: flex;
}

.satc-cards-grid > * {
    display: flex;
    height: 100%;
}

.satc-cards-grid .satc-card-container {
    display: flex;
    flex-direction: column;
}

/* Contrast warning fallback */
.satc-card-title--contrast-fallback {
    background-color: #005eb8 !important;
    color: #ffffff !important;
}
