/* ============================================================================
   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 + filtro por materia + búsqueda
   ---------------------------------------------------------------------------- */
.docentes-grid {
    padding: 30px 0 80px;
}

.docentes-filter__title {
    color: #163a8a;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    margin-bottom: 14px;
}

.docentes-filter__bar {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: nowrap;
    margin-bottom: 40px;
}

.docentes-filter__chips {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    background: #eef2fb;
    border-radius: 12px;
    padding: 6px;
    cursor: grab;
    /* Scroll horizontal suave en táctil */
    -webkit-overflow-scrolling: touch;
    /* Ocultar la barra de scroll (se desliza con mouse/dedo) */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.docentes-filter__chips::-webkit-scrollbar {
    display: none;
}

.docentes-filter__chips.is-grabbing {
    cursor: grabbing;
}

.docentes-filter__search {
    flex: 0 0 auto;
}

.dchip {
    border: 0;
    background: transparent;
    color: #2f5bb7;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 18px;
    border-radius: 9px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.dchip:hover {
    color: #163a8a;
}

.dchip.is-active {
    background: #1c3d8f;
    color: #fff;
}

.docentes-filter__search {
    position: relative;
}

.docentes-filter__search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa3b2;
}

.docentes-filter__search input {
    border: 1px solid #d9dfe8;
    border-radius: 11px;
    padding: 12px 16px 12px 42px;
    font-size: 0.95rem;
    min-width: 260px;
    outline: none;
    transition: border-color 0.2s;
}

.docentes-filter__search input:focus {
    border-color: #1c3d8f;
}

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

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

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