/* personal.css - Estilos específicos para el directorio del personal */

/* Hero Section */
.directorio-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--highlight-color) 100%);
    padding: 4rem 0 3rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.directorio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><polygon points="0,0 1000,20 1000,100 0,80"/></svg>');
    background-size: 100% 100%;
}

.hero-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    animation: heroIconBounce 2s ease-in-out infinite;
}

@keyframes heroIconBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Container Principal */
.directorio-container {
    width: 95%;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Sección de Búsqueda */
.search-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--primary-color);
    z-index: 3;
    font-size: 1.1rem;
}

.search-input {
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.75rem 1rem 0.75rem 3rem;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 93, 153, 0.25);
    outline: none;
}

.btn-clear {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: var(--text-light);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 3;
}

.btn-clear:hover {
    background: var(--accent-color);
    color: var(--dark-color);
}

.custom-select {
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    background: white;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.custom-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 93, 153, 0.25);
    outline: none;
}

.view-toggle {
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: var(--transition);
    background: white;
    color: var(--primary-color);
    width: 100%;
}

.view-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Vista de Tabla */
.table-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.custom-table {
    margin-bottom: 0;
    background: transparent;
}

.custom-table thead th {
    background: linear-gradient(135deg, var(--primary-color), var(--highlight-color));
    color: white;
    border: none;
    padding: 1rem 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    position: relative;
}

.custom-table thead th:first-child {
    border-top-left-radius: 15px;
}

.custom-table thead th:last-child {
    border-top-right-radius: 15px;
}

.sortable {
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
}

.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sort-icon {
    margin-left: 0.5rem;
    opacity: 0.6;
    transition: var(--transition);
}

.sortable:hover .sort-icon {
    opacity: 1;
}

.custom-table tbody tr {
    transition: var(--transition);
    border: none;
    background: rgba(255, 255, 255, 0.8);
}

.custom-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.9);
}

.custom-table tbody tr:hover {
    background: rgba(255, 215, 0, 0.1);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.custom-table tbody td {
    padding: 1rem 0.75rem;
    border: none;
    vertical-align: middle;
}

/* Avatar Styles */
.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    border: 3px solid var(--primary-color);
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    color: white;
}

.avatar-container:hover .avatar-overlay {
    opacity: 1;
}

.avatar-container:hover .avatar {
    transform: scale(1.1);
}

/* Text Containers */
.name-container .name-text {
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1rem;
}

.titulo-container .titulo-text {
    color: var(--text-dark);
    font-style: italic;
    background: linear-gradient(135deg, var(--primary-color), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 500;
}

.email-container .email-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.email-container .email-link:hover {
    color: var(--highlight-color);
    text-decoration: underline;
}

.date-container {
    color: var(--text-dark);
    font-weight: 500;
}

.date-container .date-text {
    background: var(--accent-color);
    color: var(--dark-color);
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Vista de Tarjetas */
.card-view {
    margin-bottom: 2rem;
}

.personal-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.personal-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2rem 1rem 1rem;
    text-align: center;
    position: relative;
}

.avatar-large {
    width: 100px;
    height: 100px;
    margin: 0 auto;
    position: relative;
}

.avatar-large img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.avatar-placeholder-large {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    border: 4px solid white;
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 1.5rem;
    text-align: center;
    flex: 1;
}

.card-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card-title {
    color: var(--primary-color);
    font-style: italic;
    margin-bottom: 1rem;
    font-weight: 500;
}

.card-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.info-item i {
    color: var(--primary-color);
    width: 16px;
}

.info-text {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
}

.info-text:hover {
    color: var(--primary-color);
}

.card-actions {
    padding: 1rem 1.5rem;
    background: rgba(248, 250, 252, 0.8);
}

.btn-contact {
    background: linear-gradient(135deg, var(--primary-color), var(--highlight-color));
    border: none;
    border-radius: 25px;
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    width: 100%;
    transition: var(--transition);
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--highlight-color), var(--primary-color));
}

