/**
 * ZYZ DYNAMICS Homepage Mobile Enhancements
 * First impression perfection for mobile visitors
 * 
 * Transforms the main landing page into a thumb-friendly showcase
 */

@media (max-width: 768px) {
    
    /* ============================================
       MOBILE HOMEPAGE LAYOUT
       ============================================ */
    
    .container {
        padding: 30px 15px !important;
        min-height: auto !important;
        justify-content: flex-start !important;
    }
    
    /* ============================================
       MOBILE HERO SECTION
       ============================================ */
    
    .hero-section {
        margin-bottom: 40px !important;
    }
    
    .hero-card {
        padding: 30px 25px !important;
        border-radius: 16px !important;
        border: 2px solid #444 !important;
        margin-bottom: 20px;
        transition: all 0.3s ease;
    }
    
    .hero-card:active {
        transform: scale(0.98);
        border-color: #667eea;
    }
    
    .hero-header {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        text-align: center;
    }
    
    .hero-title-section {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
    }
    
    .hero-icon {
        font-size: 3.5em !important;
        margin-right: 0 !important;
    }
    
    .hero-title {
        font-size: 2.8em !important;
        letter-spacing: 3px;
        text-align: center;
    }
    
    .patent-badge {
        padding: 8px 16px !important;
        font-size: 0.8em !important;
        border-radius: 20px !important;
        background: rgba(102, 126, 234, 0.2) !important;
        color: #8fa7ff !important;
        border: 1px solid #667eea !important;
        font-weight: 600;
    }
    
    .hero-subtitle {
        font-size: 1.3em !important;
        color: #ccc !important;
        text-align: center;
        margin-top: 10px;
        font-weight: 400;
    }
    
    /* ============================================
       MOBILE SUPPORTING PRODUCTS
       ============================================ */
    
    .products {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-bottom: 50px !important;
    }
    
    .product-card {
        padding: 25px !important;
        border-radius: 12px !important;
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%) !important;
        border: 1px solid #333 !important;
        transition: all 0.3s ease;
    }
    
    .product-card:active {
        transform: scale(0.98);
        border-color: #4ecdc4;
    }
    
    .product-header {
        flex-direction: row !important;
        align-items: center !important;
        text-align: left !important;
        margin-bottom: 15px;
    }
    
    .product-icon {
        font-size: 2.2em !important;
        margin-right: 15px !important;
        margin-bottom: 0 !important;
    }
    
    .product-title {
        font-size: 1.6em !important;
        font-weight: 600;
    }
    
    .product-subtitle {
        font-size: 0.95em !important;
        color: #999 !important;
        line-height: 1.5;
    }
    
    /* ============================================
       MOBILE TOOLS SECTION
       ============================================ */
    
    .tools-section {
        margin-top: 50px !important;
    }
    
    .tools-header {
        margin-bottom: 30px !important;
        padding-bottom: 15px !important;
    }
    
    .tools-title {
        font-size: 1.8em !important;
        margin-bottom: 10px !important;
    }
    
    .tools-subtitle {
        font-size: 1em !important;
        color: #888 !important;
    }
    
    .tools-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        margin-bottom: 30px !important;
    }
    
    .tools-grid .product-card {
        padding: 20px !important;
        border-radius: 10px !important;
    }
    
    .tools-grid .product-header {
        margin-bottom: 12px !important;
    }
    
    .tools-grid .product-icon {
        font-size: 2em !important;
        margin-right: 12px !important;
    }
    
    .tools-grid .product-title {
        font-size: 1.4em !important;
    }
    
    .tools-grid .product-subtitle {
        font-size: 0.9em !important;
        line-height: 1.4;
        color: #aaa !important;
    }
    
    /* ============================================
       MOBILE CONTACT SECTION
       ============================================ */
    
    .contact-section {
        padding: 40px 0 !important;
        margin-top: 40px !important;
        border-top: 1px solid #333 !important;
    }
    
    .contact-link {
        font-size: 1.1em !important;
        padding: 15px 25px !important;
        background: rgba(78, 205, 196, 0.1) !important;
        border: 1px solid #4ecdc4 !important;
        border-radius: 25px !important;
        text-decoration: none !important;
        color: #4ecdc4 !important;
        transition: all 0.3s ease;
        display: inline-block;
        font-weight: 500;
    }
    
    .contact-link:hover,
    .contact-link:active {
        background: #4ecdc4 !important;
        color: #000 !important;
        transform: scale(0.98);
        border-bottom: 1px solid #4ecdc4 !important;
    }
    
    /* ============================================
       MOBILE FOOTER
       ============================================ */
    
    footer {
        margin-top: 40px !important;
        padding-top: 30px !important;
        font-size: 0.85em !important;
        line-height: 1.6 !important;
        color: #666 !important;
        border-top: 1px solid #222 !important;
    }
    
    footer p {
        margin-bottom: 8px;
    }
    
    /* ============================================
       MOBILE AUDIO VISUALIZER OPTIMIZATION
       ============================================ */
    
    #visualizer-toggle {
        bottom: 15px !important;
        right: 15px !important;
        z-index: 1000 !important;
    }
    
    #visualizer-toggle button {
        min-width: 44px !important;
        min-height: 44px !important;
        padding: 12px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        background: rgba(0,0,0,0.8) !important;
        border: 1px solid rgba(255,255,255,0.3) !important;
        backdrop-filter: blur(15px) !important;
        -webkit-backdrop-filter: blur(15px) !important;
        transition: all 0.3s ease;
    }
    
    #visualizer-toggle button:active {
        transform: scale(0.95);
        background: rgba(78, 205, 196, 0.2) !important;
        border-color: #4ecdc4 !important;
    }
    
    #toggle-text {
        font-size: 1.2em;
        display: block;
    }
    
    /* Mobile hover states */
    #visualizer-toggle:hover {
        opacity: 0.9 !important;
    }
    
    /* ============================================
       MOBILE PERFORMANCE OPTIMIZATIONS
       ============================================ */
    
    /* Reduce animation complexity on mobile */
    .hero-card::before,
    .product-card::before {
        display: none !important;
    }
    
    .hero-card:hover,
    .product-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    /* Optimize gradients for mobile performance */
    .hero-card,
    .product-card {
        background-attachment: local !important;
    }
    
    /* ============================================
       MOBILE ACCESSIBILITY ENHANCEMENTS
       ============================================ */
    
    /* Larger touch targets */
    .hero-card,
    .product-card,
    .contact-link {
        min-height: 60px !important;
        touch-action: manipulation;
    }
    
    /* Better focus indicators */
    .hero-card:focus,
    .product-card:focus,
    .contact-link:focus {
        outline: 3px solid #4ecdc4 !important;
        outline-offset: 2px;
    }
    
    /* Improved text contrast for mobile screens */
    .hero-title,
    .product-title {
        color: #fff !important;
    }
    
    .hero-subtitle,
    .product-subtitle {
        color: #ccc !important;
    }
    
    /* ============================================
       MOBILE LOADING OPTIMIZATIONS
       ============================================ */
    
    /* Optimize image loading if any are added later */
    img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 8px;
    }
    
    /* Optimize font loading for mobile */
    .logo {
        font-display: swap;
    }
    
    /* ============================================
       MOBILE SCROLL BEHAVIOR
       ============================================ */
    
    /* Smooth scrolling for mobile navigation */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Optimize scroll performance */
    .container {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
    
    /* ============================================
       MOBILE INTERACTION FEEDBACK
       ============================================ */
    
    /* Enhanced touch feedback for all interactive elements */
    .hero-card,
    .product-card,
    .contact-link,
    #visualizer-toggle button {
        -webkit-tap-highlight-color: rgba(78, 205, 196, 0.2);
        tap-highlight-color: rgba(78, 205, 196, 0.2);
    }
    
    /* Prevent text selection on touch targets */
    .hero-card,
    .product-card,
    .contact-link {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    /* ============================================
       MOBILE SPACING OPTIMIZATION
       ============================================ */
    
    /* Optimize spacing for thumb navigation */
    .hero-section,
    .products,
    .tools-section {
        scroll-margin-top: 20px;
    }
    
    /* Add breathing room between sections */
    .hero-section::after,
    .products::after {
        content: '';
        display: block;
        height: 20px;
    }
    
    /* ============================================
       MOBILE UTILITY CLASSES
       ============================================ */
    
    .mobile-hidden { display: none !important; }
    .mobile-only { display: block !important; }
    .mobile-center { text-align: center !important; }
    .mobile-full-width { width: 100% !important; }
    .mobile-no-margin { margin: 0 !important; }
    .mobile-small-gap { gap: 10px !important; }
}

/* ============================================
   DESKTOP-ONLY UTILITIES
   ============================================ */

@media (min-width: 769px) {
    .mobile-only { display: none !important; }
}