/* =====================================================
   CSS PARA PÁGINA PÚBLICA DE FUNCIONARIOS
   Municipalidad Provincial de Santa Cruz
   ===================================================== */

/* Buscador */
.search-section {
    margin-bottom: 2rem;
}

.search-box-funcionarios {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    max-width: 500px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.search-box-funcionarios:focus-within {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-box-funcionarios svg {
    width: 20px;
    height: 20px;
    color: #9ca3af;
    flex-shrink: 0;
}

.search-box-funcionarios input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1f2937;
    background: transparent;
}

.search-box-funcionarios input::placeholder {
    color: #9ca3af;
}

/* Título de sección */
.section-title-decorated {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.title-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.section-title-decorated h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

/* Sección Alta Dirección */
.direccion-section {
    margin-bottom: 3rem;
}

.funcionarios-destacados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.funcionario-card-destacado {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.funcionario-card-destacado:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.funcionario-imagen {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 4px solid #2563eb;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.funcionario-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb, #d1d5db);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.funcionario-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cargo-label {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    background: #f3f4f6;
    color: #4b5563;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    width: fit-content;
}

.cargo-label.alta-direccion {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
}

.funcionario-nombre {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.funcionario-area {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.funcionario-area svg {
    width: 16px;
    height: 16px;
}

.funcionario-descripcion {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.5;
    margin: 0.5rem 0;
}

.funcionario-contacto {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-top: auto;
}

.contacto-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #6b7280;
}

.contacto-item svg {
    width: 14px;
    height: 14px;
    color: #2563eb;
}

/* Sección Gerencias */
.gerencias-section {
    margin-bottom: 3rem;
}

.funcionarios-lista {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.area-grupo {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e7eb;
}

.area-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
}

/* Colores de gerencias */
.area-header.administracion { background: linear-gradient(135deg, #2563eb, #1e40af); }
.area-header.desarrollo { background: linear-gradient(135deg, #10b981, #059669); }
.area-header.servicios { background: linear-gradient(135deg, #0891b2, #0e7490); }
.area-header.social { background: linear-gradient(135deg, #f59e0b, #d97706); }
.area-header.juridica { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.area-header.planeamiento { background: linear-gradient(135deg, #ec4899, #be185d); }
.area-header.default { background: linear-gradient(135deg, #6b7280, #4b5563); }

.area-icon {
    font-size: 1.5rem;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.area-header h3 {
    flex: 1;
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.area-siglas {
    font-size: 0.8125rem;
    opacity: 0.9;
    font-weight: 500;
}

.funcionarios-items {
    padding: 1rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.funcionario-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.funcionario-item:hover {
    background: #f3f4f6;
}

.funcionario-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.funcionario-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d1d5db, #9ca3af);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.funcionario-datos {
    flex: 1;
    min-width: 0;
}

.funcionario-datos h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.funcionario-datos .cargo {
    font-size: 0.8125rem;
    color: #6b7280;
    margin: 0 0 0.35rem 0;
}

.datos-contacto {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.datos-contacto span {
    font-size: 0.75rem;
    color: #9ca3af;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.empty-state p {
    color: #6b7280;
    font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 768px) {
    .funcionarios-destacados {
        grid-template-columns: 1fr;
    }
    
    .funcionario-card-destacado {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .funcionario-info {
        align-items: center;
    }
    
    .funcionario-contacto {
        align-items: center;
    }
    
    .section-title-decorated {
        flex-direction: column;
        text-align: center;
    }
    
    .funcionarios-items {
        grid-template-columns: 1fr;
    }
}