/* Estadísticas */
.stats-section {
    margin-top: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2rem;
    color: var(--dark-color);
    margin: 0;
    line-height: 1;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
    margin: 0;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* No Data States */
.no-data, .no-data-card {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.no-data i, .no-data-card i {
    font-size: 3rem;
    color: var(--text-light);
    opacity: 0.6;
}

.no-data h5, .no-data-card h5 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Animaciones de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.personal-row, .personal-card {
    animation: fadeInUp 0.6s ease-out;
}

.personal-row:nth-child(even), .personal-card:nth-child(even) {
    animation-delay: 0.1s;
}

/* Estados de filtrado */
.personal-row.hidden, .personal-card-col.hidden {
    display: none;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1199.98px) {
    .hero-title {
        font-size: 2.4rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 991.98px) {
    .directorio-hero {
        padding: 3rem 0 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-section {
        padding: 1.5rem;
    }
    
    .table-container {
        padding: 1rem;
    }
    
    .custom-table thead th {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .custom-table tbody td {
        padding: 0.75rem 0.5rem;
    }
    
    .avatar, .avatar-placeholder {
        width: 50px;
        height: 50px;
    }
    
    .avatar-placeholder {
        font-size: 1.25rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .directorio-container {
        width: 98%;
        padding: 0 0.5rem;
    }
    
    .hero-icon {
        font-size: 3rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .search-section {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .search-input {
        padding: 0.6rem 1rem 0.6rem 2.5rem;
        font-size: 0.9rem;
    }
    
    .search-icon {
        left: 0.75rem;
        font-size: 1rem;
    }
    
    .custom-select, .view-toggle {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        border-radius: 12px;
    }
    
    .table-container {
        border-radius: 15px;
        overflow-x: auto;
    }
    
    .custom-table {
        min-width: 600px;
    }
    
    .custom-table thead th {
        padding: 0.6rem 0.4rem;
        font-size: 0.75rem;
    }
    
    .custom-table tbody td {
        padding: 0.6rem 0.4rem;
        font-size: 0.85rem;
    }
    
    .avatar, .avatar-placeholder {
        width: 40px;
        height: 40px;
        border-width: 2px;
    }
    
    .avatar-placeholder {
        font-size: 1rem;
    }
    
    .name-container .name-text {
        font-size: 0.9rem;
    }
    
    .titulo-container .titulo-text {
        font-size: 0.85rem;
    }
    
    .email-container .email-link {
        font-size: 0.8rem;
    }
    
    .date-container .date-text {
        font-size: 0.8rem;
        padding: 0.2rem 0.4rem;
    }
    
    .personal-card {
        border-radius: 15px;
    }
    
    .card-header {
        padding: 1.5rem 1rem 0.75rem;
    }
    
    .avatar-large {
        width: 80px;
        height: 80px;
    }
    
    .avatar-placeholder-large {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .card-name {
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .info-item {
        font-size: 0.8rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        border-radius: 15px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .stat-number {
        font-size: 1.25rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .search-section {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .custom-table thead th {
        padding: 0.5rem 0.25rem;
        font-size: 0.7rem;
    }
    
    .custom-table tbody td {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }
    
    .avatar, .avatar-placeholder {
        width: 35px;
        height: 35px;
    }
    
    .avatar-placeholder {
        font-size: 0.9rem;
    }
    
    .name-container .name-text {
        font-size: 0.8rem;
    }
    
    .titulo-container .titulo-text {
        font-size: 0.75rem;
    }
    
    .email-container .email-link {
        font-size: 0.75rem;
    }
    
    .date-container .date-text {
        font-size: 0.7rem;
        padding: 0.15rem 0.3rem;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin: 0 auto;
    }
}

/* Efectos adicionales para mejorar la experiencia */
.search-input:focus {
    transform: scale(1.02);
}

.personal-row:hover .avatar {
    box-shadow: 0 0 20px rgba(0, 93, 153, 0.4);
}

.personal-card:hover .avatar-large img,
.personal-card:hover .avatar-placeholder-large {
    transform: scale(1.1);
}

/* Animación de loading para búsqueda */
@keyframes searchPulse {
    0% { opacity: 1; }
    50% { opacity: 0.6; }
    100% { opacity: 1; }
}

.searching {
    animation: searchPulse 1s ease-in-out infinite;
}

/* Estilos para tooltips personalizados */
.custom-tooltip {
    position: relative;
}

.custom-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-color);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.custom-tooltip:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* Estilos para indicadores de estado */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-active {
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-inactive {
    background: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

/* Estilos para badges */
.custom-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-secondary {
    background: var(--secondary-color);
    color: var(--dark-color);
}

.badge-accent {
    background: var(--accent-color);
    color: var(--dark-color);
}

/* Animaciones de entrada secuencial */
.fade-in-sequence {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSequence 0.6s ease-out forwards;
}

@keyframes fadeInSequence {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-sequence:nth-child(1) { animation-delay: 0.1s; }
.fade-in-sequence:nth-child(2) { animation-delay: 0.2s; }
.fade-in-sequence:nth-child(3) { animation-delay: 0.3s; }
.fade-in-sequence:nth-child(4) { animation-delay: 0.4s; }
.fade-in-sequence:nth-child(5) { animation-delay: 0.5s; }
.fade-in-sequence:nth-child(6) { animation-delay: 0.6s; }

/* Estilo para scroll personalizado */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: var(--highlight-color);
}

/* Print styles */
@media print {
    .search-section,
    .stats-section,
    .card-actions,
    .view-toggle {
        display: none !important;
    }
    
    .directorio-hero {
        background: none !important;
        color: black !important;
        padding: 1rem 0 !important;
    }
    
    .personal-card,
    .table-container {
        background: white !important;
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .custom-table thead th {
        background: #f8f9fa !important;
        color: black !important;
    }
}

/* Accesibilidad mejorada */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus mejorado para navegación por teclado */
.search-input:focus,
.custom-select:focus,
.view-toggle:focus,
.sortable:focus,
.btn-contact:focus,
.email-link:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(247, 208, 56, 0.2);
}

/* Estados de carga */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}