body {
    margin: 0;
    font-family: Arial, sans-serif;
    padding-top: 0px; /* Ajusta este valor según la suma del alto de tu topbar + header */
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

#header-fixed-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.admin-bar #header-fixed-container {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar #header-fixed-container {
        top: 46px;
    }
}

/* ----------*/
/* TOP BAR   */
/* --------- */
.topbar {
    background: #1e4a9c;
    color: white;
    font-size: 14px;
    padding: 6px 0;
}

/* IMPORTANTE: solo topbar usa flex */
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* IZQUIERDA */
.topbar-left {
    display: flex;
    gap: 10px;
    align-items: center;
}

.topbar-left span {
    opacity: 0.9;
}

/* Separador automático */
.topbar-left span + a::before {
    content: "|";
    margin: 0 8px;
    opacity: 0.5;
}

/* Teléfono */
.topbar-left a {
    color: white;
    text-decoration: none;
}

/* DERECHA */
.topbar-right {
    display: flex;
    align-items: center;
}

/* ICONOS */
.topbar-right a {
    color: white;
    margin-left: 12px;
    font-size: 15px;
    transition: 0.2s;
}

.topbar-right a:hover {
    color: #00c3ff;
}


/* ----------*/
/*   MENU    */
/* --------- */
/* ==========================================================================
   MENÚ DE NAVEGACIÓN (UNIFICADO)
   ========================================================================== */

/* 1. Estructura Base del Menú Principal */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex; /* Alineación horizontal en escritorio */
    align-items: center;
}

.main-nav li {
    position: relative; /* Clave: punto de referencia para los submenús */
}

.main-nav a {
    display: block;
    padding: 15px 20px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* 2. Submenús (Segundo Nivel) */
.main-nav ul ul {
    display: none;        /* Oculto por defecto */
    position: absolute;   /* Flota sobre el contenido */
    top: 100%;            /* Aparece justo debajo del padre */
    left: 0;
    background: #1a2533;  /* Color oscuro institucional */
    min-width: 220px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.3);
    border-top: 3px solid #00a19a; /* Detalle turquesa */
    padding: 0;
    z-index: 9999;
}

/* 3. Comportamiento Hover: Mostrar submenú */
.main-nav li:hover > ul {
    display: block;
}

/* 4. Tercer Nivel (Niveles anidados laterales) */
.main-nav ul ul ul {
    top: 0;
    left: 100%;           /* Desplaza a la derecha del menú anterior */
    border-top: none;
    border-left: 3px solid #00a19a;
}

