/* Estilos específicos de publicaciones.php.
 * Se mantienen fuera de la vista para no contaminar header.php ni footer.php.
 * La estructura, espaciado y responsive principal se resuelven con Tailwind;
 * estas reglas cubren únicamente tarjetas heredadas y ajustes de Swiper.
 */
    /* ==========================================================================
       PUBLICACIONES - estilos propios de esta vista
       ========================================================================== */
    .publicaciones-page {
        background: #EEEEEE;
    }

    .publicaciones-page h2.titulo-seccion {
        font-weight: 600;
        color: #4D5959;
        margin: 0 0 22px;
        font-size: 24px;
    }

    .publicaciones-page .container mx-auto {
        max-width: 1170px;
        margin: 0 auto;
        padding: 0 20px;
    }

    /* Botón naranja reutilizable */
    .btn-naranja {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #F0703C;
        color: #fff !important;
        text-decoration: none !important;
        font-size: 14px;
        font-weight: 600;
        padding: 11px 20px;
        border-radius: 4px;
        transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
        box-shadow: 0 2px 6px rgba(0,0,0,0.12);
        border: none;
        cursor: pointer;
    }

    .btn-naranja .flecha {
        transition: transform 0.2s ease;
        display: inline-block;
    }

    .btn-naranja:hover,
    .btn-naranja:focus {
        background: #d9541f;
        color: #fff !important;
        transform: translateY(-2px);
        box-shadow: 0 6px 14px rgba(217, 84, 31, 0.4);
        outline: none;
    }

    .btn-naranja:hover .flecha {
        transform: translateX(4px);
    }

    .btn-naranja-sm {
        padding: 8px 16px;
        font-size: 13px;
    }

    /* --- Carrusel genérico (arrastrar con mouse / dedo + flechas) ---------- */
    .carrusel-outer {
        position: relative;
        padding: 0 42px;
    }

    .carrusel-track {
        display: flex;
        gap: 18px;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding: 4px 2px 10px;
        cursor: grab;
        user-select: none;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .carrusel-track::-webkit-scrollbar {
        display: none;
    }

    /* Fila simple (sin flechas ni scroll) para Trabajos de Alumnos y
       Monografías: como son como máximo 5 tarjetas por año, no hace
       falta slider -- se acomodan solas en la caja del contenedor. */
    .cards-row {
        display: flex;
        flex-wrap: wrap;
        gap: 18px;
    }

    .carrusel-track.arrastrando {
        cursor: grabbing;
        scroll-behavior: auto;
    }

    .carrusel-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: rgba(0,0,0,0.08);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.2s ease;
        z-index: 3;
    }

    .carrusel-arrow:hover {
        background: rgba(0,0,0,0.16);
    }

    .carrusel-arrow svg {
        width: 14px;
        height: 14px;
        stroke: #333;
        fill: none;
        stroke-width: 2.5;
    }

    .carrusel-arrow-prev {
        left: 0;
    }

    .carrusel-arrow-next {
        right: 0;
    }

    /* En fondos oscuros/de color, las flechas pasan a blancas */
    .carrusel-oscuro .carrusel-arrow {
        background: rgba(255,255,255,0.18);
    }

    .carrusel-oscuro .carrusel-arrow:hover {
        background: rgba(255,255,255,0.32);
    }

    .carrusel-oscuro .carrusel-arrow svg {
        stroke: #fff;
    }

    /* ==========================================================================
       ANUARIOS
       ========================================================================== */
    .anuarios-section {
        background: #EEEEEE;
        padding: 34px 0 44px;
    }

    .anuario-hero-card {
        background: #ffffff;
        border-radius: 6px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        display: flex;
        gap: 26px;
        align-items: center;
        padding: 22px;
        max-width: 560px;
        margin-bottom: 40px;
    }

    .anuario-hero-img {
        flex: 0 0 auto;
        width: 175px;
        aspect-ratio: 240 / 332;
        overflow: hidden;
        border-radius: 2px;
        box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    }

    .anuario-hero-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .anuario-hero-body h2 {
        font-size: 22px;
        font-weight: 700;
        color: #333;
        margin: 0 0 6px;
    }

    .anuario-hero-body p {
        font-size: 15px;
        color: #666;
        margin: 0 0 16px;
        line-height: 1.4;
    }

    .anuarios-anteriores-titulo {
        font-size: 20px;
        font-weight: 600;
        color: #4D5959;
        margin: 0 0 18px;
    }

    .anuario-card {
        flex: 0 0 175px;
        background: #ffffff;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.10);
        padding: 12px 12px 16px;
        display: flex;
        flex-direction: column;
        scroll-snap-align: start;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .anuario-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.18);
    }

    .anuario-card-img {
        aspect-ratio: 240 / 332;
        border-radius: 3px;
        overflow: hidden;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
    }

    .anuario-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

    .anuario-card:hover .anuario-card-img img {
        transform: scale(1.05);
    }

    .anuario-card-body {
        flex: 1 0 auto;
        margin-bottom: 12px;
    }

    .anuario-card-body h3 {
        font-size: 16px;
        font-weight: 700;
        color: #333;
        margin: 0 0 6px;
    }

    .anuario-card-body p {
        font-size: 12.5px;
        color: #777;
        line-height: 1.4;
        margin: 0;
    }

    /* ==========================================================================
       LIBRO 40 AÑOS - se deja tal cual el original (mismo bloque/estilos)
       ========================================================================== */
    .libro40-wrap {
        background: #ffffff;
        padding: 0 0 44px;
        overflow: hidden;
        position: relative;
        z-index: 2;
    }

    .documentos-section {
        position: relative;
        z-index: 1;
    }

    /* ==========================================================================
       DOCUMENTOS
       ========================================================================== */
    .documentos-section {
        background: #D9D9D9;
        padding: 34px 0 44px;
    }

    .documento-card {
        flex: 0 0 380px;
        background: #ffffff;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        display: flex;
        gap: 16px;
        padding: 16px;
        scroll-snap-align: start;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }

    .documento-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 20px rgba(0,0,0,0.18);
    }

    .documento-card-img {
        flex: 0 0 100px;
        height: 130px;
        border-radius: 3px;
        overflow: hidden;
        box-shadow: 0 2px 8px rgba(0,0,0,0.18);
        background: #f2f2f2;
    }

    .documento-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .documento-card-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
    }

    .documento-card-body h4 {
        font-size: 14.5px;
        font-weight: 700;
        color: #222;
        margin: 0 0 6px;
        text-transform: uppercase;
    }

    .documento-card-body p {
        font-size: 13px;
        color: #555;
        line-height: 1.5;
        margin: 0 0 10px;
        flex: 1 0 auto;
    }

    .documento-card-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex-wrap: nowrap;
    }

    .documento-fecha {
        font-size: 12.5px;
        font-weight: 600;
        color: #333;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .documento-card-footer .btn-naranja {
        flex: 0 0 auto;
        margin-left: auto;
    }

    /* ==========================================================================
       TRABAJOS DE ALUMNOS / MONOGRAFÍAS (tarjetas de color)
       ========================================================================== */
    .trabajos-section {
        background: #ffffff;
        padding: 34px 0 20px;
    }

    .monografias-section {
        background: #EEEEEE;
        padding: 34px 0 44px;
    }

    .grupo-badge {
        display: inline-block;
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        letter-spacing: 0.3px;
        padding: 10px 18px;
        border-radius: 4px;
        margin-bottom: 14px;
    }

    .grupo-badge-verde {
        background: #1E9E63;
    }

    .grupo-badge-teal {
        background: #1B7A8C;
    }

    .grupo-meta {
        font-size: 13.5px;
        color: #333;
        margin: 0 0 18px;
    }

    .grupo-meta b {
        font-weight: 700;
    }

    .subgrupo-titulo {
        font-size: 14px;
        font-weight: 700;
        color: #444;
        text-transform: uppercase;
        margin: 26px 0 14px;
    }

    .trabajo-card,
    .monografia-card {
        flex: 0 0 210px;
        border-radius: 6px;
        padding: 18px 16px;
        color: #fff !important;
        text-decoration: none !important;
        display: flex;
        flex-direction: column;
        min-height: 190px;
        scroll-snap-align: start;
        transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, color 0.2s ease;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    }

    .trabajo-card {
        background: linear-gradient(135deg, #1E8F5B 0%, #3CAE7C 100%);
    }

    .monografia-card {
        background: linear-gradient(135deg, #15697A 0%, #2E93A8 100%);
    }

    .trabajo-card:hover,
    .monografia-card:hover {
        color: #e8e8e8 !important;
        transform: translateY(-4px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.28);
        filter: brightness(1.06);
    }

    .card-rule {
        width: 22px;
        height: 3px;
        background: rgba(255,255,255,0.7);
        margin-bottom: 12px;
        border-radius: 2px;
    }

    .card-titulo {
        font-size: 13.5px;
        font-weight: 700;
        line-height: 1.35;
        margin-bottom: auto;
        padding-bottom: 14px;
    }

    .card-autores {
        font-size: 12px;
        line-height: 1.5;
        opacity: 0.95;
        margin-bottom: 10px;
    }

    .card-anio {
        align-self: flex-start;
        background: rgba(255,255,255,0.22);
        font-size: 11.5px;
        font-weight: 700;
        letter-spacing: 0.3px;
        padding: 5px 12px;
        border-radius: 3px;
    }

    .card-vacia {
        flex: 1 1 100%;
        min-height: 100px;
        border: 1px dashed #bbb;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        color: #888;
        font-size: 13.5px;
        line-height: 1.5;
        padding: 20px;
        background: rgba(255,255,255,0.4);
    }

    /* ==========================================================================
       BIBLIOTECA DIGITAL
       ========================================================================== */
    .biblioteca-section {
        background: #1A2A3A;
        color: #fff;
        padding: 40px 0;
    }

    .biblioteca-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 40px;
    }

    .biblioteca-col-izq {
        flex: 1 1 380px;
    }

    .biblioteca-col-izq h2 {
        font-size: 24px;
        font-weight: 700;
        margin: 0 0 14px;
        color: #fff;
    }

    .biblioteca-col-izq p {
        font-size: 14.5px;
        color: #C9D2DA;
        line-height: 1.7;
        margin: 0 0 22px;
    }

    .biblioteca-botones {
        display: flex;
        flex-wrap: wrap;
        gap: 14px;
    }

    .btn-biblioteca-mail {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.25);
        color: #fff !important;
        text-decoration: none !important;
        font-size: 14px;
        font-weight: 600;
        padding: 11px 20px;
        border-radius: 4px;
        transition: background-color 0.2s ease, transform 0.15s ease;
    }

    .btn-biblioteca-mail:hover {
        background: rgba(255,255,255,0.14);
        transform: translateY(-2px);
    }

    .biblioteca-col-der {
        flex: 1 1 320px;
    }

    .biblioteca-col-der h3 {
        font-size: 15px;
        font-weight: 700;
        margin: 0 0 14px;
        color: #fff;
    }

    .biblioteca-servicios {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .biblioteca-servicios li {
        font-size: 14px;
        color: #C9D2DA;
        padding-left: 22px;
        position: relative;
        margin-bottom: 10px;
    }

    .biblioteca-servicios li:before {
        content: '→';
        position: absolute;
        left: 0;
        color: #F0703C;
    }

    /* ==========================================================================
       LIBROS
       ========================================================================== */
    .libros-section {
        background: #ffffff;
        padding: 34px 0 50px;
    }

    .libro-card {
        display: flex;
        gap: 30px;
        background: #fff;
        border-radius: 6px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 26px;
        margin-bottom: 26px;
        flex-wrap: wrap;
    }

    .libro-card-img {
        flex: 0 0 220px;
    }

    .libro-card-img img {
        width: 100%;
        display: block;
        box-shadow: 0 6px 18px rgba(0,0,0,0.25);
        border-radius: 2px;
    }

    .libro-card-body {
        flex: 1 1 380px;
    }

    .libro-card-etiqueta {
        font-size: 12px;
        font-weight: 700;
        color: #F0703C;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        margin-bottom: 8px;
    }

    .libro-card-body h3 {
        font-size: 19px;
        font-weight: 700;
        color: #222;
        margin: 0 0 12px;
    }

    .libro-card-body p {
        font-size: 14px;
        color: #555;
        line-height: 1.7;
        margin: 0 0 20px;
    }

    .libro-card-botones {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
    }

    .btn-outline {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: #fff;
        border: 1px solid #0575AB;
        color: #0575AB !important;
        text-decoration: none !important;
        font-size: 14px;
        font-weight: 600;
        padding: 10px 18px;
        border-radius: 4px;
        transition: background-color 0.2s ease, transform 0.15s ease;
    }

    .btn-outline:hover {
        background: #0575AB;
        color: #fff !important;
        transform: translateY(-2px);
    }

    @media (max-width: 700px) {
        .documento-card {
            flex-direction: column;
            flex-basis: 260px;
        }

        .documento-card-img {
            width: 100%;
            flex-basis: 140px;
        }

        .libro-card {
            flex-direction: column;
        }

        .libro-card-img {
            flex: 0 0 auto;
            max-width: 220px;
        }
    }


                    .libro40-section {
                        background-color: #e8e8e8;
                        border-radius: 10px;
                        box-shadow: 0 4px 18px rgba(0,0,0,0.10);
                        padding: 45px 30px;
                        display: flex;
                        align-items: center;
                        flex-wrap: nowrap;
                    }
                    .libro40-book-col {
                        margin-bottom: 20px;
                        text-align: left;
                    }
                    .libro40-links-col {
                        display: flex;
                        align-items: center;
                        flex-wrap: nowrap;
                        margin-bottom: 20px;
                    }
                    .libro40-thumb-book {
                        width: 100%;
                        border: 0px solid #ccc;
                        box-shadow: 0 15px 35px rgba(0,0,0,0.3);
                    }
                    .libro40-item {
                        color: #1a1a1a;
                        display: inline-block;
                    }
                    .libro40-item:hover,
                    .libro40-item:focus {
                        color: #1a1a1a;
                        text-decoration: none;
                    }
                    .libro40-thumb-carpeta {
                        max-width: 80%;
                        margin: 0 auto 15px auto;
                        box-shadow: 0 10px 25px rgba(0,0,0,0.25);
                    }
                    .libro40-thumb-formulario {
                        max-width: 60%;
                        margin: 0 auto 15px auto;
                        box-shadow: 0 10px 25px rgba(0,0,0,0.25);
                    }
                    .libro40-item h3 {
                        font-size: 1.1em;
                        font-weight: 600;
                        margin: 0;
                        line-height: 1.3;
                    }
                    @media screen and (max-width: 767px) {
                        .libro40-book-col {
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            width: 100%;
                        }
                        .libro40-links-col {
                            margin-top: 20px
                        }
                        .libro40-section {
                            padding: 30px 15px;
                        }
                        .libro40-thumb-book {
                            width: 45%;
                        }
                        .libro40-thumb-carpeta,
                        .libro40-thumb-formulario {
                            max-width: 60%;
                            margin-top: 50px;
                        }
                    }
                
/* Swiper: cada carrusel de publicaciones tiene controles independientes. */
.publicaciones-page .publicaciones-swiper { overflow: hidden; }
.publicaciones-page .publicaciones-swiper .swiper-wrapper { align-items: stretch; }
.publicaciones-page .publicaciones-swiper .swiper-slide { height: auto; box-sizing: border-box; }
.publicaciones-page .publicaciones-swiper-anuarios .swiper-slide { width: 175px; }
.publicaciones-page .publicaciones-swiper-documentos .swiper-slide { width: 380px; }
.publicaciones-page .publicaciones-swiper .swiper-pagination { position: static; margin-top: 1rem; }
.publicaciones-page .publicaciones-swiper .swiper-button-prev,
.publicaciones-page .publicaciones-swiper .swiper-button-next { color: #0575AB; }
.publicaciones-page .publicaciones-swiper .swiper-button-prev::after,
.publicaciones-page .publicaciones-swiper .swiper-button-next::after { font-size: 1.35rem; font-weight: 700; }
@media (max-width: 700px) {
    .publicaciones-page .publicaciones-swiper-anuarios .swiper-slide { width: 175px; }
    .publicaciones-page .publicaciones-swiper-documentos .swiper-slide { width: 260px; }
}
