/* ==========================================================================
   1. RESET, VARIABLES & UTILIDADES GENERALES (.portal-nvo)
   ========================================================================== */
html{
    overflow-x: hidden;
}
.portal-nvo {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #333;
}

.portal-nvo * { 
    box-sizing: border-box; 
}

.portal-nvo a { 
    text-decoration: none !important; 
    color: inherit;
}

/* Animaciones */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.audience-tabs, 
.quick-access, 
.quick-access-layout,
.news-modern-container, 
.carousel-container, 
.banner-slider, 
.video-card, 
.stat-item, 
.card-link, 
.carousel-inner, 
.card-image, 
.enterate-swiper, 
.container-portal, 
.filter-tabs, 
.event-card {
    animation: fadeUp 0.7s 0.4s ease both;
}

/* Clases de Bootstrap adaptadas / Utilidades */
.portal-nvo .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pt-32{
    padding-top: 32px;
}

.pb-32{
    padding-bottom: 32px;
}

.pt-20{
    padding-top: 20px;;
}

.section-header{
    display:flex;
    align-items:center;
    gap:20px;
    margin-bottom:20px;
    
}

.section-title{
    margin:0;
    white-space:nowrap;

    font-size:2rem;
    font-weight:700;
    color:#7d1c1c;
}

/* Línea */
.section-line{
    flex:1;
    height:1px;
    background:#e3e3e3;
    margin-bottom: 0px;
}   

/* Ver más */
.section-more{
    white-space:nowrap;

    display:flex;
    align-items:center;
    gap:8px;

    color:#8c1c1c !important;
    font-weight:600;
    font-size:15px;
    transition:.25s;
    margin-bottom: 0px;
}

.section-more:hover{
    color:#af1c1c !important;
    text-decoration:none;
}

.section-more i{
    transition:.25s;
}

.section-more:hover i{
    transform:translateX(4px);
}

@media (max-width:768px){

    .section-header{
        flex-wrap:wrap;
        gap:10px;
        margin-bottom:18px;
    }

    .section-title{
        width:100%;
        font-size:1.6rem;
    }

    .section-line{
        display:none;
    }

    .section-more{
        margin-left:0;
        font-size:14px;
    }

}

.portal-nvo .px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.portal-nvo .pt-3 { padding-top: 1rem !important; }
.portal-nvo .pb-3 { padding-bottom: 1rem !important; }
.portal-nvo .mt-0 { margin-top: 0 !important; }
.portal-nvo .mt-3 { margin-top: 1rem !important; }
.portal-nvo .ms-2 { margin-left: 0.5rem !important; }
.portal-nvo .me-0 { margin-right: 0 !important; }
.portal-nvo .me-2 { margin-right: 0.5rem !important; }
.portal-nvo .mx-2 { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
.portal-nvo .text-end { text-align: right !important; }

.d-flex {
    display: flex !important;
    flex-direction: row;
    flex-wrap: wrap;  
}

.p-3 {
    padding: 9px;
}

.ms-auto, .ml-auto { margin-left: auto !important; }
.me-auto, .mr-auto { margin-right: auto !important; }

.container, .container-fluid {
    padding: 0px;
}

@media (min-width: 768px) {
    .container { width: 100%; }
}
@media (min-width: 992px) {
    .container { width: 100%; }
}
@media (min-width: 1200px) {
    .container { width: 100%; }
}

/* ==========================================================================
   2. HEADER, MENÚ DE NAVEGACIÓN Y DROPDOWNS
   ========================================================================== */
#navigation {
    background: #ffffff;
    border-top: none;
    border-bottom: 1px solid #d8d8d8;
    box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 12px rgba(0,0,0,.05);
}

/* Enlaces principales .menu--portal-2 */
.menu--portal-2 > li > a {
    color: #7d1c1c !important;
    height: 56px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 20px !important;
    font-size: 14px;
    letter-spacing: .5px;
    font-weight: 600;
    transition: all .25s ease;
    position: relative;
}

.menu--portal-2 > li > a::after {
    content: '';
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 8px;
    height: 3px;
    background: #7d1c1c;
    transform: scaleX(0);
    transition: .25s ease;
}

/* Hover, active y open de la navegación */
.menu--portal-2 > li > a:hover,
.menu--portal-2 > li.open > a,
.menu--portal-2 > li.active > a {
    background: #7d1c1c !important;
    color: #ffffff !important;
}

.menu--portal-2 > li > a:hover::after {
    transform: scaleX(1);
}

/* Flechas dropdown (Caret) */
.menu--portal-2 > li > a .caret {
    border-top-color: #7d1c1c;
    transition: .25s;
}

.menu--portal-2 > li > a:hover .caret,
.menu--portal-2 > li.open > a .caret {
    border-top-color: #ffffff;
}

.caret {
    border: 0;
    width: auto;
    height: auto;
    margin-left: 6px;
}

.caret::before {
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Menú colapsado lateral u otros bloques específicos */
div.region.region-sidebar-second nav#block-mainnavigation ul.menu.menu--portal-2.nav.navbar-nav li {
    display: block;
    float: none;
    width: 100%;
    text-align: left;
    font-family: "Montserrat", sans-serif;
    line-height: 30px;
    border-bottom: 1px dashed;
}

ul.menu.menu--portal-2.nav.navbar-nav > li:last-child {
    display: none !important;
}

@media (min-width: 760px) {
    .menu--portal-2 {
        display: flex;
        justify-content: center;
        align-items: center;
        align-content: center;
        flex-wrap: wrap;
    }
}

/* Comportamiento general de los Dropdowns */
.dropdown-menu {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all .3s ease;
    pointer-events: none;
    background-color: #fff !important;
}

.dropdown-menu li {
    position: relative;
    border-bottom: 1px solid #f6f8fa !important;
}

.dropdown-menu > li > a {
    color: #002d4b !important;
    width: 250px;
    text-wrap: auto;
}

/* Sub-dropdowns (Segundo nivel en adelante) */
.dropdown-menu .dropdown-menu {
    left: 100%;
    top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all .3s ease;
    pointer-events: none;
}

.dropdown-menu > li.expanded > a::after {
    content: "\f105";
    font-family: "Font Awesome 6 Free";
    font-weight: 600;
    margin-left: 6px;
    font-size: 12px;
}

/* Estados disparados de Dropdowns (.open y :hover) */
.open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu > .dropdown:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Hovers específicos de enlaces de menús específicos */
nav#block-drudg8b3-portal2-menu ul.menu.menu--portal-2.nav.navbar-nav li.expanded.dropdown ul.dropdown-menu li a:hover,
nav#block-drudg8b3-portal2-menu ul.menu.menu--main.nav.navbar-nav li.expanded.dropdown ul.dropdown-menu li a:hover {
    background-color: #fff !important;
    color: #980e0e !important;
}

