/**
 * Link Cards Module
 * 
 * A collection of image cards with required images and CTA options.
 * Supports two variants:
 * - Button: Center-aligned with single CTA button
 * - Links: Left-aligned with 1-3 inline links
 * 
 * Grid: 3-up desktop, 2-up tablet, 1-up mobile
 * 
 * Uses existing card-container and card base classes from card.css
 */

/* ==========================================================================
   Grid Layout Fix
   Use display:contents to remove field wrapper from layout flow
   ========================================================================== */

.link-cards-container__grid > .field,
.link-cards-container__grid > .field__items,
.link-cards-container__grid > .field__items > .field__item {
    display: contents;
}

/* ==========================================================================
   Link Card Specific Styles
   ========================================================================== */

.link-card {
    overflow: hidden;
}

/* ==========================================================================
   Title Override - Left aligned instead of centered
   ========================================================================== */

.link-cards-container__title {
    color: #002D97;
    font-family: "Merriweather Sans";
    font-size: 30px;
    font-style: normal;
    font-weight: 700;
    line-height: 115%;
    letter-spacing: -0.6px;
    text-align: left;
}

@media (min-width: 992px) {
    .link-cards-container__title {
        font-size: 44px;
        letter-spacing: -0.88px;
    }
}

/* ==========================================================================
   Card Image
   ========================================================================== */

.link-card__image {
    margin: 0;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.link-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.link-card:hover .link-card__image img {
    transform: scale(1.05);
}

/* ==========================================================================
   Card Content
   ========================================================================== */

.link-card__content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 30px;
}

@media (max-width: 767.98px) {
    .link-card__content {
        padding: 20px;
    }
}

/* ==========================================================================
   Button Variant - Center Aligned
   ========================================================================== */

.link-card--button .link-card__content {
    text-align: center;
    align-items: center;
}

.link-card--button .link-card__title {
    color: #434343;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

@media (min-width: 575px) {
    .link-card--button .link-card__title {
        font-size: calc(20px + 4 * (100vw - 575px) / 1025);
    }
}

@media (min-width: 1600px) {
    .link-card--button .link-card__title {
        font-size: 24px;
    }
}

.link-card--button .link-card__body {
    color: #434343;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.link-card--button .link-card__body p {
    margin: 0;
}

.link-card--button .link-card__cta {
    margin-top: auto;
    padding-top: 10px;
}

/* Button Styling */
.link-card__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #005AE8;
    color: #fff;
    border: 2px solid #005AE8;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.35s ease;
    cursor: pointer;
}

.link-card__button:hover,
.link-card__button:focus {
    background-color: #fff;
    color: #005AE8;
    border-color: #005AE8;
}

/* ==========================================================================
   Links Variant - Left Aligned
   ========================================================================== */

.link-card--links .link-card__content {
    text-align: left;
    align-items: flex-start;
}

.link-card--links .link-card__title {
    color: #434343;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

@media (min-width: 575px) {
    .link-card--links .link-card__title {
        font-size: calc(20px + 4 * (100vw - 575px) / 1025);
    }
}

@media (min-width: 1600px) {
    .link-card--links .link-card__title {
        font-size: 24px;
    }
}

.link-card--links .link-card__body {
    color: #434343;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.link-card--links .link-card__body p {
    margin: 0;
}

.link-card--links .link-card__cta {
    margin-top: auto;
    padding-top: 10px;
}

/* Links List */
.link-card__links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.link-card__link-item {
    padding: 0;
}

.link-card__link-item:before {
    display: none;
}

.link-card__link {
    color: #005AE8;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: text-decoration 0.2s ease;
}

.link-card__link:hover,
.link-card__link:focus {
    text-decoration: underline;
    color: #005AE8;
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.link-card:focus-within {
    outline: 2px solid #005AE8;
    outline-offset: 2px;
}

.link-card__button:focus,
.link-card__link:focus {
    outline: 2px solid #005AE8;
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .link-card__image img,
    .link-card__button {
        transition: none;
    }
    
    .link-card:hover .link-card__image img {
        transform: none;
    }
}
