/* =========================================================
   PUBLIC DOCUMENTS / TRANSPARENCIA
   Misma línea visual que index, servicios, convocatorias y noticias
   Este archivo NO toca el header principal.
========================================================= */

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

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

.page-transparencia .documents-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-transparencia .documents-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-transparencia .documents-hero .shell,
.page-transparencia .documents-hero .web-container {
    position: relative;
    z-index: 1;
    padding: 72px 0;
}

.page-transparencia .documents-hero .eyebrow,
.page-transparencia .documents-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-transparencia .documents-hero h1 {
    max-width: 820px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(46px, 6vw, 76px);
    line-height: .95;
    letter-spacing: -0.07em;
    font-weight: 1000;
}

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

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

.documents-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;
}

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

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

.documents-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;
}

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

/* =========================
   Tabs de secciones
========================= */

.documents-section-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 18px;
    scrollbar-width: thin;
}

.documents-section-button {
    flex: 0 0 auto;
    min-height: 46px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 999px;
    padding: 0 17px;
    background: #ffffff;
    color: var(--primary, #0b2a6f);
    font: inherit;
    font-size: 14px;
    font-weight: 1000;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    transition:
        transform .22s ease,
        background .22s ease,
        color .22s ease,
        border-color .22s ease,
        box-shadow .22s ease;
}

.documents-section-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, .08);
}

.documents-section-button.active {
    background: var(--accent, #1b5cff);
    border-color: var(--accent, #1b5cff);
    color: #ffffff;
    box-shadow: 0 18px 36px rgba(27, 92, 255, .22);
}

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

.documents-filter-card {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(180px, .9fr) minmax(140px, .55fr) 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));
}

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

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

.documents-filter-card input,
.documents-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;
}

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

.documents-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;
}

.documents-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;
}

/* =========================
   Lista de documentos
========================= */

.public-documents-list {
    display: grid;
    gap: 18px;
}

.public-document-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 20px;
    padding: 22px;
    border-radius: 26px;
    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-document-card:hover {
    transform: translateY(-5px);
    border-color: rgba(37, 99, 235, 0.30);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.14);
}

.document-icon {
    width: 86px;
    height: 96px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background:
        linear-gradient(135deg, #eef4ff, #dbeafe);
    color: var(--primary, #0b2a6f);
    font-size: 13px;
    font-weight: 1000;
    letter-spacing: 0.08em;
}

.public-document-content {
    min-width: 0;
}

.public-document-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

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

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

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

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

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

.public-document-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
}

.document-category {
    color: var(--muted, #64748b);
    font-weight: 800;
    font-size: 14px;
}

.document-open-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    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;
}

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

/* =========================
   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,
.public-load-more[hidden] {
    display: none;
}

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

.page-transparencia .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) {
    .documents-public-headline {
        grid-template-columns: 1fr;
        gap: 16px;
    }

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

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

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

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

    .page-transparencia .documents-hero h1 {
        font-size: 44px;
    }

    .page-transparencia .documents-hero p {
        font-size: 16px;
    }

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

    .documents-public-headline h2 {
        font-size: 38px;
    }

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

    .public-document-card {
        grid-template-columns: 1fr;
        padding: 20px;
        border-radius: 24px;
    }

    .document-icon {
        width: 100%;
        height: 74px;
    }

    .public-document-footer {
        display: grid;
    }

    .document-open-button,
    .documents-clear-button {
        width: 100%;
    }

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

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