/* ==========================================================================
   3. HERO BANNER, CAROUSEL, CARDS PORTAL NUEVO
   ========================================================================== */
.portal-nvo .top-bar {
    background: #1a1a2e;
    color: #fff;
    font-size: 12px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 4px 10px;
    gap: 0;
}
.portal-nvo .top-bar a {
    color: #fff;
    padding: 4px 10px;
    border-left: 1px solid #444;
    font-size: 12px;
}
.portal-nvo .top-bar a:first-child { border-left: none; }
.portal-nvo .top-bar .udg-logo {
    background: #003087;
    padding: 4px 12px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 1px;
}

.portal-nvo .header-udeg {
    background: #04365d;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 35px;
    position: relative;
}
.portal-nvo .header-udeg .udeg-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.portal-nvo .logog {
    height: 55px;
    position: relative;
    top: 10px;
    z-index: 10;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,.3));
}
.portal-nvo .udeg-brand img { height: 40px; }
.portal-nvo .udeg-brand .brand-text { text-align: left; }

/* Hero Banner */
.portal-nvo .hero-banner {
    background: linear-gradient(135deg, #001a4d 0%, #003087 40%, #0052cc 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    height: 50vh;
}
.portal-nvo .imagen-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.portal-nvo .institution-bar {
    background: #993300;
    color: #fff;
    text-align: center;
    padding-top: 16px;
    font-size: 18px;
    font-weight: 400;
    text-transform: uppercase;
}

/* Nav Main del Portal Nuevo */
.portal-nvo nav.main-nav {
    background: #6b2400;
    border-top: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 6px 10px rgba(2, 34, 71, 0.07);
}
.portal-nvo nav.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
}
.portal-nvo nav.main-nav ul li a {
    display: block;
    color: #fff;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s;
}
.portal-nvo nav.main-nav ul li a:hover,
.portal-nvo nav.main-nav ul li.active a {
    background: rgba(0,0,0,0.2);
}

/* Audience Tabs */
.portal-nvo .audience-tabs {
    display: flex;
    justify-content: center;
    background: #f3d0cc;
    border-radius: 0px;
    margin: 3vh 20% -3vh;
    margin-top: 5vh;
    box-shadow: 0 3px 10px rgb(122 7 7 / 20%) !important;
    animation: fadeUp 0.7s 0.4s ease both;
}
.portal-nvo .audience-tabs a {
    color: #8c1c1c;
    padding: 8px 30px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
    border-right: 1px solid rgba(255,255,255,0.2);
}
.portal-nvo .audience-tabs a:first-child { border-left: 1px solid rgba(255,255,255,0.2); }
.portal-nvo .audience-tabs a:hover { background: rgba(255,255,255,0.1); }

/* Grid de Tarjetas (Container-Portal) */
.portal-nvo .container-portal {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    font-family: 'Montserrat';
    margin-top: 5vh;
}

.portal-nvo .card-link {
    text-decoration: none;
    color: white !important;
}

.portal-nvo .card-main {
    color: white !important;
    width: 100%;
    height: 200px;
    background-size: cover !important;
    background-position: center;
    border-radius: 0px !important;
    padding: 0;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2); 
}

.portal-nvo .overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 18px;
    transition: .3s all;
    background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, .5) 30%, rgba(0, 0, 0, 0) 60%);
}

.portal-nvo .card-text {
    font-size: 1.3rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: .5px;
    color: white;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* Efectos Hover Cards */
.portal-nvo .card-link:hover .card {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.portal-nvo .card-link:hover .overlay {
    background-color: rgb(125 28 28 / 50%);
}

.portal-nvo .card-link:hover .card-text {
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8), 0 0 20px rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* Sección de Títulos y Divisores */
.portal-nvo .section-title {
   
    margin-bottom: 0px;
    margin-top: 0px;
    
    position: relative;
    animation: fadeUp 0.7s 0.4s ease both;

    border-left: 4px solid #8B1D1D !important;
    padding-left: 12px !important;
    line-height: 1.1 !important;
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    border-radius: 0px;
}

/*
.portal-nvo .section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    height: 65%;
    width: 5px;
    background-color: #8B0000;
}*/

.portal-nvo .udg-divider {
    border: none;
    border-top: 1px solid var(--udg-gray-border);
    margin: 0;
}

/* ==========================================================================
   4. EVENT CARDS, NOTICIAS, SLIDERS Y CAROUSELS (GENÉRICOS & ESPECÍFICOS)
   ========================================================================== */
/* Tarjetas de Eventos (.event-card) */
.event-card {
    width: 260px !important;
    height: 100%;
    overflow: hidden;
    border-radius: 0px;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    border:1px solid #f3f3f3;
}

.event-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0;
}

.event-card img {
    margin-left: auto;
    margin-right: auto;
}

#convocatorias .event-card, 
#actividades .event-card, 
#becas .event-card {
    height: -webkit-fill-available !important;
}

/* Título de Tarjetas */
.card-title {
    padding:10px 18px 0;

    /*font-size:20px;*/
    font-weight:700;
    color:#202020;

    line-height:1.35;

    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;

    overflow:hidden;

    min-height:55px;
}


.event-card .card-title{
    font-size:14px;
    line-height:1.5;

    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;

    overflow:hidden;

    height:calc(74px);
}


/* Fecha de Tarjetas */
.card-date {
    font-size: .9rem;
    color: #7b8aa0;
    padding: 0 1.5rem 1rem;
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: auto;
}

.card-date i {
    font-size: .8rem;
}

/* Tarjetas de imágenes */
.card-image, .event-image {
    height: 185px;
    position: relative;
    overflow: hidden;
}

.card-image img, .event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: .45s;
    display: block;
}

/* Grid de Eventos */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.cards-grid .event-card {
    width: 350px;
}

/* --- Estilos Encapsulados de Eventos (.portal-nvo) --- */
.portal-nvo .event-card.card {
    flex: 0 0 calc(25% - 15px);
    border-radius: 0px;
    overflow: hidden;
    padding: 0 !important;
    transition: all 0.3s ease;
}

.portal-nvo .event-card.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 40px rgba(0,0,0,.15);
}

.event-card:hover .card-image img{
    transform: scale(1.06);
}

.event-card:hover .card-title{
    color: #8B0000;
}

.portal-nvo .event-card .img-news {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/*.portal-nvo .event-card .card-title {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
}*/


.portal-nvo .event-card .card-date {
    display:flex;
    align-items:center;
    gap:6px;

    color:#333333;
    font-size:13px;

    padding:16px 18px 0;
}

.card-date i{
    color:#8B0000;
}

/* Badges de Categorías */
.portal-nvo .badge-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #8c1c1c;
    color: #fff;
    padding: 6px 12px;
    border-radius: 0px;
    font-size: 11px;
    font-weight: 700;
    z-index: 10;
}