/* 5. Estilo de los enlaces dentro de submenús */
.main-nav ul ul a {
    padding: 12px 20px;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.main-nav ul ul li:last-child > a {
    border-bottom: none;
}

/* Efecto hover general en items */
.main-nav li:hover > a {
    background: rgba(0, 161, 154, 0.15); /* Brillo turquesa suave */
}

/* ==========================================================================
   INDICADORES DE SUBMENÚ (FLECHAS)
   ========================================================================== */

/* Flecha hacia abajo (Primer Nivel) */
.main-nav .menu-item-has-children > a::after {
    content: '\f107'; /* Icono FontAwesome Angle Down */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: 8px;
    font-size: 0.8rem;
    transition: transform 0.3s;
    display: inline-block;
}

/* Flecha hacia la derecha (Submenús) */
.main-nav ul ul .menu-item-has-children > a::after {
    content: '\f105'; /* Icono FontAwesome Angle Right */
    float: right;
    margin-top: 3px;
}

/* Animación: La flecha gira al abrirse */
.main-nav li:hover > a::after {
    transform: rotate(180deg);
}

/* Evitar rotación en submenús laterales */
.main-nav ul ul li:hover > a::after {
    transform: rotate(0deg) translateX(3px);
}

/* ==========================================================================
   ADAPTACIÓN MÓVIL (RESPONSIVE)
   ========================================================================== */
@media (max-width: 768px) {
    .main-nav {
        display: none; /* Se activa con la clase .active via JS */
        position: absolute;
        width: 100%;
        top: 100%;
        left: 0;
        background: #1e2f4f;
    }

    .main-nav ul {
        flex-direction: column; /* Menú vertical en móvil */
    }

    .main-nav ul ul {
        position: static; /* En móvil, el submenú empuja el contenido */
        width: 100%;
        display: block;   /* Siempre visible o manejado por clic en móvil */
        box-shadow: none;
        border-left: 3px solid #00a19a;
        border-top: none;
        background: rgba(0,0,0,0.1);
    }
}

/* ----------*
/*   HEADER  */
/* --------- */
.main-header {
    background: #1e2f4f; /* Color institucional */
    padding: 15px 0;
    transition: background 0.3s ease;
}

.main-header.scrolled {
    background: #1e2d4f;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.main-header.scrolled {
    background: #1e2d4f;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.logo a {
    color: white;
    font-size: 22px;
    font-weight: bold;
    text-decoration: none;
}



/* HERO */
.hero {
    height: 500px;
    background: #2e4a86;
    color: white;
    display: flex;
    align-items: center;
    padding-top: 100px;
}

/* RESPONSIVE agregado recien*/
/* Layout base */
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Menú desktop */
.main-nav {
    display: flex;
}

/* Botón hamburguesa oculto por defecto */
.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

/* 📱 SOLO MOBILE */
@media (max-width: 768px) {

    .menu-toggle {
        display: block;
        color: white;
        font-size: 24px;
        background: none;
        border: none;
        cursor: pointer;
    }

    .main-nav {
        display: none; /* Oculto por defecto */
        position: absolute;
        top: 100%; /* Aparece justo debajo del header */
        left: 0;
        width: 100%;
        background: #1e2f4f;
        flex-direction: column;
        padding: 20px 0;
        z-index: 999;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

}

/* --- Escritorio --- */
@media (min-width: 769px) {
    .menu-toggle {
        display: none; /* Oculto en PC */
    }
}


/* ----------*/
/*   HERO    */
/* --------- */


.hero-slider {
    width: 100%;
    height: 80vh;
    position: relative;
    overflow: hidden;
}

/* Evita el efecto mosaico y estira la imagen */
.hero-slider .swiper-slide {
    background-size: cover;      /* La imagen cubre todo el ancho/alto disponible */
    background-position: center; /* Centra la imagen para que no se corte mal */
    background-repeat: no-repeat;
    display: flex;         /* Mantenlo activo */
    align-items: center;   /* Esto centra el texto verticalmente (importante) */
    justify-content: flex-start; /* Esto empuja todo a la IZQUIERDA */
    color: white;
}

/* Contenedor relativo para posicionar el botón */
.hero-container-flex {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Añade esta línea para empujar el texto a la izquierda */
    position: relative; 
    width: 100%;
}

/* Ajuste del contenedor interno para permitir posicionamiento absoluto */
.hero-slider .container {
    height: 100%;
    display: flex;
    align-items: center; /* Centra el contenido verticalmente */
    position: relative;  /* Referencia para el botón 'Leer más' */
    padding: 0 60px; /* Esto crea el margen de seguridad para que NO se solape con las flechas */}


.hero-content {
    max-width: 700px;
    color: white;
    z-index: 2;
}

.hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 10px;
    text-transform: uppercase;
    text-align: left; /* Asegura alineación a la izquierda */
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6);
}

/* Texto descriptivo más grande */
.hero-description p {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    /*font-size: 24px ; /* Tamaño aumentado */
    line-height: 1.4;
    text-align: left; /* Asegura alineación a la izquierda */
    text-shadow: 1px 1px 5px rgba(32, 19, 32, 0.8);
    margin: 0;
}

/* BOTÓN LEER MÁS: Estilo Transparente */
.btn-hero {
    position: absolute;
    bottom: 50px;    
    right: 20px;     
    padding: 14px 30px;
    background: rgba(255, 255, 255, 0.1); 
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    backdrop-filter: blur(10px); 
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-hero:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
    transform: translateY(-3px);
}

/* FLECHAS */
.swiper-button-next, .swiper-button-prev {
    color: #ffffff !important;
    background: rgba(0,0,0,0.2);
    width: 50px !important;
    height: 50px !important;
    border-radius: 50%;
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    background: rgba(0,0,0,0.5);
}

/* fondo video*/

/* Contenedor del fondo (sea video o imagen) */
.hero-bg-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Hace que el video estire sin deformarse */
    z-index: 1;
}

