/**
 * MinCiencia Consejeros CTCI - Estilos Frontend
 * Cuadrícula de tarjetas y modal detallado de trayectoria
 */

/* ==========================================================================
   Contenedor Principal y Reset Local
   ========================================================================== */
.mc-ctci-wrapper {
    box-sizing: border-box;
    width: 100%;
    margin: 0 auto 40px auto;
    font-family: inherit;
    color: #ffffff;
}

.mc-ctci-wrapper *,
.mc-ctci-wrapper *::before,
.mc-ctci-wrapper *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Filtros y Búsqueda Interactivos
   ========================================================================== */
.mc-ctci-filters-bar {
    margin-bottom: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.mc-ctci-search-row {
    width: 100%;
}

.mc-ctci-search-box {
    position: relative;
    max-width: 520px;
    width: 100%;
}

.mc-ctci-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #8b97c6;
    pointer-events: none;
}

.mc-ctci-search-input {
    width: 100%;
    height: 44px;
    background: #191c38;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0 38px 0 42px;
    font-size: 14px;
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.mc-ctci-search-input::placeholder {
    color: #7b88b4;
}

.mc-ctci-search-input:focus {
    border-color: #73e5bf;
    background: #1f2347;
    box-shadow: 0 0 0 3px rgba(115, 229, 191, 0.2);
}

.mc-ctci-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #8b97c6;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.mc-ctci-search-clear:hover {
    color: #ffffff;
}

.mc-ctci-filters-groups {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mc-ctci-filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.mc-ctci-filter-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #8b97c6;
    min-width: 150px;
}

.mc-ctci-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mc-ctci-filter-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #c5d0f1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.mc-ctci-filter-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
}

.mc-ctci-filter-btn.is-active {
    background: #73e5bf;
    color: #0c362b;
    border-color: #73e5bf;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(115, 229, 191, 0.3);
}

/* ==========================================================================
   Grilla de Consejeros (Imagen 1)
   ========================================================================== */
.mc-ctci-grid {
    display: grid;
    gap: 24px;
    width: 100%;
}

.mc-ctci-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.mc-ctci-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mc-ctci-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mc-ctci-cols-1 {
    grid-template-columns: 1fr;
}

@media (max-width: 1200px) {
    .mc-ctci-cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .mc-ctci-cols-4,
    .mc-ctci-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .mc-ctci-cols-4,
    .mc-ctci-cols-3,
    .mc-ctci-cols-2 {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Tarjeta Individual de Consejero (Imagen 1)
   ========================================================================== */
.mc-ctci-card {
    background-color: #212548;
    background-image: linear-gradient(180deg, #24284d 0%, #1e2243 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 22px 20px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    cursor: pointer;
}

.mc-ctci-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(115, 229, 191, 0.35);
}

/* Cabecera de la tarjeta: Avatar y Nombre */
.mc-ctci-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.mc-ctci-avatar-wrap {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #4f75f8 0%, #294eb8 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mc-ctci-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #171b36;
}

.mc-ctci-header-info {
    flex: 1;
    min-width: 0;
}

.mc-ctci-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: -0.2px;
}

/* Disciplina / Subtítulo */
.mc-ctci-disciplina {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #7ce0c3;
    margin-bottom: 14px;
}

/* Institución */
.mc-ctci-institucion-block {
    margin-bottom: 18px;
}

.mc-ctci-meta-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    color: #8b97c6;
    margin-bottom: 3px;
}

.mc-ctci-meta-value {
    font-size: 0.88rem;
    color: #e2e8f0;
    line-height: 1.35;
    font-weight: 400;
}

/* Píldoras de Área y Sector */
.mc-ctci-pills-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 28px;
}

.mc-ctci-pill {
    display: inline-flex;
    align-items: center;
    background-color: #d1f3e3;
    color: #103c30;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    line-height: 1.2;
    letter-spacing: 0.1px;
}

/* Footer de la tarjeta con Botón */
.mc-ctci-card-footer {
    margin-top: auto;
}

.mc-ctci-btn-trayectoria {
    width: 100%;
    background-color: #73e5bf;
    color: #0c362b;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.mc-ctci-btn-trayectoria:hover {
    background-color: #5fe0b5;
    box-shadow: 0 4px 14px rgba(115, 229, 191, 0.4);
    transform: translateY(-1px);
}

