  /* ==========================================================================
   Blog Page Templates
   ========================================================================== */

/* ==========================================================================
   News Landing (.news-landing)
   Featured hero slider + "Latest News" grid + optional editor-authored blocks.
   ========================================================================== */

.news-landing {
    padding-bottom: var(--wp--preset--spacing--lg);
}

/* --- Hero Slider --- */
/* No padding-top: spacing between breadcrumb and hero comes from the breadcrumb's
   own 16px bottom padding, matching every other template. Bottom spacing
   (padding + margin) mirrors events so the drop-shadow separator has room. */
.news-landing__hero {
    padding-bottom: 3rem;
    margin-bottom: 4rem;
}

.news-landing__hero-inner {
    width: 93%;
    margin: 0 auto;
    position: relative; /* anchor for .news-landing__nav */
}

.news-landing__hero-slider {
    width: 100%;
}

/* Each slide = stacked sections (media on top, 2-col text, then meta row). */
.news-landing__slide {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.news-landing__slide-media {
    width: 100%;
}

/* Text block: 2-column (title left | excerpt + read-more right). */
.news-landing__slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: start;
}

.news-landing__slide-title {
    font-family: var(--ccs-font-heading);
    font-size: var(--ccs-text-xl);
    font-weight: 700;
    line-height: 1.15;
    margin: 0;
}

.news-landing__slide-title a {
    color: inherit;
    text-decoration: none;
}

.news-landing__slide-title a:hover { opacity: 0.8; }

.news-landing__slide-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
}

.news-landing__slide-excerpt {
    font-family: var(--ccs-font-body);
    font-size: var(--ccs-text-base);
    color: var(--ccs-color-text);
    line-height: 1.5;
    margin: 0;
}

/* "Read more about..." link with up-right arrow. Inline so the underline sizes to content. */
.news-landing__slide-readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--ccs-font-body);
    font-size: var(--ccs-text-sm);
    font-weight: 500;
    color: var(--ccs-color-black);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity var(--ccs-transition-fast);
}

.news-landing__slide-readmore:hover,
.news-landing__slide-readmore:focus-visible { opacity: 0.7; }
.news-landing__slide-readmore:link,
.news-landing__slide-readmore:visited { color: var(--ccs-color-black); }

.news-landing__slide-readmore-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Meta row (below text, left-aligned). */
.news-landing__slide-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

/* Share popover wrapper (ccs_share_button, chip variant). Deliberately has no
   font/background/border of its own — the inner .ccs-share__toggle is a
   .ccs-chip and must keep the chip's 0.875rem sizing, not inherit the body's
   16px. Cursor + popover styling live with .ccs-share in block-base.css. */

/* Bottom-right slider arrows — sit inside the hero padding-bottom area. */
.news-landing__nav {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 2;
}

/* --- Latest News Grid --- */
.news-landing__latest {
    padding: var(--wp--preset--spacing--lg) 0;
}

.news-landing__latest-inner {
    width: 93%;
    margin: 0 auto;
}

/* Matches .events-main__col-heading exactly. */
.news-landing__latest-heading {
    font-family: var(--ccs-font-heading);
    font-size: var(--ccs-text-lg);
    font-weight: 700;
    margin: 0 0 24px;
}

.news-landing__grid {
    row-gap: 2.5rem;
}

/* Standardized stacked-card rhythm when the grid collapses to one column
   (token lives in the plugin's block-base.css, loaded on every page). */
@media (max-width: 768px) {
    .news-landing__grid {
        row-gap: var(--ccs-grid-gap-mobile, 2.5rem);
    }
}

/* Cards replicate .events-main__featured-card: flat look, card-wide link, 4:3
   image with scale-on-hover, tight content padding, bold 1.25rem title. */
.news-landing__card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
}

.news-landing__card-link {
    display: flex;
    flex-direction: column;
    color: var(--ccs-color-text);
    text-decoration: none;
    transition: var(--ccs-transition);
}

.news-landing__card-link:hover .ccs-card__img,
.news-landing__card-link:focus-visible .ccs-card__img {
    transform: scale(1.03);
}

