/* ============================================
   DIRECTORIO DE ACTORES
   La tabla; el encabezado, el buscador, los filtros y la paginación están en
   portal.css.
   ============================================ */

/* ---------- Tabla ---------- */

.dir-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(13, 78, 117, 0.10);
}

.dir-table thead th {
    background: #DAE4F0;
    color: #0D4E75;
    text-align: left;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 18px;
}

/* Temas se queda con el resto (38 %): ahí van también el grupo temático y las
   líneas de investigación */
.dir-col-nombre { width: 22%; }
.dir-col-inst { width: 26%; }
.dir-col-tarjetas { width: 14%; }

.dir-table tbody th,
.dir-table tbody td {
    padding: 15px 18px;
    vertical-align: middle;
    border-bottom: 1px solid #e3ebf2;
    font-size: 0.92rem;
    text-align: left;
}

.dir-table tbody tr:nth-child(even) > * {
    background: #f8fbfd;
}

.dir-table tbody tr:last-child > * {
    border-bottom: none;
}

.dir-name {
    font-weight: 700;
    color: #0D4E75;
}

.dir-inst {
    color: #2c5f74;
    font-weight: 500;
}

.dir-inst small {
    display: block;
    margin-top: 2px;
    color: #4d6879;
    font-size: 0.78rem;
    font-weight: 500;
}

.dir-tarjeta {
    color: #0e668d;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: rgba(14, 102, 141, 0.35);
    text-underline-offset: 3px;
}

.dir-tarjeta:hover {
    text-decoration-color: currentColor;
}

/* Hay temas largos («Acción Comunitaria y Sustentabilidad Local»): si no
   caben en la celda, la etiqueta parte en dos renglones en vez de salirse */
.dir-table .chip {
    max-width: 100%;
    white-space: normal;
}

/* Grupo temático: la primera etiqueta de la celda de temas, con contorno
   para distinguirla de los temas */
.chip--grupo {
    background: #ffffff;
    box-shadow: inset 0 0 0 1.5px #9fbccd;
    color: #0D4E75;
}

a.chip--grupo:hover {
    background: #eef5f9;
}

/* Líneas de investigación: debajo de los temas, más chicas y en gris azulado,
   con su etiqueta como la de los datos de la fila en móvil */
.dir-lineas {
    margin: 8px 0 0;
    color: #4d6879;
    font-size: 0.8rem;
    line-height: 1.45;
}

.dir-lineas:first-child {
    margin-top: 0;
}

.dir-lineas-etiqueta {
    display: block;
    margin-bottom: 1px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4d6879;
}

/* Móvil: cada fila pasa a ser una tarjeta con la etiqueta de cada dato */
@media (max-width: 767.98px) {
    .dir-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .dir-table,
    .dir-table tbody,
    .dir-table tr,
    .dir-table tbody th,
    .dir-table tbody td {
        display: block;
        width: 100%;
    }

    .dir-table tbody tr {
        padding: 14px 16px;
        border-bottom: 1px solid #e3ebf2;
    }

    .dir-table tbody tr:nth-child(even) {
        background: #f8fbfd;
    }

    .dir-table tbody tr:last-child {
        border-bottom: none;
    }

    .dir-table tbody th,
    .dir-table tbody td {
        padding: 4px 0;
        border: none;
        background: none !important;
    }

    .dir-table tbody th {
        font-size: 1rem;
        padding-bottom: 6px;
    }

    .dir-table tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 2px;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #4d6879;
    }
}
