/* Kimelfe – Inicio: Explora el portal (opción B) */

.kimelfe-home-explore {
    background: #f4f7fa;
    padding: 2.5rem 0 2rem;
    clear: both;
}

.kimelfe-home-explore .container {
    max-width: 1120px;
}

.kimelfe-home-explore-title {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #13294b;
    letter-spacing: -0.02em;
}

/* —— Métricas —— */
.kimelfe-home-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kimelfe-metric-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1.25rem 1.35rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.kimelfe-metric-card:hover,
.kimelfe-metric-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

.kimelfe-metric-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: #167093;
    font-variant-numeric: tabular-nums;
}

.kimelfe-metric-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #334155;
}

.kimelfe-metric-link {
    margin-top: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #167093;
}

.kimelfe-metric-card:hover .kimelfe-metric-link {
    text-decoration: underline;
}

/* —— Dos columnas —— */
.kimelfe-home-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.kimelfe-home-panel {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 1.25rem 1.35rem 1rem;
    min-height: 280px;
    display: flex;
    flex-direction: column;
}

.kimelfe-home-panel h3 {
    margin: 0 0 1rem;
    padding: 0 0 0.75rem;
    border-bottom: 2px solid #e8edf2;
    font-size: 1.0625rem;
    font-weight: 700;
    color: #13294b;
}

.kimelfe-home-panel-body {
    flex: 1;
}

.kimelfe-home-view-all {
    display: inline-block;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eef2f6;
    font-size: 0.875rem;
    font-weight: 600;
    color: #167093;
    text-decoration: none;
    align-self: flex-end;
}

.kimelfe-home-view-all:hover {
    text-decoration: underline;
    color: #13294b;
}

.kimelfe-home-loading,
.kimelfe-home-empty {
    margin: 0;
    padding: 1rem 0;
    color: #64748b;
    font-size: 0.9375rem;
}

/* —— Investigadores destacados —— */
.kimelfe-home-faculty-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.kimelfe-home-person-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.kimelfe-home-person-card:hover,
.kimelfe-home-person-card:focus {
    background: #eef6fa;
    border-color: #cfe8f3;
    text-decoration: none;
    color: inherit;
}

.kimelfe-home-person-card img {
    width: 52px;
    height: 52px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    background: #e2e8f0;
}

.kimelfe-home-person-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.kimelfe-home-person-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #13294b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.kimelfe-home-person-meta {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* —— Unidades académicas —— */
.kimelfe-home-dept-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.kimelfe-home-dept-list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eef2f6;
}

.kimelfe-home-dept-list li:last-child {
    border-bottom: none;
}

.kimelfe-home-dept-list a {
    display: block;
    padding: 0.65rem 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.15s ease, color 0.15s ease;
}

.kimelfe-home-dept-list a:hover {
    background: #eef6fa;
    color: #167093;
    text-decoration: none;
}

/* Ocultar fila antigua de 3 columnas si queda markup residual */
.row.faculty-home {
    display: none !important;
}

@media (max-width: 991px) {
    .kimelfe-home-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kimelfe-home-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .kimelfe-home-explore {
        padding: 1.75rem 0 1.5rem;
    }

    .kimelfe-home-metrics {
        grid-template-columns: 1fr;
    }

    .kimelfe-home-faculty-grid {
        grid-template-columns: 1fr;
    }

    .kimelfe-metric-value {
        font-size: 1.65rem;
    }
}
