/* ==========================================================
   INGRACE NEWS — DIRECT FIX
   This file must be loaded in base.html.
   ========================================================== */

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

.news-hero,
.news-page,
.article-detail,
.article-detail-header,
.related-articles {
    width: 100%;
    overflow-x: clip;
}

.news-hero {
    padding: 72px 0;
    background: linear-gradient(135deg, #075895, #0c55ce);
    color: #ffffff;
}

.news-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    gap: 54px;
    align-items: end;
}

.news-hero-copy,
.news-search,
.featured-article,
.featured-article-image,
.featured-article-content,
.article-card,
.article-card-image,
.article-card-content,
.article-detail-layout,
.article-body,
.article-sidebar {
    min-width: 0;
}

.news-eyebrow {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.news-hero h1 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: clamp(48px, 7vw, 82px);
    font-weight: 500;
    line-height: 1;
}

.news-hero-copy > p:last-child {
    max-width: 680px;
    margin: 0;
    font-size: 19px;
    line-height: 1.65;
}

.news-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
}

.news-search input {
    width: 100%;
    min-width: 0;
    padding: 15px 16px;
    border: 0;
    border-radius: 4px 0 0 4px;
    font: inherit;
}

.news-search button {
    padding: 15px 21px;
    border: 0;
    border-radius: 0 4px 4px 0;
    background: #181818;
    color: #ffffff;
    font-weight: 700;
}

.news-page {
    padding: 76px 0 94px;
    background: #f5f8fa;
}

.news-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.news-tabs a {
    padding: 9px 15px;
    border: 1px solid #d4dfe7;
    border-radius: 999px;
    background: #ffffff;
    color: #004c8e;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.news-tabs a.active {
    border-color: #0c55ce;
    background: #0c55ce;
    color: #ffffff;
}

.featured-article {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    width: 100%;
    overflow: hidden;
    margin-bottom: 48px;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(0, 49, 91, 0.12);
}

.featured-article-image {
    display: block;
    width: 100%;
    height: 100%;
    overflow: hidden;
    text-decoration: none;
}

.featured-article-image img,
.featured-article-image .news-image-placeholder {
    display: grid;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 420px;
    place-items: center;
    object-fit: cover;
}

.featured-article-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 46px;
}

.news-label {
    color: #0c55ce;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-decoration: none;
    text-transform: uppercase;
}

.featured-article h2 {
    margin: 12px 0 17px;
    font-size: clamp(31px, 3.8vw, 46px);
    line-height: 1.15;
}

.featured-article h2 a,
.article-card h2 a {
    color: #004c8e;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.featured-article-content > p {
    margin: 0 0 18px;
    font-size: 17px;
    line-height: 1.7;
}

.news-action {
    align-self: flex-start;
    margin-top: 22px;
    padding: 13px 21px;
    border-radius: 3px;
    background: #0c55ce;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
}

.article-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    width: 100%;
}

.article-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border: 1px solid #dee6ec;
    border-radius: 5px;
    background: #ffffff;
    box-shadow: 0 9px 24px rgba(0, 49, 91, 0.08);
}

.article-card-image {
    display: block;
    width: 100%;
    overflow: hidden;
    text-decoration: none;
}

.article-card-image img,
.article-card-image .news-image-placeholder {
    display: grid;
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    place-items: center;
    object-fit: cover;
}