.mc-ctci-arrow-icon {
    transition: transform 0.2s ease;
}

.mc-ctci-btn-trayectoria:hover .mc-ctci-arrow-icon {
    transform: translateX(3px);
}

/* ==========================================================================
   Modal Detallado de Trayectoria Profesional (Imagen 2)
   ========================================================================== */
.mc-ctci-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mc-ctci-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.mc-ctci-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(9, 12, 26, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

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

.mc-ctci-modal-dialog {
    position: relative;
    z-index: 2;
    background-color: #202447;
    background-image: linear-gradient(180deg, #22274b 0%, #1c2041 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 100%;
    max-width: 660px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 32px 32px 32px;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
    transform: scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.mc-ctci-modal-overlay.is-active .mc-ctci-modal-dialog {
    transform: scale(1);
}

/* Barra superior: Badge y Botón Cerrar */
.mc-ctci-modal-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    min-height: 32px;
}

.mc-ctci-modal-badge-holder {
    flex: 1;
}

.mc-ctci-modal-badge {
    display: inline-flex;
    align-items: center;
    background-color: #d1f3e3;
    color: #103c30;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: 0.1px;
}

.mc-ctci-modal-close {
    background-color: #2c3258;
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    margin-left: auto;
}

.mc-ctci-modal-close:hover {
    background-color: #3b4375;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Contenido Principal del Modal */
.mc-ctci-modal-body {
    display: flex;
    flex-direction: column;
}

/* Avatar central grande con aro eléctrico */
.mc-ctci-modal-avatar-wrap {
    width: 104px;
    height: 104px;
    border-radius: 50%;
    margin: 0 auto 16px auto;
    padding: 3px;
    background: linear-gradient(135deg, #4578ff 0%, #1e45c4 100%);
    box-shadow: 0 0 20px rgba(69, 120, 255, 0.45);
}

.mc-ctci-modal-avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: #171b36;
}

/* Datos centrados */
.mc-ctci-modal-name {
    font-size: 1.55rem;
    font-weight: 700;
    color: #ffffff;
    text-align: center;
    margin: 0 0 6px 0;
    letter-spacing: -0.2px;
}

.mc-ctci-modal-disciplina {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #7ce0c3;
    text-align: center;
    margin-bottom: 4px;
}

.mc-ctci-modal-institucion {
    font-size: 0.95rem;
    color: #cbd5e1;
    text-align: center;
    margin-bottom: 14px;
}

.mc-ctci-modal-pills {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

/* Líneas divisorias */
.mc-ctci-modal-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.12);
    margin: 22px 0;
    width: 100%;
}

/* Trayectoria Profesional */
.mc-ctci-modal-section-title {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #8b97c6;
    margin: 0 0 14px 0;
}

.mc-ctci-modal-bio {
    font-size: 0.94rem;
    line-height: 1.68;
    color: #e2e8f0;
}

.mc-ctci-modal-bio p {
    margin: 0 0 14px 0;
}

.mc-ctci-modal-bio p:last-child {
    margin-bottom: 0;
}

/* Footer del Modal: Navegación Anterior / Siguiente */
.mc-ctci-modal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.mc-ctci-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 22px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.mc-ctci-nav-prev {
    background-color: #252b4d;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-weight: 500;
}

.mc-ctci-nav-prev:hover:not(:disabled) {
    background-color: #323a66;
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.mc-ctci-nav-next {
    background-color: #73e5bf;
    color: #0c362b;
    border: 1px solid #73e5bf;
    font-weight: 600;
}

.mc-ctci-nav-next:hover:not(:disabled) {
    background-color: #5fe0b5;
    border-color: #5fe0b5;
    box-shadow: 0 4px 14px rgba(115, 229, 191, 0.4);
}

.mc-ctci-nav-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Responsive del Modal */
@media (max-width: 600px) {
    .mc-ctci-modal-dialog {
        padding: 22px 18px;
    }
    .mc-ctci-modal-name {
        font-size: 1.3rem;
    }
    .mc-ctci-modal-avatar-wrap {
        width: 86px;
        height: 86px;
    }
    .mc-ctci-nav-btn {
        flex: 1;
        justify-content: center;
        padding: 9px 12px;
    }
}

/* Mensajes de vacío */
.mc-ctci-empty,
.mc-ctci-no-results {
    background: #212548;
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 36px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}
