/* 🚀 MOBILE OPTIMIZED CSS - PODCORN 🍿 */

/* Optimizaciones específicas para dispositivos móviles */
@media (max-width: 768px) {
    
    /* ===== OPTIMIZACIONES DE RENDIMIENTO ===== */
    
    /* Reducir animaciones complejas en móviles */
    .mobile-optimized * {
        animation-duration: 0.8s !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.3s !important;
    }
    
    /* Mejorar visibilidad de palomitas en móviles */
    .global-popcorn-rain.mobile-optimized .global-falling-popcorn {
        animation: global-fall 8s infinite linear !important;
        opacity: 0.9 !important;
        will-change: transform !important;
        transform: scale(1.2) !important;
        filter: brightness(1.3) contrast(1.2) !important;
    }
    
    .initial-popcorn-cascade.mobile-optimized .cascade-popcorn {
        animation: cascade-fall 6s infinite linear !important;
        opacity: 0.9 !important;
        will-change: transform !important;
        transform: scale(1.3) !important;
        filter: brightness(1.4) contrast(1.3) !important;
    }
    
    .welcome-popcorn-rain.mobile-optimized .fast-falling-popcorn {
        animation: fast-fall 4s infinite linear !important;
        opacity: 0.8 !important;
        will-change: transform !important;
        transform: scale(1.2) !important;
        filter: brightness(1.3) contrast(1.2) !important;
    }
    
    .popcorn-rain.mobile-optimized .falling-popcorn {
        animation: popcorn-fall 7s infinite linear !important;
        opacity: 0.8 !important;
        will-change: transform !important;
        transform: scale(1.2) !important;
        filter: brightness(1.3) contrast(1.2) !important;
    }
    
    /* Reducir luces parpadeantes pero mantener brillo suave */
    .cinema-lights-background.mobile-optimized .light-bulb {
        animation: mobile-light-glow 4s infinite ease-in-out !important;
        opacity: 0.5 !important;
    }
    
    /* OCULTAR FOCOS PROBLEMÁTICOS EN MÓVILES */
    .cinema-frame-main .frame-lights.top-lights,
    .cinema-frame-main .frame-lights.bottom-lights {
        display: none !important;
    }
    
    /* Focos laterales con animación de parpadeo como en PC */
    .cinema-frame-main .frame-lights.left-lights .frame-bulb,
    .cinema-frame-main .frame-lights.right-lights .frame-bulb {
        animation: frame-bulb-flicker 2s infinite ease-in-out !important;
        opacity: 1 !important;
        transform: scale(0.8) !important;
    }
    
    /* Ocultar focos de pantalla de video en móviles */
    .screen-lights {
        display: none !important;
    }
    
    /* Activar marquesina de header con parpadeo como en PC */
    .marquee-bulbs {
        display: block !important;
    }
    
    .marquee-bulbs .marquee-light {
        animation: marquee-flicker 1.5s infinite ease-in-out !important;
        opacity: 1 !important;
    }
    
    /* OPTIMIZACIONES ADICIONALES DE RENDIMIENTO */
    
    /* Reducir complejidad visual en móviles */
    .popcorn-explosion,
    .logo-glow,
    .poster-glow {
        display: none !important;
    }
    
    /* Simplificar efectos de texto */
    .letter-neon {
        text-shadow: 0 0 5px var(--gold) !important;
        animation: none !important;
    }
    
    /* Optimizar carrusel para móviles */
    .carousel-container {
        will-change: auto !important;
    }
    
    /* Reducir sombras complejas */
    .cinema-cta-button,
    .ticket,
    .service-poster {
        box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    }
    
    /* Optimizar imágenes de características en móviles - mismo tamaño que botón CTA */
    .feature-images {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Optimizar showcase de clientes para móviles con 4 logos */
    .client-showcase {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        max-width: 100% !important;
    }
    
    .client-poster {
        width: 120px !important;
        height: 120px !important;
        padding: 15px !important;
    }
    
    .feature-image {
        max-width: 100% !important;
        width: 100% !important;
        border-width: 3px !important;
        box-shadow: 0 8px 25px rgba(255, 215, 0, 0.3) !important;
        border-radius: 50px !important;
        padding: 15px 30px !important;
    }
    
    .feature-image:hover {
        transform: translateY(-3px) scale(1.02) !important;
        box-shadow: 0 15px 40px rgba(255, 215, 0, 0.5) !important;
    }
    
    /* Optimizar pantalla de cine y video para móviles */
    .cinema-screen-section {
        min-height: 80vh !important;
        padding: 20px 10px 0 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-bottom: 0 !important;
    }
    
    .cinema-theater {
        margin-top: 20px !important;
        padding: 15px !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    
    .cinema-screen {
        display: block !important;
        width: 100% !important;
        max-width: 90vw !important;
        margin: 0 auto 20px auto !important;
        background: #000 !important;
        border-radius: 15px !important;
        padding: 10px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.5) !important;
    }
    
    .video-container {
        position: relative !important;
        width: 100% !important;
        height: 0 !important;
        padding-bottom: 56.25% !important; /* 16:9 aspect ratio */
        background: #000 !important;
        border-radius: 10px !important;
        overflow: hidden !important;
    }
    
    .cinema-video {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        transform: none !important;
        will-change: auto !important;
    }
    
    /* Asientos que abarcan toda la pantalla hasta el final */
    .cinema-seats-container {
        display: block !important;
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-top: 20px !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        text-align: center !important;
        position: relative !important;
        bottom: 0 !important;
    }
    
    .cinema-seats-image {
        width: 100% !important;
        max-width: none !important;
        height: auto !important;
        opacity: 1 !important;
        display: block !important;
        margin: 0 !important;
    }
    
    /* Eliminar espacios debajo de la sección de cine */
    body {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    html {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
    
    /* Optimizar modal para móviles */
    .modal-content {
        width: 95% !important;
        margin: 5% auto !important;
        max-width: none !important;
    }
    
    .modal-header img {
        width: 120px !important;
        height: 120px !important;
    }
    
    .modal-header h3 {
        font-size: 1.3rem !important;
    }
    
    .modal-body p {
        font-size: 1rem !important;
        padding: 0 10px !important;
    }
    
    /* Optimizar redes sociales para móviles */
    .social-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .social-btn {
        width: 100% !important;
        max-width: 200px !important;
        margin: 0 auto !important;
        font-size: 0.85rem !important;
        padding: 8px 15px !important;
    }
    
    /* Optimizar sección de atención telefónica para móviles */
    .phone-attention-section {
        margin: 20px 10px !important;
        padding: 20px !important;
    }
    
    .phone-number {
        font-size: 1.5rem !important;
    }
    
    .simple-social-icons {
        gap: 15px !important;
    }
    
    .simple-social-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
    }
    
    /* Optimizar sección final de atención telefónica para móviles */
    .final-phone-section {
        padding: 30px 10px !important;
    }
    
    .final-phone-section .phone-attention-section {
        margin: 0 !important;
        max-width: 100% !important;
    }
    
    /* ANIMACIONES SUAVES PARA MÓVILES */
    
    /* Animación suave para focos del marco */
    @keyframes mobile-bulb-glow {
        0%, 100% { 
            opacity: 0.4;
            box-shadow: 0 0 10px var(--gold);
        }
        50% { 
            opacity: 0.8;
            box-shadow: 0 0 20px var(--gold), 0 0 30px var(--gold);
        }
    }
    
    /* Animación suave para luces de fondo */
    @keyframes mobile-light-glow {
        0%, 100% { 
            opacity: 0.3;
        }
        50% { 
            opacity: 0.7;
        }
    }
    
    /* ===== ACELERACIÓN POR HARDWARE ===== */
    
    /* Usar transform3d para aceleración por hardware */
    .cinema-header,
    .welcome-cinema,
    .cinema-about-section,
    .cinema-services-section,
    .cinema-clients-section,
    .cinema-contact-section {
        transform: translate3d(0, 0, 0);
        will-change: transform;
        backface-visibility: hidden;
    }
    
    /* ===== OPTIMIZACIONES DE LAYOUT ===== */
    
    /* Mejorar el layout en móviles */
    .header-content {
        padding: 10px 15px;
        flex-direction: column;
        gap: 15px;
    }
    
    .cinema-nav {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .nav-ticket {
        padding: 12px 20px;
        font-size: 16px;
        text-align: center;
        width: 100%;
    }
    
    /* ===== OPTIMIZACIONES DE IMÁGENES ===== */
    
    /* Optimizar imágenes para móviles */
    .main-logo {
        max-width: 200px;
        height: auto;
    }
    
    .cinema-logo-showcase img {
        max-width: 180px;
        height: auto;
    }
    
    /* ===== OPTIMIZACIONES DE TEXTO ===== */
    
    /* Mejorar legibilidad en móviles */
    .cinema-welcome-title {
        font-size: 2.5rem;
        line-height: 1.2;
        text-align: center;
        padding: 0 20px;
    }
    
    .cinema-subtitle {
        font-size: 1.2rem;
        text-align: center;
        padding: 0 20px;
    }
    
    .cinema-description {
        font-size: 1rem;
        text-align: center;
        padding: 0 20px;
    }
    
    /* ===== OPTIMIZACIONES DE CARRUSEL ===== */
    
    /* Mejorar carrusel en móviles */
    .carousel-container {
        padding: 20px;
    }
    
    .carousel-image-container img {
        max-width: 100%;
        height: auto;
        border-radius: 10px;
    }
    
    .carousel-controls {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }
    
    .carousel-btn {
        padding: 12px 20px;
        font-size: 16px;
        width: 100%;
    }
    
    /* ===== OPTIMIZACIONES DE SERVICIOS ===== */
    
    /* Mejorar grid de servicios en móviles */
    .cinema-services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .service-poster {
        margin: 0;
    }
    
    /* ===== OPTIMIZACIONES DE CONTACTO ===== */
    
    /* Mejorar formulario en móviles */
    .box-office-container {
        flex-direction: column;
        gap: 30px;
        padding: 20px;
    }
    
    .ticket-form {
        padding: 20px;
    }
    
    .form-slot {
        margin-bottom: 20px;
    }
    
    .form-slot input,
    .form-slot select,
    .form-slot textarea {
        padding: 15px;
        font-size: 16px;
        width: 100%;
    }
    
    /* ===== OPTIMIZACIONES DE SCROLL ===== */
    
    /* Mejorar scroll en móviles */
    html {
        scroll-behavior: auto;
    }
    
    /* ===== OPTIMIZACIONES DE VIDEO ===== */
    
    /* Optimizar video en móviles */
    .cinema-video {
        max-width: 100%;
        height: auto;
    }
    
    /* ===== OPTIMIZACIONES DE ASIENTOS ===== */
    
    /* Optimizar imagen de asientos */
    .cinema-seats-image {
        max-width: 100%;
        height: auto;
    }
    
    /* ===== OPTIMIZACIONES DE PERFORMANCE ===== */
    
    /* Reducir sombras y efectos en móviles */
    .poster-glow,
    .logo-glow,
    .title-underline {
        box-shadow: none !important;
        filter: none !important;
    }
    
    /* Optimizar transiciones */
    * {
        transition-timing-function: ease-out !important;
    }
    
    /* ===== MEDIA QUERIES ESPECÍFICOS ===== */
    
    @media (max-width: 480px) {
        .cinema-welcome-title {
            font-size: 2rem;
        }
        
        .cinema-subtitle {
            font-size: 1rem;
        }
        
        .cinema-description {
            font-size: 0.9rem;
        }
        
        .header-content {
            padding: 8px 10px;
        }
        
        .nav-ticket {
            padding: 10px 15px;
            font-size: 14px;
        }
    }
    
    @media (max-width: 360px) {
        .cinema-welcome-title {
            font-size: 1.8rem;
        }
        
        .main-logo {
            max-width: 150px;
        }
        
        .cinema-logo-showcase img {
            max-width: 140px;
        }
    }
}

/* ===== OPTIMIZACIONES GLOBALES DE PERFORMANCE ===== */

/* Reducir repaints y reflows */
.mobile-optimized {
    contain: layout style paint;
}

/* Optimizar animaciones CSS */
@media (prefers-reduced-motion: reduce) {
    .mobile-optimized * {
        animation: none !important;
        transition: none !important;
    }
}

/* Optimizar para dispositivos de baja potencia */
@media (max-width: 768px) and (max-resolution: 1dppx) {
    .mobile-optimized * {
        animation: none !important;
        transition: none !important;
        box-shadow: none !important;
        filter: none !important;
    }
}
