/*
  _news.css: News list (news.php) and story (story.php) pages.
*/

/* === Hero ("Another Season Begins") === */
.hero-battle-log {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    background-color: var(--color-process-black);
    color: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
}

@media (min-width: 48em) {
    .hero-battle-log {
        flex-direction: row;
        min-height: 360px;
    }
}

.hero-image-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--color-process-black);
}

.hero-action-shot {
    width: 100%;
    height: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}

.image-border-overlay {
    position: absolute;
    inset: 0;
    border: 5px solid var(--color-primary-red);
    pointer-events: none;
}

.hero-text-container {
    flex: 1;
    padding: 2rem var(--padding);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero-text-container .headline {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.2;
    color: var(--color-red-on-dark);
    margin: 0 0 0.75rem;
}

.hero-text-container .subtext {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--color-white);
    margin: 0 0 1.5rem;
}

.hero-text-container .cta-button {
    display: inline-block;
    background-color: var(--color-primary-red);
    color: var(--color-white);
    padding: 0.8rem 1.8rem;
    border-radius: 5px;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 700;
    border: 2px solid var(--color-primary-red);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.hero-text-container .cta-button:hover,
.hero-text-container .cta-button:focus-visible {
    background-color: var(--color-process-black);
    border-color: var(--color-white);
}

/* === News list === */
.news-list {
    scroll-margin-top: 2rem;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.news-card {
    position: relative;
    background-color: var(--color-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    text-align: left;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.news-card:hover,
.news-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.news-card .news-image {
    margin: 0;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: var(--color-process-black);
}

.news-card .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-card .news-details {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.news-card h3 a {
    color: var(--color-process-black);
    text-decoration: none;
}

/* The whole card is clickable through the title link */
.news-card h3 a::after {
    content: "";
    position: absolute;
    inset: 0;
}

.news-card h3 a:focus-visible {
    outline: none;
}

.news-card:focus-within {
    outline: 3px solid var(--color-primary-red);
    outline-offset: 2px;
}

.news-card .news-meta {
    font-size: 0.9rem;
    color: #4a4a4a;
    margin: 0 0 0.75rem;
}

.news-card .news-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #222;
    flex-grow: 1;
}

.news-card .news-description p {
    margin: 0;
}

.news-card .read-more {
    margin-top: 1rem;
    color: var(--color-primary-red);
    font-family: var(--font-heading);
    font-weight: 700;
    text-decoration: none;
}

.news-card:hover .read-more {
    text-decoration: underline;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

@media (min-width: 48em) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 64em) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* === Story page === */
.news-story {
    max-width: 800px;
    text-align: left;
}

.story-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-white);
    margin: 0 0 0.5rem;
}

.story-meta {
    color: var(--color-mh-light-grey);
    margin: 0 0 1.5rem;
}

.story-cover {
    margin: 0 0 1.75rem;
}

.story-cover img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    border-radius: 10px;
    background-color: var(--color-process-black);
}

.story-cover figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: #ccc;
}

/* .text adds side padding and centring meant for full-width pages */
.story-body {
    max-width: none;
    padding: 0;
    color: var(--color-light);
    font-size: 1.05rem;
    line-height: 1.75;
}

.story-body a {
    color: var(--color-white);
    text-decoration: underline;
}

.story-media {
    margin-top: 2.5rem;
}

.story-media h2 {
    font-size: 1.5rem;
}

.story-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.story-media-grid img,
.story-media-grid video {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.story-download {
    display: block;
    padding: 1rem;
    border-radius: 8px;
    background-color: var(--color-mh-dark-grey);
    color: var(--color-white);
    font-weight: 700;
    word-break: break-word;
}

.story-back {
    margin: 2rem 0 0;
    font-family: var(--font-heading);
    font-weight: 700;
}

.story-back a {
    color: var(--color-red-on-dark);
}
