/* ============================================================================
   UNIEBEC — Docentes
   Estilos de la página de docentes (docentes.php). Diseño nuevo, fuera del
   template. El template (style.css y demás) no se modifica.
   ============================================================================ */

/* ----------------------------------------------------------------------------
   Hero / encabezado
   Banner de fondo a todo el ancho con texto centrado y breadcrumb en pastilla.
   La imagen de fondo se inyecta inline desde el JSON (campo hero.imagen_fondo).
   ---------------------------------------------------------------------------- */
.docentes-hero {
    position: relative;
    background-color: #f4f7fb;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    text-align: center;
    padding: 90px 20px;
    overflow: hidden;
}

/* Velo claro para que el texto resalte sobre la imagen */
.docentes-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(244, 247, 251, 0.72);
}

.docentes-hero .container {
    position: relative;
    z-index: 1;
}

.docentes-hero__title {
    color: #163a8a;
    font-weight: 700;
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.docentes-hero__subtitle {
    color: #2f5bb7;
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.docentes-hero__breadcrumb {
    display: inline-block;
    background: #e9edf3;
    color: #5b6478;
    padding: 9px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.docentes-hero__breadcrumb a {
    color: #5b6478;
    text-decoration: none;
    transition: color 0.2s;
}

.docentes-hero__breadcrumb a:hover {
    color: #163a8a;
}

@media (max-width: 991px) {
    .docentes-hero {
        padding: 60px 16px;
    }

    .docentes-hero__title {
        font-size: 2rem;
    }

    .docentes-hero__subtitle {
        font-size: 1rem;
    }
}

/* ----------------------------------------------------------------------------
   Grilla de docentes
   ---------------------------------------------------------------------------- */
.docentes-grid {
    padding: 40px 0 80px;
}

.docentes-section-title {
    color: #163a8a;
    font-weight: 700;
    font-size: 1.6rem;
    text-align: center;
    margin-bottom: 36px;
}

/* Cuadrícula */
.docentes-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.dcard {
    display: flex;
    flex-direction: column;
    background: #fbfcfe;
    border: 1px solid #eef1f6;
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

/* Variante: la foto va arriba (el orden se alterna automáticamente) */
.dcard--photo-top {
    flex-direction: column-reverse;
}

.dcard:hover {
    box-shadow: 0 12px 30px rgba(20, 45, 120, 0.10);
    transform: translateY(-3px);
}

.dcard__info {
    text-align: center;
    padding: 22px 16px;
}

.dcard__name {
    color: #163a8a;
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.dcard__subject {
    color: #7b8494;
    font-size: 0.95rem;
    margin-bottom: 14px;
}

.dcard__actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.dcard__icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fdeccb;
    color: #e9a400;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
}

.dcard__icon:hover {
    background: #fbdf9f;
    color: #e9a400;
}

.dcard__photo {
    line-height: 0;
    background: #e9edf3;
}

.dcard__photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    display: block;
}

/* Avatar por defecto cuando el docente aún no tiene foto */
.dcard__photo--empty {
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e9edf3 0%, #dbe4f2 100%);
}

.dcard__photo--empty i {
    font-size: 3.4rem;
    color: #b3c1d8;
    line-height: 1;
}

.docentes-empty {
    text-align: center;
    color: #7b8494;
    padding: 60px 0;
    font-size: 1.1rem;
}

@media (max-width: 1199px) {
    .docentes-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .docentes-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .docentes-filter__bar {
        flex-direction: column;
        align-items: stretch;
    }

    .docentes-filter__search input {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 479px) {
    .docentes-cards {
        grid-template-columns: 1fr;
    }
}
