/* Card.ImageTitleDescription - bordered white card.
   Order: image -> title -> description. No CTA button.
   Text left-aligned; card stretches to the tallest sibling in a row. */

.card-itd {
    background-color: var(--color-white);
    border: 1px solid var(--color-border-gray);
    padding: 30px;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
}

.card-itd__figure {
    width: 100%;
    margin: 0 0 22px;
    padding: 0;
}

.card-itd__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.card-itd__title {
    color: var(--color-near-black);
    font-family: var(--font-family-bold);
    font-size: 18px;
    font-weight: 700;
    line-height: 24px;
    text-align: left;
    margin: 0 0 12px;
    max-width: 100%;
}

.card-itd__description {
    color: var(--color-near-black);
    font-family: var(--font-family-medium);
    font-size: 15px;
    font-weight: 500;
    line-height: 27px;
    text-align: left;
    margin: 0;
    width: 100%;
}

.card-itd__description p {
    margin: 0 0 1em;
}

.card-itd__description p:last-child {
    margin-bottom: 0;
}

.card-itd__description a {
    color: var(--color-dark-blue);
    font-family: var(--font-family-semi-bold);
    font-weight: 600;
}

/* Clickable card: bare anchor stretched over the card - one tab stop,
   no nested interactive elements. Only present when a link is set.
   height: 100% on .card-itd fills the stretched .sf_colsIn grid cell, so
   margin-bottom would overflow the cell and not push following content.
   Subtract the margin from height so the gap sits inside the column. */
.card-itd--clickable {
    position: relative;
    cursor: pointer;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    height: calc(100% - 64px);
    margin-bottom: 64px;
}

.card-itd__link {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.card-itd--clickable:hover,
.card-itd--clickable:focus-within {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-itd--clickable .card-itd__title {
    transition: color 0.3s ease;
}

.card-itd--clickable:hover .card-itd__title,
.card-itd--clickable:focus-within .card-itd__title {
    color: var(--color-dark-blue);
}

.card-itd--clickable:has(.card-itd__link:focus-visible) {
    outline: 2px solid var(--color-dark-blue);
    outline-offset: 3px;
}

.card-itd--clickable .card-itd__link:focus-visible {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {

    .card-itd--clickable,
    .card-itd--clickable .card-itd__title {
        transition: none;
    }

    .card-itd--clickable:hover,
    .card-itd--clickable:focus-within {
        transform: none;
    }
}
@media (min-width: 878px) and (max-width: 1023px) {
    .card-itd--clickable {
        height: 100%;
        margin-bottom: 0;
    }
    .grid-d3-t2-m1-cols .sf_colsIn:last-child .card-itd--clickable {
        height: calc(100% - 48px);
        margin-bottom: 48px;
    }
}
/* Tablet + mobile: same type scale, tighter padding on small screens */
@media (max-width: 877px) {
    .card-itd {
        padding: 20px;
    }

    .card-itd__description {
        line-height: 25px;
    }

    .card-itd--clickable {
        height: 100%;
        margin-bottom: 0;
    }
    .grid-d3-t2-m1-cols .sf_colsIn:last-child .card-itd--clickable {
        margin-bottom: 32px;
        height: calc(100% - 32px);
    }
}
 