/* ============================================ */
/* ===== ESTILOS PARA DIRECTORIO ===== */
/* ============================================ */

.directorio-section {
    padding: 40px 0 60px;
    min-height: 100vh;
}

/* Encabezado */
.directorio-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.directorio-header-left h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--iesitblue-dark, #0d2b4e);
    margin-bottom: 0.3rem;
}

.text-gradient {
    background: linear-gradient(135deg, var(--iesitblue, #1a5a8a), var(--iesitblue-dark, #0d2b4e));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.directorio-header-left p {
    color: var(--gray-600, #6c757d);
    font-size: 1.1rem;
}

/* Filtro de botones */
.directorio-filtro {
    margin-bottom: 2rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filtro-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: nowrap;
    min-width: max-content;
}

.filtro-btn {
    padding: 8px 20px;
    border: 2px solid var(--iesitblue, #1a5a8a);
    background: transparent;
    color: var(--iesitblue, #1a5a8a);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filtro-btn:hover {
    background: var(--iesitblue, #1a5a8a);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(26, 90, 138, 0.3);
}

.filtro-btn.active {
    background: var(--iesitblue, #1a5a8a);
    color: white;
}

/* Grid de departamentos */
.directorio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

/* Tarjetas de departamento */
.depto-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.depto-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(26, 90, 138, 0.12);
    border-color: rgba(26, 90, 138, 0.15);
}

.depto-header {
    background: linear-gradient(135deg, var(--iesitblue-dark, #0d2b4e), var(--iesitblue, #1a5a8a));
    padding: 20px 20px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.depto-icono {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.depto-icono svg {
    width: 22px;
    height: 22px;
    color: white;
}

.depto-nombre {
    font-size: 1rem;
    font-weight: 700;
    color: white;
    flex: 1;
}

.depto-body {
    padding: 16px 20px;
}

/* Items de empleados */
.empleado-item {
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.empleado-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.empleado-item:first-child {
    padding-top: 0;
}

.empleado-info {
    margin-bottom: 8px;
}

.empleado-nombre {
    font-weight: 700;
    color: var(--text-color, #1e293b);
    font-size: 0.95rem;
}

.empleado-puesto {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 2px;
}

.empleado-contacto {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
}

.contacto-link {
    color: var(--iesitblue, #1a5a8a);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.contacto-link:hover {
    color: var(--iesitblue-dark, #0d2b4e);
}

.contacto-extension {
    color: #94a3b8;
    font-weight: 500;
}

.correo-link {
    color: #64748b;
}

.correo-link:hover {
    color: var(--iesitblue, #1a5a8a);
}

/* Footer de la sección */
.directorio-footer {
    text-align: center;
    padding: 30px 0 10px;
    border-top: 1px solid #e2e8f0;
    margin-top: 20px;
}

.directorio-footer p {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--iesitblue-dark, #0d2b4e);
    margin-bottom: 15px;
}

.btn-regresar {
    display: inline-block;
    background: var(--iesitblue, #1a5a8a);
    color: white;
    padding: 10px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--iesitblue, #1a5a8a);
}

.btn-regresar:hover {
    background: transparent;
    color: var(--iesitblue, #1a5a8a);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 90, 138, 0.2);
}

/* Animación de entrada */
.animate-card {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================ */
/* ===== RESPONSIVE ===== */
/* ============================================ */

@media (max-width: 992px) {
    .directorio-header-left h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .directorio-section {
        padding: 20px 0 40px;
    }

    .directorio-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .directorio-header-left h2 {
        font-size: 1.8rem;
    }

    .directorio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .filtro-selector {
        gap: 0.4rem;
    }

    .filtro-btn {
        padding: 6px 14px;
        font-size: 0.75rem;
    }

    .empleado-contacto {
        flex-direction: column;
        gap: 4px;
    }

    .depto-header {
        padding: 16px 16px 12px;
    }

    .depto-nombre {
        font-size: 0.9rem;
    }

    .depto-body {
        padding: 12px 16px;
    }

    .directorio-footer p {
        font-size: 1rem;
    }

    .btn-regresar {
        padding: 8px 24px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .directorio-header-left h2 {
        font-size: 1.5rem;
    }

    .directorio-header-left p {
        font-size: 0.95rem;
    }

    .filtro-selector {
        gap: 0.3rem;
    }

    .filtro-btn {
        padding: 5px 12px;
        font-size: 0.7rem;
    }

    .empleado-nombre {
        font-size: 0.85rem;
    }

    .empleado-puesto {
        font-size: 0.75rem;
    }

    .contacto-link {
        font-size: 0.75rem;
    }
}

/* Ocultar elementos al filtrar */
.depto-card.hidden {
    display: none;
}
