/**
 * Estilos solo para la página web pública (no aplican al sistema/intranet).
 * Paleta alineada con login: azul #1e4a7e, gradientes azul-verde.
 */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
.body-web {
    background: var(--fondo, #f5f7fa);
    --color-primario: #1e4a7e;
    --color-primario-oscuro: #163a66;
    --color-secundario: #3b82b6;
    --color-secundario-oscuro: #2563eb;
    --color-acento: #1a5c4a;
    --fondo: #f5f7fa;
    --fondo-claro: #eef2f7;
    --texto: #1f2937;
    --texto-suave: #4b5563;
    --borde: #e5e7eb;
    font-size: var(--tamano-texto-base, 1.0625rem);
}
/* Header: solo zona del logo (sin fondo) */
.body-web .web-header {
    background: transparent;
    overflow: hidden;
}
/* Barra plateada en la parte superior del encabezado */
.web-header-bar-plateada {
    height: 15px;
    background: linear-gradient(180deg, #e8e8e8 0%, #c8c8c8 50%, #b8b8b8 100%);
    width: 100%;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}
/* Barra de menú: debajo del encabezado, sticky */
.web-nav-bar {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    min-height: 64px;
    overflow: visible;
}
.web-header-top {
    padding: 1rem 0;
    overflow: hidden;
    max-height: 347px;
    position: relative;
}
.web-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: calc(1.5rem + 160px + 1.5rem);
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(0, 3fr);
    grid-template-rows: minmax(0, 315px);
    align-items: center;
    gap: 1.5rem;
}
.web-header-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}
.web-header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    padding: 0 0.5rem;
}
.web-header-anuncio-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    max-width: 100%;
    max-height: 305px;
    flex-wrap: wrap;
    min-height: 0;
}
.web-header-anuncio-img-link {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}
.web-header-anuncio-img {
    max-height: 305px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    flex-shrink: 1;
}
.web-header-anuncio {
    margin: 0;
    padding: 0.5rem 0.75rem;
    font-size: 0.95rem;
    line-height: 1.4;
    color: var(--texto, #1f2937);
    text-align: center;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.web-header-anuncio a {
    color: var(--color-primario, #1e4a7e);
    text-decoration: underline;
}
.web-header-anuncio a:hover {
    color: var(--color-primario-oscuro, #163a66);
}
.web-header-right {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
}
.web-header-intranet-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--color-primario, #1e4a7e);
    color: #fff !important;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.2s;
}
.web-header-intranet-btn:hover {
    background: var(--color-primario-oscuro, #163a66);
    color: #fff !important;
}
.body-web .web-header-logo-link {
    display: block;
    line-height: 0;
}
.body-web .web-header-logo {
    max-width: 315px;
    max-height: 315px;
    width: auto;
    height: auto;
    object-fit: contain;
}
.web-nav-bar .web-nav {
    position: static;
    background: transparent;
    padding: 0;
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    font-family: 'Roboto Condensed', sans-serif;
    overflow: visible;
}
.web-nav-bar .web-nav-list {
    justify-content: center;
    overflow: visible;
}
.web-nav-bar .web-nav-label {
    padding: 1.25rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: var(--texto, #1f2937);
    transition: color 0.15s ease, background 0.15s ease;
}
.web-nav-bar .web-nav-label:hover {
    color: var(--color-primario, #1e4a7e);
    background: var(--fondo-claro, #eef2f7) !important;
}
.web-nav-bar .web-nav-item.web-nav-active > .web-nav-label,
.web-nav-bar .web-nav-label.active {
    color: var(--color-primario, #1e4a7e) !important;
    font-weight: 600;
    background: transparent !important;
}
.web-nav-bar .web-nav-item.web-nav-active > .web-nav-label::after,
.web-nav-bar .web-nav-label.active::after {
    background: var(--color-primario, #1e4a7e) !important;
}
.web-nav-bar .web-nav-sub {
    background: #fff !important;
    border: 1px solid var(--borde, #e5e7eb) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-8px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}
.web-nav-bar .web-nav-item:hover .web-nav-sub,
.web-nav-bar .web-nav-item.web-nav-sub-hover .web-nav-sub,
.web-nav-bar .web-nav-item.web-nav-sub-open .web-nav-sub {
    transform: translateY(0);
}
.web-nav-bar .web-nav-sub a {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 0.95rem;
    color: var(--texto, #1f2937) !important;
    border-top: 1px solid var(--borde, #e5e7eb) !important;
}
.web-nav-bar .web-nav-sub a:hover,
.web-nav-bar .web-nav-sub a.active {
    background: var(--fondo-claro, #eef2f7) !important;
    color: var(--color-primario, #1e4a7e) !important;
}
.body-web .web-nav-toggle {
    background: transparent;
    color: var(--texto, #1f2937);
}

.body-web .btn-primary {
    background: var(--color-primario);
}
.body-web .btn-primary:hover {
    background: var(--color-primario-oscuro);
}

/* Countdown bar: colores administrables desde Intranet > Admisión > Configurar apariencia */

.body-web .web-main-inner {
    font-size: 1em;
}
.body-web .titulo-pagina,
.body-web .web-main-inner > h2 {
    font-size: 1.4em;
}
.body-web h3 {
    font-size: 1.2em;
}

/* Inscripción, Mesa de Partes y otras páginas públicas con layout-mpv */
.layout-mpv {
    font-family: 'Libel Suit', sans-serif;
    font-size: var(--tamano-texto-base, 1.0625rem);
}
.layout-mpv .text-sm {
    font-size: 0.95em;
}
.layout-mpv h1 {
    font-size: 1.4em;
}
.layout-mpv h2 {
    font-size: 1.2em;
}

/* Footer ampliado - color negro */
.web-footer {
    background: #1a1a1a !important;
    padding: 2.5rem 2rem 1rem !important;
}
.web-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}
.web-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.web-footer-title {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.75rem 0;
}
.web-footer-desc {
    color: rgba(255,255,255,0.85);
    font-size: 0.9rem;
    line-height: 1.55;
    margin: 0;
}
.web-footer-links,
.web-footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}
.web-footer-links li,
.web-footer-contact li {
    margin-bottom: 0.5rem;
}
.web-footer-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
}
.web-footer-links a:hover {
    color: rgba(255,255,255,1);
}
.web-footer-contact li {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}
.web-footer-contact i {
    margin-right: 0.5rem;
    color: rgba(255,255,255,0.7);
    width: 1.1em;
}
.web-footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 1rem;
    text-align: center;
}
.web-footer-counter {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(255,255,255,0.16);
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
}
.web-footer-counter__label {
    color: rgba(255,255,255,0.78);
    font-size: 0.85rem;
}
.web-footer-counter__value {
    color: #fff;
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}
.web-footer-bottom p {
    margin: 0;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
}
@media (max-width: 768px) {
    .web-header-top { padding: 0.75rem 0; max-height: 267px; }
    .web-header-inner {
        padding-left: 1rem;
        padding-right: calc(1rem + 150px + 1.5rem);
        grid-template-columns: minmax(120px, 1fr) minmax(0, 2.5fr);
        grid-template-rows: minmax(0, 235px);
        gap: 1rem;
    }
    .web-header-anuncio { font-size: 0.85rem; }
    .web-header-anuncio-wrap { max-height: 215px; }
    .web-header-anuncio-img { max-height: 215px; max-width: 100%; }
    .web-header-intranet-btn { padding: 0.5rem 1rem; font-size: 0.9rem; }
    .body-web .web-header-logo { max-width: 235px; max-height: 235px; }
    .web-nav-bar .web-nav { flex-wrap: wrap; padding: 0 1rem; }
    .web-nav-bar .web-nav-list.web-nav-open { width: 100%; }
    .web-nav-bar .web-nav-item { border-top: 1px solid var(--borde, #e5e7eb) !important; }
    .web-footer { padding: 1.5rem 1rem !important; }
    .web-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
}
/* Página pública Matrícula en línea (contenido desde web_paginas) */
.matricula-en-linea-dinamica .matricula-comunicados .matricula-subtitulo {
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    font-size: 1.15rem;
    color: #0f172a;
}
.matricula-en-linea-dinamica .matricula-comunicados .matricula-tabla-titulo {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
}
.matricula-en-linea-dinamica .matricula-comunicados .tabla-responsive {
    overflow-x: auto;
    margin: 0.75rem 0 1.25rem;
    -webkit-overflow-scrolling: touch;
}
.matricula-en-linea-dinamica .matricula-comunicados .cronograma-tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}
.matricula-en-linea-dinamica .matricula-comunicados .cronograma-tabla th,
.matricula-en-linea-dinamica .matricula-comunicados .cronograma-tabla td {
    border: 1px solid #cbd5e1;
    padding: 0.6rem 0.75rem;
    text-align: left;
    vertical-align: top;
}
.matricula-en-linea-dinamica .matricula-comunicados .cronograma-tabla thead th {
    background: #0e7490;
    color: #fff;
    font-weight: 600;
}
.matricula-en-linea-dinamica .matricula-comunicados .cronograma-tabla tbody tr:nth-child(even) {
    background: #f8fafc;
}
.matricula-en-linea-dinamica .matricula-comunicados .matricula-nota {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 1rem 1.15rem;
    margin: 1.5rem 0;
}
.matricula-en-linea-dinamica .matricula-comunicados .matricula-requisitos {
    margin: 0.5rem 0 1.5rem;
    padding-left: 1.25rem;
}
.matricula-en-linea-dinamica .matricula-comunicados .matricula-requisitos li {
    margin: 0.45rem 0;
}
.matricula-en-linea-dinamica .matricula-cta {
    text-align: center;
    margin: 2rem 0 1rem;
    padding: 1.5rem 1rem;
    background: linear-gradient(180deg, #f0fdfa 0%, #ecfeff 100%);
    border-radius: 12px;
    border: 1px solid #99f6e4;
}
.matricula-en-linea-dinamica .btn-matricula-intranet {
    display: inline-block;
    padding: 0.85rem 2rem;
    background: #0e7490;
    color: #fff !important;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(14, 116, 144, 0.35);
}
.matricula-en-linea-dinamica .btn-matricula-intranet:hover {
    background: #155e75;
}
.matricula-en-linea-dinamica .matricula-cta-ayuda {
    margin: 1rem 0 0;
    font-size: 0.9rem;
    color: #475569;
    max-width: 36rem;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 480px) {
    .web-header-top { max-height: none; }
    .web-header-inner {
        padding-right: calc(1rem + 130px + 1.5rem);
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 155px);
        grid-template-areas: "logo" "anuncio";
    }
    .web-header-left { grid-area: logo; }
    .web-header-center { grid-area: anuncio; justify-content: flex-start; max-height: 155px; overflow: hidden; }
    .web-header-right { right: 1rem; }
    .body-web .web-header-logo { max-width: 175px; max-height: 175px; }
    .web-header-anuncio-wrap { max-height: 155px; }
    .web-header-anuncio-img { max-height: 155px; max-width: 100%; }
    .web-header-anuncio { font-size: 0.8rem; text-align: left; padding: 0.25rem 0; }
}

/* --- Biblioteca pública (estilo hero + tarjeta búsqueda tipo portal) --- */
.body-web .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.bib-page {
    margin: 0;
}
.bib-hero-shell {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
}
.bib-hero-bg {
    position: relative;
    min-height: min(78vh, 720px);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem 1.25rem 0;
    box-sizing: border-box;
    background-color: #0c2744;
    background-image:
        linear-gradient(105deg, rgba(10, 35, 62, 0.92) 0%, rgba(30, 74, 126, 0.78) 42%, rgba(15, 23, 42, 0.65) 100%),
        url("https://images.unsplash.com/photo-1521587760476-9c73541d19f2?auto=format&fit=crop&w=2000&q=80");
    background-size: cover;
    background-position: center;
}
.bib-hero-inner {
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 1.5rem;
}
.bib-hero-brand {
    margin-bottom: 1.75rem;
    text-align: left;
}
.bib-hero-welcome {
    margin: 0 0 0.15rem;
    font-size: clamp(1.05rem, 2.5vw, 1.35rem);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: 0.02em;
}
.bib-hero-title {
    margin: 0;
    font-size: clamp(1.75rem, 4.5vw, 2.65rem);
    font-weight: 800;
    line-height: 1.15;
    color: #fff;
    letter-spacing: -0.02em;
}
.bib-hero-title em {
    font-style: italic;
    color: #ff6b35;
    font-weight: 900;
}
.bib-hero-title .bib-hero-name {
    font-style: normal;
    color: #fff;
    font-weight: 800;
}
.bib-search-card {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.22);
    overflow: hidden;
    max-width: 920px;
    margin: 0 auto;
}
.bib-search-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.bib-tab {
    flex: 1;
    max-width: 50%;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #64748b;
    background: transparent;
    border: none;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s ease, border-color 0.15s ease;
}
.bib-tab:hover {
    color: #1e4a7e;
}
.bib-tab--active {
    color: #1e4a7e;
    border-bottom-color: #1e4a7e;
}
.bib-search-panel {
    padding: 1.35rem 1.5rem 1.5rem;
    background: #eef3f8;
}
.bib-search-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 0;
    align-items: stretch;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.bib-search-row input[type="search"],
.bib-search-row input[type="text"] {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 0.95rem 1.1rem;
    font-size: 1.05rem;
    color: var(--texto, #1f2937);
    background: #fff;
}
.bib-search-row input:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(30, 74, 126, 0.2);
}
@media (max-width: 520px) {
    .bib-search-row {
        flex-wrap: wrap;
    }
    .bib-search-submit {
        width: 100%;
        padding: 0.85rem 1rem;
    }
}
.bib-search-submit {
    flex-shrink: 0;
    padding: 0 1.75rem;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #fff;
    background: #ff6b35;
    border: none;
    cursor: pointer;
    transition: background 0.15s ease, filter 0.15s ease;
}
.bib-search-submit:hover {
    background: #e85d2c;
    filter: brightness(1.02);
}
.bib-adv-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem 1rem;
}
@media (max-width: 600px) {
    .bib-adv-grid {
        grid-template-columns: 1fr;
    }
}
.bib-adv-grid label {
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.3rem;
}
.bib-adv-grid input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.95rem;
    box-sizing: border-box;
}
.bib-adv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.1rem;
    align-items: center;
}
.bib-link-quiet {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e4a7e;
    text-decoration: none;
}
.bib-link-quiet:hover {
    text-decoration: underline;
}
.bib-quicklinks {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 0;
    margin-top: 0;
    padding: 0.35rem 0.5rem;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}
.bib-quicklink {
    flex: 1 1 140px;
    min-width: 120px;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 1rem 0.65rem;
    text-decoration: none;
    color: #1e4a7e;
    font-size: 0.78rem;
    font-weight: 700;
    text-align: center;
    line-height: 1.25;
    border: 2px solid transparent;
    border-radius: 4px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.bib-quicklink:hover {
    background: #fff7ed;
    border-color: #ff6b35;
    color: #0f172a;
}
.bib-quicklink__icon {
    font-size: 1.65rem;
    line-height: 1;
}
.bib-quicklink__icon .fa-database {
    color: #1e4a7e;
}
.bib-quicklink__icon .fa-book-open,
.bib-quicklink__icon .fa-tablet-screen-button,
.bib-quicklink__icon .fa-folder-open,
.bib-quicklink__icon .fa-file-lines {
    color: #1e4a7e;
}
.bib-below {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 2.5rem;
    box-sizing: border-box;
}
.bib-catalog-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}
.bib-catalog-head h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--texto, #1f2937);
}
.bib-catalog-head p {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
}
.bib-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem 1rem;
}
@media (min-width: 640px) {
    .bib-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1.5rem 1.25rem;
    }
}
.bib-tile {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
}
.bib-cover-btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    background: linear-gradient(145deg, #e2e8f0, #f8fafc);
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.06),
        0 12px 24px rgba(30, 74, 126, 0.08);
    overflow: hidden;
    aspect-ratio: 2 / 3;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.bib-cover-btn:hover {
    box-shadow:
        0 8px 16px rgba(15, 23, 42, 0.1),
        0 20px 36px rgba(30, 74, 126, 0.14);
    transform: translateY(-2px);
}
.bib-cover-btn:focus {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}
.bib-cover-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bib-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    color: #64748b;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.75rem;
    text-align: center;
    line-height: 1.3;
}
.bib-cover-placeholder span:first-child {
    font-size: 2rem;
    opacity: 0.5;
}
.bib-badge {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    right: 0.5rem;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    backdrop-filter: blur(8px);
}
.bib-badge--ok {
    background: rgba(16, 185, 129, 0.92);
    color: #fff;
}
.bib-badge--wait {
    background: rgba(245, 158, 11, 0.95);
    color: #1c1917;
}
.bib-badge--off {
    background: rgba(15, 23, 42, 0.75);
    color: #f1f5f9;
}
.bib-tile-meta {
    margin-top: 0.65rem;
    min-height: 2.6rem;
}
.bib-tile-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--texto, #1f2937);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bib-tile-author {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bib-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #64748b;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
}
.bib-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    overflow: auto;
}
.bib-overlay[hidden] {
    display: none !important;
}
.bib-panel {
    width: min(640px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    overflow: hidden;
    background: #fff;
}
.bib-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1rem 0.5rem 1.25rem;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border-bottom: 1px solid #e2e8f0;
}
.bib-dialog-close {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bib-dialog-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}
.bib-dialog-scroll {
    padding: 1.25rem 1.25rem 1.5rem;
    max-height: min(70vh, 520px);
    overflow-y: auto;
}
.bib-dialog-layout {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 520px) {
    .bib-dialog-layout {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
    .bib-dialog-layout .bib-dialog-cover {
        max-width: 200px;
    }
}
.bib-dialog-cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    background: linear-gradient(145deg, #e2e8f0, #f1f5f9);
}
.bib-dialog-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.bib-dialog-body h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    line-height: 1.35;
    color: var(--texto, #1f2937);
}
.bib-dialog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
.bib-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #e0f2fe;
    color: #0369a1;
}
.bib-tag--muted {
    background: #f1f5f9;
    color: #475569;
}
.bib-tag--ok {
    background: #d1fae5;
    color: #047857;
}
.bib-tag--warn {
    background: #fef3c7;
    color: #b45309;
}
.bib-dialog-dl {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.55;
}
.bib-dialog-dl dt {
    font-weight: 700;
    color: #64748b;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.5rem;
}
.bib-dialog-dl dt:first-child {
    margin-top: 0;
}
.bib-dialog-dl dd {
    margin: 0.15rem 0 0;
}
.bib-dialog-desc {
    margin: 0 0 1.25rem;
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--texto-suave, #4b5563);
    white-space: pre-wrap;
}
.bib-dialog-desc:empty {
    display: none;
}
.bib-dialog-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}
.bib-dialog-actions a,
.bib-dialog-actions span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}
.bib-dialog-actions a.bib-act-primary {
    background: #1e4a7e;
    color: #fff !important;
}
.bib-dialog-actions a.bib-act-primary:hover {
    background: #163a66;
}
.bib-dialog-actions a.bib-act-secondary {
    background: #f1f5f9;
    color: #1e4a7e !important;
    border: 1px solid #cbd5e1;
}
.bib-dialog-actions a.bib-act-secondary:hover {
    background: #e2e8f0;
}
.bib-dialog-actions span.bib-act-disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}
.bib-dialog-note {
    margin: 0.75rem 0 0;
    font-size: 0.82rem;
    color: #64748b;
}

