/* ==========================================
   NEWS LIST BLOCK
   Standalone, byte-for-byte copy of the home page section-8 news design.
   The home version lives (unscoped) in assets/css/app.css; this block
   reuses the SAME `.news-*` class names and the SAME values, scoped under
   `.news-list-section` so it is self-contained (the editor only loads
   design-system.css + editor.css, not app.css) and never collides with
   the home's global rules. Reference = the home; keep them in sync.
   ========================================== */

/* Standalone section context — the home `.section-8` is position:absolute /
   opacity:0 (revealed by the home master timeline), so we keep a visible,
   normal-flow full-screen centered section here instead. */
.news-list-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* --- Decorative totem --- */
.news-list-section .news-totem-deco {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 75vh;
    width: auto;
    opacity: 0.05;
    pointer-events: none;
}

/* --- Inner container --- */
.news-list-section .news-inner {
    width: 75vw;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
}

/* --- Header --- */
.news-list-section .news-header {
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateX(40px);
}

.news-list-section .news-title {
    font-family: var(--font-family-base);
    font-weight: var(--font-weight-black);
    font-size: var(--font-size-h2);
    line-height: var(--line-height-heading);
    color: var(--color-white);
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.news-list-section .news-title .gold {
    color: var(--gold);
}

.news-list-section .news-subtitle {
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-body);
    line-height: var(--line-height-copy);
    color: var(--color-white);
    max-width: 550px;
}

.news-list-section .news-subtitle p {
    margin: 0;
}

.news-list-section .news-subtitle p + p {
    margin-top: 1em;
}

/* --- List --- */
.news-list-section .news-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid rgba(var(--color-white-rgb), 0.08);
}

/* --- Item --- */
.news-list-section .news-item {
    display: flex;
    align-items: center;
    gap: var(--space-2xl);
    padding: 1.6rem 0;
    border-bottom: 1px solid rgba(var(--color-white-rgb), 0.08);
    transition: var(--transition-standard);
    opacity: 0;
    transform: translateX(40px);
    position: relative;
    z-index: 1;
    text-decoration: none;
    color: inherit;
}

.news-list-section .news-item--static {
    cursor: default;
}

.news-list-section .news-item:hover {
    padding-left: 1.5rem;
    border-bottom-color: var(--gold);
    z-index: 20;
}

.news-list-section .news-meta {
    display: contents;
}

.news-list-section .news-date {
    order: 1;
    flex: 0 0 110px;
    font-size: var(--font-size-xs-3);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-label);
    color: rgba(var(--color-white-rgb), 0.5);
}

.news-list-section .news-item-title {
    order: 2;
    flex: 1;
    font-weight: var(--font-weight-regular);
    font-size: var(--font-size-md);
    line-height: var(--line-height-copy-tight);
    color: var(--color-white);
    transition: var(--transition-color);
}

.news-list-section .news-item:hover .news-item-title {
    color: var(--color-white);
}

.news-list-section .news-item-tag {
    order: 3;
    flex: 0 0 auto;
    font-size: var(--font-size-eyebrow);
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-button);
    color: var(--gold);
    opacity: 0.7;
    padding: 4px 12px;
    border: 1px solid rgba(var(--color-gold-rgb), 0.25);
    border-radius: var(--button-radius);
    transition: var(--transition-fast);
}

.news-list-section .news-item:hover .news-item-tag {
    opacity: 1;
}

.news-list-section .news-arrow {
    order: 4;
    flex: 0 0 auto;
    font-size: var(--font-size-md-2);
    color: var(--gold);
    opacity: 0;
    transform: translateX(-8px);
    transition: var(--transition-standard);
}

.news-list-section .news-item:hover .news-arrow {
    opacity: 1;
    transform: translateX(0);
}

/* --- Hover image --- */
.news-list-section .news-item-img {
    position: absolute;
    top: 0;
    right: 0;
    left: auto;
    width: 280px;
    height: 180px;
    border-radius: var(--card-radius);
    background-size: cover;
    background-position: center;
    pointer-events: none;
    opacity: 0;
    z-index: 999998;
    filter: grayscale(30%) contrast(1.05);
}

