/* ==========================================================================
   asignaturas.css
   Basado en producciones.css, adaptado a las clases del shortcode
   [icyte_asignaturas] — tarjetas en una sola columna (una por fila)
   ========================================================================== */

/* --- Menú de filtros por carrera (píldora) --- */
/* --- Buscador por nombre o código --- */
.asignaturas-buscador-wrap {
    max-width: 400px;
    margin: 0 auto 1.5rem auto;
}

#asignaturas-buscador {
    width: 100%;
    padding: 0.7rem 1.1rem;
    border: 1px solid #00b2a9;
    border-radius: 9999px;
    font-size: 0.95rem;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#asignaturas-buscador:focus {
    border-color: #08d7cd;
    box-shadow: 0 0 0 3px rgba(47,186,249,0.15);
}

.asignaturas-filters {
    margin-bottom: 5rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    background-color: #e5e7eb;
    border-radius: 9999px;
    padding: 0.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
    gap: 0.25rem;
}

.asignaturas-filters .filter-btn-sm {
    padding: 0.55rem 0.9rem;
    border: none;
    border-radius: 9999px;
    background-color: transparent;
    color: #00b2a9;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.7rem;
    flex-grow: 1;
    text-align: center;
    white-space: normal;
}

.asignaturas-filters .filter-btn-sm.active {
    background-color: #ffffff;
    color: #08d7cd;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.asignaturas-filters .filter-btn-sm:hover {
    color: #08d7cd;
}

/* --- Contenedor: una tarjeta por fila --- */
.cards-container.design-2 {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 960px;
    margin: 0 auto;
}

/* --- Link que envuelve la tarjeta completa --- */
.asignatura-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* --- Tarjeta de asignatura --- */
.asignatura-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.3rem;
    background-color: #ffffff;
    padding: 1.5rem 1.75rem;
    border-radius: 0.75rem;
    border-left: 5px solid #00b2a9;
    
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);

    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.asignatura-card:hover {
    box-shadow: 0 20px 35px -15px rgba(0, 0, 0, 0.25);
    transform: translateY(-0.2rem);
    border-left: 5px solid #08d7cd;
}

/* --- Bloque izquierdo: título + carrera --- */
.asignatura-card .card-title {
    font-size: 1.4rem;
    line-height: 1.7rem;
    font-weight: 800;
    margin: 0 0 0.2rem 0;
}

.card-tipo-asignatura {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 0.4rem 0;
}

.card-carrera {
    color: #6b7280;
    font-size: 0.8rem;
    margin: 0;
}

.card-carrera .card-label {
    color: #6b7280;
    font-weight: 600;
}

.asignatura-card-main {
    width: 100%;
}

/* --- Bloque central: metadatos (código, área, créditos, horas) --- */
.asignatura-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 1.75rem;
    width: 100%;
    padding-top: 0.35rem;
    margin-top: 0;
    border-top: 1px solid #f0f0f0;
}

.asignatura-card-meta p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.3rem;
    color: #4b5563;
    white-space: nowrap;
}

.card-label {
    font-weight: 600;
    color: #1f2937;
}

.card-area {
    font-style: italic;
    color: #6b7280;
}

/* --- Responsive: en pantallas chicas, el detalle apilado en una sola columna --- */
@media screen and (max-width: 640px) {
    .asignatura-card-meta {
        flex-direction: column;
        gap: 0.35rem;
    }
}

@media screen and (min-width: 768px) {
    .asignaturas-filters .filter-btn-sm {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Página de detalle de asignatura (shortcode icyte_detalle_asignatura)
   ========================================================================== */

.detalle-asignatura {
    max-width: 800px;
    margin: 0 auto;
    padding: 1rem 0 3rem 0;
}

/* --- Header: icono + título + chips de metadatos --- */
.detalle-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding-bottom: 1.75rem;
    border-bottom: 2px solid #e2e8f0;
}

.detalle-header-icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #2fbaf9, #0072B2);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px -2px rgba(0, 114, 178, 0.4);
}

.detalle-header-icon svg {
    width: 28px;
    height: 28px;
}

.detalle-header-texto {
    flex: 1 1 auto;
    min-width: 0;
}

.detalle-titulo {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.3rem 0;
    line-height: 1.3;
}

.detalle-tipo-asignatura {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 0.85rem 0;
}

.detalle-meta-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background-color: #f3f4f6;
    border-radius: 9999px;
    padding: 0.4rem 0.9rem 0.4rem 0.6rem;
    font-size: 0.82rem;
    color: #374151;
}

.meta-chip svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #2fbaf9;
}

.meta-chip strong {
    font-weight: 600;
    color: #1f2937;
    margin-right: 0.2rem;
}

/* --- Subtítulo de sección --- */
.detalle-subtitulo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.6rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.25rem;
}

.detalle-subtitulo svg {
    width: 20px;
    height: 20px;
    color: #2fbaf9;
}

.detalle-sin-docentes {
    color: #6b7280;
    font-style: italic;
}

/* --- Docentes: una tarjeta por fila --- */
.docentes-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.docente-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background-color: #ffffff;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.12);
    transition: all 0.25s ease;
}

.docente-card:hover {
    box-shadow: 0 10px 20px -8px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

.docente-avatar-link {
    display: block;
    flex: 0 0 auto;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.docente-avatar-link:hover {
    transform: scale(1.06);
}

.docente-avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 9999px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
}

.docente-avatar-foto {
    object-fit: cover;
    background-color: #e5e7eb; /* placeholder mientras carga */
}

.docente-info {
    flex: 1 1 auto;
    min-width: 0;
}

.docente-nombre-link {
    text-decoration: none;
}

.docente-nombre-link:hover .docente-nombre {
    color: #2fbaf9;
}

.docente-nombre {
    display: block;
    font-weight: 700;
    color: #1f2937;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.docente-badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
}

.badge-funcion {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-cuatrimestre {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    background-color: #eef2f7;
    color: #4b5563;
}

.badge-cuatrimestre svg {
    width: 12px;
    height: 12px;
}

@media screen and (max-width: 480px) {
    .detalle-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* --- Botón de campus virtual --- */
.detalle-campus {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e2e8f0;
}

.btn-campus {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #2fbaf9, #0072B2);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.6rem;
    text-decoration: none;
    box-shadow: 0 4px 10px -2px rgba(0, 114, 178, 0.4);
    transition: all 0.25s ease;
}

.btn-campus:hover {
    box-shadow: 0 6px 16px -2px rgba(0, 114, 178, 0.55);
    transform: translateY(-1px);
    color: #ffffff;
}

.btn-campus svg {
    width: 18px;
    height: 18px;
}