/* --- Repositorio público (mejora visual) --- */
.repo-page { margin: 0; }
.repo-hero-shell {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    position: relative;
}
.repo-hero-bg {
    min-height: min(70vh, 620px);
    display: flex;
    align-items: center;
    padding: 2.25rem 1.25rem;
    box-sizing: border-box;
    background-color: #0f2f4f;
    background-image:
        linear-gradient(105deg, rgba(14, 30, 54, 0.9) 0%, rgba(30, 74, 126, 0.72) 45%, rgba(15, 23, 42, 0.62) 100%),
        url("https://images.unsplash.com/photo-1456513080510-7bf3a84b82f8?auto=format&fit=crop&w=2000&q=80");
    background-size: cover;
    background-position: center;
}
.repo-hero-inner {
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
}
.repo-hero-brand { margin-bottom: 1.2rem; color: #fff; }
.repo-hero-welcome {
    margin: 0 0 0.25rem;
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0.95;
}
.repo-hero-title {
    margin: 0;
    font-size: clamp(1.6rem, 4.2vw, 2.45rem);
    line-height: 1.15;
    font-weight: 800;
}
.repo-hero-title em { color: #ff6b35; font-style: italic; font-weight: 900; }
.repo-hero-desc {
    margin: 0.65rem 0 0;
    max-width: 48rem;
    opacity: 0.92;
    font-size: 0.97rem;
}
.repo-search-card {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.22);
    padding: 1rem;
    max-width: 930px;
}
.repo-search-row {
    display: flex;
    align-items: stretch;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}
.repo-search-row input[type="search"] {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 0.92rem 1rem;
    font-size: 1rem;
}
.repo-search-row input[type="search"]:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(30, 74, 126, 0.2);
}
.repo-search-submit {
    border: none;
    background: #ff6b35;
    color: #fff;
    font-size: 0.98rem;
    font-weight: 800;
    padding: 0 1.5rem;
    cursor: pointer;
}
.repo-search-submit:hover { background: #e85d2c; }
.repo-search-clean { margin: 0.6rem 0 0.25rem; }
.repo-search-clean a { color: #1e4a7e; text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.repo-search-clean a:hover { text-decoration: underline; }
.repo-quicklinks {
    margin-top: 0.65rem;
    padding-top: 0.7rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}
.repo-quicklink {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    text-decoration: none;
    color: #1e4a7e;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
}
.repo-quicklink:hover { background: #fff7ed; border-color: #ff6b35; color: #0f172a; }
.repo-below {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 2.5rem;
    box-sizing: border-box;
}
.repo-catalog-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.repo-catalog-head h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--texto, #1f2937);
}
.repo-catalog-head p { margin: 0; color: #64748b; font-size: 0.88rem; }
.repo-empty {
    text-align: center;
    padding: 2rem 1rem;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: #64748b;
}
.repo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.repo-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.repo-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.repo-chip {
    display: inline-block;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.22rem 0.58rem;
}
.repo-year { font-size: 0.82rem; color: #64748b; font-weight: 700; }
.repo-title {
    margin: 0;
    color: var(--texto, #1f2937);
    font-size: 1.03rem;
    line-height: 1.35;
}
.repo-meta {
    margin: 0;
    color: #334155;
    font-size: 0.87rem;
    line-height: 1.45;
}
.repo-summary {
    margin: 0.25rem 0 0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.repo-keywords {
    margin: 0.1rem 0 0;
    color: #64748b;
    font-size: 0.8rem;
}
.repo-actions {
    margin-top: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.2rem;
}
.repo-btn {
    text-decoration: none;
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    font-size: 0.84rem;
    font-weight: 800;
}
.repo-btn-primary { background: #1e4a7e; color: #fff; }
.repo-btn-primary:hover { background: #163a66; }
.repo-btn-secondary { background: #f1f5f9; border: 1px solid #cbd5e1; color: #1e4a7e; }
.repo-btn-secondary:hover { background: #e2e8f0; }
@media (max-width: 640px) {
    .repo-search-row { flex-wrap: wrap; }
    .repo-search-submit { width: 100%; padding: 0.85rem 1rem; }
}

/* --- Aula Virtual pública (mejora visual) --- */
.av-page { margin: 0; }
.av-hero-shell {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}
.av-hero-bg {
    min-height: min(68vh, 600px);
    display: flex;
    align-items: center;
    padding: 2.2rem 1.25rem;
    box-sizing: border-box;
    background-color: #0f2f4f;
    background-image:
        linear-gradient(110deg, rgba(8, 25, 47, 0.92) 0%, rgba(30, 74, 126, 0.72) 45%, rgba(14, 116, 144, 0.6) 100%),
        url("https://images.unsplash.com/photo-1434030216411-0b793f4b4173?auto=format&fit=crop&w=2000&q=80");
    background-size: cover;
    background-position: center;
}
.av-hero-inner {
    max-width: 1040px;
    margin: 0 auto;
    width: 100%;
}
.av-hero-brand { color: #fff; max-width: 780px; }
.av-hero-welcome {
    margin: 0 0 0.35rem;
    font-size: clamp(0.95rem, 2vw, 1.2rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    opacity: 0.95;
}
.av-hero-title {
    margin: 0;
    font-size: clamp(1.7rem, 4.2vw, 2.6rem);
    line-height: 1.15;
    font-weight: 800;
}
.av-hero-title em { color: #ff6b35; font-style: italic; font-weight: 900; }
.av-hero-desc {
    margin: 0.8rem 0 0;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.93;
}
.av-hero-actions {
    margin-top: 1.4rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}
.av-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.72rem 1.2rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.92rem;
    transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}
.av-btn:hover { transform: translateY(-1px); }
.av-btn-primary {
    background: #ff6b35;
    color: #fff !important;
}
.av-btn-primary:hover { background: #e85d2c; }
.av-btn-ghost {
    background: rgba(255, 255, 255, 0.16);
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.av-btn-ghost:hover { background: rgba(255, 255, 255, 0.24); }
.av-below {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem 2.6rem;
    box-sizing: border-box;
}
.av-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.95rem;
}
.av-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}
.av-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e0f2fe;
    color: #075985;
    font-size: 1.1rem;
    margin-bottom: 0.7rem;
}
.av-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.03rem;
    color: var(--texto, #1f2937);
}
.av-card p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.55;
    color: #475569;
}
.av-note {
    margin-top: 1rem;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #334155;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    font-size: 0.9rem;
}
@media (max-width: 640px) {
    .av-hero-actions { flex-direction: column; align-items: flex-start; }
    .av-btn { width: 100%; }
}

/* --- Actividades oficiales públicas --- */
.actpub-page{max-width:1180px;margin:0 auto;padding:1rem 1.25rem 2rem;box-sizing:border-box}
.actpub-hero{border:1px solid #dbe3ef;border-radius:16px;background:linear-gradient(120deg,#0f2f4f,#1e4a7e 58%,#2f6ea3);padding:1.2rem 1.2rem;margin-bottom:1rem;box-shadow:0 16px 34px rgba(15,23,42,.14)}
.actpub-hero-badge{display:inline-flex;align-items:center;padding:.2rem .6rem;border-radius:999px;background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.35);color:#fff;font-size:.74rem;font-weight:700;letter-spacing:.04em;text-transform:uppercase;margin-bottom:.65rem}
.actpub-hero h1{margin:0 0 .4rem;color:#fff;font-size:clamp(1.45rem,3.5vw,2.1rem)}
.actpub-hero p{margin:0;color:rgba(255,255,255,.9);max-width:58rem}
.actpub-hero-meta{display:flex;gap:.65rem;flex-wrap:wrap;margin-top:.9rem}
.actpub-hero-meta span{display:inline-flex;padding:.28rem .65rem;border-radius:999px;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.25);color:#fff;font-size:.8rem}
.actpub-toolbar{display:flex;gap:.7rem;align-items:center;justify-content:center;flex-wrap:wrap;margin:1rem 0 .65rem}
.actpub-btn{display:inline-flex;padding:.5rem .95rem;border-radius:10px;text-decoration:none;background:#f1f5f9;border:1px solid #dbe3ef;color:#1e4a7e;font-weight:700}
.actpub-btn:hover{background:#e2e8f0}
.actpub-month{font-size:1rem;color:#0f172a}
.actpub-legend{display:flex;justify-content:center;margin-bottom:.75rem}
.actpub-legend span{font-size:.84rem;color:#64748b}
.actpub-calendar{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:.5rem;margin-top:.6rem;background:#fff;border:1px solid #e2e8f0;border-radius:14px;padding:.75rem;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.actpub-dayname{text-align:center;font-size:.78rem;font-weight:800;color:#334155;padding:.2rem 0}
.actpub-cell{min-height:98px;border:1px solid #e2e8f0;border-radius:10px;background:#fff;padding:.4rem .42rem;transition:border-color .2s ease,box-shadow .2s ease}
.actpub-cell:hover{border-color:#bfdbfe;box-shadow:0 6px 14px rgba(30,74,126,.08)}
.actpub-cell--empty{background:#f8fafc;opacity:.45}
.actpub-num{font-size:.8rem;font-weight:700;color:#334155}
.actpub-pill{display:block;margin-top:.28rem;padding:.22rem .36rem;border-radius:6px;background:#f1f5f9;font-size:.72rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:#0f172a}
.actpub-list{margin-top:1.25rem}
.actpub-list-head{display:flex;justify-content:space-between;align-items:flex-end;gap:.8rem;flex-wrap:wrap;margin-bottom:.8rem}
.actpub-list h2{margin:0;color:#0f172a}
.actpub-list-head p{margin:0;color:#64748b;font-size:.88rem}
.actpub-item{display:grid;grid-template-columns:120px 1fr;gap:.9rem;border:1px solid #e2e8f0;border-radius:12px;background:#fff;padding:.85rem;margin-bottom:.75rem;box-shadow:0 8px 20px rgba(15,23,42,.05)}
.actpub-item img{width:120px;height:88px;border-radius:9px;object-fit:cover;border:1px solid #dbe3ef}
.actpub-item-top{display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap;margin-bottom:.35rem}
.actpub-chip{display:inline-flex;padding:.18rem .55rem;border-radius:999px;background:#eef4ff;border:1px solid #d3e3ff;color:#1d4ed8;font-size:.75rem;font-weight:700}
.actpub-state{display:inline-flex;padding:.18rem .55rem;border-radius:999px;font-size:.75rem;font-weight:700;border:1px solid}
.actpub-state--upcoming{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
.actpub-state--live{background:#ecfdf5;border-color:#a7f3d0;color:#047857}
.actpub-state--done{background:#f1f5f9;border-color:#cbd5e1;color:#475569}
.actpub-item h3{margin:.1rem 0 .2rem;font-size:1.02rem}
.actpub-meta{margin:0;color:#64748b;font-size:.85rem}
.actpub-lugar{margin:.35rem 0 0;color:#334155;font-size:.88rem;font-weight:600}
.actpub-item p{margin:.35rem 0 0;color:#334155}
@media (max-width:760px){
    .actpub-hero{padding:1rem}
    .actpub-hero-meta{margin-top:.75rem}
    .actpub-calendar{grid-template-columns:repeat(2,minmax(0,1fr));padding:.6rem}
    .actpub-dayname:nth-child(n+3){display:none}
    .actpub-item{grid-template-columns:1fr}
    .actpub-item img{width:100%;height:160px}
    .actpub-list-head{align-items:flex-start}
}