.news-landing__card-link .ccs-card__img {
    transition: transform var(--ccs-transition);
}

/* Mirrors .events-main__featured-card focus ring. */
.news-landing__card-link:focus-visible {
    outline: 2px solid var(--ccs-color-primary);
    outline-offset: 4px;
    border-radius: var(--ccs-radius-md);
}

/* Image wrap spacing: 8px below image (matches .events-main__featured-image-wrap). */
.news-landing__card-link .ccs-card__image {
    margin-bottom: 8px;
}

/* Content: 4px padding like .events-main__featured-info. */
.news-landing__card-content {
    padding: 4px 0;
    gap: 0.5rem;
}

/* Date chip sits inline (don't stretch to flex column width). */
.news-landing__card-date {
    align-self: flex-start;
}

/* Title matches .events-main__featured-title exactly. */
.news-landing__card-title {
    font-family: var(--ccs-font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.1em;
    margin: 0 0 0.5rem;
}

/* Inline-flex span inside a flex column stretches by default — constrain to content
   so the border-bottom underline only spans the text + arrow, not the card width. */
.news-landing__card-readmore {
    margin-top: 0;
    align-self: flex-start;
}

.news-landing__load-more {
    display: flex;
    justify-content: flex-start;
    margin-top: 3rem;
}

.news-landing__empty {
    font-family: var(--ccs-font-body);
    font-size: var(--ccs-text-base);
    color: var(--ccs-color-text-muted);
    text-align: center;
    padding: 2rem 0;
}

/* Editor-authored blocks below the grid */
.news-landing__extra {
    margin-top: var(--wp--preset--spacing--lg);
}

/* --- News Landing Responsive --- */
@media (max-width: 860px) {
    .news-landing__slide {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        min-height: 0;
    }

    .news-landing__nav {
        position: static;
        display: flex;
        justify-content: flex-end;
        gap: 0.5rem;
        margin-top: 1rem;
    }
}

/* ==========================================================================
   Single Post (.blog-single)
   ========================================================================== */

.blog-single {
    padding-bottom: 0;
}

/* ==========================================================================
   News Intro — Normal Variant (.news-intro)
   ========================================================================== */

.news-intro {
    text-align: center;
    padding: var(--wp--preset--spacing--md) 0 0;
}

.news-intro__inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.5rem var(--wp--preset--spacing--md);
}

.news-intro__title {
    font-family: var(--ccs-font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 1.5rem;
    text-wrap: pretty;
}

.news-intro__meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.news-intro__excerpt {
    font-family: var(--ccs-font-body);
    font-size: var(--ccs-text-base);
    line-height: 1.6;
    color: var(--ccs-color-gray-dark);
    margin: 0 0 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* External-story block: source logo badge stacked above the
   "Read the full article" button */
.news-intro__external {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

/* Media (image or video) */
.news-intro__media {
    margin-bottom: 2rem;
}

.news-intro__figure {
    margin: 0;
}

.news-intro__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    border-radius: var(--ccs-radius-md);
}

.news-intro__video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: var(--ccs-radius-md);
    display: block;
}

.news-intro__caption {
    font-family: var(--ccs-font-body);
    font-size: var(--ccs-text-xs);
    color: var(--ccs-color-text-muted);
    text-align: center;
    margin-top: 0.75rem;
}

/* ==========================================================================
   News Intro — Highlight Variant (.news-intro--highlight)
   ========================================================================== */

.news-intro--highlight {
    padding-top: 0;
    margin-top: 0;
    border-radius: var(--ccs-radius-xl) var(--ccs-radius-xl) 0 0;
    overflow: hidden;
}

.news-intro--highlight .news-intro__bg {
    background: var(--ccs-color-black);
    color: var(--ccs-color-white);
    padding: var(--ccs-padding-large) 0 var(--wp--preset--spacing--md);
}

.news-intro--highlight .news-intro__title {
    color: var(--ccs-color-white);
}

.news-intro--highlight .news-intro__excerpt {
    color: rgba(255, 255, 255, 0.8);
}

/* Chips on dark background */
.news-intro--highlight .ccs-chip--secondary {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--ccs-color-white);
    --ccs-chip-hover-fill: var(--ccs-color-white);
}

