/* ANIMACIONES PARA BANNER PRINCIPAL */

.hero-animation {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.animated-elements {
    position: relative;
    width: 350px;
    height: 350px;
}

/* Elementos animados */
.element {
    position: absolute;
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 3px solid rgba(46, 204, 113, 0.3);
    transition: all 0.3s ease;
}

.element:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(46, 204, 113, 0.6);
}

.element i {
    background: linear-gradient(135deg, #2ecc71, #3498db);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
}

/* Casco - Elemento principal */
.helmet {
    width: 100px;
    height: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 3s ease-in-out infinite;
}

.helmet i {
    font-size: 3rem;
}

/* Escudo */
.shield {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 20%;
    animation: floatRotate 8s ease-in-out infinite;
}

/* Corazón */
.heart {
    width: 70px;
    height: 70px;
    top: 20%;
    right: 20%;
    animation: floatRotate 8s ease-in-out infinite 2s;
}

/* Guantes */
.gloves {
    width: 75px;
    height: 75px;
    bottom: 20%;
    left: 15%;
    animation: floatRotate 8s ease-in-out infinite 4s;
}

/* Señales de seguridad */
.signs {
    width: 65px;
    height: 65px;
    bottom: 20%;
    right: 15%;
    animation: floatRotate 8s ease-in-out infinite 6s;
}

/* Animaciones */
@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 15px 35px rgba(46, 204, 113, 0.3);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.05);
        box-shadow: 0 20px 40px rgba(46, 204, 113, 0.5);
    }
}

@keyframes floatRotate {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-15px) rotate(5deg);
    }
    50% {
        transform: translateY(-25px) rotate(0deg);
    }
    75% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

/* Partículas de seguridad */
.safety-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(135deg, #2ecc71, #3498db);
    border-radius: 50%;
    opacity: 0.6;
    animation: particleFloat 10s linear infinite;
}

.particle:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { top: 20%; left: 80%; animation-delay: 2s; }
.particle:nth-child(3) { top: 80%; left: 20%; animation-delay: 4s; }
.particle:nth-child(4) { top: 70%; left: 70%; animation-delay: 6s; }
.particle:nth-child(5) { top: 50%; left: 5%; animation-delay: 8s; }
.particle:nth-child(6) { top: 30%; left: 90%; animation-delay: 1s; }
.particle:nth-child(7) { top: 90%; left: 50%; animation-delay: 3s; }
.particle:nth-child(8) { top: 5%; left: 50%; animation-delay: 5s; }

@keyframes particleFloat {
    0% {
        transform: translateY(0px) translateX(0px);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0;
    }
}

/* Líneas conectoras */
.connection-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.connection-line {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(46, 204, 113, 0.3), transparent);
    transform-origin: left center;
    animation: connectionPulse 4s ease-in-out infinite;
}

.line-1 {
    width: 120px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    animation-delay: 0s;
}

.line-2 {
    width: 100px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-45deg);
    animation-delay: 1s;
}

.line-3 {
    width: 110px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(135deg);
    animation-delay: 2s;
}

.line-4 {
    width: 90px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-135deg);
    animation-delay: 3s;
}

@keyframes connectionPulse {
    0%, 100% {
        opacity: 0;
        transform: translate(-50%, -50%) rotate(var(--rotation)) scaleX(0.5);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--rotation)) scaleX(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-animation {
        height: 300px;
    }
    
    .animated-elements {
        width: 250px;
        height: 250px;
    }
    
    .helmet {
        width: 80px;
        height: 80px;
    }
    
    .helmet i {
        font-size: 2.5rem;
    }
    
    .shield, .heart, .gloves, .signs {
        width: 60px;
        height: 60px;
    }
    
    .element i {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-animation {
        height: 250px;
    }
    
    .animated-elements {
        width: 200px;
        height: 200px;
    }
    
    .helmet {
        width: 70px;
        height: 70px;
    }
    
    .helmet i {
        font-size: 2rem;
    }
    
    .shield, .heart, .gloves, .signs {
        width: 50px;
        height: 50px;
    }
    
    .element i {
        font-size: 1.5rem;
    }
}