.portal-nvo .event-card .badge-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #8c1c1c;
    color: #fff;
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 0px;
    font-weight: 700;
    z-index: 10;
}

.portal-nvo .badge-actividades,
.portal-nvo .badge-becas,
.portal-nvo .badge-convocatorias {
    background: #8c1c1c;
}


.read-more{
    margin-top:auto;

    padding:18px;

    font-size:14px;
    font-weight:700;

    color:#7b1113;
}

.read-more a{
    color:inherit;
    text-decoration:none;
}

.read-more i{
    transition:.25s;
}

.event-card:hover .read-more i{
    transform:translateX(4px);
}

/* Swiper Enterate */
.enterate-swiper {
    position: relative;
    padding: 0 50px;
    margin-top: 2vh;
}

.enterate-swiper .swiper-slide {
    height: auto;
    width: auto !important;
    padding: 0 12px;
    box-sizing: border-box;
}

.enterate-swiper .swiper-button-prev,
.enterate-swiper .swiper-button-next {
    color: #7a5b3a;
}

/* Slides */
.slides {
    height: 30vh;
}

.slides > li {
    margin-right: 2vh !important;
    margin-top: 2vh !important;
    transition: all .3s;
}

.slides > li:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
}

.slides img {
    border-radius: 0px !important;
}

/* Carrusel Genérico (Eventos + Libros) */
.portal-nvo .carousel-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 0 0px;
    box-sizing: border-box;
}

.portal-nvo .carousel-track {
    display: flex;
    gap: 20px;
    transition: transform 0.6s ease-in-out;
    will-change: transform;
}

.portal-nvo .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border: none;
    border-radius: 0px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    z-index: 100;
    transition: background .2s;
}

.portal-nvo .carousel-arrow.left  { left: 0; }
.portal-nvo .carousel-arrow.right { right: 0; }
.portal-nvo .carousel-arrow:hover { background: rgba(0,0,0,.9); }

/* Bootstrap Carousel Controls */
.carousel {
    position: relative;
    overflow: visible;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #8b1d1d85 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    text-shadow: none;
    background-image: none !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 50;
}

.carousel-control.left  { left: -28px; }
.carousel-control.right { right: -28px; }

.carousel-control .glyphicon {
    display: none;
}

.carousel-control::before {
    content: '';
    width: 10px;
    height: 10px;
    border-top: 3px solid #631616;
    border-right: 3px solid #631616;
}

.carousel-control.left::before  { transform: rotate(-135deg); }
.carousel-control.right::before { transform: rotate(45deg); }

.carousel-control:hover {
    background: #f5f5f5 !important;
    transform: translateY(-50%) scale(1.05);
    transition: .25s ease;
}

.portal-nvo .carousel-inner > .item > a > img, 
.carousel-inner > .item > img {
    border-radius: 0px !important;
}

.carousel-control.left, .carousel-control.right {
    margin-right: 4vh !important;
    margin-left: 4vh !important;
}

.flexslider {
    background-color: #ffffff00;
    border-color: #ffffff00 !important;
}

/* Banner Slider "Entérate" */
.portal-nvo .banner-slider {
    position: relative;
    overflow: hidden;
    width: 100%;
    max-height: 50vh;
}

.portal-nvo .banner-track {
    display: flex;
    transition: transform 0.5s ease;
}

.portal-nvo .banner-slide {
    min-width: 100%;
    padding: 0 40px;
    box-sizing: border-box;
    margin-top: auto;
    margin-bottom: auto;
    max-height: 50vh;
}

.portal-nvo .banner-slide img {
    width: 100%;
    border-radius: 0px;
    display: block;
    max-height: 50vh;
    object-fit: contain;
    object-position: center center;
}

.portal-nvo .banner-slider .carousel-arrow { top: 45%; }
.portal-nvo .banner-slider .dots { margin-top: 10px; }

/* Dots de Navegación */
.portal-nvo .dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 15px 0;
}

.portal-nvo .dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background .3s, transform .3s;
}

.portal-nvo .dots span.active {
    background: #993300;
    transform: scale(1.2);
}

/* Libros (Sección) */
.portal-nvo .book {
    flex: 0 0 calc(25% - 15px);
    margin-left: 5px;
    margin-right: 5px;
}

.portal-nvo .book img { 
    width: 100%; 
    height: 365px; 
    object-fit: cover; 
    border-radius: 0px; 
    display: block; 
}

.portal-nvo .book-cover {
    position: relative;
    overflow: hidden;
    border-radius: 0px;
}

.portal-nvo .book-cover img {
    width: 100%;
    height: 365px;
    object-fit: cover;
    display: block;
    border-radius: 0px;
}

.portal-nvo .book-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.6) 40%, rgba(0,0,0,0.0) 100%);
    display: flex;
    align-items: flex-end;
    padding: 15px;
    border-radius: 0px;
}

.portal-nvo .book-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
    position: relative;
    padding-bottom: 8px;
}

.portal-nvo .book-title::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background: #8c1c1c;
    margin-top: 6px;
    border-radius: 0px;
}

.portal-nvo .book-cover:hover img {
    transform: scale(1.05);
    transition: 0.4s ease;
}

.portal-nvo .book-cover:hover .book-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, rgba(0,0,0,0.1) 100%);
}

/* ==========================================================================
   5. MODULOS: NOTICIAS DESTACADAS Y MODERNAS
   ========================================================================== */
.portal-nvo .news-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.portal-nvo .news-slider {
    overflow: hidden;
    width: 100%;
    padding: 10px 0;
}

.portal-nvo .news-track {
    display: flex;
    gap: 14px;
    transition: transform 0.6s ease;
}

.portal-nvo .news-card {
    min-width: calc(25% - 10px);
    max-width: calc(25% - 10px);
    flex-shrink: 0;
    cursor: pointer;
    padding: 0 !important;
}

.portal-nvo .news-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.portal-nvo .img-news {
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
}

/*.portal-nvo .card-title { font-weight: 700; font-size: 20px; }*/
.portal-nvo .card-date  { font-weight: 500; color: #8c1c1c; font-size: 12px; }

/* Controles de Slider de Noticias */
.portal-nvo .slider-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #8c1c1c;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    cursor: pointer;
    z-index: 5;
    transition: .3s;
    flex-shrink: 0;
}
.portal-nvo .slider-btn:hover { background: #8c1c1c; color: white; }
.portal-nvo .slider-btn.prev  { margin-right: 10px; }
.portal-nvo .slider-btn.next  { margin-left: 10px; }

/* Sección Noticias Modernas (Diseño 2 columnas) */
.portal-nvo .news-modern-container {
    display: grid;
    grid-template-columns: 2.3fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.portal-nvo .news-featured {
    position: relative;
    height: 320px;
    overflow: hidden;
    border-radius: 0px;
}

.portal-nvo .news-featured .news-list-card {
    height: 100%;
}

.portal-nvo .news-featured .news-image {
    height: 100%;
}

.portal-nvo .news-featured .news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.portal-nvo .news-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0.2));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
}