.news-intro--highlight .ccs-chip--secondary:link,
.news-intro--highlight .ccs-chip--secondary:visited {
    color: var(--ccs-color-white);
}

.news-intro--highlight .ccs-chip--secondary:hover {
    color: var(--ccs-color-black);
}

.news-intro--highlight .ccs-chip--low {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--ccs-color-white);
}

/* Media — black bg extends 50% behind the image via pseudo-element */
.news-intro--highlight .news-intro__media {
    position: relative;
    z-index: 2;
}

.news-intro--highlight .news-intro__media::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: var(--ccs-color-black);
    z-index: -1;
}

.news-intro--highlight .news-intro__caption {
    color: var(--ccs-color-text-muted);
}

/* ==========================================================================
   Post Content Body (.news-body)
   ========================================================================== */

.news-body {
    max-width: 800px;
    /* padding-block only — a `… 0` shorthand here nuked the responsive
       contain rule's 16px mobile side gutters and the text hit the viewport
       edges (block-base.css .ccs-contain--* @ ≤768px supplies the sides). */
    padding-block: var(--wp--preset--spacing--md);
}

.news-body__text {
    font-family: var(--ccs-font-body);
    font-size: var(--ccs-text-base);
    line-height: 1.7;
}

.news-body__text p {
    margin: 0 0 1.5em;
}

.news-body__text p:last-child {
    margin-bottom: 0;
}

.news-body__text h2,
.news-body__text h3,
.news-body__text h4 {
    font-family: var(--ccs-font-heading);
    font-weight: 700;
    margin: 2rem 0 1rem;
    line-height: 1.2;
}

.news-body__text h2 { font-size: var(--ccs-text-xl); }
.news-body__text h3 { font-size: var(--ccs-text-lg); }
.news-body__text h4 { font-size: var(--ccs-text-md); }

.news-body__text img {
    max-width: 100%;
    height: auto;
    border-radius: var(--ccs-radius-md);
    margin: 1.5rem 0;
}

.news-body__text blockquote {
    border-left: 4px solid var(--ccs-color-primary);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
}

/* ==========================================================================
   News Tags (.news-tags)
   ========================================================================== */

.news-tags {
    max-width: 800px;
    padding-block: var(--wp--preset--spacing--md) var(--wp--preset--spacing--lg);
}

.news-tags__divider {
    border: none;
    border-top: 1px solid var(--ccs-color-border-light);
    margin: 0 0 2rem;
}

.news-tags__label {
    font-family: var(--ccs-font-body);
    font-size: var(--ccs-text-sm);
    font-weight: 400;
    color: var(--ccs-color-text);
    margin: 0 0 0.75rem;
}

.news-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   Interested Section (.news-interested)
   Uses .ccs-section-card for overlap pattern.
   ========================================================================== */

.news-interested {
    background: var(--ccs-color-gray-light);
    padding: var(--ccs-padding-large) 0;
}

.news-interested__heading {
    font-family: var(--ccs-font-heading);
    font-size: var(--ccs-text-xl);
    font-weight: 700;
    margin: 0 0 var(--wp--preset--spacing--md);
}

/* Chip spacing, title links, and text-btn spacing inside cards are shared —
   see .content-card-title a / .content-card-info rules in block-base.css. */

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .news-intro__title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    .news-intro--highlight .news-intro__bg {
        padding-bottom: var(--wp--preset--spacing--sm);
    }

    .news-body {
        padding-block: 1.5rem 2rem;
    }

    /* Hero slide text: title | excerpt columns stack. */
    .news-landing__slide-content {
        grid-template-columns: 1fr;
    }

    /* The related-posts section card pulls up ~36px (radius-xl + 12px) over
       this block; add that back so the chips keep a real gap on mobile. */
    .news-tags {
        padding-bottom: calc(var(--wp--preset--spacing--lg) + var(--ccs-radius-xl) + 12px);
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .news-landing__hero-slider .splide__slide {
        transition: none;
    }
}
