/* Regla defensiva: ocultar h1 vacío generado por el tema */
article header h1[itemprop="headline"]:empty,
.entry-header:has(h1:empty),
h1.entry-title:empty {
    display: none !important;
}

button.csi-btn-quick {
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    cursor: pointer;
}

.csi-wrapper-corporativo {
    max-width: 1140px !important;
    margin: 0 auto !important;
    padding: 20px 15px !important;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.csi-wrapper-corporativo input,
.csi-wrapper-corporativo textarea {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.csi-wrapper-corporativo img,
.csi-modal-dialog img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

.csi-catalogo-wrapper {
    background-color: #f0f8ff; /* Celeste muy claro */
    padding: 40px 20px;
    font-family: inherit;
}

.csi-filters {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.csi-filters-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.csi-search-container {
    width: 100%;
}

.csi-search-input {
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 1rem;
    box-sizing: border-box;
}

.csi-btn-load-more {
    background-color: #002B5E;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.csi-btn-load-more:hover {
    background-color: #001a38;
}

/* Paginación de Servicios */
.csi-pagination-container {
    margin-top: 35px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.csi-pagination-info {
    font-size: 0.92rem;
    color: #64748b;
    font-weight: 500;
}

.csi-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.csi-page-btn {
    background-color: #ffffff;
    color: #002B5E;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    min-width: 42px;
    height: 42px;
    padding: 8px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    user-select: none;
    font-family: inherit;
    text-decoration: none;
    box-sizing: border-box;
}

.csi-page-btn:hover:not(:disabled):not(.csi-page-btn-disabled):not(.csi-page-btn-active) {
    background-color: #e8f1fc;
    border-color: #002B5E;
    color: #002B5E;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 43, 94, 0.15);
}

.csi-page-btn-active {
    background-color: #002B5E !important;
    border-color: #002B5E !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(0, 43, 94, 0.28);
    cursor: default;
    transform: none !important;
}

.csi-page-btn-nav {
    padding: 8px 18px;
    font-weight: 600;
    border-radius: 8px;
}

.csi-page-btn:disabled,
.csi-page-btn-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background-color: #f1f5f9;
    border-color: #e2e8f0;
    color: #94a3b8;
    transform: none !important;
    box-shadow: none;
}

.csi-page-ellipsis {
    padding: 0 6px;
    color: #94a3b8;
    font-weight: 700;
    font-size: 1.1rem;
    user-select: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mensaje sin resultados */
.csi-no-results {
    background: #ffffff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    margin: 30px auto;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.csi-filter-estamento {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.csi-btn-estamento {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #333;
}

.csi-btn-estamento:hover {
    background-color: #f0f0f0;
}

.csi-btn-estamento.active {
    background-color: #002B5E;
    color: #fff;
    border-color: #002B5E;
}



.csi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
}

.csi-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.csi-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.csi-card-image img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: block;
}

.csi-card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.csi-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.csi-badge {
    background-color: #e9ecef;
    color: #495057;
    font-size: 0.75rem;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
}

/* Colores específicos de pills */
.csi-badge-docencia {
    background-color: #d4edda;
    color: #155724;
}

.csi-badge-investigacion {
    background-color: #cce5ff;
    color: #004085;
}

.csi-badge-administracion {
    background-color: #f8d7da;
    color: #721c24;
}

.csi-badge-alumnos {
    background-color: #fff3cd;
    color: #856404;
}

.csi-card-image {
    position: relative;
}

.csi-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    color: #1e293b;
    pointer-events: none;
}

.csi-status-badge-modal {
    position: static;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    padding: 4px 10px;
}

.csi-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.csi-status-operativo .csi-status-dot {
    background-color: #10b981;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: csiStatusPulse 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

.csi-status-mantenimiento .csi-status-dot {
    background-color: #f59e0b;
}

.csi-status-intermitente .csi-status-dot {
    background-color: #ef4444;
    animation: csiStatusPulseRed 2s infinite cubic-bezier(0.66, 0, 0, 1);
}

@keyframes csiStatusPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@keyframes csiStatusPulseRed {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Badge de Requisito de Acceso */
.csi-badge-access {
    background-color: #f8fafc;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    font-weight: 600;
}

.csi-card-title {
    font-size: 1.25rem;
    margin: 0 0 10px 0;
    color: #333;
}

.csi-card-excerpt {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
    flex-grow: 1;
}

.csi-card-excerpt p {
    margin-bottom: 0;
}

.csi-btn-acceder {
    background-color: #002B5E;
    color: #fff;
    text-align: center;
    padding: 10px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: block;
    box-shadow: 0 2px 4px rgba(0,43,94,0.2);
    margin-top: auto;
}

.csi-btn-acceder:hover, .csi-btn-acceder:focus {
    background-color: #004080;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,43,94,0.3);
}

/* Support Section */
.csi-support-section {
    margin-top: 50px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.csi-support-card {
    background-color: #002B5E;
    color: #fff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,43,94,0.2);
}

.csi-support-card h2 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 2rem;
}

.csi-support-card p {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.csi-support-card a {
    color: #FFC107;
    text-decoration: underline;
}

.csi-contact-section {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    text-align: center;
}

.csi-contact-section p {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 20px;
}

#csi-contact-form {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

#csi-contact-form input[type="email"] {
    padding: 12px 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 100%;
    max-width: 400px;
    font-size: 1rem;
}

#csi-contact-form .csi-btn-enviar {
    background-color: #002B5E;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#csi-contact-form .csi-btn-enviar:hover {
    background-color: #001a38;
}

/* ==========================================================================
   Estilos del Pop-up / Modal Informativo de Servicios
   ========================================================================== */

body.csi-modal-open {
    overflow: hidden !important;
}

.csi-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.csi-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 20, 50, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.csi-modal-dialog {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 60px -15px rgba(0, 43, 94, 0.4), 0 0 1px 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: csiModalZoomIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes csiModalZoomIn {
    0% {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.csi-modal-content-wrapper {
    overflow-y: auto;
    max-height: calc(90vh - 20px);
    display: flex;
    flex-direction: column;
    scrollbar-width: thin;
    scrollbar-color: #002B5E #f1f5f9;
}

.csi-modal-content-wrapper::-webkit-scrollbar {
    width: 7px;
}

.csi-modal-content-wrapper::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.csi-modal-content-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.csi-modal-content-wrapper::-webkit-scrollbar-thumb:hover {
    background: #002B5E;
}

/* Cabecera del Modal */
.csi-modal-header {
    padding: 24px 26px 18px 26px;
    background: linear-gradient(180deg, #fafbfc 0%, #ffffff 100%);
    border-bottom: 1px solid #edf2f7;
    position: relative;
}

.csi-modal-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
    gap: 15px;
}

.csi-modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.csi-badge-estamento {
    background-color: #002B5E !important;
    color: #ffffff !important;
    font-size: 0.72rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
}

.csi-modal-close-btn {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 1.5rem;
    line-height: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    margin-left: auto;
}

.csi-modal-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.08);
}

.csi-modal-identity {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.csi-modal-image-showcase,
.csi-modal-logo {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: 220px;
    background: #002B5E;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0, 43, 94, 0.08);
}

.csi-modal-image-showcase img,
.csi-modal-logo img {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 0;
    transition: transform 0.4s ease;
}

.csi-modal-image-showcase:hover img,
.csi-modal-logo:hover img {
    transform: scale(1.04);
}

.csi-modal-title-group {
    width: 100%;
}

.csi-modal-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #002B5E;
    margin: 0 0 6px 0;
    line-height: 1.25;
}

.csi-modal-subtitle {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.45;
}

/* Cuerpo del Modal */
.csi-modal-body-content {
    padding: 24px 26px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Caja de Alerta de Estado en el Modal */
.csi-modal-status-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    border-radius: 10px;
    line-height: 1.45;
    font-size: 0.92rem;
}

.csi-modal-status-alert-mantenimiento {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.csi-modal-status-alert-intermitente {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.csi-status-alert-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
}

.csi-status-alert-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.csi-status-alert-title {
    font-weight: 700;
}

.csi-status-alert-msg {
    font-weight: 400;
}

.csi-modal-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #002B5E;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.csi-section-icon {
    font-size: 1.15rem;
}

/* Caja de Reseña */
.csi-modal-resena-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

.csi-modal-description-text {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #334155;
}

.csi-modal-description-text p {
    margin-top: 0;
    margin-bottom: 12px;
}

.csi-modal-description-text p:last-child {
    margin-bottom: 0;
}

.csi-modal-description-text ul,
.csi-modal-description-text ol {
    margin: 8px 0 12px 20px;
    padding: 0;
}

.csi-modal-description-text li {
    margin-bottom: 5px;
}

/* Sección de Enlaces / Opciones */
.csi-modal-actions-box {
    display: flex;
    flex-direction: column;
}

.csi-modal-actions-hint {
    font-size: 0.88rem;
    color: #64748b;
    margin: -4px 0 14px 0;
}

.csi-modal-links-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.csi-modal-link-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 10px;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

/* Enlace Principal (CTA Destacado) */
.csi-modal-link-primary {
    background: linear-gradient(135deg, #002B5E 0%, #004085 100%);
    border: 1px solid #002B5E;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 43, 94, 0.2);
}

.csi-modal-link-primary:hover {
    background: linear-gradient(135deg, #001f44 0%, #00336a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 43, 94, 0.3);
    color: #ffffff !important;
}

.csi-modal-link-primary .csi-modal-link-icon {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.csi-modal-link-primary .csi-modal-link-title {
    color: #ffffff;
    font-size: 1.05rem;
}

.csi-modal-link-primary .csi-modal-link-desc {
    color: #e2e8f0;
}

.csi-modal-link-primary .csi-modal-link-arrow {
    color: #ffcc00;
}

/* Enlaces Secundarios / Opciones adicionales */
.csi-modal-link-secondary {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b !important;
}

.csi-modal-link-secondary:hover {
    background: #fdfdfd;
    border-color: #002B5E;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 43, 94, 0.09);
    color: #002B5E !important;
}

.csi-modal-link-secondary .csi-modal-link-icon {
    background: #f1f5f9;
}

.csi-modal-link-secondary:hover .csi-modal-link-icon {
    background: #e0f2fe;
}

.csi-modal-link-secondary .csi-modal-link-title {
    color: #002B5E;
    font-size: 0.98rem;
}

.csi-modal-link-secondary .csi-modal-link-desc {
    color: #64748b;
}

.csi-modal-link-secondary .csi-modal-link-arrow {
    color: #002B5E;
}

/* Componentes internos de cada enlace */
.csi-modal-link-icon {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: background 0.2s;
}

.csi-modal-link-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.csi-modal-link-title {
    font-weight: 700;
    line-height: 1.25;
}

.csi-modal-link-desc {
    font-size: 0.83rem;
    margin-top: 3px;
    line-height: 1.25;
}

.csi-modal-link-arrow {
    font-size: 1.25rem;
    font-weight: bold;
    margin-left: 10px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.csi-modal-link-item:hover .csi-modal-link-arrow {
    transform: translate(3px, -3px);
}

/* Pie del Modal */
.csi-modal-footer {
    padding: 16px 26px;
    background: #f8fafc;
    border-top: 1px solid #edf2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.csi-modal-footer-help {
    font-size: 0.84rem;
    color: #64748b;
    line-height: 1.4;
}

.csi-modal-footer-help a {
    color: #002B5E;
    font-weight: 600;
    text-decoration: underline;
}

.csi-modal-footer-close {
    background: #e2e8f0;
    color: #334155;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-left: auto;
}

.csi-modal-footer-close:hover {
    background: #cbd5e1;
    color: #0f172a;
}

/* Responsividad en pantallas pequeñas */
@media (max-width: 600px) {
    .csi-modal-overlay {
        padding: 10px;
    }

    .csi-modal-header {
        padding: 18px 18px 14px 18px;
    }

    .csi-modal-identity {
        gap: 12px;
    }

    .csi-modal-image-showcase,
    .csi-modal-logo {
        height: 160px;
        min-width: 100%;
        max-width: 100%;
        padding: 0;
        border-radius: 10px;
    }

    .csi-modal-image-showcase img,
    .csi-modal-logo img {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        object-fit: cover;
        object-position: center;
        border-radius: 0;
    }

    .csi-modal-body-content {
        padding: 18px;
        gap: 16px;
    }

    .csi-modal-title {
        font-size: 1.25rem;
    }

    .csi-modal-footer {
        padding: 14px 18px;
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .csi-modal-footer-close {
        width: 100%;
        margin-left: 0;
    }

    .csi-pagination {
        gap: 5px;
    }

    .csi-page-btn {
        min-width: 36px;
        height: 36px;
        padding: 6px 10px;
        font-size: 0.88rem;
    }

    .csi-page-btn-nav {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

