/* ===================================
   CRITICAL MOBILE OVERRIDES FOR LINEANOVAMOVIE.COM
   Must load last to override all other styles
   =================================== */

/* FORCE CRITICAL MOBILE STYLES */
@media (max-width: 768px) {

    /* CRITICAL: Remove any yellow/gold backgrounds */
    * {
        background-color: inherit !important;
    }

    /* Fix header completely */
    .header,
    .header-2025,
    header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100vw !important;
        height: 70px !important;
        z-index: 9999 !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;
        border-top: none !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
        transform: none !important;
    }

    /* Fix navigation */
    .nav,
    .nav-2025,
    nav {
        height: 70px !important;
        padding: 0 1rem !important;
        max-width: 100% !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    /* Fix main content */
    main {
        padding-top: 70px !important;
        margin-top: 0 !important;
        width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Fix hero section positioning */
    .hero,
    .hero-2025,
    section.hero-2025 {
        margin-top: 0 !important;
        padding-top: 0 !important;
        min-height: calc(100vh - 70px) !important;
        position: relative !important;
        top: 0 !important;
    }

    /* Ensure no element creates yellow bar */
    body::before,
    body::after,
    html::before,
    html::after,
    .hero::before,
    .hero::after,
    .hero-2025::before,
    .hero-2025::after {
        display: none !important;
    }

    /* Remove any potential gold/yellow elements */
    .hero-label,
    .label-glow,
    .roman-gold,
    .tuscan-bronze,
    .golden-highlight {
        background: transparent !important;
        color: rgba(139, 92, 246, 0.8) !important;
    }

    /* Fix viewport */
    html {
        overflow-x: hidden !important;
        width: 100% !important;
        touch-action: pan-y !important;
    }

    body {
        overflow-x: hidden !important;
        overflow-y: auto !important;
        width: 100% !important;
        position: relative !important;
        margin: 0 !important;
        padding: 0 !important;
        touch-action: pan-y !important;
    }

    /* Ensure scrolling works */
    body[style*="overflow: hidden"],
    body[style*="overflow:hidden"] {
        overflow-y: auto !important;
    }

    /* CRITICAL: Disable all touch interactions except vertical scroll */
    * {
        touch-action: pan-y !important;
        -webkit-touch-callout: none !important;
        -webkit-user-select: none !important;
        -moz-user-select: none !important;
        -ms-user-select: none !important;
        user-select: none !important;
    }

    /* Re-enable selection for text content */
    p,
    span,
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .bio-text,
    .story-text {
        -webkit-user-select: text !important;
        -moz-user-select: text !important;
        -ms-user-select: text !important;
        user-select: text !important;
    }

    /* Disable pointer events on decorative elements */
    .hero-particles,
    .hero-canvas,
    .floating-image,
    .story-mood-image,
    .hero-stats,
    .stat-item,
    .scroll-indicator,
    .scroll-indicator-2025 {
        pointer-events: none !important;
        touch-action: none !important;
    }

    /* Keep essential navigation interactive */
    .nav-toggle-2025,
    .mobile-nav-link,
    .mobile-close,
    .contact-link,
    .social-link-2025,
    .footer-nav-2025 a,
    .footer-legal-2025 a {
        touch-action: manipulation !important;
        pointer-events: auto !important;
    }

    /* ATL crew cards special handling */
    .profile-card-3d {
        touch-action: manipulation !important;
        pointer-events: auto !important;
    }

    /* CRITICAL: Prevent all horizontal scrolling and gestures */
    .hero,
    .hero-2025,
    .story-section,
    .cast-crew-section,
    .contact-section,
    .footer,
    .timeline,
    .process-section,
    section {
        overflow-x: hidden !important;
        touch-action: pan-y !important;
        width: 100% !important;
        max-width: 100vw !important;
    }

    /* Disable all transform-based interactions on mobile */
    .hero-content,
    .story-content,
    .timeline-item,
    .process-card,
    .crew-member-modern {
        transform: none !important;
        transition: none !important;
    }

    /* Force disable any remaining touch callouts or selections */
    * {
        -webkit-tap-highlight-color: transparent !important;
        -webkit-touch-callout: none !important;
    }

    /* Re-enable essential interactions only */
    input,
    textarea,
    select {
        -webkit-tap-highlight-color: rgba(139, 92, 246, 0.3) !important;
        touch-action: manipulation !important;
    }

    /* CRITICAL: Disable AOS animations on mobile to prevent FOUC */
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
    }

    /* Force immediate visibility for all AOS elements on mobile */
    .aos-animate {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    /* Disable all AOS-related transitions on mobile */
    * {
        transition-delay: 0s !important;
    }
}

/* iPhone specific fixes */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {

        .header,
        .header-2025 {
            position: fixed !important;
            top: 0 !important;
            height: 70px !important;
            background: rgba(10, 10, 10, 0.98) !important;
        }

        .hero,
        .hero-2025 {
            min-height: calc(100vh - 70px) !important;
            padding-top: 0 !important;
        }
    }
}

