/* ===== ANIMACIONES CSS ===== */

/* Animaciones de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animaciones de hover */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
    }
}

/* Animaciones de carga */
@keyframes loadingDots {
    0%, 20% {
        color: rgba(255, 107, 53, 0.2);
        text-shadow: 0.25em 0 0 rgba(255, 107, 53, 0.2),
                     0.5em 0 0 rgba(255, 107, 53, 0.2);
    }
    40% {
        color: rgba(255, 107, 53, 0.5);
        text-shadow: 0.25em 0 0 rgba(255, 107, 53, 0.5),
                     0.5em 0 0 rgba(255, 107, 53, 0.2);
    }
    60% {
        text-shadow: 0.25em 0 0 rgba(255, 107, 53, 0.5),
                     0.5em 0 0 rgba(255, 107, 53, 0.5);
    }
    80%, 100% {
        text-shadow: 0.25em 0 0 rgba(255, 107, 53, 0.2),
                     0.5em 0 0 rgba(255, 107, 53, 0.2);
    }
}

/* Animaciones de scroll */
@keyframes slideInFromBottom {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animaciones de elementos específicos */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes wave {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(20deg);
    }
    75% {
        transform: rotate(-20deg);
    }
}

/* Clases de animación */
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-down {
    animation: fadeInDown 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out;
}

.animate-slide-in-up {
    animation: slideInUp 0.8s ease-out;
}

/* Animaciones de hover */
.hover-pulse:hover {
    animation: pulse 0.6s ease-in-out;
}

.hover-shake:hover {
    animation: shake 0.5s ease-in-out;
}

.hover-glow:hover {
    animation: glow 1s ease-in-out infinite;
}

/* Animaciones de carga */
.loading-dots::after {
    content: '...';
    animation: loadingDots 1.5s infinite;
}

/* Animaciones de scroll */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones de elementos específicos */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

.rotate-animation {
    animation: rotate 2s linear infinite;
}

.wave-animation {
    animation: wave 2s ease-in-out infinite;
}

/* Animaciones de navegación */
.nav-link {
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.2), transparent);
    transition: left 0.5s;
}

.nav-link:hover::before {
    left: 100%;
}

/* Animaciones de botones */
.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Animaciones de cards */
.tour-card,
.gallery-item,
.testimonial-card {
    transition: all 0.3s ease;
}

.tour-card:hover,
.gallery-item:hover,
.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Animaciones de filtros */
.filter-btn {
    transition: all 0.3s ease;
}

.filter-btn:hover {
    transform: translateY(-2px) scale(1.05);
}

.filter-btn.active {
    animation: scaleIn 0.3s ease-out;
}

/* Animaciones de hero */
.hero-title .title-line {
    display: inline-block;
    animation: fadeInUp 0.8s ease-out;
}

.hero-title .title-line:nth-child(2) {
    animation-delay: 0.2s;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-description {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.hero-buttons {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.hero-stats .stat-item {
    animation: fadeInUp 0.8s ease-out;
}

.hero-stats .stat-item:nth-child(1) {
    animation-delay: 1s;
}

.hero-stats .stat-item:nth-child(2) {
    animation-delay: 1.2s;
}

.hero-stats .stat-item:nth-child(3) {
    animation-delay: 1.4s;
}

/* Animaciones de secciones */
.section-header {
    animation: fadeInUp 0.8s ease-out;
}

.tour-filters {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.tours-grid {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Animaciones de galería */
.gallery-grid {
    animation: fadeInUp 0.8s ease-out;
}

.gallery-item {
    animation: scaleIn 0.6s ease-out;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

/* Animaciones de testimonios */
.testimonials-grid {
    animation: fadeInUp 0.8s ease-out;
}

.testimonial-card {
    animation: scaleIn 0.6s ease-out;
}

.testimonial-card:nth-child(1) { animation-delay: 0.1s; }
.testimonial-card:nth-child(2) { animation-delay: 0.2s; }
.testimonial-card:nth-child(3) { animation-delay: 0.3s; }

/* Animaciones de contacto */
.contact-info {
    animation: fadeInLeft 0.8s ease-out;
}

.contact-form-container {
    animation: fadeInRight 0.8s ease-out;
}

.social-links {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Animaciones de footer */
.footer-content {
    animation: fadeInUp 0.8s ease-out;
}

/* Animaciones de modal */
.modal {
    animation: fadeInUp 0.3s ease-out;
}

.modal-content {
    animation: scaleIn 0.3s ease-out;
}

/* Animaciones de loading */
.loading-spinner {
    animation: fadeInUp 0.3s ease-out;
}

/* Animaciones de scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Animaciones de parallax */
.parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Animaciones de texto */
.text-animation {
    overflow: hidden;
}

.text-animation span {
    display: inline-block;
    animation: slideInFromBottom 0.6s ease-out;
}

/* Animaciones de iconos */
.icon-animation {
    transition: all 0.3s ease;
}

.icon-animation:hover {
    transform: scale(1.2) rotate(5deg);
}

/* Animaciones de imágenes */
.image-hover {
    transition: all 0.3s ease;
}

.image-hover:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Animaciones de formularios */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    animation: glow 0.3s ease-out;
}

/* Animaciones de notificaciones */
.notification {
    animation: slideInFromTop 0.5s ease-out;
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

/* Animaciones de progreso */
.progress-bar {
    width: 0%;
    transition: width 1s ease-out;
}

/* Animaciones de contador */
.counter {
    animation: fadeInUp 0.6s ease-out;
}

/* Animaciones de menú móvil */
.nav-menu.active {
    animation: slideInFromTop 0.3s ease-out;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Animaciones de filtros activos */
.filter-btn.active {
    animation: pulse 0.3s ease-out;
}

/* Animaciones de carga de imágenes */
.image-loading {
    position: relative;
    overflow: hidden;
}

.image-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Animaciones de scroll suave */
html {
    scroll-behavior: smooth;
}

/* Animaciones de focus */
.btn:focus,
.nav-link:focus,
.filter-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Animaciones de estado de carga */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* Animaciones de éxito */
.success-animation {
    animation: scaleIn 0.3s ease-out;
}

/* Animaciones de error */
.error-animation {
    animation: shake 0.5s ease-in-out;
}

/* Animaciones de transición de página */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 9999;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.5s ease-in-out;
}

.page-transition.active {
    transform: scaleX(1);
    transform-origin: left;
} 