/* =========================================================
   PUBLIC NEWS
   Noticias públicas - misma línea visual que index/servicios
   Este archivo NO toca el header principal.
========================================================= */

body.page-noticias {
    background: #f4f7fb;
}

/* =========================
   Hero
========================= */

.page-noticias .news-hero {
    position: relative;
    overflow: hidden;
    min-height: 370px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background:
        radial-gradient(circle at 92% 12%, rgba(72, 120, 255, 0.32), transparent 32%),
        linear-gradient(135deg, #06183f 0%, #0b2a6f 48%, #244dab 100%);
}

.page-noticias .news-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: .75;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.page-noticias .news-hero .shell,
.page-noticias .news-hero .web-container {
    position: relative;
    z-index: 1;
    padding: 72px 0;
}

.page-noticias .news-hero .eyebrow,
.page-noticias .news-hero .eyebrow--light {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    color: #ffffff;
    font-size: 13px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 18px;
}

.page-noticias .news-hero h1 {
    max-width: 680px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(48px, 6vw, 76px);
    line-height: .95;
    letter-spacing: -0.07em;
    font-weight: 1000;
}

.page-noticias .news-hero p {
    max-width: 720px;
    margin: 20px 0 0;
    color: rgba(255, 255, 255, .9);
    font-size: 18px;
    line-height: 1.65;
    font-weight: 500;
}

/* =========================
   Sección pública
========================= */

.news-public-section {
    background:
        radial-gradient(circle at 90% 0%, rgba(37, 99, 235, .10), transparent 28%),
        linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    padding: 82px 0 96px;
}

.news-public-headline {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    align-items: end;
    gap: 32px;
    margin-bottom: 30px;
}

.news-public-headline .eyebrow {
    display: inline-flex;
    color: var(--primary-3, #2563eb);
    font-size: 13px;
    font-weight: 1000;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.news-public-headline h2 {
    margin: 12px 0 0;
    color: var(--primary, #0b2a6f);
    font-size: clamp(38px, 5vw, 56px);
    line-height: 1;
    letter-spacing: -0.06em;
    font-weight: 1000;
}

.news-public-headline p {
    margin: 0;
    color: var(--text-soft, #64748b);
    line-height: 1.7;
    font-size: 16px;
}

/* =========================
   Filtros
========================= */

.news-filter-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(140px, .55fr) minmax(150px, .7fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--border, #e2e8f0);
    box-shadow: var(--shadow, 0 18px 48px rgba(6, 22, 56, .08));
}

.news-search-box,
.news-select-box {
    display: grid;
    gap: 7px;
}

.news-filter-card label {
    color: var(--primary, #0b2a6f);
    font-size: 13px;
    font-weight: 900;
}

.news-filter-card input,
.news-filter-card select {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 15px;
    background: #ffffff;
    color: var(--text, #10213f);
    padding: 0 14px;
    font: inherit;
    font-weight: 700;
    outline: none;
}

.news-filter-card input:focus,
.news-filter-card select:focus {
    border-color: var(--accent, #1b5cff);
    box-shadow: 0 0 0 4px rgba(27, 92, 255, 0.12);
}

.news-clear-button {
    height: 48px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 15px;
    padding: 0 18px;
    background: #f8fafc;
    color: var(--primary, #0b2a6f);
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    transition: background .22s ease, color .22s ease, transform .22s ease;
}

.news-clear-button:hover {
    background: #eef4ff;
    color: var(--accent, #1b5cff);
    transform: translateY(-1px);
}

/* =========================
   Mensajes
========================= */

.public-message {
    margin: 0 0 24px;
    padding: 18px 20px;
    border-radius: 18px;
    background: #ffffff;
    color: var(--text-soft, #64748b);
    font-weight: 800;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.public-message:empty {
    display: none;
}

/* =========================
   Grid de noticias
========================= */

.public-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.public-news-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: var(--shadow, 0 18px 48px rgba(6, 22, 56, .08));
    transition:
        transform 0.24s ease,
        box-shadow 0.24s ease,
        border-color 0.24s ease;
}

.public-news-card:hover {
    transform: translateY(-7px);
    border-color: rgba(37, 99, 235, 0.30);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.14);
}

.public-news-card.is-featured {
    border-color: rgba(27, 92, 255, 0.34);
}

.public-news-image-link {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    background:
        linear-gradient(135deg, #eef4ff, #dbeafe);
    overflow: hidden;
}

.public-news-image-link.is-disabled {
    pointer-events: none;
}

.public-news-image-link img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 0.28s ease, filter 0.28s ease;
}

.public-news-card:hover .public-news-image-link img {
    transform: scale(1.055);
    filter: saturate(1.05);
}

.public-news-content {
    padding: 21px;
}

.public-news-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.public-news-meta span,
.public-news-meta strong {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
}

.public-news-meta span {
    background: #eef4ff;
    color: var(--primary, #0b2a6f);
}

.public-news-meta strong {
    background: #ecfdf5;
    color: #047857;
}

.public-news-content h2 {
    margin: 0;
    color: var(--primary, #0b2a6f);
    font-size: 21px;
    line-height: 1.18;
    letter-spacing: -0.035em;
    font-weight: 1000;
}

.public-news-content p {
    margin: 12px 0 0;
    color: var(--muted, #64748b);
    line-height: 1.58;
    font-size: 15px;
}

.public-news-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    margin-top: 18px;
    border-radius: 999px;
    padding: 0 17px;
    background: var(--primary, #0b2a6f);
    color: #ffffff;
    text-decoration: none;
    font-weight: 1000;
    font-size: 14px;
    box-shadow: 0 14px 26px rgba(11, 42, 111, 0.22);
    transition:
        transform .24s ease,
        background .24s ease,
        box-shadow .24s ease;
}

.public-news-button:hover {
    background: var(--primary-light, #123f98);
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(11, 42, 111, 0.28);
}

.public-news-button.is-muted {
    background: #f1f5f9;
    color: var(--muted, #64748b);
    box-shadow: none;
}

/* =========================
   Cargar más
========================= */

.public-load-more {
    margin-top: 28px;
    padding: 18px;
    text-align: center;
    color: var(--muted, #64748b);
    font-weight: 900;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px dashed var(--border, #e2e8f0);
}

.public-load-more:empty {
    display: none;
}

/* ===============================
   FOOTER INSTITUCIONAL
=============================== */

.site-footer {
    background:
        radial-gradient(circle at 15% 20%, rgba(37, 99, 235, .16), transparent 32%),
        linear-gradient(135deg, #050b1f 0%, #061a43 48%, #031024 100%);
    color: #ffffff;
    margin-top: 0;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 46px 46px;
    opacity: .35;
    pointer-events: none;
}

.footer-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 72px 0 48px;
    display: grid;
    grid-template-columns: 1.4fr 1fr .9fr 1fr;
    gap: 42px;
    position: relative;
    z-index: 1;
}

.footer-brand p {
    color: rgba(255,255,255,.72);
    line-height: 1.75;
    margin: 20px 0 24px;
    max-width: 390px;
}

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #ffffff;
}

.footer-logo__mark {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 18px 45px rgba(0,0,0,.25);
    font-weight: 900;
    letter-spacing: -.04em;
}

.footer-logo strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1;
    letter-spacing: -.03em;
}

.footer-logo small {
    display: block;
    color: rgba(255,255,255,.68);
    margin-top: 5px;
    font-weight: 700;
}

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.1);
    color: #ffffff;
    text-decoration: none;
    font-weight: 900;
    border: 1px solid rgba(255,255,255,.14);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.footer-social a:hover {
    transform: translateY(-4px);
    background: #2563eb;
    box-shadow: 0 16px 35px rgba(37, 99, 235, .35);
}

.footer-column h3 {
    margin: 0 0 20px;
    font-size: 1.05rem;
    color: #ffffff;
    letter-spacing: -.02em;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 13px;
}

.footer-column li {
    color: rgba(255,255,255,.76);
    line-height: 1.5;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.footer-column a {
    color: rgba(255,255,255,.78);
    text-decoration: none;
    transition: color .2s ease, transform .2s ease;
}

.footer-column a:hover {
    color: #ffffff;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.footer-icon {
    flex: 0 0 auto;
    opacity: .9;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    position: relative;
    z-index: 1;
}

.footer-bottom__inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    color: rgba(255,255,255,.66);
    font-size: .92rem;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-weight: 800;
}

.footer-bottom a:hover {
    color: #ffffff;
}

/* ===============================
   Botón volver arriba
=============================== */

.page-noticias .back-to-top,
.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 60;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: var(--primary, #0b2a6f);
    color: #ffffff;
    text-decoration: none;
    font-weight: 1000;
    box-shadow: 0 18px 38px rgba(6, 22, 56, .22);
    transition: transform .22s ease, background .22s ease;
}

.back-to-top:hover {
    transform: translateY(-3px);
    background: var(--primary-light, #123f98);
}

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

@media (max-width: 1080px) {
    .news-public-headline {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .news-filter-card {
        grid-template-columns: 1fr 1fr;
    }

    .news-search-box {
        grid-column: 1 / -1;
    }

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

    .footer-shell {
        grid-template-columns: 1fr 1fr;
        padding: 56px 0 36px;
    }
}

@media (max-width: 720px) {
    .page-noticias .news-hero {
        min-height: auto;
    }

    .page-noticias .news-hero .shell,
    .page-noticias .news-hero .web-container {
        padding: 54px 0 76px;
    }

    .page-noticias .news-hero h1 {
        font-size: 48px;
    }

    .page-noticias .news-hero p {
        font-size: 16px;
    }

    .news-public-section {
        padding: 64px 0 76px;
    }

    .news-public-headline h2 {
        font-size: 40px;
    }

    .news-filter-card {
        grid-template-columns: 1fr;
        padding: 14px;
        border-radius: 20px;
    }

    .public-news-grid {
        grid-template-columns: 1fr;
    }

    .public-news-content h2 {
        font-size: 20px;
    }

    .public-news-button,
    .news-clear-button {
        width: 100%;
    }

    .footer-shell {
        width: min(100% - 28px, 1180px);
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 48px 0 32px;
    }

    .footer-bottom__inner {
        width: min(100% - 28px, 1180px);
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-logo__mark {
        width: 48px;
        height: 48px;
        border-radius: 16px;
    }

    .back-to-top {
        right: 16px;
        bottom: 16px;
        width: 44px;
        height: 44px;
    }
}