/* Capa de oscuridad extra para videos claros */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4); /* Ajusta el 0.4 para más o menos oscuridad */
    z-index: 2;
}

/* Asegurar que el contenido esté por encima del video */
.hero-slider .container {
    z-index: 3;
    position: relative;
    /* ... mantén tus otros estilos de centrado aquí ... */
}

/* PUNTOS */
.swiper-pagination-bullet { background: #fff !important; }
.swiper-pagination-bullet-active { width: 25px; border-radius: 5px; }

/* 📱 AJUSTES MÓVIL (Forzar botón a la derecha) */
@media (max-width: 768px) {
    .hero-slider { height: 70vh; }
    
    .hero-content h1 { font-size: 2.2rem; }
    .hero-description p { font-size: 1.5rem; }

    .btn-hero {
        right: 20px;    /* Forzamos que se quede a la derecha */
        bottom: 30px;   /* Un poco más arriba en móvil */
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    .hero-slider .container {
        padding: 0 45px;
    }
}

/** ----------*/
/*  LINKS RÁPIDOS  */
/* --------- */

.links-rapidos {
    background-color: #1a2537;
    padding: 36px 0;
}

.links-rapidos-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
}

.link-rapido-card {
    flex: 0 0 calc(12.5% - 14px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px 12px;
    background-color: #1e2f4f;
    border-radius: 10px;
    color: #e0e8f5;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.link-rapido-card:hover {
    background-color: #1e4a9c;
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 16px rgba(0, 161, 154, 0.35);
    color: #ffffff;
}

.link-rapido-card i {
    font-size: 2rem;
    color: #00a19a;
    transition: color 0.2s ease;
}

.link-rapido-card:hover i {
    color: #ffffff;
}

.link-rapido-card span {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.4;
    text-transform: uppercase;
}

@media (max-width: 900px) {
    .link-rapido-card {
        flex-basis: calc(25% - 12px);
    }
}

@media (max-width: 500px) {
    .links-rapidos-grid {
        gap: 10px;
    }
    .link-rapido-card {
        flex-basis: calc(50% - 5px);
        padding: 18px 8px;
    }
    .link-rapido-card i {
        font-size: 1.6rem;
    }
}

/** ----------*/
/*   NOTICIAS  */
/* --------- */
/* SECCIÓN NOTICIAS */

.noticias-seccion {
    padding: 1px 0;
    background-color: #cbd8e6;
}
.titulo-seccion {
    text-align: center;
    font-size: 2.5rem;
    color: #1e2f4f;
    margin-bottom: 40px;
    position: relative;
    font-weight: 800;
}

/* El Grid: 4 columnas en PC, 2 en Tablet, 1 en Móvil */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
}

/* La Ficha */
.noticia-ficha {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    /* Sombra más pronunciada para que "flote" sobre el fondo gris */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(30, 47, 79, 0.05); /* Borde casi invisible para definir mejor la ficha */
}

/* Efecto al pasar el mouse */
.noticia-ficha:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 45px rgba(30, 47, 79, 0.15);
}
.noticia-imagen img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.noticia-cuerpo {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.noticia-fecha {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 10px;
    display: block;
}

.noticia-cuerpo h3 {
    font-size: 1.25rem;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.noticia-cuerpo h3 a {
    color: #1e2f4f;
    text-decoration: none;
}

.noticia-cuerpo h3 a:hover {
    color: #1e4a9c; /* */
}

.noticia-resumen {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
}

.leer-mas-noticia {
    margin-top: auto;
    color: #1e4a9c;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9rem;
}

/* PAGINACIÓN */
.noticias-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin-top: 50px;
    gap: 10px;
}

.noticias-nav ul li a, .noticias-nav ul li span {
    padding: 10px 20px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #1e2f4f;
    border-radius: 5px;
    transition: all 0.3s;
}

.noticias-nav ul li span.current {
    background: #1e4a9c;
    color: #fff;
    border-color: #1e4a9c;
}

.noticias-nav ul li a:hover {
    background: #eef2f7;
}

/* Estilo para ocultar los posts que cargamos de más */
.post-oculto {
    display: none;
    opacity: 0;
    transform: translateY(20px);
}

/* Animación cuando aparecen */
.post-visible {
    display: flex !important;
    animation: fadeInNews 0.5s forwards;
}

@keyframes fadeInNews {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-cargar {
    display: block;
    margin: 50px auto 60px;
    padding: 15px 45px;
    background: #1e4a9c;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(30, 74, 156, 0.3);
}


/* --------------------------*/
/*   SECCIÓN EVENTOS      */
/* -------------------------- */

.eventos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    width: 100%;
}

.evento-ficha {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    /* Sombra más pronunciada para que "flote" sobre el fondo gris */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(30, 47, 79, 0.05); /* Borde casi invisible para definir mejor la ficha */
}


/* Efecto al pasar el mouse */
.evento-ficha:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 45px rgba(30, 47, 79, 0.15);
}

