/* ===== ANIMACIONES AVANZADAS ===== */

/* Animación de pulso para botones */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(243, 146, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(243, 146, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(243, 146, 0, 0);
    }
}

.btn-pulse {
    animation: pulse 2s infinite;
}

.btn-pulse:hover {
    animation: none;
}

/* Animación de brillo para botones secundarios */
@keyframes shine {
    0% {
        background-position: -100% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-20deg);
    animation: shine 3s infinite;
}

/* Animación de flotación */
@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.btn-float {
    animation: float 3s ease-in-out infinite;
}

.btn-float:hover {
    animation: none;
}

/* Animación del logo */
@keyframes logoGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(243, 146, 0, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(243, 146, 0, 0.8));
    }
    100% {
        filter: drop-shadow(0 0 5px rgba(243, 146, 0, 0.5));
    }
}

.logo-animado {
    animation: logoGlow 3s ease-in-out infinite;
}

.logo-animado:hover {
    animation: none;
    transform: scale(1.05);
    transition: transform 0.3s ease;
}

/* Animación de las tarjetas 3D */
.card-3d {
    perspective: 1000px;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

.card-3d:hover {
    transform: rotateY(5deg) rotateX(5deg);
}

.card-front, .card-back {
    backface-visibility: hidden;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-3d:hover .card-front {
    transform: rotateY(180deg);
}

.card-3d:hover .card-back {
    transform: rotateY(0deg);
}

/* Animación de entrada para el hero */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-content {
    animation: fadeInScale 1.5s ease-out;
}

/* Animación para el contador de visitas */
@keyframes counterPulse {
    0% {
        background-color: var(--verde-oscuro);
    }
    50% {
        background-color: var(--naranjo-intenso);
    }
    100% {
        background-color: var(--verde-oscuro);
    }
}

.visit-counter {
    animation: counterPulse 3s ease-in-out infinite;
}

/* Animación para el scroll indicator */
@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.scroll-icon {
    animation: scrollBounce 2s infinite;
}

/* Animación para las partículas del hero */
.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    pointer-events: none;
}

@keyframes particleFloat {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Animación para las tarjetas de valor */
.value-card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-card-hover:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.2);
}

.value-card-hover:hover .value-icon {
    animation: iconSpin 0.6s ease;
}

@keyframes iconSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Animación para los contadores numéricos */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number.count-up-animation {
    animation: countUp 1s ease-out;
}

/* Animación para el loader del brochure */
@keyframes loaderSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loader-brochure i {
    animation: loaderSpin 1s linear infinite;
}

/* Animación para el modal */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal.show .modal-content {
    animation: modalFadeIn 0.3s ease-out;
}

/* Animación para los testimonios */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.testimonio-card.active {
    animation: slideInLeft 0.5s ease-out;
}

/* Animación para el botón volver arriba */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-volver-arriba.show {
    animation: fadeInUp 0.3s ease-out;
}

/* Animación para el header al hacer scroll */
.header-scrolled {
    animation: headerShrink 0.3s ease-out forwards;
}

@keyframes headerShrink {
    from {
        padding: 1rem 0;
    }
    to {
        padding: 0.5rem 0;
    }
}

/* Animación para el indicador de escritura */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

.typing-effect {
    overflow: hidden;
    white-space: nowrap;
    animation: typing 3s steps(40, end);
}

/* Animación para el efecto hover de los botones sociales */
.social-link {
    transition: all 0.3s ease;
}

.social-link:hover {
    transform: translateY(-5px) rotate(360deg);
}

/* Animación para el efecto ripple en botones */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 1;
    }
    20% {
        transform: scale(25, 25);
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: scale(40, 40);
    }
}

.ripple:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}