/* =============================================
   News Index Styles
   Relies on: app.css (btn, btn-dark, container, row, col-*)
              font.css (spectral-* classes)
   ============================================= */

:root {
    --news-accent-yellow: #FFDE59;
    --news-accent-blue:   #a5bfff;
    --news-accent-green:  #78f2c1;
    --news-accent-pink:   #ffd4f7;
    --news-text:          #212129;
    --news-muted:         #424248; /* 8.75:1 on white — passes AAA */
    --news-on-yellow:     #38383f; /* 7.94:1 on #FFDE59 — passes AAA */
}

/* --- Category badges --- */
.news-category-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--news-text);
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.news-category-badge:hover {
    opacity: .8;
}

.news-category-badge--active {
    background: var(--news-accent-yellow);
    color: var(--news-on-yellow);
}

.news-category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1.25rem;
}

/* --- Category list on detail page --- */
.news-detail-header__categories {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

/* --- Detail header split layout (featured image) --- */
.news-detail-header__split {
    display: flex;
    align-items: center;
    gap: 56px;
    padding-top: 8px;
}

.news-detail-header__image-col {
    flex: 0 0 44%;
}

.news-detail-header__img-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%;
}

.news-detail-header__img-block {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    background: var(--news-accent-yellow);
}

.news-detail-header__img-block img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-detail-header__img-accent {
    position: absolute;
    bottom: -14px;
    right: -14px;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: var(--news-text);
}

.news-detail-header__text-col {
    flex: 1;
    min-width: 0;
}

/* --- Preview banner --- */
.preview-banner {
    background: #fff3cd;
    color: #7d4e00;
    border-bottom: 2px solid #FFDE59;
    padding: 12px 0;
    font-size: 14px;
    text-align: center;
}

/* --- Page Hero --- */
.news-hero {
    position: relative;
    background: var(--news-accent-yellow);
    padding: 80px 0 72px;
    overflow: hidden;
}

.news-hero .container {
    position: relative;
    z-index: 2;
}

/* Concentric arcs — right-edge decoration */
.news-hero__arcs {
    position: absolute;
    width: 680px;
    height: 680px;
    top: -160px;
    right: -180px;
    z-index: 1;
    pointer-events: none;
}

.news-hero__heading {
    font-size: 5rem;
    line-height: 1;
    color: var(--news-text);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.news-hero__strapline {
    font-size: 1.25rem;
    color: var(--news-on-yellow);
    margin: 0;
}

/* --- News List --- */
.news-list {
    padding: 60px 0 80px;
}

/* --- News Card --- */
.news-card {
    display: flex;
    align-items: center;
    gap: 56px;
    margin-bottom: 72px;
}

/* Image Column */
.news-card__image-col {
    flex: 0 0 42%;
}

.news-card__img-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
}

.news-card__img-block {
    position: absolute;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    transition: transform 0.25s ease;
}

.news-card__img-accent {
    position: absolute;
    bottom: -14px;
    right: -14px;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: var(--news-text);
    transition: transform 0.25s ease;
}

/* Accent colour cycling */
.news-card:nth-child(4n+1) .news-card__img-block { background: var(--news-accent-yellow); }
.news-card:nth-child(4n+2) .news-card__img-block { background: var(--news-accent-blue); }
.news-card:nth-child(4n+3) .news-card__img-block { background: var(--news-accent-green); }
.news-card:nth-child(4n+4) .news-card__img-block { background: var(--news-accent-pink); }

/* Decorative bullseye — oversized and anchored to a corner so
   overflow:hidden on the block clips it to a partial arc effect */
.news-card__img-circles {
    position: absolute;
    width: 480px;
    height: 480px;
    opacity: 0.18;
    flex-shrink: 0;
}

/* Each nth-child anchors the bullseye to a different corner */
.news-card:nth-child(4n+1) .news-card__img-circles { bottom: -160px; right: -160px; }
.news-card:nth-child(4n+2) .news-card__img-circles { top: -160px;    left:  -160px; }
.news-card:nth-child(4n+3) .news-card__img-circles { top: -160px;    right: -160px; }
.news-card:nth-child(4n+4) .news-card__img-circles { bottom: -160px; left:  -160px; }

/* Content Column */
.news-card__content {
    flex: 1;
    border-left: 2px solid var(--news-text);
    padding-left: 40px;
}

.news-card__date {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--news-muted);
    margin-bottom: 14px;
}

.news-card__title {
    font-size: 1.9rem;
    line-height: 1.2;
    color: var(--news-text);
    margin-bottom: 16px;
    font-weight: 700;
}