/* CRITICAL: Fix Ice Cream Tears Production LLC box squishing on mobile */
@media (max-width: 768px) {
    .production-showcase {
        padding: 2rem 1rem !important;
        margin: 2rem 0 !important;
    }

    .company-logo h3 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .company-logo span {
        font-size: 1.2rem !important;
        margin-top: 0.5rem !important;
    }

    .company-mission {
        font-size: 1rem !important;
        line-height: 1.5 !important;
        padding: 0 1rem !important;
        max-width: none !important;
    }

    .logo-underline {
        margin: 1.5rem auto !important;
    }

    /* Footer mobile containment fix */
    .footer-container {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}

@media (max-width: 480px) {
    .production-showcase {
        padding: 1.5rem 0.75rem !important;
        margin: 1.5rem 0 !important;
    }

    .company-logo h3 {
        font-size: 1.75rem !important;
    }

    .company-logo span {
        font-size: 1rem !important;
    }

    .company-mission {
        font-size: 0.9rem !important;
        padding: 0 0.5rem !important;
    }

    /* Footer mobile containment for small screens */
    .footer-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

/* ===================================
   WCAG ACCESSIBILITY IMPROVEMENTS
   Meet WCAG AA Standards for Mobile
   =================================== */

@media (max-width: 768px) {

    /* WCAG: Touch targets must be at least 44x44px */
    .footer-legal-2025 a {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 16px !important;
        font-size: 1rem !important;
        text-align: center !important;
        border-radius: 6px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        margin: 4px !important;
        transition: all 0.3s ease !important;
    }

    .footer-legal-2025 a:hover,
    .footer-legal-2025 a:focus {
        background: rgba(139, 92, 246, 0.2) !important;
        color: #8b5cf6 !important;
        outline: 2px solid #8b5cf6 !important;
        outline-offset: 2px !important;
    }

    /* Navigation links accessibility */
    .nav-link-2025 {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        padding: 12px 16px !important;
    }

    .mobile-nav-link {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        padding: 12px 20px !important;
        font-size: 1.1rem !important;
        border-radius: 6px !important;
        margin: 4px 0 !important;
        transition: all 0.3s ease !important;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:focus {
        background: rgba(139, 92, 246, 0.2) !important;
        outline: 2px solid #8b5cf6 !important;
        outline-offset: 2px !important;
    }

    /* Social links accessibility */
    .social-link-2025 {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .social-link-2025:focus {
        outline: 2px solid #8b5cf6 !important;
        outline-offset: 2px !important;
    }

    /* Contact links accessibility */
    .contact-link {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 12px 24px !important;
        font-size: 1rem !important;
    }

    .contact-link:focus {
        outline: 2px solid #fff !important;
        outline-offset: 2px !important;
    }

    /* Play button accessibility */
    .play-button-2025 {
        min-width: 80px !important;
        min-height: 80px !important;
    }

    .play-button-2025:focus {
        outline: 3px solid #8b5cf6 !important;
        outline-offset: 4px !important;
    }

    /* Mobile menu toggle accessibility */
    .nav-toggle-2025 {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 12px !important;
    }

    .nav-toggle-2025:focus {
        outline: 2px solid #8b5cf6 !important;
        outline-offset: 2px !important;
    }

    /* Floating action buttons accessibility */
    .action-btn {
        min-width: 56px !important;
        min-height: 56px !important;
    }

    .action-btn:focus {
        outline: 2px solid #8b5cf6 !important;
        outline-offset: 2px !important;
    }

    /* Newsletter form accessibility */
    .newsletter-form input {
        min-height: 44px !important;
        font-size: 1rem !important;
        padding: 12px 16px !important;
    }

    .newsletter-form input:focus {
        outline: 2px solid #8b5cf6 !important;
        outline-offset: 2px !important;
    }

    .newsletter-form button {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    .newsletter-form button:focus {
        outline: 2px solid #fff !important;
        outline-offset: 2px !important;
    }

    /* Mobile close button accessibility */
    .mobile-close {
        min-width: 44px !important;
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 8px !important;
    }

    .mobile-close:focus {
        outline: 2px solid #8b5cf6 !important;
        outline-offset: 2px !important;
        background: rgba(139, 92, 246, 0.2) !important;
    }

    /* Footer navigation links */
    .footer-nav-2025 a {
        min-height: 44px !important;
        display: inline-flex !important;
        align-items: center !important;
        padding: 8px 12px !important;
        border-radius: 4px !important;
        margin: 2px 0 !important;
    }

    .footer-nav-2025 a:focus {
        outline: 2px solid #8b5cf6 !important;
        outline-offset: 2px !important;
        background: rgba(139, 92, 246, 0.2) !important;
    }

    /* Improved contrast and readability */
    .footer-legal-2025 a {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    .footer-nav-2025 a {
        color: rgba(255, 255, 255, 0.8) !important;
    }

    /* Focus indicators for keyboard navigation */
    *:focus {
        scroll-margin-top: 100px !important;
    }

    /* Ensure sufficient color contrast */
    .hero-subtitle-2025,
    .story-text,
    .company-mission {
        color: rgba(255, 255, 255, 0.9) !important;
    }

    /* =====================================
       LEGAL PAGES MOBILE FIXES
       ===================================== */

    /* Fix legal page spacing and layout on mobile */
    .legal-page {
        padding-top: 70px !important;
        background: transparent !important;
    }

    .legal-page .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        background: transparent !important;
    }

    /* Fix email links on mobile */
    .press-email,
    .contact-info a,
    .press-quick-contact a,
    .press-kit-access a,
    .legal-content a {
        display: inline-block !important;
        min-height: 44px !important;
        padding: 8px 12px !important;
        margin: 2px 0 !important;
        color: #8b5cf6 !important;
        background: rgba(139, 92, 246, 0.15) !important;
        border: 1px solid rgba(139, 92, 246, 0.4) !important;
        border-radius: 6px !important;
        text-decoration: none !important;
        font-size: 1rem !important;
        line-height: 1.4 !important;
        text-align: center !important;
        touch-action: manipulation !important;
        word-break: break-all !important;
    }

    .press-email:hover,
    .press-email:focus,
    .contact-info a:hover,
    .contact-info a:focus,
    .press-quick-contact a:hover,
    .press-quick-contact a:focus,
    .press-kit-access a:hover,
    .press-kit-access a:focus,
    .legal-content a:hover,
    .legal-content a:focus {
        color: #fff !important;
        background: #8b5cf6 !important;
        outline: 2px solid #8b5cf6 !important;
        outline-offset: 2px !important;
    }

    /* Fix press highlight on mobile */
    .press-highlight {
        margin: 1.5rem 0 !important;
        padding: 1.25rem !important;
        text-align: center !important;
    }

    .press-highlight p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    /* Fix contact grid on mobile */
    .contact-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .contact-card {
        padding: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    .contact-card h3 {
        font-size: 1.2rem !important;
        margin-bottom: 1rem !important;
    }

    /* Fix press resources on mobile */
    .press-resources {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .resource-category {
        padding: 1.5rem !important;
    }

    .resource-category h3 {
        font-size: 1.1rem !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }

    /* Fix facts grid on mobile */
    .facts-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) !important;
        gap: 1rem !important;
    }

    .fact-item {
        padding: 1rem !important;
    }

    .fact-item h4 {
        font-size: 0.8rem !important;
    }

    .fact-item p {
        font-size: 0.9rem !important;
    }

    /* Fix social links on mobile */
    .social-links-list {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .social-item {
        padding: 1.25rem !important;
        text-align: center !important;
    }

    /* Fix legal quick links on mobile */
    .legal-quick-links {
        margin-top: 2rem !important;
        padding: 1.5rem !important;
    }

    .legal-quick-links ul {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .legal-quick-links a {
        min-height: 44px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 280px !important;
        padding: 12px 16px !important;
        font-size: 1rem !important;
    }

    /* Fix inquiry template on mobile */
    .inquiry-template {
        padding: 1.5rem !important;
        margin: 1.5rem 0 !important;
    }

    .inquiry-template h3 {
        font-size: 1.1rem !important;
        text-align: center !important;
        margin-bottom: 1rem !important;
    }

    .inquiry-template li {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
        margin-bottom: 0.75rem !important;
    }

    /* Fix legal section spacing on mobile */
    .legal-section {
        padding: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .legal-section h2 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }

    .legal-section h3 {
        font-size: 1.2rem !important;
        margin-bottom: 0.75rem !important;
    }

    .legal-section h4 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    /* Fix legal intro on mobile */
    .legal-intro {
        padding: 1.5rem !important;
        margin-bottom: 2rem !important;
    }

    .legal-intro p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    /* Fix legal header on mobile */
    .legal-header {
        padding: 1.5rem 0 !important;
        text-align: center !important;
    }

    .legal-title {
        font-size: 2.2rem !important;
        margin-bottom: 1rem !important;
    }

    .legal-subtitle {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .legal-meta {
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.75rem !important;
    }

    .legal-meta span {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
    }

    /* Fix coverage note on mobile */
    .coverage-note {
        padding: 1.25rem !important;
        margin: 1.5rem 0 !important;
    }

    .coverage-note p {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    /* Fix synopsis content on mobile */
    .film-synopsis .synopsis-content {
        padding: 1.5rem !important;
    }

    .film-synopsis h3 {
        font-size: 1.1rem !important;
        margin-top: 1.5rem !important;
        margin-bottom: 0.75rem !important;
        text-align: center !important;
    }

    .film-synopsis h3:first-child {
        margin-top: 0 !important;
    }

    .film-synopsis p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }
}