.portal-nvo .badge-featured {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #8c1c1c;
    color: white;
    padding: 4px 12px;
    border-radius: 0px;
    font-size: 11px;
    letter-spacing: 0.5px;
    font-weight: bold;
}

.portal-nvo .news-featured-content h3 {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin: 5px 0 0;
}

.portal-nvo .news-date {
    color: #ddd;
    font-size: 12px;
}

.portal-nvo .news-arrow {
    position: absolute;
    right: 15px;
    bottom: 15px;
    width: 40px;
    height: 40px;
    background: white;
    color: #8c1c1c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Columna Derecha: Lista de Noticias */
.portal-nvo .news-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.portal-nvo .news-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.portal-nvo .news-list-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0,0,0,.1);
}

.portal-nvo .news-list-item img {
    width: 90px;
    height: 70px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 0px;
}

.portal-nvo .news-list-item p {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
}

.portal-nvo .news-date-small {
    font-size: 11px;
    color: #8c1c1c;
    margin-bottom: 4px;
}

.news-list-item .news-list-card {
    display: flex;
    padding: 0px;
}

.news-list-item .news-list-card .news-image {
    margin: 10px;
}

/* ==========================================================================
   6. ACCESOS RÁPIDOS (QUICK ACCESS CARDS) & FILTROS
   ========================================================================== */
.portal-nvo .quick-access { 
    padding: 0;
    background: #fff; 
}

.quick-access-layout{

    display:grid;
    grid-template-columns:1fr;

    gap:28px;

    align-items:start;

}


.stats-card{

    background:
        radial-gradient(circle at top right,
        rgba(255,255,255,.08) 0,
        rgba(255,255,255,0) 45%),

        linear-gradient(135deg,#8B0000,#B11212);

    border-radius:.5rem;

    padding:28px;

    color:#fff;

    position:relative;

    overflow:hidden;

    box-shadow:0 18px 40px rgba(139,0,0,.18);

}

.stats-card::before{

    content:"";

    position:absolute;

    inset:0;

    background-image:

        linear-gradient(45deg,
        rgba(255,255,255,.03) 25%,
        transparent 25%),

        linear-gradient(-45deg,
        rgba(255,255,255,.03) 25%,
        transparent 25%);

    background-size:90px 90px;

    opacity:.5;

    pointer-events:none;

}

.stats-card .stat-item{

    display:flex;

    align-items:center;

    gap:18px;

    margin-bottom:26px;

    position:relative;

    z-index:2;

}

.stats-card .stat-item:last-child{

    margin-bottom:0;

}

.stats-card i{

    width:52px;
    height:52px;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:rgba(255,255,255,.15);

    border:2px solid rgba(255,255,255,.25);

    font-size:22px;

}

.stats-card h3{

    margin:0;

    font-size:34px;

    font-weight:700;

    color:#fff;

}

.stats-card span{

    opacity:.92;
    font-weight: 500;
    font-size:15px;

}

@media(max-width:992px){

    .quick-access-layout{

        grid-template-columns:1fr;

    }

}



.portal-nvo .cards-grid {
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:18px;

    align-content:start;   /* ← importante */
}

@media (max-width:1200px){

.portal-nvo .cards-grid{
    grid-template-columns:repeat(2,1fr);
}

}

@media (max-width:768px){

.portal-nvo .cards-grid{
    grid-template-columns:repeat(2,1fr);
}

}

@media (max-width:500px){

.portal-nvo .cards-grid{
    grid-template-columns:1fr;
}

}/* ==========================================================================
   NUEVO DISEÑO DE TARJETAS DE ACCESO RÁPIDO (MATERIAL DESIGN 3)
   ========================================================================== */

.portal-nvo .card {
    background: #ffffff;
    /* Mayor radio de curvatura para un look más moderno y orgánico */
    border-radius: 0px !important; 
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #1e293b; /* Gris oscuro elegante, menos agresivo que el negro puro */
    text-decoration: none !important; /* Elimina subrayados por defecto */
    
    /* Estado reposo: plano, limpio y delimitado por un borde sutil */
    border: 1px solid #e2e8f0 !important; 
    box-shadow: none !important; /* Eliminamos la sombra pesada fija */
    
    overflow: hidden;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.2s ease,
                background-color 0.2s ease;
    position: relative;
}

/* Estado Hover (Al pasar el cursor) */
.portal-nvo .card:hover {
    transform: translateY(-3px); /* Elevación sutil */
    border-color: #cbd5e1 !important; /* El borde se oscurece ligeramente */
    background-color: #f8fafc; /* Un tinte de fondo extremadamente sutil */
    
    /* Sombra de elevación moderna: difuminada, suave y de color neutro (no azulada) */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06) !important; 
}

