/**
 * Community Astra
 * Nyheder
 *
 * @package Community_Astra
 */


/* =========================================================
   FRONT PAGE NEWS
   ========================================================= */

.c-news {
    padding: 72px 0 96px;
}

.c-news .section-heading {
    margin-bottom: 48px;
}

.c-news__grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 28px;

    width: 100%;
}


/* =========================================================
   NEWS PAGE
   ========================================================= */

.c-news-page {
    padding: 72px 0 96px;
}


/* =========================================================
   NEWS HEADER
   Uses the existing section-heading component
   ========================================================= */

.c-news-page .section-heading {
    margin-bottom: 52px;
}

.c-news-page__eyebrow {
    margin: 0 0 12px;

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    line-height: 1.4;
    text-transform: uppercase;

    color: var(--color-accent, #0077b6);
}

.c-news-page .section-heading h1 {
    margin: 0 0 16px;

    font-family: var(
        --font-heading,
        Georgia,
        'Times New Roman',
        serif
    );

    font-size: clamp(48px, 5vw, 68px);
    font-weight: 700;
    line-height: 1;

    color: var(--color-primary, #123b5d);
}

.c-news-page .section-heading > p:last-child {
    max-width: 700px;
    margin: 0 auto;

    font-size: 17px;
    line-height: 1.65;

    color: var(--color-text, #123b5d);
}


/* =========================================================
   NEWS PAGE GRID
   ========================================================= */

.c-news-page__grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 28px;

    width: 100%;
}


/* =========================================================
   NEWS CARD
   ========================================================= */

.c-news-card {
    display: flex;
    flex-direction: column;

    min-width: 0;

    background: #ffffff;

    border: 1px solid rgba(18, 59, 93, 0.14);

    overflow: hidden;

    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.c-news-card:hover {
    transform: translateY(-2px);

    box-shadow:
        0 12px 30px rgba(18, 59, 93, 0.08);
}


/* =========================================================
   NEWS IMAGE
   ========================================================= */

.c-news-card__image-link {
    display: block;

    width: 100%;

    aspect-ratio: 16 / 10;

    overflow: hidden;

    background: #eef0ed;
}

.c-news-card__image {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 300ms ease;
}

.c-news-card:hover .c-news-card__image {
    transform: scale(1.02);
}


/* Placeholder when no image exists */

.c-news-card__image--placeholder {
    width: 100%;
    height: 100%;

    min-height: 220px;

    background: #eef0ed;
}


/* =========================================================
   CARD CONTENT
   ========================================================= */

.c-news-card__content {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 22px 20px 24px;
}


/* =========================================================
   DATE
   ========================================================= */

.c-news-card__date {
    display: block;

    margin: 0 0 12px;

    font-size: 12px;
    line-height: 1.5;

    color: #55718a;
}


/* =========================================================
   TITLE
   ========================================================= */

.c-news-card__title {
    margin: 0 0 12px;

    font-family: var(
        --font-heading,
        Georgia,
        'Times New Roman',
        serif
    );

    font-size: 25px;
    font-weight: 700;
    line-height: 1.12;

    color: var(--color-primary, #123b5d);
}

.c-news-card__title a {
    color: inherit;

    text-decoration: none;
}

.c-news-card__title a:hover {
    color: var(--color-accent, #0077b6);
}


/* =========================================================
   EXCERPT
   ========================================================= */

.c-news-card__excerpt {
    margin: 0;

    font-size: 14px;
    line-height: 1.65;

    color: var(--color-text, #123b5d);
}

.c-news-card__excerpt p {
    margin: 0;
}


/* =========================================================
   READ MORE
   ========================================================= */

.c-news-card__link {
    display: inline-flex;
    align-items: center;

    width: fit-content;

    margin-top: auto;
    padding-top: 22px;

    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;

    color: var(--color-primary, #123b5d);

    text-decoration: none;
}

.c-news-card__link:hover {
    color: var(--color-accent, #0077b6);
}


/* =========================================================
   FRONT PAGE NEWS FOOTER
   ========================================================= */

.c-news__footer {
    margin-top: 36px;

    text-align: center;
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.c-news-page__empty {
    max-width: 760px;

    margin: 0 auto;

    padding: 48px 32px;

    text-align: center;

    background: #f4f5f1;
}

.c-news-page__empty h2 {
    margin: 0 0 12px;

    font-family: var(
        --font-heading,
        Georgia,
        'Times New Roman',
        serif
    );

    font-size: 32px;
    line-height: 1.15;

    color: var(--color-primary, #123b5d);
}

.c-news-page__empty p {
    margin: 0;

    font-size: 15px;
    line-height: 1.7;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .c-news {
        padding: 60px 0 80px;
    }

    .c-news .section-heading {
        margin-bottom: 42px;
    }

    .c-news__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 24px;
    }

    .c-news-page {
        padding: 60px 0 80px;
    }

    .c-news-page .section-heading {
        margin-bottom: 42px;
    }

    .c-news-page__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 24px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .c-news {
        padding: 48px 0 64px;
    }

    .c-news .section-heading {
        margin-bottom: 36px;
    }

    .c-news__grid {
        grid-template-columns: 1fr;

        gap: 24px;
    }

    .c-news-page {
        padding: 48px 0 64px;
    }

    .c-news-page .section-heading {
        margin-bottom: 36px;
    }

    .c-news-page .section-heading h1 {
        font-size: 44px;
    }

    .c-news-page .section-heading > p:last-child {
        font-size: 16px;
        line-height: 1.6;
    }

    .c-news-page__grid {
        grid-template-columns: 1fr;

        gap: 24px;
    }

    .c-news-card__content {
        padding: 20px 18px 22px;
    }

    .c-news-card__title {
        font-size: 24px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .c-news-page .section-heading h1 {
        font-size: 38px;
    }

    .c-news-card__image-link {
        aspect-ratio: 16 / 10;
    }

}