
/* =========================================
   1. LAYOUT Y ANIMACIONES (UX DE ENTRADA)
   ========================================= */
    .flex-container {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
        /* Un poco más de aire */
        padding: 24px;
    }

    .fade-in {
        animation: fadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .skeleton-card {
        background: #f6f7f8;
        overflow: hidden;
        position: relative;
        border-radius: 20px;
    }

    .skeleton-card::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
        animation: loading 1.8s infinite;
    }

    @keyframes loading {
        0% {
            transform: translateX(-100%);
        }

        100% {
            transform: translateX(100%);
        }
    }

    /* =========================================
   2. LA TARJETA (CARD) Y AVATAR
   ========================================= */
    .card {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 28px;
        /* Más padding para que respire */
        background: #fff;
        border-radius: 20px;
        /* Bordes más suaves */
        /* Sombra inicial muy sutil */
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.04);
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        border: 1px solid #f2f2f2;
        max-width: 320px;
        position: relative;
    }

    .card:hover {
        transform: translateY(-8px);
        /* Sombra más dramática y difuminada en hover */
        box-shadow: 0 20px 35px rgba(0, 0, 0, 0.07);
        border-color: #e6e6e6;
    }

    .avatar-user {
        width: 90px;
        height: 90px;
        border-radius: 50%;
        margin: 0 auto 18px;
        background: #f0f2f5;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 4px solid #fff;
        /* Borde más grueso para resaltar */
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .card:hover .avatar-user {
        transform: scale(1.08) rotate(2deg);
    }

    .avatar-user img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Texto y Tipografía */
    .username-fl-dashboard {
        margin: 5px 0;
        font-size: 1.2rem;
        font-weight: 800;
        /* Más peso visual */
        color: #1a1a1a;
        letter-spacing: -0.3px;
        font-family: 'Inter', -apple-system, sans-serif;
    }

    .user-type-fl-dashboard {
        font-size: 0.9rem;
        color: #808080;
        margin-bottom: 18px;
        font-weight: 500;
    }

    /* =========================================
   3. BOTONES (MICRO-INTERACCIONES)
   ========================================= */
    .acciones-card {
        display: flex;
        gap: 12px;
        margin-top: 5px;
    }

    .action-btn {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 14px;
        /* Un poco más curvo */
        background: #ffffff;
        border: 1px solid #ededed;
        color: #555;
        cursor: pointer;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .action-btn i {
        font-size: 17px;
    }

    /* Efecto de clic (Hundimiento) */
    .action-btn:active {
        transform: scale(0.9);
    }

    .action-btn:hover {
        background: #f9f9f9;
        border-color: #ddd;
        color: #1a1a1a;
    }

    /* Botón Destacado (Contratar) */
    .action-btn.contratar {
        background: #f44336;
        color: white;
        border: none;
        box-shadow: 0 6px 15px rgba(244, 67, 54, 0.25);
    }

    .action-btn.contratar:hover {
        background: #e53935;
        transform: translateY(-4px);
        box-shadow: 0 10px 20px rgba(244, 67, 54, 0.35);
    }

    /* Botón Perfil (Ancho completo) */
    .btn-perfil {
        width: 100%;
        padding: 14px;
        border-radius: 14px;
        background: #f8f9fa;
        border: 1px solid #e9ecef;
        color: #495057;
        font-weight: 700;
        cursor: pointer;
        margin-top: 20px;
        transition: all 0.3s ease;
    }

    .btn-perfil:hover {
        background: #e9ecef;
        color: #212529;
    }

    .btn-perfil:active {
        transform: scale(0.98);
    }

    /* =========================================
   4. RESPONSIVE (UX MÓVIL)
   ========================================= */
    @media (max-width: 600px) {
        .flex-container {
            gap: 16px;
            padding: 16px;
        }

        .card {
            padding: 24px;
            max-width: 100%;
            width: 100%;
        }

        .action-btn {
            width: 52px;
            /* Área de toque óptima para pulgares */
            height: 52px;
        }

        .btn-perfil {
            order: 99;
            margin-top: 18px;
            padding: 16px;
        }
    }

    

    /* Tarjeta más compacta */
    .card-freelancer {
        background: #ffffff;
        border-radius: 12px;
        overflow: hidden;
        text-align: center;
        border: 1px solid #e6e8ec;
        transition: all 0.25s ease;
        width: 200px;
    }

    .card-freelancer:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    }

    /* Header más pequeño */
    .card-header-bg {
        height: 60px;
        display: flex;
        justify-content: center;
        align-items: flex-end;
        margin-bottom: 30px;
        position: relative;
    }

    /* Avatar más compacto */
    .avatar-wrapper {
        position: relative;
        bottom: -25px;
    }

    .avatar-oval {
        width: 60px;
        height: 72px;
        background: #f2f4f7;
        border-radius: 40% / 50%;
        border: 2px solid #fff;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    }

    /* Avatar completamente redondo */
    .avatar-oval {
        width: 70px;
        height: 70px;
        /* IMPORTANTE: mismo valor */
        border-radius: 50%;
        /* círculo perfecto */
        background: #f2f4f7;
        border: 2px solid #fff;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    }

    /* Imagen dentro */
    .avatar-oval img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Nombre */
    .username {
        font-size: 0.95rem;
        font-weight: 600;
        color: #1f2937;
        margin-top: 5px;
    }

    /* Rol */
    .user-role {
        font-size: 0.75rem;
        color: #6b7280;
        margin-bottom: 10px;
    }

    /* Status */
    .status-dot {
        position: absolute;
        bottom: 3px;
        right: 3px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: 2px solid #fff;
    }

    .online-pulse {
        background: #22c55e;
        animation: pulse-green 2s infinite;
    }

    .offline {
        background: #9ca3af;
    }

    @keyframes pulse-green {
        0% {
            box-shadow: 0 0 0 0px rgba(34, 197, 94, 0.6);
        }

        70% {
            box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
        }

        100% {
            box-shadow: 0 0 0 0px rgba(34, 197, 94, 0);
        }
    }

    /* Acciones */
    .acciones-modernas {
        display: flex;
        justify-content: center;
        gap: 6px;
        padding: 10px;
    }

    /* Botones más pequeños */
    .btn-action {
        border: none;
        border-radius: 8px;
        padding: 6px 10px;
        cursor: pointer;
        font-size: 12px;
        transition: all 0.2s ease;
    }

    /* CTA principal */
    .btn-action.primary {
        background: #2563eb;
        color: #fff;
    }

    .btn-action.primary:hover {
        background: #1d4ed8;
    }

    /* Secundario */
    .btn-action.secondary {
        background: #f9fafb;
        color: #374151;
        border: 1px solid #e5e7eb;
    }

    .btn-action.secondary:hover {
        background: #f3f4f6;
    }

    /* Badges */
    .badge-status {
        font-size: 10px;
        padding: 3px 8px;
        border-radius: 20px;
        font-weight: 600;
    }

    .verificado {
        background: #ecfdf5;
        color: #16a34a;
    }

    .pendiente {
        background: #fffbeb;
        color: #d97706;
    }

    


    /* Tarjeta de navegación */
    .nav-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 20px;
        margin-top: 20px;
        background: #f9fafb;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
        text-align: center;
    }

    .nav-buttons {
        display: flex;
        gap: 12px;
        margin: 12px 0;
    }

    .nav-buttons button {
        padding: 8px 14px;
        border-radius: 8px;
        border: 1px solid #d1d5db;
        cursor: pointer;
        font-weight: 600;
        transition: 0.2s;
    }

    .nav-buttons button:hover:not(:disabled) {
        background: #e5e7eb;
    }

    .nav-buttons button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    .nav-info h3 {
        margin: 4px 0 0;
    }

    .total-count {
        font-size: 12px;
        color: #6b7280;
    }



    /* Layout General */
    .main-dashboard {
        max-width: 1400px;
        margin: 0 auto;
        padding: 20px;
        font-family: 'Inter', sans-serif;
    }

    .content-layout {
        display: grid;
        grid-template-columns: 250px 1fr 250px;
        /* Sidebar | Lista | Sidebar */
        gap: 30px;
        align-items: start;
    }

    /* Centrar lista */
    .list-center {
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Centra las cards si el grid no está lleno */
    }

    .freelancers-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        /* 3 Columnas */
        gap: 20px;
        width: 100%;
    }

    /* Sección Destacados (Efecto Horizontal) */
    .destacados-grid {
        display: flex;
        gap: 20px;
        overflow-x: auto;
        padding: 20px 0;
        justify-content: center;
    }

    /* Tarjetas de Tips (Sidebars) */
    .sidebar-tips,
    .sidebar-community {
        position: sticky;
        top: 20px;
    }

    .tip-card {
        background: #ffffff;
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        border-left: 5px solid #6c5ce7;
        margin-bottom: 20px;
    }

    .tip-card.gold {
        border-left-color: #f1c40f;
    }

    .tip-card h4 {
        margin-top: 0;
        color: #1e293b;
        font-size: 1rem;
    }

    .tip-card p {
        font-size: 0.85rem;
        color: #64748b;
        line-height: 1.4;
    }

    .tip-card button {
        width: 100%;
        padding: 8px;
        margin-top: 10px;
        border-radius: 8px;
        border: none;
        background: #6c5ce7;
        color: white;
        font-weight: 600;
        cursor: pointer;
    }

    /* Barra de Progreso (Gamificación) */
    .progress-bar {
        background: #e2e8f0;
        height: 8px;
        border-radius: 10px;
        margin-top: 10px;
        overflow: hidden;
    }

    .progress {
        background: #2ecc71;
        height: 100%;
        transition: width 0.5s ease;
    }

    /* Responsive */
    @media (max-width: 1100px) {
        .content-layout {
            grid-template-columns: 1fr;
            /* Todo a una columna en tablets/móvil */
        }

        .sidebar-tips,
        .sidebar-community {
            display: none;
        }

        /* Ocultar laterales en móvil para limpieza */
        .freelancers-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 600px) {
        .freelancers-grid {
            grid-template-columns: 1fr;
        }
    }


     /* HEADER */
            .topbar {
                background: linear-gradient(to right, #363636, #2c3e50);
                height: 56px;
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 0 16px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            }

            /* HERO BUTTONS */
            .hero-buttons {
                text-align: center;
                margin: 40px 0;
            }

            .hero-buttons ul {
                list-style: none;
                padding: 0;
                margin: 0;
                display: inline-flex;
                gap: 20px;
            }

            .hero-btn {
                display: flex;
                align-items: center;
                gap: 12px;
                padding: 18px 36px;
                font-size: 18px;
                font-weight: 600;
                text-decoration: none;
                color: #fff;
                background: linear-gradient(135deg, #ff4b2b, #ff416c);
                border-radius: 14px;
                box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
                transition: all 0.25s ease;
            }

            .hero-btn:hover {
                transform: translateY(-5px);
                box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
            }



              
            /* CARDS */
            .w3-card,
            .w3-card-4 {
                border-radius: 16px !important;
            }

            /* MODALES */
            .w3-modal-content {
                border-radius: 18px;
            }

            /* BOTONES */
            .w3-button {
                border-radius: 10px;
                transition: 0.2s ease;
            }

            .w3-button:hover {
                transform: translateY(-2px);
            }


                    /* RESPONSIVE */
            @media (max-width: 600px) {
                .hero-buttons ul {
                    flex-direction: column;
                    gap: 15px;
                }

                .hero-btn {
                    width: 100%;
                    justify-content: center;
                }
            }

            .slider-container {
                overflow-x: auto;
                padding: 10px 0;
            }

            .slider {
                display: flex;
                gap: 15px;
                list-style: none;
                padding: 0 10px;
                margin: 0;
                scroll-snap-type: x mandatory;
            }

            .slider::-webkit-scrollbar {
                height: 6px;
            }

            .slider::-webkit-scrollbar-thumb {
                background: #ccc;
                border-radius: 10px;
            }



.radar-container {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: #f1f1f1;
    border-radius: 50%;
    border: 2px solid #3f51b5;
    overflow: hidden;
}

/* El haz de luz que gira */
.radar-sweep {
    position: absolute;
    width: 100%;
    height: 100%;
    background: conic-gradient(from 0deg, transparent 70%, rgba(63, 81, 181, 0.4) 100%);
    border-radius: 50%;
    display: none; /* Se activa al presionar */
}

/* El efecto de pulso */
.radar-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid rgba(63, 81, 181, 0.2);
    border-radius: 50%;
    animation: radar-pulse 2s infinite;
    display: none;
}

@keyframes radar-pulse {
    0% { transform: scale(0.1); opacity: 1; }
    100% { transform: scale(1.2); opacity: 0; }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.animar-radar { animation: spin 1.5s linear infinite !important; display: block !important; }
.animar-pulso { display: block !important; }



        @keyframes pulse {
            0% {
                transform: scale(1);
                opacity: .7;
            }

            50% {
                transform: scale(1.4);
                opacity: 1;
            }

            100% {
                transform: scale(1);
                opacity: .7;
            }
        }