.news-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card__title a:hover {
    color: #3a3a45;
}

.news-card__title a:focus-visible,
.news-card__link:focus-visible {
    outline: 3px solid var(--news-text);
    outline-offset: 3px;
    text-decoration: underline;
}

.news-card__summary {
    font-size: 15px;
    line-height: 1.65;
    color: #444;
    margin-bottom: 24px;
}

.news-card__summary p {
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--news-text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'Spectral', serif;
}

.news-card__link-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.news-card__link:hover .news-card__link-arrow {
    transform: translateX(4px);
}

/* Card hover: lift photo block, extend accent offset */
.news-card:hover .news-card__img-block {
    transform: translateY(-3px);
}

.news-card:hover .news-card__img-accent {
    transform: translate(4px, 4px);
}

/* --- Pagination --- */
.news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 0 20px;
    border-top: 1px solid #eee;
}

.news-pagination__link {
    display: inline-block;
    padding: 14px 22px; /* 14px top/bottom gives ~44px height — AAA tap target */
    font-size: 13px;
    font-weight: 700;
    font-family: 'Spectral', serif;
    color: var(--news-text);
    text-decoration: none;
    border: 2px solid var(--news-text);
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: background 0.2s ease, color 0.2s ease;
}

.news-pagination__link:hover {
    background: var(--news-text);
    color: #fff;
}

.news-pagination__info {
    font-size: 13px;
    color: var(--news-muted);
}

/* =============================================
   News Detail Page
   ============================================= */


.news-detail-header {
    position: relative;
    background: var(--news-accent-yellow);
    padding: 72px 0 80px;
    overflow: hidden;
}

.news-detail-header .container {
    position: relative;
    z-index: 2;
}

/* Arc position variants for page hero */
.page-hero__arcs--top-right    { position: absolute; width: 580px; height: 580px; top: -220px;    right: -140px;  z-index: 1; pointer-events: none; }
.page-hero__arcs--top-left     { position: absolute; width: 580px; height: 580px; top: -220px;    left:  -140px;  z-index: 1; pointer-events: none; }
.page-hero__arcs--center-right { position: absolute; width: 580px; height: 580px; top: 50%;       right: -200px;  z-index: 1; pointer-events: none; transform: translateY(-50%); }
.page-hero__arcs--center-left  { position: absolute; width: 580px; height: 580px; top: 50%;       left:  -200px;  z-index: 1; pointer-events: none; transform: translateY(-50%); }
.page-hero__arcs--bottom-right { position: absolute; width: 580px; height: 580px; bottom: -220px; right: -140px;  z-index: 1; pointer-events: none; }
.page-hero__arcs--bottom-left  { position: absolute; width: 580px; height: 580px; bottom: -220px; left:  -140px;  z-index: 1; pointer-events: none; }

.news-detail-header__arcs {
    position: absolute;
    width: 580px;
    height: 580px;
    top: -120px;
    right: -140px;
    z-index: 1;
    pointer-events: none;
}

.news-detail-header__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px; /* AAA tap target */
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--news-on-yellow);
    text-decoration: none;
    font-family: 'Spectral', serif;
    margin-bottom: 28px;
    transition: color 0.2s ease;
}

.news-detail-header__back:hover {
    color: var(--news-text);
}

.news-detail-header__back-arrow {
    display: inline-block;
    transition: transform 0.2s ease;
}

.news-detail-header__back:hover .news-detail-header__back-arrow {
    transform: translateX(-4px);
}

.news-detail-header__date {
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--news-on-yellow);
    margin-bottom: 20px;
}

.news-detail-header__title {
    font-size: 3rem;
    line-height: 1.1;
    color: var(--news-text);
    font-weight: 800;
    letter-spacing: -0.02em;
    max-width: 820px;
    margin-bottom: 24px;
}

.news-detail-header__summary {
    font-size: 1.15rem;
    line-height: 1.65;
    color: #444;
    max-width: 680px;
    border-left: 2px solid var(--news-text);
    padding-left: 20px;
}

.news-detail-header__summary p {
    margin: 0;
}

.news-detail-header__byline {
    margin-top: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--news-on-yellow);
}

/* --- Article body --- */
.news-detail-body {
    padding: 48px 0 80px;
    border-top: 1px solid #e8e8e8;
}

.news-detail-body__inner {
    max-width: 680px;
}

/* Scoped rich text styles */
.news-detail-body__inner p {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5em;
}

