/* ===========================================
   MOBILE OPTIMIZATION CSS
   Disable heavy effects for better mobile performance
   =========================================== */

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ===== MOBILE OPTIMIZATIONS (max-width: 768px) ===== */
@media (max-width: 768px) {

    /* Disable custom cursor on mobile/touch devices */
    #cursor {
        display: none !important;
    }

    body {
        cursor: auto !important;
    }

    .cursor-hover {
        cursor: pointer !important;
    }

    /* Disable decorative liquid blobs */
    .liquid-blob {
        display: none !important;
    }

    /* Disable parallax effect */
    .parallax-element {
        transform: none !important;
    }

    /* Simplify glass panel effects for performance */
    .glass-panel {
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        background: rgba(10, 20, 40, 0.9) !important;
    }

    /* Disable glass panel hover transform */
    .glass-panel:hover {
        transform: none !important;
    }

    /* Disable shine effect on glass panels */
    .glass-panel::before {
        display: none !important;
    }

    /* Simplify reveal animations */
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }

    /* Disable stack card 3D effects */
    .stack-card {
        transform: none !important;
        opacity: 1 !important;
    }

    /* Hide non-active stack cards on mobile */
    .stack-section .stack-card:not(:first-child) {
        display: none !important;
    }

    /* Simplify noise overlay */
    .noise-overlay {
        opacity: 0.02 !important;
    }

    /* Reduce marquee animation speed */
    .marquee-content {
        animation-duration: 45s !important;
    }

    /* Disable gallery card hover effects */
    .gallery-card-hover:hover .gallery-img {
        transform: none !important;
    }

    /* Mobile menu improvements */
    #mobile-menu {
        padding: 2rem;
        z-index: 99 !important;
    }

    /* When menu is visible, ensure it can receive clicks */
    #mobile-menu.opacity-100 {
        pointer-events: auto !important;
    }

    #mobile-menu a {
        padding: 0.75rem 1.5rem;
        text-align: center;
        width: auto;
        position: relative;
        z-index: 100;
        pointer-events: auto !important;
        -webkit-tap-highlight-color: rgba(0, 123, 255, 0.3);
        touch-action: manipulation;
    }

    /* Ensure proper touch targets (min 48px for better accessibility) */
    .mobile-link {
        min-height: 48px;
        min-width: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: auto !important;
        cursor: pointer !important;
    }


    /* Preloader - faster on mobile */
    #preloader {
        transition-duration: 0.3s !important;
    }

    /* Hero section spacing adjustments */
    #hero {
        min-height: 100svh;
        padding-top: 5rem;
        padding-bottom: 3rem;
    }

    /* Section spacing optimization */
    section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    /* Footer optimization */
    footer {
        padding-top: 3rem !important;
        padding-bottom: 2rem !important;
    }

    /* Disable hover states on touch devices */
    @media (hover: none) {

        .glass-panel:hover,
        .cursor-hover:hover {
            transform: none !important;
            box-shadow: inherit !important;
        }
    }
}

/* ===== SMALL MOBILE (max-width: 480px) ===== */
@media (max-width: 480px) {

    /* Further reduce glass blur for performance */
    .glass-panel {
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
    }

    /* Compact text sizing */
    .font-heading {
        letter-spacing: -0.02em !important;
    }

    /* Smaller section paddings */
    section {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Stack items vertically */
    .grid {
        gap: 1rem !important;
    }

    /* Disable marquee completely on very small screens */
    .marquee-content {
        animation: none !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
        gap: 1rem !important;
    }

    .marquee-container {
        mask-image: none !important;
    }
}