/* Estado Active (Al hacer clic / pulsar) */
.portal-nvo .card:active {
    transform: translateY(-1px); /* Efecto de hundimiento físico */
    background-color: #f1f5f9;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

/* Opcional: Estilo para los títulos dentro de las tarjetas */
.portal-nvo .card h3 {
    font-size: 0.95rem;
    font-weight: 600; /* Peso semibold para mejor legibilidad */
    margin: 0;
    color: #1e293b;
    transition: color 0.2s ease;
}

/* Si quieres que los iconos tengan un contenedor circular plano y unificado */
.portal-nvo .card .icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

/* Pequeña microinteracción en el icono al hacer hover en la tarjeta */
.portal-nvo .card:hover .icon {
    transform: scale(1.05);
}.portal-nvo .card-body:hover > .card-title { 
    color: #af1c1c !important; 
    transition: .3s;
}

.portal-nvo .card-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.portal-nvo .card h3 { font-size: 16px; margin: 0; }
.portal-nvo .card p  { font-size: 13px; color: #6c757d; margin: 0; }

/* Icon Boxes */
.portal-nvo .icon {
    width: 50px;
    height: 50px;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.portal-nvo .icon img { width: 28px; }

.portal-nvo .orange { background: #e07e15; }
.portal-nvo .blue   { background: #053275; }
.portal-nvo .red    { background: #b30d0d; }
.portal-nvo .green  { background: #177946; }
.portal-nvo .gray   { background: #f1f1f1; }
.portal-nvo .purple { background: #6d1eb8; }
.portal-nvo .coffee { background: #976c2a; }
.portal-nvo .lightblue { background: #c8e0f3; }
.portal-nvo .lightyellow { background: #faf5ee; }
.portal-nvo .pdi-color { background: #0B1F3A; }


.portal-nvo .site-arrow {
    font-size: 18px;
    color: #999;
    transition: color 0.2s;
    position: absolute;
    bottom: 15px;
    right: 15px;
}
.portal-nvo .card:hover .site-arrow { color: #c40000; }

/* Colores de Textos del Acceso Rápido */
.portal-nvo .text-moodle,       .portal-nvo .arrow-moodle       { color: #f38c1d; }
.portal-nvo .text-sia,          .portal-nvo .arrow-sia          { color: #053275; }
.portal-nvo .text-biblioteca,   .portal-nvo .arrow-biblioteca   { color: #b30d0d; }
.portal-nvo .text-siga,         .portal-nvo .arrow-siga         { color: #177946; }
.portal-nvo .text-lineamientos, .portal-nvo .arrow-lineamientos { color: #e07e15; }
.portal-nvo .text-fil,          .portal-nvo .arrow-fil          { color: #6d1eb8; }
.portal-nvo .text-informe,      .portal-nvo .arrow-informe      { color: #1b7fcc; }

/* Pestañas de Filtros */
.portal-nvo .filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background: #fff;
    border-radius: 0px;
    margin-left: 2%;
}

.portal-nvo .filter-btn {
    border: none;
    padding: 14px 18px;
    cursor: pointer;
    font-weight: 600;
    transition: all .3s ease;
    font-family: 'Montserrat', sans-serif;
    border-radius: 0px;
    margin: 0;


    background-color: #fff !important; /* Gris claro sutil */
    color: #333333 !important;
    border: 1px solid #D1D5DB;
    border-radius: 0px !important;
    transition: all 0.2s ease;
}

.portal-nvo .filter-btn:hover{
    background-color: #e5e7eb !important;
    color: #af1c1c !important;
}

.portal-nvo .filter-btn:first-child { border-radius: 0px 0 0 .5rem; }
.portal-nvo .filter-btn:last-child  { border-radius: 0 .5rem .5rem 0; }
.portal-nvo .filter-btn.active {
    color: #fff !important;
    background: #7d1c1c !important;
    border-radius: 0px;
}

/* ==========================================================================
   7. BÚSQUEDA (MODERNA & OVERLAY)
   ========================================================================== */
/* Buscador Integrado */
.portal-nvo .search-bar {
    background: #993300;
    padding: 6px 20px 10px;
    display: flex;
    justify-content: center;
}

.portal-nvo .search-form {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.portal-nvo .search-form input {
    width: 100%;
    padding: 6px 10px;
    border-radius: 0px;
    border: 1px solid #333333;
    outline: none;
    font-size: 15px;
    font-family: 'Montserrat', sans-serif;
    background-color: #fff;
    color: #6b2400;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.portal-nvo .search-form input:focus {
    border-color: #003087;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.portal-nvo .search-form input::placeholder {
    color: #6b2400;
}

.portal-nvo .search-form button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    color: #6b2400;
}

.portal-nvo .search-form button:hover {
    color: #003087;
}

#buscador {
    display: none !important;
}

/* Overlay Buscador Pantalla Completa */
#search-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 20vh;
    opacity: 0;
    visibility: hidden;
    background: rgba(0,0,0,.3);
    backdrop-filter: blur(3px);
    transition: all .3s ease;
}

#search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-wrapper {
    width: min(900px, 90vw);
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 auto;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

#overlay-search-input {
    width: 100%;
    height: 70px;
    border: none;
    border-radius: 0px;
    padding-left: 65px;
    font-size: 3rem;
    color: #333333;
    font-weight: 600;
}

#overlay-search-input::placeholder {
    color: #999;
}

.search-icon {
    position: absolute;
    left: 24px;
    top: 42%;
    transform: translateY(-50%);
    color: #777;
    font-size: 3rem;
    opacity: .6;
    pointer-events: none;
}

#search-results {
    margin-top: 15px;
    background: white;
    border-radius: 0px;
    overflow: hidden;
}

.search-result {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.search-result a {
    text-decoration: none;
}

#close-search {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all .25s ease;
}

#close-search i {
    font-size: 1.3rem;
    color: white;
}

#close-search:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg) scale(1.08);
}

#close-search:active {
    transform: scale(.95);
}

/* ==========================================================================
   8. VIDEOS, CONTADORES, FOOTER Y SECCIONES MISCELÁNEAS
   ========================================================================== */
/* Tabs Generales */
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}

/* Videos */
.portal-nvo .video-card {
    background: #1a1a1a;
    color: #fff;
    padding: 0px;
    text-align: center;
    margin-bottom: 8px;
    height: 42vh !important;
    border-radius: 0px !important;
}

.portal-nvo .views-field-field-video-embed .field-content {
    height: 43vh !important;
}

iframe {
    border-radius: 0px !important;
}

/* Contadores / Stats */
.portal-nvo .stats-section { 
    /*padding-top: 60px;*/
    padding-bottom: 60px; 
    margin-top: 60px; 
}

.portal-nvo .stats-container {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    text-align: center;
}

.portal-nvo .stat-item {
    background: #fff;
    padding: 25px 15px;
    border-radius: 0px;
    /*box-shadow: 0 6px 20px rgba(0,0,0,0.08);*/
    transition: 0.3s;
}

.portal-nvo .stat-item:hover { 
    transform: translateY(-5px); 
}

.portal-nvo .stat-item h2 {
    font-size: 34px;
    font-weight: 700;
    color: #8c1c1c;
    margin-bottom: 5px;
    margin-top: 5px;
}

.portal-nvo .stat-item p {
    font-size: 13px;
    color: #555;
}

.stat-item i {
    font-size: 3rem;
    color: #8c1c1c;
    margin-bottom: 0px;
    opacity: .9;
}

/* Botones de Ver Más */
.portal-nvo .more-link {
    color: #8c1c1c !important;
    font-weight: 600;
    background-color: #fff0;
    margin-bottom: 15px;
    margin-top: 1vh !important;
    display: inline-block;
    animation: fadeUp 0.7s 0.4s ease both;
}

.more-link:hover {
    background-color: #f2f2f2 !important;
    color: #8c1c1c !important;
}

.view-footer {
    background-color: #fff0;
    color: #8c1c1c;
    font-weight: 600;
    margin-top: 1vh !important;
}

.view-footer:hover {
    background-color: #f2f2f2 !important;
}

.menu.menu--footer.nav a:hover{
    background: #696969 !important;
}

.view-footer a:hover, 
.view-footer a:focus,
.more-link a:hover, 
.more-link a:focus {
    color: #8c1c1c !important;
}

/* Ocultar elementos huérfanos/legacy */
.block-broken, .precontent3, .page-header, .tabs {
    /*display: none !important;*/
}

@media (max-width:768px){

.region.region-precontent .name{
    margin-bottom: 16px;
    margin-top: 0px;
    padding-left: 8px;
    padding-right: 8px;

}

}

#precontent {
    background-color: #7d1c1c;
}

/* Redes Sociales Header */
.redes-sociales-header img {
    margin-right: 0px;
}

@media (min-width: 1200px) {
    .redes-sociales-header {
        display: flex !important;
        padding: 5px 5px;
        position: relative;
        right: -75%;
        z-index: 50;
        max-width: 600px;
        background-color: #032e4a;
        border-radius: 0px 0px .5rem .5rem;
        top: -40px;
    }
    .redes-sociales-header a {
        border-right: 1px solid #5c7587;
        padding: 10px 15px;
        display: flex;
        align-content: center;
        align-items: center;
        height: 25px;
        transition: transform .1s;
    }
    .redes-sociales-header a:hover {
        transform: scale(1.03);
    }
    .redes-sociales-header a:last-child {
        border: 0px;
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .redes-sociales-header {
        display: flex !important;
        padding: 5px 5px;
        position: relative;
        right: -75%;
        z-index: 50;
        max-width: 600px;
        background-color: #032e4a;
        border-radius: 0px 0px .5rem .5rem;
        top: -40px;
    }
    .redes-sociales-header a {
        border-right: 1px solid #5c7587;
        padding: 10px 5px;
        display: flex;
        align-content: center;
        align-items: center;
        height: 25px;
        transition: transform .1s;
    }
    .redes-sociales-header a:hover {
        transform: scale(1.03);
    }
    .redes-sociales-header a:last-child {
        border: 0px;
    }
}

/* Footer general */
.portal-nvo footer {
    background: #4b4b4b;
    color: #fff;
    margin-top: 20px;
}

.region-footer .redes-sociales-header {
    display: none !important;
}

.portal-nvo .footer-main {
    display: flex;
    gap: 40px;
    padding: 25px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.portal-nvo .footer-brand { flex: 1; }
.portal-nvo .footer-brand .center-name {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.portal-nvo .footer-brand p {
    font-size: 14px;
    line-height: 1.6;
}

.portal-nvo .footer-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 120px;
}

.portal-nvo .footer-links a {
    color: #fff;
    font-size: 14px;
    transition: color .2s;
}

.portal-nvo .footer-links a:hover { color: #fff; }

.portal-nvo .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    padding: 10px;
    font-size: 14px;
    color: #fff;
}

.portal-nvo .footer-bottom a { color: #fff; }
.portal-nvo .footer-bottom a:hover { color: #aaa; }


.menu--footer {
    margin-top: 2vh !important;
}

.portal-nvo .icon img {
    margin-right: 0px !important;
}

/* ==========================================================================
   9. MEDIA QUERIES (ESTADOS RESPONSIVOS)
   ========================================================================== */


/* Tablets (A partir de 768px) */
@media (min-width: 768px) {
    .portal2-container {
        width: 750px;
    }
    .main-container {
        padding: 15px;
    }
}


/* Desktop Pequeñas / Medias (992px) */
@media (min-width: 992px) {
    .portal2-container {
        width: 970px;
    }
}


/* Desktop Grandes (1200px en adelante) */
@media (min-width: 1200px) {
    .portal2-container {
        width: 1170px;
    }
}


/* Tablets & Mobile (Menores a 992px) */
@media (max-width: 992px) { 
    .portal-nvo .news-card { 
        min-width: calc(50% - 10px); 
    } 
    .portal-nvo .news-modern-container {
        grid-template-columns: 1fr;
    }
    .portal-nvo .news-featured {
        height: 260px;
    }
    .event-card { 
        margin-left: auto; 
        margin-right: auto;
    }
    .p-3 {
        padding: 14px; 
        width: calc(50% - 10px) !important; 
    }
    .card-title {
        font-size: 14px !important;
    } 
}

/* Dispositivos Móviles Generales (Menores a 768px) */
@media (max-width: 767px) {
    /* Carrusel banner móvil */
    #views-bootstrap-banner-block-3 .carousel-inner,
    #views-bootstrap-banner-block-3 .item {
        height: 200px !important;
    }
    #views-bootstrap-banner-block-3 .item img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
        object-position: center;
    }

    /* Redes sociales header colapsado */
    .redes-sociales-header {
        display: none !important;
        padding: 0px;
        position: absolute;
        right: 0px;
        top: 30px;
        z-index: 50;
        max-width: 40px;
        background-color: #032e4a;
        border-radius: 0px 0px 0px .5rem;
        flex-direction: column;
    }
    .redes-sociales-header a {
        padding: 20px 9px;
        display: flex;
        align-content: center;
        align-items: center;
        height: 25px;
        transition: transform .1s;
    }
    .redes-sociales-header a:hover {
        transform: scale(1.03);
    }
    .redes-sociales-header a:last-child {
        border: 0px;
    }
    .Informativo p {
        font-size: 11px;
    }
}

/* CSS para Grid Móvil en Portal */
@media (max-width: 768px) {
    .portal-nvo .container-portal {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .portal-nvo .card-main {
        height: 160px;
    }
    .portal-nvo .card-text {
        font-size: 1rem;
    }
    .card-informe-actividades {
        grid-column: span 1;
    }
    .search-wrapper {
        gap: 10px;
    }
    #close-search {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }
}



/* Pantallas Móviles Pequeñas (Menores a 600px) */
@media (max-width: 600px)  {
    .portal-nvo .news-card { 
        min-width: 85%; 
    }
    .portal-nvo .slider-btn { 
        display: none; 
    }
    .portal-nvo .filter-tabs { 
        gap: 10px; 
    }
    .portal-nvo .filter-btn  { 
        border-radius: 0px !important; 
    }
    .event-card {
        width: 100% !important;
    }
    .p-3 {
        padding: 10px;
    }
    .card-title {
        font-size: 14px !important;
    }
}

/* Celulares muy pequeños (Menores a 480px) */
@media (max-width: 480px) {
    .portal-nvo .container-portal {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}




/* DISEÑO CORREGIDO DE LA BARRA DE AUDIENCIA */
.audience-section {
    /*margin: 25px 0;*/
    margin-top: 32px;
    margin-bottom: 48px;
}

.audience-bar {
    display: flex;
    background-color: #7d1c1c; /* Azul institucional */
    border-radius: 0px;
    overflow: hidden;
    padding: 0px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.audience-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: white;
    padding: 15px 20px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease;
    color: white !important;
}

.audience-item:hover {
    background-color: #570c0c;
}

/* Línea divisoria vertical entre secciones */
.audience-item:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 25%;
    height: 50%;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.2);
}

.audience-item .icon {
    font-size: 24px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audience-info h3 {
    font-size: 15px;
    font-weight: bold;
    margin-bottom: 2px;
    color: #fff;
}

.audience-info p {
    font-size: 11px;
    opacity: 0.8;
}

/* Adaptación responsiva */
@media (max-width: 768px) {
    .audience-bar {
        flex-direction: column;
    }
    .audience-item:not(:last-child)::after {
        display: none;
    }
    .audience-item {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

#footer{
    /*margin-top: 80px;*/
}


.name.navbar-brand{
    font-weight: 500;
}

a:focus, button:focus {
    outline: 3px solid #0056b3;
    outline-offset: 2px;
}

.flex-control-paging li a.flex-active{
    background-color: #8b0000;
}




/* 1. Volvemos al contenedor principal el "ancla" */
.media--bundle--image {
    position: relative !important;
    display: block;
    overflow: hidden;
}


/* 3. Nos aseguramos de que la imagen original se quede atrás del overlay */
.media--bundle--image img {
    position: relative;
    z-index: 1;
}


/* Asegura que el contenedor de ambos enlaces los maneje de forma ordenada */
.contenedor-enlaces-libros {
    display: flex;
    justify-content: center; /* Los centra en la pantalla */
    align-items: center;
    gap: 24px;              /* Espaciado horizontal constante entre ellos en escritorio */
    flex-wrap: wrap;        /* Permite que bajen ordenadamente en pantallas pequeñas */
}

/* Reglas específicas para que no se vean mal en pantallas de celular (menos de 576px) */
@media (max-width: 576px) {
    .contenedor-enlaces-libros {
        flex-direction: column; /* En móvil, en lugar de estar de lado, se apilan verticalmente */
        gap: 12px;             /* Un espacio más compacto pero cómodo para tocar con el dedo */
        width: 100%;
        text-align: left;
    }
    
    .contenedor-enlaces-libros a {
        display: block;
        width: 100%;           /* Ocupan todo el ancho móvil para mejorar el área de clic (Touch Target) */
        padding: 8px 0;        /* Les da más "aire" para que sea fácil pulsarlos */
    }
}


/* 1. Forzamos a que los elementos de la lista tengan un ancho base base predecible antes del script */
.flexslider .slides > li {
    width: 285px !important; /* Ajusta este valor al tamaño promedio de tus portadas en escritorio */
    margin-right: 5px !important;
    float: left !important;
}

/* 2. Aseguramos que el contenedor de la imagen respete la proporción */
.views-field-field-portada .field-content a,
.views-field-field-portada img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 365px; /* Evita que colapse verticalmente a 0px mientras carga el archivo */
}

/* 3. Evitamos el desborde feo en lo que el viewport se configura */
.flex-viewport {
    max-height: 390px; /* Limita la altura de la sección para evitar saltos verticales del footer */
}

/* 1. Por defecto, ocultamos los dots para que no "parpadeen" al cargar */
.flexslider .flex-control-nav {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

/* 2. En cuanto FlexSlider se inicializa y calcula las páginas reales, los mostramos */
.flexslider[data-once="flexslider"] .flex-control-nav,
.flexslider.flexslider-active .flex-control-nav,
.flexslider .flex-viewport + .flex-control-nav {
    opacity: 1 !important;
    pointer-events: auto;
}

/* 3. Corrección extra: si por alguna razón el JS tarda, aseguramos que solo se muestren 
   los dots que realmente caben físicamente en el contenedor */
.flex-control-paging li:nth-child(n+3) {
    display: none !important; /* Esconde del 3ero en adelante en carga inicial de escritorio */
}

/* En resoluciones pequeñas (donde sí necesitas más dots porque se ve de 1 en 1 o de 2 en 2) 
   volvemos a habilitar que se muestren todos */
@media (max-width: 768px) {
    .flex-control-paging li:nth-child(n+3) {
        display: inline-block !important;
    }
}


/* ==========================================================================
   SECCIÓN NOTICIAS CUCSH - DISEÑO UX/UI OPTIMIZADO (10/10)
   ========================================================================== */

.news-section-wrapper {
    background-color: #F8FAFC;
    padding: 0px 0 40px 0;
}

/* Header alineado */

.portal-nvo .section-more:hover {
    transform: translateX(4px);
    color: #af1c1c !important;
}

/* Grid equilibrado 50/50 */
.portal-nvo .news-modern-container {
    display: grid;
    grid-template-columns: 2fr 1fr; /* Balance perfecto */
    gap: 18px;
    align-items: stretch;
}

/* --------------------------------------------------------------------------
   1. NOTICIA DESTACADA (IZQUIERDA)
   -------------------------------------------------------------------------- */
.portal-nvo .news-featured {
    height: 100%;
    min-height: 360px; /* Altura máxima controlada */
    max-height: 380px;
    border-radius: 0px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portal-nvo .news-featured:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
}

.portal-nvo .news-featured-card {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
}

.portal-nvo .news-image-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.portal-nvo .news-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.portal-nvo .news-featured:hover img {
    transform: scale(1.04);
}

.portal-nvo .news-featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0) 20%, rgba(15, 23, 42, 0.92) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
}

.portal-nvo .badge-featured {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #8c1c1c;
    color: #FFFFFF;
    padding: 4px 12px;
    border-radius: 0px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}




.portal-nvo .news-date-light {
    color: #CBD5E1;
    font-size: 0.825rem;
    font-weight: 500;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-nvo .news-featured-content h3 {
    color: #FFFFFF;
    font-size: 15px; /* Legibilidad optimizada */
    font-weight: 700;
    line-height: 1.4;
    margin: 0;
}

/* --------------------------------------------------------------------------
   2. LISTA SECUNDARIA (DERECHA) - DISEÑO LIMPIO SIN MARCOS PESADOS
   -------------------------------------------------------------------------- */
.portal-nvo .news-list {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribuye exactamente al alto de la izquierda */
    gap: 12px;
}

.portal-nvo .news-list-item {
    background: #FFFFFF;
    border-radius: 0px;
    border: 1px solid #E2E8F0;
    padding: 10px;
    transition: all 0.2s ease;
}

.portal-nvo .news-list-item:hover {
    border-color: #CBD5E1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background-color: #FFFFFF;
}

.portal-nvo .news-list-card {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none !important;
}

/* Imagen con mejor proporción */
.portal-nvo .news-list-thumb {
    width: 120px;
    height: 82px;
    flex-shrink: 0;
    border-radius: 6px;
    overflow: hidden;
}

.portal-nvo .news-list-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portal-nvo .news-list-item:hover .news-list-thumb img {
    transform: scale(1.06);
}

/* Contenido de texto con jerarquía clara */
.portal-nvo .news-list-content {
    flex: 1;
}

.portal-nvo .news-date-small {
    font-size: 12px;
    font-weight: 700;
    color: #8B0000;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.portal-nvo .news-list-content p {
    font-size: 12px; /* Subió de 12px a 15px para lectura cómoda */
    font-weight: 600;
    color: #1E293B;
    line-height: 1.35;
    margin: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2; /* Trunca a 2 líneas para mantener alineación */
    overflow: hidden;
    transition: color 0.2s ease;
}

.portal-nvo .news-list-item:hover .news-list-content p {
    color: #8B0000;
}

/* Responsive breakpoint */
@media (max-width: 992px) {
    .portal-nvo .news-modern-container {
        grid-template-columns: 1fr;
    }
    
    .portal-nvo .news-featured {
        min-height: 300px;
    }
}


/* ==========================================================================
   CORRECCIÓN ESTÍLOS NOTICIAS CUCSH (DESTACADA VS SECUNDARIAS)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. COLUMNA IZQUIERDA: NOTICIA DESTACADA
   -------------------------------------------------------------------------- */
.news-featured .news-card-link {
  display: block;
  position: relative;
  height: 100%;
  min-height: 420px;
  border-radius: 0px;
  overflow: hidden;
  text-decoration: none !important;
}

.news-featured .news-thumb-wrapper {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}

.news-featured .news-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Badge rojo superior */
.news-featured .badge-featured {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #8c1c1c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 0px;
  z-index: 2;


}

/* Superposición de texto y fecha abajo sobre la foto */
.news-featured .news-info-wrapper {
  position: absolute;
  bottom: 4vh;
  left: 0;
  right: 0;
  padding: 30px 20px 20px 20px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(15, 23, 42, 0.95) 85%);
  z-index: 2;
}

.news-featured .news-date {
  color: #E2E8F0 !important;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  display: block;
}

.news-featured .news-title {
  color: #FFFFFF !important;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0;
}

/* --------------------------------------------------------------------------
   2. COLUMNA DERECHA: LISTA VERTICAL SECUNDARIA
   -------------------------------------------------------------------------- */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.news-list-item {
  background: #FFFFFF;
  border-radius: 0px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid #F1F5F9;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.news-list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.news-list-item .news-card-link {
  display: flex !important;
  align-items: center;
  gap: 16px;
  text-decoration: none !important;
}

/* Ocultar el badge "Destacado" en la columna derecha */
.news-list-item .badge-featured {
  display: none !important;
}

/* Miniatura a la izquierda */
.news-list-item .news-thumb-wrapper {
  width: 110px !important;
  height: 95px !important;
  flex-shrink: 0;
  border-radius: 0px;
  overflow: hidden;
  position: relative;
}

.news-list-item .news-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Contenido de texto a la derecha de la miniatura */
.news-list-item .news-info-wrapper {
  flex: 1;
  position: static;
  background: transparent;
  padding: 0;
}

.news-list-item .news-date {
  color: #666666 !important; /* Gris visible */
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 4px;
  display: block;
}

.news-list-item .news-title {
  color: #1E293B !important;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.news-list-item:hover .news-title {
  color: #8B0000 !important;
}




/* ==========================================================================
   SISTEMA DE UNIFORMIDAD TIPOGRÁFICA Y ESPACIADO (CUCSH MODERN)
   ========================================================================== */

/* 1. PALETA DE COLORES Y MÁRGENES ESTÁNDAR */
:root {
  --cucsh-red-primary: #7d1c1c;
  --cucsh-red-hover: #af1c1c;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --bg-light-gray: #f8fafc;
  --section-spacing: 48px; /* Separación unificada entre secciones */
}

/* 2. UNIFORMIDAD DE SECCIONES (PADDINGS Y MARGINS UNIFICADOS) */
.portal2-container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: var(--section-spacing) !important;
  padding-bottom: 0 !important;
}

/* Eliminamos los márgenes inline agresivos en HTML */
.portal-nvo [style*="margin-top: 5vh"],
.portal-nvo [style*="margin-bottom:17px"] {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 3. ENCABEZADOS DE SECCIÓN UNIFICADOS (TAMAÑOS Y BORDES) */
.portal-nvo .section-header {
  margin-bottom: 24px !important;
  align-items: center;
}

.portal-nvo .section-title {
  font-size: 22px !important; /* Ancla de tamaño uniforme para títulos principales */
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  border-left: 4px solid var(--cucsh-red-primary) !important;
  padding-left: 12px !important;
  line-height: 1.2 !important;
  margin: 0 !important;
}

.portal-nvo .section-more {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--cucsh-red-primary) !important;
}

/* 4. UNIFORMIDAD DE TÍTULOS EN TARJETAS Y CONTENIDOS */

/* Títulos de Tarjetas Intermedias (Noticias, Convocatorias, Libros) */
.portal-nvo .card-title,
.portal-nvo .book-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  color: var(--text-dark) !important;
}

/* Fechas y Subtítulos */
.portal-nvo .card-date,
.portal-nvo .news-date{
  font-size: 12px !important;
  color: var(--text-muted) !important;
  font-weight: 500 !important;
}

.news-featured .news-date{
    color: #cccccc !important;
}

.news-featured img{
    transition: .3s all;
}

/* Fechas y Subtítulos */
.portal-nvo .audience-info p {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.85);
}

/* 5. AJUSTE DE CONTENEDORES GRISES CON SOMBRAS (NOTICIAS Y LIBROS) */
.news-section-wrapper,
div[style*="background-color: #F6F8FA"] {
  background-color: var(--bg-light-gray) !important;
  box-shadow: none !important; /* Elimina sombras pesadas desalineadas */
  padding-top: var(--section-spacing) !important;
  padding-bottom: var(--section-spacing) !important;
  margin-top: var(--section-spacing) !important;
  border-top: 1px solid #fff;
  border-bottom: 1px solid #fff;
}

/* 6. ALINEACIÓN DE ACCESOS RÁPIDOS Y PANEL DE ESTADÍSTICAS */
.quick-access-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch; /* Ambas columnas mantendrán la misma altura */
  padding-top: 20px;
}

.portal-nvo .cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  height: 100%;
}

.portal-nvo .cards-grid .card {
  height: 100%;
  min-height: 64px;
  display: flex;
}

.portal-nvo .cards-grid .card h3 {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: var(--text-dark) !important;
}

.stats-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
}



/* Card Destacada de Noticias */
.news-featured-card {
  position: relative;
  border-radius: 0px;
  overflow: hidden;
  height: 100%;
  min-height: 280px;
}

.news-featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Gradiente para legibilidad del título */
.news-featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 16px 16px 16px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.news-featured-overlay .news-title {
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}


/* Badge Único Universal para Noticias y Entérate */
.cucsh-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background-color: #7d1c1c; /* Rojo Institucional */
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}


/* Estilo Unificado de Fechas */
.card-date, .news-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px !important;
  color: #64748b !important; /* Slate gray */
  font-weight: 500;
  margin-bottom: 4px;
}

.card-date i, .news-date i {
  color: #7d1c1c; /* Icono en rojo institucional */
  font-size: 13px;
}


.menu.menu--footer.nav li{
    padding-bottom: 10px;
}


.stat-item svg{
     width: 42px;
    height: 42px;
    color: #8B332D;
    margin-bottom: 0px;
}

.footer{
    padding-top: 0px !important;
}



#main-container > .main-container{
    padding: 0px !important;
}

.main-container > .contenido > section{
    padding: 0px !important;
}