.news-detail-body__inner h2 {
    font-family: 'Spectral', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--news-text);
    margin: 2em 0 0.6em;
    line-height: 1.2;
}

.news-detail-body__inner h3 {
    font-family: 'Spectral', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--news-text);
    margin: 1.8em 0 0.5em;
}

.news-detail-body__inner ul,
.news-detail-body__inner ol {
    margin: 0 0 1.5em 1.6em;
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    padding-left: 0.25em;
}

.news-detail-body__inner ul {
    list-style-type: disc;
}

.news-detail-body__inner ul ul {
    list-style-type: circle;
    margin-top: 0.4em;
    margin-bottom: 0.4em;
}

.news-detail-body__inner ul ul ul {
    list-style-type: square;
}

.news-detail-body__inner ol {
    list-style-type: decimal;
}

.news-detail-body__inner ol ol {
    list-style-type: lower-alpha;
    margin-top: 0.4em;
    margin-bottom: 0.4em;
}

.news-detail-body__inner li {
    margin-bottom: 0.4em;
}

.news-detail-body__inner li > ul,
.news-detail-body__inner li > ol {
    margin-top: 0.4em;
    margin-bottom: 0;
}

.news-detail-body__inner strong {
    font-weight: 700;
    color: var(--news-text);
}

.news-detail-body__inner em {
    font-style: italic;
}

.news-detail-body__inner a {
    color: var(--news-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.news-detail-body__inner a:hover {
    text-decoration: none;
}

.news-detail-body__inner blockquote {
    border-left: 3px solid var(--news-accent-yellow);
    margin: 2em 0;
    padding: 0.5em 0 0.5em 24px;
    font-size: 1.1rem;
    color: #444; /* 8.48:1 on white — passes AAA */
    font-style: italic;
}

.news-detail-body__inner table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin: 0 0 2em;
    line-height: 1.6;
}

.news-detail-body__inner th,
.news-detail-body__inner td {
    padding: 10px 14px;
    text-align: left;
    border: 1px solid #ddd;
    color: #333;
    vertical-align: top;
}

.news-detail-body__inner thead th {
    background: var(--news-text);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-color: var(--news-text);
}

.news-detail-body__inner tbody tr:nth-child(even) {
    background: #f7f7f8;
}

.news-detail-body__inner tbody tr:hover {
    background: #f0f0f2;
}

.news-detail-body__inner hr {
    border: none;
    border-top: 1px solid #e8e8e8;
    margin: 2.5em 0;
}

.news-detail-body__inner code {
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', monospace;
    font-size: 0.875em;
    background: #f3f3f5;
    padding: 0.15em 0.4em;
    border-radius: 3px;
    color: var(--news-text);
}

.news-detail-body__inner pre {
    background: #f3f3f5;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 1.25em 1.5em;
    overflow-x: auto;
    margin: 0 0 1.5em;
    font-size: 14px;
    line-height: 1.6;
}

.news-detail-body__inner pre code {
    background: none;
    padding: 0;
    font-size: inherit;
}

/* --- Detail footer nav --- */
.news-detail-footer {
    padding: 40px 0 60px;
    border-top: 1px solid #e8e8e8;
}

/* Footer back-link is on white, not yellow — override to muted grey */
.news-detail-footer .news-detail-header__back {
    color: var(--news-muted);
}

.news-detail-footer .news-detail-header__back:hover {
    color: var(--news-text);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .news-detail-header__split {
        flex-direction: column;
        gap: 32px;
    }

    .news-detail-header__image-col {
        flex: 0 0 auto;
        width: 100%;
    }

    .news-detail-header__title {
        font-size: 2rem;
    }

    .news-detail-header__summary {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .news-detail-header__title {
        font-size: 1.6rem;
    }
}

/* --- Empty state --- */
.news-empty {
    padding: 80px 0;
    text-align: center;
    color: var(--news-muted);
    font-size: 15px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .news-hero__arcs,
    .news-detail-header__arcs {
        width: 420px;
        height: 420px;
        top: -80px;
        right: -160px;
    }

    .news-hero__heading {
        font-size: 3rem;
    }

    .news-card {
        flex-direction: column;
        gap: 0;
        margin-bottom: 56px;
    }

    .news-card__image-col {
        flex: 0 0 auto;
        width: 100%;
        margin-bottom: 32px;
    }

    .news-card__content {
        padding-left: 20px;
    }

    .news-card__img-accent {
        bottom: -10px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .news-hero__heading {
        font-size: 2.2rem;
    }

    .news-card__title {
        font-size: 1.5rem;
    }
}
