/**
 * ============================================================
 *  MÓDULO: Talento Humano → Inicio
 *  Ruta: /portal/afa/talento/inicio/talento.css
 *  Convención de clases: prefijo .th-
 *  Estética alineada con General y Avanzado
 * ============================================================
 */

/* CONTENEDOR PRINCIPAL */
.th-principal-wrapper {
    padding: 8px 0 32px;
    font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* CABECERA */
.th-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.th-header-titles {
    max-width: 720px;
}

.th-title {
    margin: 0 0 4px 0;
    font-size: 1.9rem;
    font-weight: 700;
    color: #003666;
    font-family: "Museo Slab 2", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
}

.th-title i {
    font-size: 1.4rem;
    color: #0082cf;
}

.th-subtitle {
    margin: 0;
    font-size: 0.95rem;
    color: #025993;
    font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.th-header-user {
    text-align: right;
    font-size: 0.85rem;
    color: #4b5563;
}

.th-header-user-label {
    display: block;
    color: #6b7280;
    margin-bottom: 2px;
}

.th-header-user-name {
    font-weight: 600;
    color: #003259;
}

/* GRID DE TARJETAS */
.th-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 20px;
}

/* TARJETAS */
.th-card {
    position: relative;
    background: linear-gradient(135deg, #f4f8ff 0%, #ffffff 45%, #ffffff 100%);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    gap: 18px;
    align-items: center;
    cursor: pointer;

    border: 1px solid #e8eef5;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);

    transition:
        transform 0.18s ease,
        box-shadow 0.22s ease,
        background 0.22s ease;

    height: 100%;
    box-sizing: border-box;
}

.th-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    background: radial-gradient(circle at 0% 0%, rgba(64, 233, 229, 0.08), transparent 55%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.th-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 38px rgba(0, 0, 0, 0.08);
}

.th-card:hover::before {
    opacity: 1;
}

/* ICONO TARJETA */
.th-card-icon {
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(145deg, #e0f2ff, #ffffff);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(2, 89, 147, 0.18);
}

.th-card-icon i {
    font-size: 2.0rem;
    color: #0082cf;
}

/* CUERPO TARJETA */
.th-card-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.th-card-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #003259;
    font-family: "Dharma Gothic E", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0.02em;
}

.th-card-text {
    margin-top: 4px;
    font-size: 0.92rem;
    color: #025993;
    font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* VISTA DETALLE */
.th-view {
    display: none;
    margin-top: 22px;
    background: #ffffff;
    border-radius: 20px;
    padding: 22px 24px;
    border: 1px solid #e8eef5;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.05);
}

.th-view-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.th-view-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #003666;
    font-family: "Museo Slab 2", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* BOTÓN VOLVER */
.th-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    padding: 6px 14px;
    border-radius: 999px;

    border: 1px solid #d0d9e5;
    background: #f5f7fb;
    color: #003666;

    cursor: pointer;
    font-size: 0.9rem;
    font-family: "Raleway", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    transition:
        background 0.18s ease,
        transform 0.1s ease,
        box-shadow 0.18s ease;
}

.th-back-btn i {
    font-size: 0.9rem;
}

.th-back-btn:hover {
    background: #e7f1ff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

/* DETALLE DE CADA MÓDULO */
.th-view-body {
    margin-top: 6px;
}

.th-module {
    display: none;
}

.th-module.is-active {
    display: block;
}

.th-module-card {
    border-radius: 16px;
    border: 1px solid #e5edf6;
    background: #f9fafb;
    padding: 18px 18px 20px;
}

.th-module-title {
    margin: 0 0 6px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #003666;
}

.th-module-text {
    margin: 0 0 10px;
    font-size: 0.94rem;
    color: #4b5563;
}

.th-module-list {
    margin: 0 0 10px 18px;
    padding: 0;
    font-size: 0.9rem;
    color: #374151;
}

.th-module-list li + li {
    margin-top: 4px;
}

.th-module-note {
    margin: 6px 0 0;
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
}

/* ESTADO GENÉRICO DE CARGA (POR SI SE USA LUEGO) */
.th-view-body.is-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .th-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .th-header-user {
        text-align: left;
    }
}

@media (max-width: 600px) {
    .th-title {
        font-size: 1.6rem;
    }

    .th-card {
        padding: 18px;
    }

    .th-grid {
        grid-template-columns: 1fr;
    }

    .th-view-title {
        font-size: 1.4rem;
    }
}
