/* ===================================
   CRITICAL MOBILE FIXES FOR LINEANOVAMOVIE.COM
   Fixes scrolling and yellow bar issues
   =================================== */

/* CRITICAL: Fix mobile scrolling and viewport */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: 80px;
    scroll-behavior: smooth;
    height: 100%;
}

body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    /* CRITICAL: Force vertical scrolling */
    width: 100%;
    position: relative;
    -webkit-overflow-scrolling: touch;
    -webkit-user-select: text;
    /* Allow text selection */
    user-select: text;
    -webkit-touch-callout: default;
    -webkit-tap-highlight-color: rgba(139, 92, 246, 0.3);
    height: auto;
    min-height: 100vh;
}

/* CRITICAL: Override any JavaScript that disables scrolling */
body[style*="overflow: hidden"] {
    overflow-y: auto !important;
}

/* Fix iOS Safari address bar issues */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
}

/* CRITICAL: Fix header positioning and yellow bar issues */
.header,
.header-2025 {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    height: auto !important;
    min-height: 70px !important;
    max-height: 80px !important;
}

/* Fix main content spacing */
main {
    padding-top: 80px !important;
    margin-top: 0 !important;
}

/* Hero section fixes */
.hero,
.hero-2025 {
    min-height: calc(100vh - 80px) !important;
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* MOBILE BREAKPOINT - AGGRESSIVE FIXES */
@media (max-width: 768px) {

    /* CRITICAL: Fix header on mobile */
    .header,
    .header-2025 {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 1000 !important;
        background: rgba(10, 10, 10, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        height: 70px !important;
        min-height: 70px !important;
        max-height: 70px !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
    }

    /* Navigation fixes */
    .nav,
    .nav-2025 {
        padding: 1rem !important;
        height: 70px !important;
        align-items: center !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* Brand fixes */
    .nav-brand,
    .nav-brand-2025 {
        font-size: 1.2rem !important;
    }

    .brand-text,
    .brand-main {
        font-size: 1.3rem !important;
    }

    .brand-subtitle {
        font-size: 0.7rem !important;
    }

    /* Main content spacing */
    main {
        padding-top: 70px !important;
        margin-top: 0 !important;
    }

    /* Hero section mobile fixes */
    .hero,
    .hero-2025 {
        min-height: calc(100vh - 70px) !important;
        padding-top: 0 !important;
        margin-top: 0 !important;
        height: auto !important;
        overflow: visible !important;
    }

    .hero-content,
    .hero-content-2025 {
        padding: 2rem 1rem !important;
        min-height: calc(100vh - 100px) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* HIDE SCROLL INDICATOR COMPLETELY */
    .scroll-indicator-2025,
    .discover-more,
    .scroll-icon {
        display: none;
    }

    /* HERO SECTION FIXES */
    .hero-2025 .hero-content-2025 {
        min-height: calc(100vh - 80px);
        padding: 1rem;
        gap: 2rem;
    }

    .hero-2025 .hero-text-container {
        gap: 1.5rem;
    }

    .hero-2025 .hero-label {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
        justify-self: center;
        align-self: center;
        margin: 0 auto;
        text-align: center;
    }

    .hero-2025 .hero-title-2025 {
        font-size: clamp(2.5rem, 12vw, 4rem);
        text-align: center;
    }

    .hero-2025 .hero-subtitle-2025 {
        font-size: 1rem;
        text-align: center;
    }

    /* CENTER "WORLD PREMIERE 2026" */
    .hero-2025 .hero-label,
    .hero-2025 .world-premiere {
        display: block;
        text-align: center;
        margin: 0 auto;
        justify-self: center;
    }

    /* STORY SECTION - CANVAS OF MEMORY COMPLETE REDESIGN */
    section.story-immersive {
        padding: 3rem 1rem;
    }

    section.story-immersive .story-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        grid-template-columns: none;
        gap: 0;
    }

    /* Hide complex desktop canvas but keep images */
    section.story-immersive .story-canvas {
        display: none;
    }

    section.story-immersive .paint-stroke {
        display: none;
    }

    /* Show and redesign the visual section for mobile */
    section.story-immersive .story-visual {
        order: 2;
        /* Place images after content on mobile */
        margin-top: 2rem;
    }

    /* Create proper mobile image gallery */
    section.story-immersive .story-images {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        margin: 0 auto;
        padding: 0;
        max-width: 350px;
        width: 100%;
    }

    section.story-immersive .story-images .floating-image {
        position: static;
        transform: none;
        width: 100%;
        height: auto;
        margin: 0;
        max-width: none;
        border-radius: 12px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    section.story-immersive .story-images .floating-image img {
        width: 100%;
        height: 160px;
        object-fit: cover;
        border-radius: 12px;
        border: 2px solid rgba(139, 92, 246, 0.4);
        transition: all 0.3s ease;
    }

    /* Stack and center third image */
    section.story-immersive .story-images .floating-image.img-3 {
        grid-column: 1 / -1;
        max-width: 75%;
        margin: 1rem auto 0;
    }

    section.story-immersive .story-images .floating-image.img-3 img {
        height: 140px;
    }

    /* CENTER "THE NARRATIVE" */
    section.story-immersive .story-content {
        order: 1;
        /* Content comes first on mobile */
        text-align: center;
        padding: 0 1rem;
        margin-bottom: 1rem;
    }

    section.story-immersive .story-content h2 {
        text-align: center;
        margin-bottom: 1.5rem;
        font-size: 2.2rem;
    }

    section.story-immersive .story-content .story-text {
        text-align: center;
    }

    /* CREW SECTION - BTL CARDS FULL WIDTH */
    section.cast-crew-2025 {
        padding: 3rem 1rem;
    }

    /* Make BTL crew cards full width like ATL cards */
    section.cast-crew-2025 .crew-grid-2025 {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        margin-top: 2rem;
        padding: 0;
        grid-template-columns: none;
        width: 100%;
    }

    section.cast-crew-2025 .crew-grid-2025 .crew-member-modern {
        width: 100%;
        max-width: 100%;
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(255, 255, 255, 0.25);
        border-radius: 16px;
        padding: 2rem 1.5rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 280px;
        margin: 0;
        grid-template-columns: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }

    section.cast-crew-2025 .crew-grid-2025 .crew-member-modern .member-avatar {
        width: 120px;
        height: 120px;
        margin: 0 auto 1.5rem;
        border-radius: 50%;
        overflow: hidden;
        border: 3px solid rgba(139, 92, 246, 0.6);
        flex-shrink: 0;
        box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
    }

    section.cast-crew-2025 .crew-grid-2025 .crew-member-modern .member-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    section.cast-crew-2025 .crew-grid-2025 .crew-member-modern h4 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
        color: white;
        font-weight: 700;
        text-align: center;
    }

    section.cast-crew-2025 .crew-grid-2025 .crew-member-modern .member-role {
        font-size: 1.2rem;
        color: var(--accent-purple);
        margin-bottom: 0.8rem;
        font-weight: 600;
        text-align: center;
    }

    section.cast-crew-2025 .crew-grid-2025 .crew-member-modern .member-specialty {
        font-size: 1rem;
        color: var(--gray-200);
        text-align: center;
        line-height: 1.5;
        opacity: 0.9;
    }

    /* FOOTER - LEFT ALIGN ALL TEXT */
    footer.footer-2025 {
        text-align: left;
    }

    footer.footer-2025 .footer-container {
        padding: 2rem 1rem 1rem;
        text-align: left;
    }

    footer.footer-2025 .footer-main-2025 {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        grid-template-columns: none;
        text-align: left;
    }

    footer.footer-2025 .footer-brand-2025 {
        text-align: left;
        padding-right: 0;
    }

    footer.footer-2025 .footer-brand-2025 .footer-logo-2025 {
        justify-content: flex-start;
        text-align: left;
    }

    footer.footer-2025 .footer-brand-2025 .footer-tagline-2025 {
        text-align: left;
    }

    footer.footer-2025 .footer-brand-2025 .footer-description-2025 {
        text-align: left;
    }

    footer.footer-2025 .footer-social-2025 {
        justify-content: flex-start;
        gap: 1rem;
        text-align: left;
    }

    footer.footer-2025 .footer-nav-2025 {
        text-align: left;
    }

    footer.footer-2025 .footer-nav-2025 h4 {
        text-align: left;
    }

    footer.footer-2025 .footer-nav-2025 ul {
        text-align: left;
        padding-left: 0;
    }

    footer.footer-2025 .footer-nav-2025 li {
        text-align: left;
    }

    footer.footer-2025 .footer-info-2025 {
        text-align: left;
    }

    footer.footer-2025 .footer-info-2025 h4 {
        text-align: left;
    }

    footer.footer-2025 .footer-info-2025 ul {
        text-align: left;
        padding-left: 0;
    }

    footer.footer-2025 .footer-info-2025 li {
        text-align: left;
    }

    footer.footer-2025 .footer-newsletter-2025 {
        text-align: left;
    }

    footer.footer-2025 .footer-newsletter-2025 h4 {
        text-align: left;
    }

    footer.footer-2025 .footer-bottom-2025 {
        flex-direction: column;
        gap: 1rem;
        text-align: left;
        padding-top: 1rem;
    }

    footer.footer-2025 .footer-copyright-2025 {
        text-align: left;
    }

    footer.footer-2025 .footer-legal-2025 {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        text-align: left;
    }

    footer.footer-2025 .footer-legal-2025 a {
        text-align: left;
    }

    /* Additional section centering */
    .section-header {
        text-align: center;
    }

    .section-header-2025 {
        text-align: center;
    }

    .section-label {
        text-align: center;
        display: block;
        margin: 0 auto;
    }

    .section-title-2025 {
        text-align: center;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .touch-target {
        min-width: 44px;
        min-height: 44px;
    }

    .nav-link-2025:hover,
    .contact-link:hover,
    .social-link-2025:hover {
        background: rgba(139, 92, 246, 0.1);
        transform: scale(1.05);
    }

    .profile-card-3d:active,
    .contact-card:active,
    .crew-member-modern:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    .play-button-2025:active {
        transform: translate(-50%, -50%) scale(0.95);
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {

    .hero-canvas,
    .hero-particles {
        display: none;
    }

    .hero-2025 {
        background: var(--primary-black);
    }

    .title-word {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .label-glow {
        animation: none;
        opacity: 0.3;
    }

    img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}
