/**
 * News Grid - Flex Part Styles
 */

.news-grid {
    padding: 80px 0;
}

/* Header */
.news-grid__header {
    margin-bottom: 16px;
}

/* Title - H2 */
.news-grid__title {
    font: var(--font-h2);
    letter-spacing: var(--font-h2-spacing);
    color: var(--color-purple-dark, #1D004B);
    margin: 0;
}

/* Grid */
.news-grid__grid {
    display: flex;
    align-items: stretch;
    gap: 32px;
    align-self: stretch;
    flex-wrap: wrap;
}

/* News Card - 3 per row */
.news-card {
    display: flex;
    flex: 1 0 calc((100% - 64px) / 3);
    max-width: calc((100% - 64px) / 3);
    padding: 24px;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    border-radius: 8px;
    background: #FFF;
    box-shadow: 0 4px 15px 3px rgba(39, 43, 43, 0.08);
}

/* Image */
.news-card__image {
    aspect-ratio: 1.72 / 1;
    align-self: stretch;
    border-radius: 8px;
    overflow: hidden;
    display: block;
    background: #F5F5F6;
    position: relative;
}

.news-card__image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2"><rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>') no-repeat center;
    background-size: contain;
    opacity: 0.3;
}

.news-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: relative;
    z-index: 1;
}

/* Content Container */
.news-card__content-container {
    display: flex;
    padding: 0 8px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
    flex: 1;
    justify-content: space-between;
}

/* Title/Excerpt Container */
.news-card__title-excerpt {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
}

/* Date - 16px/400/140% */
.news-card__date {
    font-family: "Funnel Sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 140%;
    color: #4E4C56;
}

/* Title - Desktop/Button Large Emphasized, 3 lines fixed */
.news-card__title {
    margin: 0;
}

.news-card__title a {
    font-family: "Funnel Sans", sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 110%;
    letter-spacing: 0.11px;
    color: var(--color-purple-dark, #1D004B);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card__title a:hover {
    color: var(--color-primary);
}

/* Excerpt */
.news-card__excerpt {
    font: var(--font-body);
    color: var(--color-text);
}

.news-card__excerpt p {
    margin: 0;
}

.news-card__excerpt p + p {
    margin-top: 12px;
}

/* Bottom row - date left, read more right */
.news-card__bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    align-self: stretch;
    margin-top: auto;
    padding-top: 38px;
}

/* Read More Link */
.news-card__link {
    display: flex;
    align-items: center;
    gap: 4px;
}


/* CTA Button - right aligned */
.news-grid__cta {
    display: flex;
    justify-content: flex-end;
    margin-top: 40px;
}

/* Responsive - 2 cols at 1280px */
@media (max-width: 1280px) {
    .news-card {
        flex: 1 0 calc((100% - 32px) / 2);
        max-width: calc((100% - 32px) / 2);
    }
}

@media (max-width: 768px) {
    .news-grid {
        padding: 60px 0;
    }

    .news-grid__grid {
        flex-direction: column;
        gap: 20px;
    }

    .news-card {
        display: flex;
        width: 100%;
        max-width: 100%;
        padding: 16px 16px 24px 16px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 28px;
        flex: 1 0 0;
    }

    .news-grid__cta {
        display: none;
    }
}

@media (max-width: 480px) {
    .news-grid__header {
        margin-bottom: 24px;
    }

    .news-grid__grid {
        gap: 16px;
    }

    .news-card__image {
        aspect-ratio: 1.72 / 1;
    }

    .news-card__content-container {
        padding: 0 4px;
        gap: 16px;
    }
}

