/* Shared presentation for the news feeds and the reference mockup. */
.news-page {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #f3f3f3 0%, #d9d9d9 100%);
}

.news-header__brand {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    width: 100%;
    min-width: 0;
    padding: 40px 16px;
}

.news-header {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    padding: 40px 16px;
}

.news-header .news-header__brand {
    width: 360px;
    padding: 0;
}

.news-languages {
    display: flex;
    flex: none;
    align-items: center;
    gap: 4px;
}

.news-languages a,
.news-languages a:visited {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    opacity: 0.7;
    text-decoration: none;
}

.news-languages a[aria-current="page"],
.news-languages a:hover,
.news-languages a:focus-visible {
    opacity: 1;
}

.news-languages img {
    flex: none;
    border-radius: 1px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.news-feed {
    padding: 0 12px;
}

.news-topics {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0 0 24px;
}

.news-topics__link,
.news-topics__link:visited {
    padding: 6px 12px;
    border: 1px solid #aaa;
    border-radius: 4px;
    color: #555;
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
}

.news-topics__link:hover,
.news-topics__link.selected {
    color: #fff;
    background: #555;
    border-color: #555;
    text-decoration: none;
}

.news-page a:focus-visible,
.news-back-to-top:focus-visible {
    outline: 2px solid #694d88;
    outline-offset: 3px;
}

.news-back-to-top {
    position: fixed;
    bottom: 5px;
    right: 12px;
    z-index: 99;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: 0.5;
}

.news-back-to-top[hidden] {
    display: none;
}

.news-back-to-top:hover,
.news-back-to-top:focus-visible {
    opacity: 1;
}

.news-back-to-top img {
    display: block;
}

.news-welcome {
    display: grid;
    place-items: center;
}

.news-brand {
    margin: 0;
    color: #a855f7;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: clamp(2.75rem, 8vw, 4.5rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8),
        0 4px 5px rgba(76, 35, 110, 0.35),
        0 9px 16px rgba(76, 35, 110, 0.25);
}

.news-brand__eye {
    position: relative;
    display: inline-block;
}

.news-brand__eye::after {
    content: "";
    position: absolute;
    top: 64%;
    left: calc(50% - 0.07em);
    width: 0.1em;
    height: 0.1em;
    border-radius: 50%;
    background: #000;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.news-brand__eye--capital::after {
    top: 57%;
}

.news-brand__link,
.news-brand__link:hover {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.news-brand--image {
    width: 360px;
    max-width: 100%;
    line-height: 0;
    text-shadow: none;
}

.news-brand--image .news-brand__link {
    display: block;
}

.news-brand__image {
    display: block;
    width: 100%;
    height: auto;
    /* Blend the existing logo's white background into the page. */
    mix-blend-mode: multiply;
}

.news-card {
    max-width: 840px;
    margin: 0 auto 1rem;
    background-color: #fff;
    box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.22);
}

.news-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    align-items: baseline;
    font-size: 14px;
}

.news-card__topic,
.news-card__topic:visited,
.news-card__topic:hover {
    color: #694d88;
    font-weight: 700;
}

.news-card__topic,
.news-card__source {
    text-decoration: none;
}

.news-card__topic:hover,
.news-card__source:hover {
    text-decoration: underline;
}

.news-card__source,
.news-card__source:visited,
.news-card__source:hover {
    color: #000;
    font-weight: 700;
}

.news-card__date {
    color: #694d88;
    font-size: 12px;
}

.news-card__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    padding: 1rem;
}

.news-card__image {
    display: block;
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-width: 0;
    margin: 0;
}

.news-card__image img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 6 / 1;
    object-fit: contain;
    outline: 1px solid #d6d6d6;
    outline-offset: 0;
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.16);
}

.news-card__title {
    grid-column: 1;
    grid-row: 2;
    margin: 0;
    color: #164a6b;
    text-shadow: 0 1px 2px rgba(22, 74, 107, 0.2);
    font-size: 20px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.news-card__title a {
    color: inherit;
    font-weight: inherit;
    text-decoration: none;
}

.news-card__title a:hover {
    text-decoration: underline;
}

.news-card__summary {
    grid-column: 1;
    grid-row: 3;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.news-card--text-only .news-card__title {
    grid-row: 1;
}

.news-card--text-only .news-card__summary {
    grid-row: 2;
}

@media (min-width: 768px) {
    .news-card__body {
        grid-template-columns: 144px minmax(0, 1fr);
        column-gap: 1.25rem;
        row-gap: 0.25rem;
        padding-top: 0.5rem;
        align-items: start;
    }

    .news-card__title {
        grid-column: 1 / -1;
        grid-row: 1;
        font-size: 23px;
    }

    .news-card__image {
        grid-column: 1;
        grid-row: 2;
        width: 144px;
    }

    .news-card__image img {
        aspect-ratio: 4 / 5;
    }

    .news-card__summary {
        grid-column: 2;
        grid-row: 2;
    }

    .news-card--text-only .news-card__summary {
        grid-column: 1 / -1;
    }
}