/* --- CTA link --- */
.news-list-section .news-all-cta {
    display: inline-block;
    margin-top: 2rem;
    font-size: var(--font-size-button);
    font-weight: var(--font-weight-medium);
    text-transform: uppercase;
    letter-spacing: var(--letter-spacing-button);
    color: var(--gold);
    text-decoration: none;
    opacity: 0;
    transform: translateX(40px);
    transition: var(--transition-color);
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.news-list-section .news-all-cta:hover {
    color: var(--color-white);
}

/* ==========================================
   RESPONSIVE — Mobile (mirrors the home `.section-8` mobile rules)
   ========================================== */
@media (max-width: 1023px) {
    .news-list-section {
        min-height: auto;
        align-items: flex-start;
        padding: 4rem 0;
    }

    .news-list-section .news-totem-deco {
        display: none;
    }

    .news-list-section .news-inner {
        width: 100%;
        padding: 0;
    }

    .news-list-section .news-header {
        margin-bottom: 2rem;
        opacity: 1;
        transform: none;
        padding-right: 1.5rem !important;
        padding-left: 1.5rem !important;
    }

    .news-list-section .news-title {
        font-size: var(--font-size-xl-2);
    }

    .news-list-section .news-subtitle {
        font-size: var(--font-size-nav);
    }

    .news-list-section .news-item {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: var(--space-sm) var(--space-md);
        padding: 1.4rem 1.5rem !important;
        align-items: start;
        opacity: 1;
        transform: none;
        overflow: hidden;
        isolation: isolate;
        text-decoration: none;
    }

    .news-list-section .news-item:hover {
        padding-left: 1.5rem !important;
    }

    .news-list-section .news-meta {
        grid-column: 1 / 2;
        grid-row: 1;
        order: 1;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--space-xs) var(--space-sm);
        min-width: 0;
    }

    .news-list-section .news-date {
        flex: 0 0 auto;
        grid-column: auto;
        grid-row: auto;
    }

    .news-list-section .news-item-tag {
        flex: 0 1 auto;
        max-width: 100%;
        grid-column: auto;
        grid-row: auto;
    }

    .news-list-section .news-item-title {
        order: 2;
        grid-column: 1 / -1;
        grid-row: 2;
        font-size: var(--font-size-nav);
        align-self: start;
    }

    .news-list-section .news-arrow {
        display: none !important;
        order: 3;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
        align-self: center;
    }

    .news-list-section .news-meta,
    .news-list-section .news-item-title,
    .news-list-section .news-arrow {
        position: relative;
        z-index: 1;
    }

    .news-list-section .news-item-img {
        display: block !important;
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        opacity: 0.2 !important;
        z-index: 0;
        transform: none !important;
        transition: none;
    }

    .news-list-section .news-all-cta {
        margin-top: 1.5rem;
        opacity: 1;
        transform: none;
        padding-right: 1.5rem !important;
        padding-left: 1.5rem !important;
    }
}

/* ==========================================
   Tablet landscape (1024–1280) — mirrors the home's unification.css tweaks
   ========================================== */
@media (min-width: 1024px) and (max-width: 1280px) {
    .news-list-section .news-item-title {
        font-weight: var(--font-weight-regular) !important;
        line-height: var(--line-height-copy) !important;
        font-size: 13px !important;
    }

    .news-list-section .news-title {
        margin-bottom: 10px;
    }

    .news-list-section .news-item {
        padding: 10px 0px;
    }

    .news-list-section .news-all-cta {
        margin-top: 10px;
    }
}

/* ==========================================
   REDUCED MOTION
   ========================================== */
@media (prefers-reduced-motion: reduce) {
    .news-list-section .news-header,
    .news-list-section .news-item,
    .news-list-section .news-all-cta {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ==========================================
   Editor preview tweaks
   No pin/JS in the editor, so force the reveal-from-hidden elements visible
   and drop the full-viewport centering.
   ========================================== */
.wp-block[data-type="acf/news-list"] .news-list-section {
    min-height: 0;
    display: block;
    padding: 2rem;
}

.wp-block[data-type="acf/news-list"] .news-header,
.wp-block[data-type="acf/news-list"] .news-item,
.wp-block[data-type="acf/news-list"] .news-all-cta {
    opacity: 1 !important;
    transform: none !important;
}
