/* ==========================================
   FIX - Photo-info Performance (Keep Original Colors)
   WITH SCROLL ANIMATIONS ENABLED
   ========================================== */

/* Fix horizontal overflow */
html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    width: 100%;
}

/* Footer gap fix */
.footer {
    margin-bottom: 0 !important;
}

.footer-bottom {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ========================================== 
   MOBILE OPTIMIZATIONS (Scroll Animations Enabled)
   ========================================== */

@media (max-width: 768px) {
    /* ===== CRITICAL FIX: MOBILE HEADER - Always Visible ===== */
    
    .header {
        background-color: rgba(10, 10, 15, 0.95) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3) !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: var(--header-height) !important;
        z-index: 1000 !important;
    }
    
    .header.scrolled {
        background-color: rgba(10, 10, 15, 0.98) !important;
    }
    
    /* Ensure container is visible */
    .header .container {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 var(--container-padding) !important;
    }
    
    /* Ensure nav is properly displayed */
    .header .nav {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        height: var(--header-height) !important;
        width: 100% !important;
    }
    
    /* Logo always visible */
    .header .logo {
        display: flex !important;
        align-items: center !important;
        color: var(--color-text-primary) !important;
        z-index: 1001 !important;
        opacity: 1 !important;
    }
    
    .header .logo-text {
        color: rgba(0, 245, 212, 1) !important;
    }
    
    /* Nav actions always visible */
    .header .nav-actions {
        display: flex !important;
        z-index: 1001 !important;
    }
    
    /* Toggle button always visible */
    .header .nav-toggle {
        display: flex !important;
        z-index: 1001 !important;
        opacity: 1 !important;
    }
    
    .header .nav-toggle span {
        background: var(--color-text-primary) !important;
    }
    
    /* ===== KEEP SCROLL ANIMATIONS - Just simplify them ===== */
    
    /* Scroll animations stay enabled - handled by animations.css */
    
    /* ===== TRAINING & EVENTS - Remove Expensive Hover Effects Only ===== */
    
    .photo-info {
        position: relative !important;
        z-index: 4 !important;
    }
    
    /* Remove hover transitions - keep base styles */
    .photo-item:hover .photo-info {
        transform: none !important;
        transition: none !important;
    }
    
    .photo-info h4 {
        color: var(--color-text-primary) !important;
        text-shadow: none !important;
    }
    
    .photo-item:hover .photo-info h4 {
        color: var(--color-text-primary) !important;
        text-shadow: none !important;
        transition: none !important;
    }
    
    .photo-info p {
        color: var(--color-primary) !important;
        opacity: 0.95 !important;
        text-shadow: none !important;
    }
    
    .photo-item:hover .photo-info p {
        color: #00f5d4 !important;
        opacity: 1 !important;
        text-shadow: none !important;
        transition: none !important;
    }
    
    .photo-overlay {
        background: linear-gradient(
            180deg,
            rgba(10, 10, 15, 0) 0%,
            rgba(10, 10, 15, 0.7) 40%,
            rgba(10, 10, 15, 0.98) 100%
        ) !important;
    }
    
    .photo-item:hover .photo-overlay {
        background: linear-gradient(
            180deg,
            rgba(10, 10, 15, 0) 0%,
            rgba(10, 10, 15, 0.7) 40%,
            rgba(10, 10, 15, 0.98) 100%
        ) !important;
        padding-bottom: var(--space-xl) !important;
        transition: none !important;
    }
    
    /* Remove hover effects on wrapper and images */
    .photo-wrapper {
        transition: none !important;
    }
    
    .photo-wrapper::before {
        display: none !important;
    }
    
    .photo-item {
        transition: none !important;
    }
    
    .photo-item:hover {
        transform: none !important;
    }
    
    .photo-wrapper img {
        transition: none !important;
        transform: none !important;
    }
    
    .photo-item:hover .photo-wrapper img {
        transform: none !important;
    }
    
    /* ===== OUR SERVICES - Remove Expensive Hover Effects ===== */
    
    .service-icon-glow {
        filter: none !important;
        -webkit-filter: none !important;
        opacity: 0 !important;
    }
    
    .service-card:hover .service-icon-glow {
        opacity: 0 !important;
    }
    
    .service-card {
        transition: none !important;
    }
    
    .service-card:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .service-card::before {
        transition: none !important;
    }
    
    .service-card:hover::before {
        opacity: 0 !important;
    }
    
    /* ===== ABOUT SECTION - Remove Expensive Hover Effects ===== */
    
    .about-visual:hover,
    .about-content:hover {
        transform: none !important;
    }
    
    .neural-network svg * {
        animation: none !important;
    }
    
    .about-stats-card:hover,
    .about-badge-card:hover {
        transform: none !important;
    }
    
    /* ===== AI SOLUTIONS - Simplify SVGs ===== */
    
    /* Hide expensive large SVG icons (200x200) */
    .solution-icon-large {
        display: none !important;
    }
    
    /* Remove SVG gradients - use solid colors */
    .solutions linearGradient,
    .solutions radialGradient {
        display: none !important;
    }
    
    /* Use solid colors for all SVG strokes */
    .solutions svg * {
        stroke: currentColor !important;
    }
    
    .solution-visual:hover,
    .solution-info:hover {
        transform: none !important;
    }
    
    .solution-panel {
        transition: opacity 0.3s ease !important;
    }
    
    /* Simplify tab transitions */
    .tab-btn {
        transition: background-color 0.2s ease, color 0.2s ease !important;
    }
    
    /* ===== CREATIVE WORKS - Remove Hover Effects ===== */
    
    .ad-overlay {
        transition: none !important;
    }
    
    .ad-item {
        transition: none !important;
    }
    
    .ad-item:hover {
        transform: none !important;
    }
    
    .play-button {
        transition: none !important;
        transform: translate(-50%, -50%) !important;
    }
    
    .ad-item:hover .play-button {
        transform: translate(-50%, -50%) !important;
    }
    
    /* ===== GLOBAL - Simplify Hover Transitions (Not Scroll Animations) ===== */
    
    /* Only disable hover transitions, NOT scroll animations */
    *:hover {
        transition-duration: 0.15s !important;
    }
    
    /* Keep scroll animations enabled */
    [data-aos] {
        /* Scroll animations stay enabled via animations.css */
    }
    
    /* ===== FORCE CONTAINMENT ===== */
    
    .events-gallery,
    .services,
    .about,
    .solutions,
    .ai-advertising {
        contain: layout paint !important;
    }
    
    /* Optimize images */
    img {
        will-change: auto;
    }
    
    /* Reduce motion in background effects only */
    .hero-particles,
    .neural-network {
        animation-duration: 8s !important;
    }
}

/* ========================================== 
   DESKTOP - Keep Everything Normal
   ========================================== */

@media (min-width: 769px) {
    /* Desktop keeps all animations and effects */
    html {
        scroll-behavior: smooth;
    }
}
