/* Public database-backed news pages */

.news-page-lead > :first-child {
    margin-top: 0;
}

.news-page-lead > :last-child {
    margin-bottom: 0;
}

.news-category-tabs {
    margin: 32px 0 0;
}

.news-category-tabs .tab {
    text-decoration: none;
}

.news-cover,
.news-detail-cover {
    position: relative;
}

.news-cover__image,
.news-detail-cover__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-cover__label {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: calc(100% - 32px);
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.2;
    text-align: center;
    text-transform: uppercase;
    transform: translate(-50%, -50%);
    backdrop-filter: blur(5px);
}

.news-load-more-wrap {
    min-height: 72px;
    padding: 16px 0 80px;
    text-align: center;
}

.news-load-more-wrap:empty {
    min-height: 0;
    padding-top: 0;
}

[data-news-load-more].is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.news-empty {
    margin: 42px 0 80px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    color: var(--slate);
    text-align: center;
}

.news-detail-content-section {
    padding-bottom: 64px;
}

.news-detail-cover__image {
    border-radius: inherit;
}

.news-detail-body {
    overflow-wrap: anywhere;
}

.news-detail-body > :first-child {
    margin-top: 0;
}

.news-detail-body figure {
    max-width: 100%;
}

.news-author {
    overflow: hidden;
}

.news-share button.is-copied {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--ink);
}

.news-related__header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
}

.news-related__header .section-title {
    margin-bottom: 0;
}

.news-grid--related {
    margin-top: 0;
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .news-detail-meta {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .news-author {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .news-share {
        width: 100%;
        padding-left: 64px;
    }

    .news-related__header {
        align-items: flex-start;
        flex-direction: column;
    }
}