.news-image-placeholder {
    background: linear-gradient(135deg, #075895, #0c55ce);
    color: #ffffff;
}

.article-card-content {
    padding: 23px;
}

.article-card h2 {
    margin: 10px 0 12px;
    font-size: 23px;
    line-height: 1.3;
}

.article-card-content > p {
    margin: 0 0 17px;
    font-size: 16px;
    line-height: 1.65;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px 15px;
    color: #687580;
    font-size: 13px;
}

.news-empty {
    grid-column: 1 / -1;
    padding: 50px;
    background: #ffffff;
    text-align: center;
}

.news-pagination {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 48px;
}

.news-pagination a {
    padding: 10px 16px;
    border-radius: 3px;
    background: #0c55ce;
    color: #ffffff;
    text-decoration: none;
}

/* Article detail */
.article-detail-header {
    padding: 72px 0 54px;
    background: #ffffff;
    text-align: center;
}

.article-detail-heading {
    max-width: 980px;
}

.article-detail-header h1 {
    margin: 14px 0 20px;
    color: #004c8e;
    font-size: clamp(44px, 6vw, 74px);
    font-weight: 500;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.article-summary {
    max-width: 820px;
    margin: 0 auto 22px;
    font-size: 20px;
    line-height: 1.6;
}

.article-meta {
    justify-content: center;
}

.article-feature-wrap {
    max-width: 1120px;
    overflow: hidden;
}

.article-feature-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: 680px;
    object-fit: cover;
}

.article-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
    gap: 58px;
    align-items: start;
    padding-top: 64px;
    padding-bottom: 82px;
}

.article-body {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: 19px;
    line-height: 1.85;
}

.article-body > :first-child {
    margin-top: 0;
}

.article-body p {
    margin: 0 0 1.35rem;
}

.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5 {
    color: #004c8e;
    line-height: 1.25;
}

.article-body h2 {
    margin: 2.1rem 0 1rem;
    font-size: 37px;
}

.article-body h3 {
    margin: 1.9rem 0 0.9rem;
    font-size: 30px;
}

.article-body h4 {
    font-size: 24px;
}

.article-body img,
.article-body video,
.article-body iframe,
.article-body embed,
.article-body object {
    display: block;
    width: auto;
    max-width: 100% !important;
    height: auto;
    margin: 1.8rem auto;
}

.article-body iframe {
    width: 100% !important;
    aspect-ratio: 16 / 9;
}

.article-body figure {
    width: 100% !important;
    max-width: 100% !important;
    margin: 1.8rem 0;
}

.article-body figure img {
    width: 100%;
}

.article-body table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    margin: 1.8rem 0;
    border-collapse: collapse;
}

.article-body th,
.article-body td {
    min-width: 120px;
    padding: 11px 13px;
    border: 1px solid #d6e0e8;
}

.article-body blockquote {
    margin: 1.8rem 0;
    padding: 1.15rem 1.4rem;
    border-left: 5px solid #0c55ce;
    background: #f3f7fb;
}

.article-body pre {
    max-width: 100%;
    overflow-x: auto;
    padding: 1.2rem;
    background: #17212b;
    color: #ffffff;
}

.sidebar-news {
    padding: 26px;
    border-radius: 5px;
    background: #f3f7f9;
}

.sidebar-news h2 {
    margin: 0 0 18px;
    color: #004c8e;
    font-size: 23px;
}

.sidebar-news ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-news li + li {
    margin-top: 17px;
    padding-top: 17px;
    border-top: 1px solid #d7e0e7;
}

.sidebar-news a {
    display: block;
    color: #263746;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.sidebar-news span {
    display: block;
    margin-top: 5px;
    color: #6b7882;
    font-size: 12px;
}

.related-articles {
    padding: 72px 0 86px;
    background: #f5f8fa;
}

.related-title {
    margin: 0 0 34px;
    color: #004c8e;
    font-size: 36px;
}

@media (max-width: 920px) {
    .news-hero-layout {
        grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    }

    .featured-article {
        grid-template-columns: 1fr 1fr;
    }

    .featured-article-content {
        padding: 34px;
    }

    .article-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .article-detail-layout {
        grid-template-columns: minmax(0, 1fr) 250px;
        gap: 36px;
    }
}

@media (max-width: 700px) {
    .news-hero-layout,
    .featured-article,
    .article-card-grid,
    .article-detail-layout {
        grid-template-columns: 1fr;
    }

    .news-search {
        width: 100%;
    }

    .featured-article-image img,
    .featured-article-image .news-image-placeholder {
        min-height: 280px;
    }

    .featured-article-content {
        padding: 28px 24px;
    }

    .article-detail-header {
        padding-block: 52px 42px;
    }

    .article-summary {
        font-size: 18px;
    }

    .article-detail-layout {
        padding-top: 48px;
        padding-bottom: 62px;
    }

    .article-body {
        font-size: 17px;
    }
}
