/*
 * Appearance family: news
 * Source of truth: css/appearance/news.css (new family; News writer owns content).
 * Owner: the news appearance writer.
 * Loaded automatically by inc/appearance-route-loader.php for news.php and past-news.php.
 */

/* The shared theme paints listing titles #858585 on a white card at 14px
   bold (3.69:1). Keep the original hierarchy with readable light-mode ink.
   The rule is light-only: dark listing titles inherit the dark page ink. */
:root:not([data-afilms-scheme="dark"]) .page-template-news .blog-list-page .blogs-grid .blog .title,
:root:not([data-afilms-scheme="dark"]) .page-template-past-news .blog-list-page .blogs-grid .blog .title {
    color: #6c6c6c;
}

/* Dark treatment for news index and archive pages. */
:root[data-afilms-scheme="dark"] .page-template-news,
:root[data-afilms-scheme="dark"] .page-template-past-news {
    background: #101010;
    color: #e4e4e4;
}

:root[data-afilms-scheme="dark"] .page-template-news h1,
:root[data-afilms-scheme="dark"] .page-template-news h2,
:root[data-afilms-scheme="dark"] .page-template-news h3,
:root[data-afilms-scheme="dark"] .page-template-news p,
:root[data-afilms-scheme="dark"] .page-template-past-news h1,
:root[data-afilms-scheme="dark"] .page-template-past-news h2,
:root[data-afilms-scheme="dark"] .page-template-past-news h3,
:root[data-afilms-scheme="dark"] .page-template-past-news p {
    color: #e4e4e4;
}

/* The archive template paints its heading with #bcbcbc in theme.css. The
   light-specific weight needs a brighter ink on the dark canvas. */
:root[data-afilms-scheme="dark"] .page-template-past-news h1.page-title {
    color: #f5f5f5;
}

:root[data-afilms-scheme="dark"] .page-template-news .page-title-description,
:root[data-afilms-scheme="dark"] .page-template-news .blog-list-content .page-title-description,
:root[data-afilms-scheme="dark"] .page-template-past-news .blog-list-content .page-title-description {
    color: #bcbcbc;
}

/* The index hero is a baked full-bleed photograph; give it a dark scrim so
   the shared light navigation stays legible in dark mode without filtering
   the photograph itself. The Past News hero is an empty placeholder, so it
   receives no scrim and its heading keeps the full #f5f5f5 ink. */
:root[data-afilms-scheme="dark"] .page-template-news .hero,
:root[data-afilms-scheme="dark"] .page-template-news .page-hero {
    position: relative;
}

:root[data-afilms-scheme="dark"] .page-template-news .hero::after,
:root[data-afilms-scheme="dark"] .page-template-news .page-hero::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 120px;
    background: linear-gradient(#101010e6, transparent);
    pointer-events: none;
}

/* Production guides share their link styles with Home. Match the rule and
   supporting copy to the News surface here. */
:root[data-afilms-scheme="dark"] .page-template-news .af-production-guides__card,
:root[data-afilms-scheme="dark"] .page-template-past-news .af-production-guides__card {
    border-top-color: #2c2c2c;
}

:root[data-afilms-scheme="dark"] .page-template-news .af-production-guides__card p,
:root[data-afilms-scheme="dark"] .page-template-past-news .af-production-guides__card p {
    color: #bcbcbc;
}

/* Long news titles keep their original two-line step at desktop and mobile;
   the only change is a stable minimum height so one-line neighbours align. */
@media (min-width: 851px) {
    .page-template-news .blog-list-page .blogs-grid .blog .title,
    .page-template-past-news .blog-list-page .blogs-grid .blog .title {
        min-height: 2.5em;
    }
}

@media (max-width: 850px) {
    .page-template-news .blog-list-page .blogs-grid .blog .title,
    .page-template-past-news .blog-list-page .blogs-grid .blog .title {
        min-height: 4em;
    }
}

/* The list and archive button is a bordered action, not a text link. Its
   accessible name stays unchanged and the colour is paired with the surface. */
:root[data-afilms-scheme="dark"] .page-template-news .blog-list-page .default-btn,
:root[data-afilms-scheme="dark"] .page-template-past-news .blog-list-page .default-btn {
    border-color: #4a4a4a;
}

:root[data-afilms-scheme="dark"] .page-template-news .blog-list-page .default-btn a,
:root[data-afilms-scheme="dark"] .page-template-past-news .blog-list-page .default-btn a {
    color: #f5f5f5;
}

:root[data-afilms-scheme="dark"] .page-template-news .blog-list-page .default-btn a:hover,
:root[data-afilms-scheme="dark"] .page-template-news .blog-list-page .default-btn a:focus-visible,
:root[data-afilms-scheme="dark"] .page-template-past-news .blog-list-page .default-btn a:hover,
:root[data-afilms-scheme="dark"] .page-template-past-news .blog-list-page .default-btn a:focus-visible {
    color: #ffffff;
}

/* Structural rules are hard-coded light grey in theme.css. Match the dark
   canvas only on these two news listing families. */
:root[data-afilms-scheme="dark"] .page-template-news .blog-list-page .blogs-grid,
:root[data-afilms-scheme="dark"] .page-template-past-news .blog-list-page .blogs-grid {
    border-top-color: #2c2c2c;
}
