/* 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;
}

/* —— Colaboraciones —— */
.kimelfe-home-collaborations {
    background: #f4f7fa;
    padding: 2.5rem 0;
    clear: both;
}

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

.kimelfe-home-collaborations .kimelfe-dashboard {
    margin: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 1.5rem 1.25rem;
    border: 1px solid #e8edf2;
}

.kimelfe-home-collaborations .kimelfe-dashboard h4 {
    margin: 0 0 0.35rem;
    padding: 0 0 0.75rem;
    border-top: none;
    border-bottom: 2px solid #e8edf2;
    background: transparent;
    font-size: 1.5rem;
    font-weight: 700;
    color: #13294b;
    letter-spacing: -0.02em;
}

.kimelfe-home-collaborations .kimelfe-dashboard-subtitle {
    margin: 0 0 1rem;
    color: #64748b;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.kimelfe-home-collaborations .kimelfe-collab-map {
    border-radius: 8px;
    border-color: #e8edf2;
}

.kimelfe-home-collaborations .kimelfe-areas-all-link {
    margin: 0.75rem 0 0;
}

/* —— ODS en inicio —— */
.kimelfe-home-ods {
    background: #fff;
    padding: 2.5rem 0;
    clear: both;
}

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

.kimelfe-home-ods-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    padding: 1.5rem 1.5rem 1.25rem;
    border: 1px solid #e8edf2;
}

.kimelfe-home-ods-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e8edf2;
}

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

.kimelfe-home-ods-intro {
    margin: 0;
    max-width: 720px;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #64748b;
}

.kimelfe-home-ods-view-all {
    flex-shrink: 0;
    align-self: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #167093;
    text-decoration: none;
}

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

.kimelfe-home-ods-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
}

.kimelfe-home-ods-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.55rem 0.65rem;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    background: #f8fafc;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.kimelfe-home-ods-item:hover,
.kimelfe-home-ods-item:focus {
    background: #fff;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(19, 41, 75, 0.08);
    text-decoration: none;
    color: inherit;
}

.kimelfe-home-ods-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 4px;
    object-fit: cover;
    display: block;
}

.kimelfe-home-ods-icon--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #13294b;
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

.kimelfe-home-ods-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.kimelfe-home-ods-code {
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.kimelfe-home-ods-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #13294b;
    line-height: 1.35;
}

.kimelfe-home-ods-count {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.1rem;
}

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

@media (max-width: 575px) {
    .kimelfe-home-collaborations .kimelfe-dashboard {
        padding: 1.15rem 1rem 1rem;
    }

    .kimelfe-home-ods {
        padding: 1.75rem 0;
    }

    .kimelfe-home-ods-panel {
        padding: 1.15rem 1rem 1rem;
    }

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

    .kimelfe-home-ods-header {
        flex-direction: column;
        align-items: stretch;
    }

    .kimelfe-home-ods-view-all {
        align-self: flex-start;
    }
}

@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;
    }
}
