.three-cards-module {
    padding: clamp(2.5rem, 5vw, 4.5rem) 0;
}

.three-cards-module__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 2.5vw, 2rem);
    align-items: stretch;
}

.three-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    color: #464646;
    text-decoration: none;
    box-shadow: 0 0.55rem 1.6rem rgba(4, 55, 124, 0.09);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.three-card:hover,
.three-card:focus-visible {
    color: #464646;
    text-decoration: none;
    box-shadow: 0 1rem 2.4rem rgba(4, 55, 124, 0.16);
    transform: translateY(-0.25rem);
}

.three-card:focus-visible {
    outline: 3px solid rgba(43, 171, 212, 0.38);
    outline-offset: 3px;
}

.three-card__media {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-top: 8px solid #2babd4;
    background: #eef2f4;
}

.three-card__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.three-card:hover .three-card__media img,
.three-card:focus-visible .three-card__media img {
    transform: scale(1.045);
}

.three-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    padding: clamp(1.25rem, 2.5vw, 1.75rem);
}

.three-card__title {
    display: block;
    margin-bottom: 0.75rem;
    color: #464646;
    font-family: var(--secondary-font-family);
    font-size: 20px;
    font-weight: bold;
    line-height: 1.35;
}

.three-card__text {
    display: block;
    margin-bottom: 1.25rem;
    color: #464646;
    font-size: 1rem;
    line-height: 1.6;
}

.three-card__text > :last-child {
    margin-bottom: 0;
}

.three-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: auto;
    color: #2babd4;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.three-card:hover .three-card__link,
.three-card:focus-visible .three-card__link {
    color: #04377c;
}

@media (max-width: 991.98px) {
    .three-cards-module__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .three-cards-module__grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .three-card,
    .three-card__media img {
        transition: none;
    }

    .three-card:hover,
    .three-card:focus-visible,
    .three-card:hover .three-card__media img,
    .three-card:focus-visible .three-card__media img {
        transform: none;
    }
}
