/* ============================================
   ANIMACIONES - THREE STARS
   ============================================ */

/* SLIDE UP - Elementos suben desde abajo */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* SLIDE RIGHT - Elementos vienen desde la izquierda */
@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* FADE IN - Desvanecimiento suave */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* PULSE - Efecto de latido */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

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

/* GLOW - Efecto de brillo */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(212, 175, 55, 0.8);
    }
}

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

/* BOUNCE - Efecto de rebote */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 1s ease-in-out infinite;
}

/* SCROLL TRIGGER - Se activa al hacer scroll */
.scroll-trigger {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease-out;
}

.scroll-trigger.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* STAGGER ANIMATION - Para múltiples elementos */
.stagger-item {
    animation: slideUp 0.8s ease-out forwards;
}

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

/* HOVER EFFECTS */
.service-card {
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.1), transparent);
    transition: left 0.5s ease;
}

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

/* SMOOTH SCROLL TRANSITION */
html {
    scroll-behavior: smooth;
}

/* FADE IN ON SCROLL */
.fade-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease-out;
}

.fade-on-scroll.visible {
    opacity: 1;
}

/* SECTION TRANSITION */
section {
    position: relative;
}

/* SCALE UP ON HOVER */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* SHADOW LIFT */
.shadow-lift {
    transition: box-shadow 0.3s ease;
}

.shadow-lift:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* UNDERLINE EFFECT */
.underline-effect {
    position: relative;
    display: inline-block;
}

.underline-effect::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.underline-effect:hover::after {
    width: 100%;
}

/* BACKGROUND ANIMATION */
@keyframes bgShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-animate {
    background-size: 200% 200%;
    animation: bgShift 4s ease infinite;
}

/* NUMBER COUNTER */
@keyframes countUp {
    from {
        counter-increment: counter 0;
    }
    to {
        counter-increment: counter 100;
    }
}

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

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

/* PARALLAX EFFECT */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* MOBILE ANIMATIONS */
@media (max-width: 768px) {
    .slide-right {
        animation: slideRight 0.6s ease-out forwards;
    }

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

/* ACCESSIBILITY - Respeta preferencias de movimiento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}