/**
 * Módulo de Treinamento - Estilos Premium
 * Sistema RE/MAX v5.1
 */

/* ========================================
   📊 CARDS DE ESTATÍSTICAS
======================================== */

.stat-card-treinamento {
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card-treinamento::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card-treinamento:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
}

/* ========================================
   🎓 CARDS DE CURSOS
======================================== */

.curso-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.curso-card:hover {
    transform: translateY(-8px);
    border-color: #3B82F6;
}

/* Efeito de linha de progresso no topo do card */
.curso-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3B82F6, #8B5CF6, #EC4899);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.curso-card:hover::before {
    transform: scaleX(1);
}

/* ========================================
   🖼️ THUMBNAIL DOS CURSOS
======================================== */

.curso-card img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.curso-card:hover img {
    transform: scale(1.1);
}

/* Overlay escuro no hover */
.curso-card .relative::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.curso-card:hover .relative::after {
    opacity: 1;
}

/* ========================================
   📈 BARRAS DE PROGRESSO
======================================== */

.curso-card .bg-gray-200 {
    position: relative;
    overflow: hidden;
}

.curso-card .bg-gray-200::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer-progress 2s infinite;
}

@keyframes shimmer-progress {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ========================================
   🏆 BADGES E NÍVEIS
======================================== */

.badge-nivel {
    position: relative;
    overflow: hidden;
}

.badge-nivel::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.badge-nivel:hover::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   🎯 FILTROS
======================================== */

.filtro-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filtro-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.filtro-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filtro-btn.active {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* ========================================
   ⭐ AVALIAÇÕES
======================================== */

.fa-star {
    transition: transform 0.2s;
}

.curso-card:hover .fa-star {
    transform: rotate(360deg) scale(1.2);
}

/* ========================================
   🎬 ANIMAÇÕES DE ENTRADA
======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.curso-card {
    animation: fadeInUp 0.6s ease-out;
}

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

/* ========================================
   🎨 GRADIENTES PREMIUM
======================================== */

.bg-gradient-to-br {
    position: relative;
}

.bg-gradient-to-br::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* ========================================
   📱 RESPONSIVO
======================================== */

@media (max-width: 768px) {
    .stat-card-treinamento {
        padding: 20px;
    }
    
    .curso-card {
        margin-bottom: 20px;
    }
    
    .filtro-btn {
        padding: 8px 12px;
        font-size: 0.875rem;
    }
}

/* ========================================
   ✨ EFEITOS ESPECIAIS
======================================== */

/* Brilho animado nos certificados */
@keyframes shine {
    0% {
        background-position: -200%;
    }
    100% {
        background-position: 200%;
    }
}

.curso-card button[onclick*="baixarCertificado"] {
    position: relative;
    overflow: hidden;
}

.curso-card button[onclick*="baixarCertificado"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -200%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
}

/* Pulsação nos badges */
@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stat-card-treinamento .text-4xl {
    animation: pulse-badge 2s ease-in-out infinite;
}

/* Efeito de ondulação no hover dos botões */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.curso-card button:active::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: ripple 0.6s ease-out;
}

/* ========================================
   🎯 LINE CLAMP (Limitar linhas de texto)
======================================== */

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   🌟 DESTAQUES ESPECIAIS
======================================== */

/* Curso em destaque (primeiro da lista) */
#lista-cursos > .curso-card:first-child {
    position: relative;
}

#lista-cursos > .curso-card:first-child::after {
    content: '⭐ DESTAQUE';
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.4);
}

/* ========================================
   🎊 CONFETE (Animação de conquista)
======================================== */

@keyframes confetti-fall {
    0% {
        transform: translateY(-100%) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Aplicar no modal de certificado quando implementado */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    background: #3B82F6;
    animation: confetti-fall 3s linear infinite;
}