.evento-ficha h3 {
    font-size: 1.25rem;
    margin: 0 0 15px 0;
        /* 1. INTERLINEADO: Separa las líneas de texto entre sí */
    line-height: 1.3; 

    /* 2. ESPACIADO SUPERIOR: Distancia con el objeto de ARRIBA (el título H3) */
    margin-top: 3px;

    /* 3. ESPACIADO INFERIOR: Distancia con el objeto de ABAJO (los botones) */
    margin-bottom: 10px;
}

.evento-imagen-wrapper {
    position: relative;
    height: 200px;
}

.evento-imagen-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* El Badge de Fecha Solapado */
.evento-fecha-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7); /* Transparente oscuro */
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    min-width: 50px;
    backdrop-filter: blur(3px); /* Efecto blur moderno */
}

.evento-fecha-badge .dia {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.evento-fecha-badge .mes {
    text-transform: uppercase;
    font-size: 0.8rem;
}

.evento-info {
    padding: 10px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.evento-hora {
    font-size: 0.9rem;
    color: #666;
    
    /* 1. INTERLINEADO: Separa las líneas de texto entre sí */
    line-height: 1.6; 

    /* 2. ESPACIADO SUPERIOR: Distancia con el objeto de ARRIBA (el título H3) */
    margin-top: 3px;

    /* 3. ESPACIADO INFERIOR: Distancia con el objeto de ABAJO (los botones) */
    margin-bottom: 10px;

    /* Opcional: Asegura que el margen funcione bien si el texto es corto */
    display: block; 
}

.evento-acciones {
    margin-top: 1px;
    display: flex;
    gap: 10px;
}

.btn-agenda, .btn-info {
    flex: 1;
    padding: 10px 5px;
    text-align: center;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 4px;
    font-weight: bold;
}

.btn-agenda {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.btn-info {
    background: #1e4a9c;
    color: white;
}

/* ---------------------------*/
/*   SINGLE NOTICIA           */
/* -------------------------- */

.noticia-single-wrap {
    background-color: #eef1f6;
    padding: 48px 16px 64px;
    min-height: 60vh;
}

.noticia-single {
    max-width: 860px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(26, 37, 55, 0.12);
}

.noticia-single-imagen {
    width: 100%;
    height: 340px;
    overflow: hidden;
}

.noticia-single-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.noticia-single-cuerpo {
    padding: 40px 52px;
}

.noticia-single-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.noticia-single-fecha {
    color: #00a19a;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
}

.noticia-single-categoria {
    background: #1e2f4f;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.noticia-single-titulo {
    font-size: 2rem;
    color: #1a2537;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 32px;
}

.noticia-single-contenido {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #2d3a4a;
}

.noticia-single-contenido p {
    margin-bottom: 1.4em;
}

.noticia-single-contenido img {
    max-width: 100%;
    border-radius: 8px;
    margin: 12px 0;
}

.noticia-single-contenido h2,
.noticia-single-contenido h3 {
    color: #1a2537;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
}

.noticia-single-footer {
    padding: 22px 52px;
    border-top: 1px solid #e4e9f0;
    background: #f7f9fc;
}

.noticia-volver {
    color: #1e4a9c;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.2s ease;
}

.noticia-volver:hover {
    color: #00a19a;
}

@media (max-width: 900px) {
    .noticias-grid,
    .eventos-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
    .noticias-grid,
    .eventos-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .noticia-single-imagen { height: 220px; }
    .noticia-single-cuerpo { padding: 24px 20px; }
    .noticia-single-footer { padding: 18px 20px; }
    .noticia-single-titulo { font-size: 1.5rem; }
}

/* ---------------------------*/
/*   Estilos para el footer   */
/* -------------------------- */
/* --- ESTILOS FOOTER --- */
/* --- FOOTER NIVEL 1 --- */
.main-footer {
    background: #111b2d; /* Azul casi negro */
    color: #e0e0e0;
    padding-top: 60px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-top-level .container iframe {
    display: block;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* --- FOOTER NIVEL 2 --- */
.footer-main-level { padding: 50px 0; }

.footer-grid-info {
    display: grid;
    grid-template-columns: 0.7fr 1.3fr 1fr;
    gap: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 25px;
    font-size: 1.1rem;
    position: relative;
}

/* Línea debajo del título como en la imagen */
.footer-col h4::after {
    content: '';
    display: block;
    width: 50px;
    height: 2px;
    background: #3498db;
    margin-top: 8px;
}

/* Enlaces Doble Columna */
.footer-links-double {
    display: flex;
    gap: 30px;
}
.footer-links-double ul { list-style: none; padding: 0; flex: 1; }
.footer-links-double ul li { margin-bottom: 12px; }
.footer-links-double a { color: #aaa; text-decoration: none; font-size: 0.95rem; transition: 0.3s; }
.footer-links-double a:hover { color: #3498db; padding-left: 5px; }

/* Redes Sociales */
.social-circles { display: flex; gap: 10px; flex-wrap: wrap; }
.s-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: 0.3s;
}
.s-icon:hover { background: #3498db; transform: translateY(-3px); }

/* --- WHATSAPP FLOTANTE --- */
.wa-float-circle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    z-index: 1000;
    transition: 0.3s;
}
.wa-float-circle:hover { transform: scale(1.1) rotate(10deg); }

/* Socket */
.footer-socket {
    background: #0a111e;
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
    color: #666;
}
.footer-socket a.author { color: #3498db; text-decoration: none; font-weight: bold; }

/* ═══════════════════════════════════════════════════════════
   PÁGINAS GENÉRICAS (page.php)
   ═══════════════════════════════════════════════════════════ */

/* ── Banner ────────────────────────────────────────────────── */

.page-inst-banner {
    position: relative;
    height: 300px;
    background-color: #1e2f4f;
    background-size: cover;
    background-position: center;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.page-inst-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(20, 30, 55, 0.88) 0%, rgba(26, 37, 55, 0.45) 100%);
}

.page-inst-banner-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    padding-bottom: 36px;
}

.page-inst-breadcrumb {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 820px;
}

.page-inst-breadcrumb a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}

.page-inst-breadcrumb a:hover { color: #00a19a; }

.page-inst-breadcrumb span:last-child { color: rgba(255, 255, 255, 0.9); }

.page-inst-titulo {
    margin: 0;
    color: #ffffff;
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    max-width: 820px;
}

/* ── Cuerpo del contenido ──────────────────────────────────── */

.page-inst-body {
    padding: 56px 0 72px;
    background: #fff;
}

.page-inst-content {
    max-width: 820px;
}

/* Tipografía del editor */

.page-inst-content p {
    font-size: 1rem;
    line-height: 1.75;
    color: #333;
    margin: 0 0 1.2em;
}

.page-inst-content h2 {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a2537;
    margin: 2em 0 0.6em;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8ecf2;
    letter-spacing: 0.02em;
}

.page-inst-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e4a9c;
    margin: 1.6em 0 0.5em;
}

.page-inst-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #1a2537;
    margin: 1.4em 0 0.4em;
}

.page-inst-content ul,
.page-inst-content ol {
    margin: 0 0 1.2em 1.2em;
    padding: 0;
    line-height: 1.75;
    color: #333;
}

.page-inst-content ul li { list-style: none; padding-left: 0.4em; position: relative; }

.page-inst-content ul li::before {
    content: '';
    display: inline-block;
    width: 7px;
    height: 7px;
    background-color: #00a19a;
    border-radius: 50%;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

.page-inst-content ol li { list-style: decimal; padding-left: 0.2em; }

.page-inst-content blockquote {
    border-left: 4px solid #00a19a;
    margin: 1.5em 0;
    padding: 12px 20px;
    background: #f4f8fb;
    border-radius: 0 6px 6px 0;
    color: #1e2f4f;
    font-style: italic;
    font-size: 1.05rem;
}

.page-inst-content a {
    color: #1e4a9c;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.page-inst-content a:hover { color: #00a19a; }

.page-inst-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 0.5em 0;
}

.page-inst-content figure { margin: 1.5em 0; }

.page-inst-content figcaption {
    font-size: 0.82rem;
    color: #888;
    text-align: center;
    margin-top: 6px;
}

.page-inst-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.2em 0;
    font-size: 0.92rem;
}

.page-inst-content th {
    background: #1a2537;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
}

.page-inst-content td {
    padding: 9px 14px;
    border-bottom: 1px solid #e8ecf2;
    color: #444;
}

.page-inst-content tr:nth-child(even) td { background: #f8fafc; }

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 768px) {
    .page-inst-banner { height: 220px; }
    .page-inst-banner-inner { padding-bottom: 24px; }
    .page-inst-titulo { font-size: 1.8rem; }
    .page-inst-body { padding: 36px 0 48px; }
    .page-inst-content h2 { font-size: 1.15rem; }
}

/* ── Lightbox ──────────────────────────────────────────────── */

.exa-lb-trigger {
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.exa-lb-trigger:hover { opacity: 0.88; }

.exa-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 15, 28, 0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: exa-lb-fadein 0.2s ease;
}

.exa-lightbox.is-open { display: flex; }

@keyframes exa-lb-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.exa-lightbox-box {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exa-lightbox-box img {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 6px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.7);
    display: block;
}

.exa-lightbox-close {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: #1a2537;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    transition: background 0.2s, color 0.2s;
    z-index: 1;
}

.exa-lightbox-close:hover {
    background: #1e4a9c;
    color: #fff;
}





/* ---------------------------*/
/*   DPTO. DE COMPRAS         */
/*   tabla de contrataciones  */
/* -------------------------- */

.exa-compras-tabla {
    margin: 0 0 28px;
    overflow-x: auto;          /* la tabla scrollea sola en mobile */
}

.exa-compras-tabla table {
    width: 100%;
    min-width: 520px;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #e8ecf2;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 22px rgba(26, 37, 55, 0.07);
    font-size: .95rem;
}

.exa-compras-tabla thead th {
    background: #1e2f4f;
    color: #fff;
    text-align: left;
    font-weight: 600;
    font-size: .82rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 12px 16px;
}

.exa-compras-tabla tbody td {
    padding: 13px 16px;
    border-top: 1px solid #e8ecf2;
    vertical-align: middle;
    line-height: 1.45;
    color: #1a2537;
}

.exa-compras-tabla tbody tr:nth-child(even) { background: #f7f9fc; }
.exa-compras-tabla tbody tr:hover           { background: #f0f5fb; }

.exa-compras-docs {
    white-space: nowrap;
    text-align: right;
}

a.exa-compras-btn.exa-compras-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #1e4a9c;
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    padding: 7px 14px;
    border-radius: 8px;
    margin: 2px 0 2px 4px;
    transition: background .15s ease;
}

a.exa-compras-btn.exa-compras-btn::before {
    content: "\f56d";          /* file-arrow-down (Font Awesome 6) */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: .85em;
}

a.exa-compras-btn.exa-compras-btn:hover { background: #00a19a; color: #fff; }
a.exa-compras-btn.exa-compras-btn:focus-visible { outline: 2px solid #00a19a; outline-offset: 2px; }

@media (max-width: 640px) {
    .exa-compras-tabla table { font-size: .88rem; }
    .exa-compras-tabla thead th,
    .exa-compras-tabla tbody td { padding: 10px 12px; }
}

/* ---------------------------*/
/*   CONCURSOS DOCENTES       */
/* -------------------------- */

.exa-concurso-estado {
    display: inline-block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 11px;
    border-radius: 999px;
    margin: 0 0 18px;
}
.exa-concurso-estado.is-abierto    { background: #dcf2e6; color: #1b6b43; }
.exa-concurso-estado.is-proximo    { background: #dde9fa; color: #1e4a9c; }
.exa-concurso-estado.is-en_proceso { background: #fdf0d9; color: #8a5a10; }
.exa-concurso-estado.is-cerrado    { background: #ececf1; color: #5b6675; }

.exa-concurso-datos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px 22px;
    background: #f7f9fc;
    border: 1px solid #e8ecf2;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 0 0 26px;
}
.exa-concurso-datos dt {
    font-size: .72rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #5b6675;
    font-weight: 700;
    margin-bottom: 3px;
}
.exa-concurso-datos dd { margin: 0; font-size: .95rem; color: #1a2537; }

.exa-concurso-h { margin: 26px 0 12px; font-size: 1.05rem; font-weight: 700; color: #1e2f4f; }
.exa-concurso-texto { font-size: .92rem; line-height: 1.6; color: #1a2537; }

/* El cierre de inscripción es la fila que no hay que perderse. */
.exa-concurso-crono tr.is-alerta td { background: #fdf0d9; font-weight: 600; }

.exa-concurso-acciones { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }

.exa-concursos-anio {
    margin: 30px 0 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e4a9c;
}
.exa-concursos-vacio { color: #5b6675; font-style: italic; }

.exa-concurso-link { font-weight: 600; text-decoration: none; }
.exa-concurso-meta {
    display: block;
    font-size: .78rem;
    color: #5b6675;
    margin-top: 3px;
}
a.exa-compras-btn.exa-compras-btn.is-ical { background: #00a19a; }
a.exa-compras-btn.exa-compras-btn.is-ical::before { content: "\f073"; }   /* calendar */
.exa-concurso-estado.is-apertura { background: #fdf0d9; color: #8a5a10; }
.exa-concurso-estado.is-archivo  { background: #ececf1; color: #5b6675; }

/* ── Eventos anteriores ──────────────────────────────────────────────────────
   Bloque separado de los próximos, para que se entienda que se está mirando
   hacia atrás y no una continuación de la agenda. */

.eventos-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 30px;
}

#boton-eventos-pasados .eventos-cuenta {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.22);
    font-size: 0.82em;
    font-variant-numeric: tabular-nums;
}

.btn-agenda-completa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 1px solid #00a19a;
    border-radius: 4px;
    color: #00a19a;
    background: transparent;
    font-size: 0.94rem;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.btn-agenda-completa:hover,
.btn-agenda-completa:focus-visible {
    background: #00a19a;
    color: #fff;
}

.eventos-anteriores {
    margin-top: 42px;
    padding-top: 26px;
    border-top: 1px solid #dfe4ec;
}

.eventos-anteriores-titulo {
    margin: 0 0 18px;
    color: #65728a;
    font-size: 1.12rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* Los eventos ya pasados se muestran atenuados: siguen siendo consultables
   como antecedente, pero no compiten visualmente con los que están por venir. */
.eventos-anteriores .evento-ficha {
    opacity: 0.82;
}

.eventos-anteriores .evento-ficha:hover,
.eventos-anteriores .evento-ficha:focus-within {
    opacity: 1;
}

.msg-final {
    color: #65728a;
    font-size: 0.92rem;
    text-align: center;
    margin: 0;
}

/* ── Archivos, búsqueda y listado de eventos ─────────────────────────────────
   Reemplazan a las plantillas heredadas de BlankSlate, que no tenían estilos. */

.archivo-descripcion {
    max-width: 70ch;
    margin: 0 0 2rem;
    color: #3c4a61;
}

.noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 1.6rem;
}

.archivo-paginacion {
    margin-top: 2.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid #dfe4ec;
}

.archivo-paginacion .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.archivo-paginacion .page-numbers {
    display: inline-block;
    padding: 7px 14px;
    border: 1px solid #dfe4ec;
    color: #1e2f4f;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}

.archivo-paginacion .page-numbers:hover,
.archivo-paginacion .page-numbers:focus-visible {
    border-color: #00a19a;
    color: #00a19a;
}

.archivo-paginacion .page-numbers.current {
    background: #1e2f4f;
    border-color: #1e2f4f;
    color: #fff;
}

/* ── Búsqueda ─────────────────────────────────────────────────────────────── */

.busqueda-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 1.6rem;
}

.busqueda-form input[type="search"] {
    flex: 1 1 280px;
    padding: 11px 14px;
    border: 1px solid #dfe4ec;
    font-size: 1rem;
}

.busqueda-form input[type="search"]:focus-visible {
    outline: 2px solid #00a19a;
    outline-offset: -1px;
}

.busqueda-form button {
    padding: 11px 22px;
    border: 0;
    background: #1e2f4f;
    color: #fff;
    font-size: .95rem;
    cursor: pointer;
}

.busqueda-form button:hover,
.busqueda-form button:focus-visible {
    background: #00a19a;
}

.busqueda-cuenta {
    margin: 0 0 1.4rem;
    color: #65728a;
    font-size: .92rem;
}

.busqueda-resultados {
    list-style: none;
    margin: 0;
    padding: 0;
}

.busqueda-resultados li {
    padding: 1.2rem 0;
    border-top: 1px solid #dfe4ec;
}

.busqueda-resultados li:last-child {
    border-bottom: 1px solid #dfe4ec;
}

/* El tipo de resultado importa: en este sitio conviven páginas, noticias,
   carreras y trámites, y saber cuál es cambia si sirve o no. */
.busqueda-tipo {
    display: inline-block;
    margin-bottom: 5px;
    padding: 2px 9px;
    background: #e0f2f1;
    color: #00807b;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.busqueda-resultados h2 {
    margin: 0 0 .35rem;
    font-size: 1.14rem;
    line-height: 1.3;
}

.busqueda-resultados h2 a {
    color: #1e2f4f;
    text-decoration: none;
}

.busqueda-resultados h2 a:hover,
.busqueda-resultados h2 a:focus-visible {
    color: #00a19a;
    text-decoration: underline;
}

.busqueda-resultados p {
    margin: 0;
    color: #3c4a61;
    font-size: .94rem;
    max-width: 72ch;
}

.busqueda-vacia {
    padding: 1.6rem 1.8rem;
    border-left: 3px solid #00a19a;
    background: #f4f6f9;
}

.busqueda-vacia p { margin: 0 0 .7rem; }
.busqueda-vacia ul { margin: 0; padding-left: 1.2em; }
.busqueda-vacia li { margin-bottom: 4px; }

/* ── Listado de eventos ───────────────────────────────────────────────────── */

.eventos-listado .eventos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
    gap: 1.6rem;
}

.eventos-anteriores-nota {
    margin: -8px 0 20px;
    color: #65728a;
    font-size: .92rem;
}

.eventos-anteriores .exa-concursos-anio {
    margin: 2rem 0 1rem;
    color: #65728a;
    font-size: 1.05rem;
}

.evento-ficha.es-pasado { opacity: .78; }
.evento-ficha.es-pasado:hover,
.evento-ficha.es-pasado:focus-within { opacity: 1; }

/* ── Botones del editor de bloques ────────────────────────────────────────── */
/*
 * El bloque «Botón» de Gutenberg quedaba con el color y el subrayado que el
 * tema le da a cualquier <a>: texto azul subrayado sobre el fondo oscuro del
 * botón, ilegible. Pasa en cualquier página que use el bloque, y ahora lo usan
 * Ingreso 2027, Institucional y las entradas del carrusel.
 */

/*
 * Los selectores llevan `.page-inst-content` porque esa regla —la que pinta de
 * azul y subraya cualquier <a> del contenido institucional— es más específica
 * que un `.wp-block-button__link` suelto y le ganaba al botón.
 */
.wp-block-button__link,
.page-inst-content .wp-block-button__link {
    display: inline-block;
    padding: 13px 26px;
    color: #fff;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    background: #1e2f4f;
    border-radius: 6px;
    transition: background .15s ease, transform .05s ease;
}

.wp-block-button__link:hover,
.wp-block-button__link:focus,
.page-inst-content .wp-block-button__link:hover,
.page-inst-content .wp-block-button__link:focus {
    color: #fff;
    text-decoration: none;
    background: #1e4a9c;
}

.wp-block-button__link:active { transform: translateY(1px); }

.wp-block-button__link:focus-visible {
    outline: 3px solid rgba(30, 74, 156, .45);
    outline-offset: 2px;
}

/* Variante secundaria: el estilo «esquema» del propio editor. */
.wp-block-button.is-style-outline .wp-block-button__link,
.page-inst-content .wp-block-button.is-style-outline .wp-block-button__link {
    color: #1e2f4f;
    background: transparent;
    border: 2px solid #1e2f4f;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
    color: #fff;
    background: #1e2f4f;
}

.wp-block-buttons { margin: 1.6rem 0; }
