/* ============================================
   Animaciones CSS
   ============================================ */

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Slide Up Animation */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide Down Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scale Up Animation */
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Pulse Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Glow Animation */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(34, 204, 242, 0.6), 0 0 30px rgba(41, 242, 242, 0.4);
    }
    50% {
        box-shadow: 0 0 40px rgba(34, 204, 242, 0.9), 0 0 60px rgba(41, 242, 242, 0.6);
    }
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* ============================================
   Clases de Animación Reutilizables
   ============================================ */

.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.slide-down {
    animation: slideDown 0.6s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.scale-up {
    animation: scaleUp 0.5s ease-out forwards;
}

.bounce {
    animation: bounce 1s ease infinite;
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

.glow {
    animation: glow 2s ease-in-out infinite;
}

.rotate {
    animation: rotate 2s linear infinite;
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ============================================
   Animaciones de Entrada para Elementos
   ============================================ */

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Delays para animaciones en secuencia */
.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

.delay-4 {
    animation-delay: 0.4s;
}

.delay-5 {
    animation-delay: 0.5s;
}

/* ============================================
   Animaciones Específicas de Componentes
   ============================================ */

/* Hero Title Animation */
.hero-title {
    animation: slideDown 1s ease-out;
}

.hero-description {
    animation: slideUp 1s ease-out 0.2s backwards;
}

.hero-buttons {
    animation: slideUp 1s ease-out 0.4s backwards;
}

.hero-stats {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

/* Service Cards Hover Effect */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(34, 204, 242, 0.2),
        transparent
    );
    transform: rotate(45deg);
    transition: 0.5s;
}

.service-card:hover::before {
    left: 100%;
}

/* Button Ripple Effect */
.btn {
    position: relative;
    overflow: hidden;
}

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

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

/* Navigation Link Animation */
.nav-link {
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(34, 204, 242, 0.2);
    border-radius: 8px;
    transform: scaleX(0);
    transition: transform 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    transform: scaleX(1);
}

/* Logo Animation */
.logo-icon {
    display: inline-block;
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    animation: bounce 1s ease;
}

/* Stat Item Counter Animation */
.stat-number {
    display: inline-block;
}

.stat-item:hover .stat-number {
    animation: pulse 0.5s ease;
}

/* Footer Links Animation */
.footer-links a {
    position: relative;
    display: inline-block;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: -20px;
    opacity: 0;
    transition: opacity 0.3s ease, left 0.3s ease;
}

.footer-links a:hover::before {
    left: -15px;
    opacity: 1;
}

/* Social Links Hover */
.social-link {
    position: relative;
}

.social-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.social-link:hover::after {
    opacity: 1;
}

/* Menu Toggle Animation */
.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary-color);
    border-right-color: var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Skeleton Loading */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Parallax Effect Helper Class */
.parallax {
    transition: transform 0.5s ease-out;
}

/* Smooth Scroll Indicator */
@keyframes scrollDown {
    0%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    50% {
        transform: translateY(10px);
        opacity: 1;
    }
}

.scroll-indicator {
    animation: scrollDown 2s ease-in-out infinite;
}

/* Pulse Glow Animation - Para efectos de neón */
@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}




