/* ================================
   IMPERIO MÉXICO - ANIMACIONES ESTILO APPLE
   ================================ */

/* Reset y configuración base para animaciones */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fade In Animations - Aparición gradual */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 1;
    transform: translateX(0);
}

/* Delays para animaciones escalonadas */
.delay-100 { animation-delay: 0.1s; transition-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; transition-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; transition-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; transition-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; transition-delay: 0.5s; }

/* Hero Section - Animación de entrada */
.hero-content {
    opacity: 1;
    transform: scale(1);
}

.hero-image-wrapper {
    opacity: 1;
    transform: scale(1);
    overflow: hidden;
    border-radius: 1rem;
}

/* Video Background con overlay sutil */
.video-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.video-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.05) 0%,
        rgba(139, 92, 246, 0.05) 100%
    );
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.video-hero:hover::before {
    opacity: 1;
}

.video-hero video,
.video-hero img {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.video-hero:hover video,
.video-hero:hover img {
    transform: scale(1.02);
}

/* Pricing Cards - Efectos estilo Apple */
.pricing-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        135deg,
        rgba(99, 102, 241, 0.1) 0%,
        rgba(139, 92, 246, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.pricing-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.25) !important;
}

.pricing-card:hover::before {
    opacity: 1;
}

.pricing-card .card-body {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.pricing-card:hover .card-body {
    transform: translateZ(20px);
}

/* Efecto de brillo en featured cards */
.pricing-card.featured {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.pricing-card.featured::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
    pointer-events: none;
}

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Countdown Timer - Estilo Apple */
.countdown-wrapper {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
}

.countdown-timer {
    display: flex !important;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.countdown-item {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    min-width: 70px;
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.countdown-number {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    color: #ffffff !important;
    display: block !important;
}

.countdown-label {
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin-top: 0.5rem !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    display: block !important;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Parallax subtle effect */
.parallax-slow {
    will-change: transform;
}

/* Loading animation mejorada */
.page-loading {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                visibility 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.page-spinner {
    border-color: #6366f1 !important;
    border-right-color: transparent !important;
    animation: spinner 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

/* Botones con efecto ripple */
.btn-primary,
.btn-outline-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-primary::before,
.btn-outline-primary::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-primary:hover::before,
.btn-outline-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover,
.btn-outline-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.3);
}

/* Accordion mejorado */
.accordion-button {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

/* Imagen de venue con efecto de elevación */
.venue-image {
    border-radius: 1rem;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.venue-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Navbar con blur effect al hacer scroll */
.navbar.scrolled {
    backdrop-filter: blur(20px);
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .countdown-number {
        font-size: 2rem;
    }

    .countdown-item {
        min-width: 60px;
        padding: 1rem 0.5rem;
    }

    .pricing-card:hover {
        transform: translateY(-4px) scale(1.01);
    }

    /* Mejoras para scroll horizontal en mobile */
    .table-responsive-xxl {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth;
    }

    .row.flex-nowrap {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth;
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
    }

    .row.flex-nowrap > .col {
        flex: 0 0 auto;
        width: 85vw;
        max-width: 320px;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .pricing-card {
        min-width: auto !important;
    }

    .card {
        height: 100%;
    }

    /* Scroll indicators para mobile */
    .table-responsive-xxl::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9));
        pointer-events: none;
    }
}

/* Animación de entrada para secciones */
@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-animate {
    animation: sectionFadeIn 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

/* Glassmorphism effect para elementos premium */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Performance optimizations */
.pricing-card,
.video-hero,
.hero-image-wrapper,
.countdown-item {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}
