/**
 * News article detail page.
 * Focuses on the hero card shown in design.
 */
@import url("./news.css");

.news-article-hero {
    position: relative;
    z-index: 1;
    padding: 2rem 1rem 0;
    background: transparent;
}

.news-article-hero-inner {
    max-width: 1500px;
    margin: 0 auto;
}

.news-article-hero-card {
    border-radius: 0.5rem;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.news-article-hero-media {
    position: relative;
    height: 75vh;
}

.news-article-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-article-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 12%, rgba(0, 0, 0, 0.1) 58%, rgba(0, 0, 0, 0.05) 100%);
}

.news-article-hero-title {
    position: absolute;
    left: 1.5rem;
    bottom: 1.4rem;
    z-index: 2;
    margin: 0;
    color: var(--color-primary);
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.08;
    max-width: 24ch;
}

.news-article-hero-outside {
    padding-top: 1rem;
    padding-left: 0.125rem;
}

.news-article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.news-article-tag {
    color: var(--color-primary);
    font-size: 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.3rem;
    padding: 0.28rem 0.55rem;
    background: transparent;
}

.news-article-meta {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.95rem;
}

.news-article-meta i {
    font-size: 1.125rem;
}

.news-article-meta-sep {
    color: rgba(255, 255, 255, 0.45);
}

.news-article-body {
    background: var(--color-background);
    padding-top: 0.5rem;
}

/* Full-width gallery row below article (up to 4 images) */
.news-article-gallery {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    background: var(--color-background);
    padding: 0 0 2.5rem;
}

.news-article-gallery__grid {
    display: grid;
    gap: 0;
    width: 100%;
}

.news-article-gallery__item {
    margin: 0;
    min-width: 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.news-article-gallery__img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.news-article-body-grid {
    max-width: 1500px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 2.2rem;
    align-items: start;
}

.news-article-sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.news-article-content p {
    margin: 0 0 1.25rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.95rem;
    line-height: 1.4;
    text-align: justify;
}

.news-article-side-cover {
    border-radius: 0.35rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.news-article-side-cover-img {
    width: 100%;
    display: block;
    object-fit: cover;
}

.news-article-recent-title {
    margin: 0 0 0.8rem;
    color: var(--color-primary);
    font-size: 1.9rem;
    font-weight: 500;
}

.news-article-recent-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.news-article-recent {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-article-recent-item {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 0.6rem;
    text-decoration: none;
}

.news-article-recent-thumb {
    width: 70px;
    height: 52px;
    object-fit: cover;
    border-radius: 0.25rem;
}

.news-article-recent-item span strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.2;
    color: var(--color-primary);
}

.news-article-recent-item span em {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-style: normal;
    color: var(--color-accent);
}

.news-article-recent-register {
    width: 100%;
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ffffff;
    background: transparent;
    color: var(--color-primary);
    text-decoration: none;
    padding: 1.2rem;
    border-radius: 0.35rem;
}

.news-article-recent-register i {
    font-size: 1rem;
}

/* Match "Most Recent" section width to article body width */
.news-most-read .news-section-header,
.news-most-read .news-most-read-grid {
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
}

.news-most-read-card--project-style {
    display: flex;
    flex-direction: column;
}

.news-most-read-card--project-style .news-most-read-card-title {
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

.news-most-read-card--project-style .news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

@media (max-width: 900px) {
    .news-article-hero-media {
        height: 70vh;
    }

    .news-article-hero-title {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        font-size: clamp(1.7rem, 8vw, 2.7rem);
        width: auto;
        max-width: none;
    }

    .news-article-hero-outside {
        padding-left: 0;
    }

    .news-article-meta {
        font-size: 0.875rem;
    }

    .news-article-body-grid {
        grid-template-columns: 1fr;
    }

    .news-article-gallery__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .news-article-gallery__grid {
        grid-template-columns: 1fr;
    }
}
