/* ============================================
   Premium Futuristic Holographic 3D Icons Background
   High-quality service icons with advanced visual effects
   ============================================ */

.floating-icons-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: auto; /* Enable cursor interaction */
    overflow: hidden;
    isolation: isolate;
    perspective: 1000px;
    -webkit-perspective: 1000px;
}

.floating-icon {
    position: absolute;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    will-change: transform, opacity;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    user-select: none;
    -webkit-user-select: none;
    cursor: default;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

/* Premium Glassmorphic Container */
.floating-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: 
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15), transparent 70%),
        radial-gradient(circle at 70% 70%, rgba(0, 240, 255, 0.1), transparent 70%);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    z-index: -1;
    transition: all 0.3s ease;
}

/* Holographic Shimmer Effect */
.floating-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 50%,
        rgba(0, 240, 255, 0.1) 100%
    );
    opacity: 0;
    z-index: 0;
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0%, 100% {
        opacity: 0;
        transform: rotate(0deg);
    }
    50% {
        opacity: 0.6;
        transform: rotate(180deg);
    }
}

/* Icon Styling */
.floating-icon i {
    font-size: 2rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 8px currentColor);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-style: preserve-3d;
}

/* Size Variations */
.floating-icon.size-small {
    width: 55px;
    height: 55px;
}

.floating-icon.size-small i {
    font-size: 1.5rem;
}

.floating-icon.size-medium {
    width: 75px;
    height: 75px;
}

.floating-icon.size-medium i {
    font-size: 2.2rem;
}

.floating-icon.size-large {
    width: 95px;
    height: 95px;
}

.floating-icon.size-large i {
    font-size: 2.8rem;
}

/* Premium Neon Color Variations */
.floating-icon.color-cyan i {
    color: #00f0ff;
    text-shadow: 
        0 0 10px rgba(0, 240, 255, 0.9),
        0 0 20px rgba(0, 240, 255, 0.6),
        0 0 30px rgba(0, 240, 255, 0.4),
        0 0 40px rgba(0, 240, 255, 0.2);
}

.floating-icon.color-cyan::before {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 25px rgba(0, 240, 255, 0.4),
        inset 0 0 25px rgba(0, 240, 255, 0.15);
    border-color: rgba(0, 240, 255, 0.3);
}

.floating-icon.color-magenta i {
    color: #ff00ff;
    text-shadow: 
        0 0 10px rgba(255, 0, 255, 0.9),
        0 0 20px rgba(255, 0, 255, 0.6),
        0 0 30px rgba(255, 0, 255, 0.4),
        0 0 40px rgba(255, 0, 255, 0.2);
}

.floating-icon.color-magenta::before {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 25px rgba(255, 0, 255, 0.4),
        inset 0 0 25px rgba(255, 0, 255, 0.15);
    border-color: rgba(255, 0, 255, 0.3);
}

.floating-icon.color-green i {
    color: #00ff88;
    text-shadow: 
        0 0 10px rgba(0, 255, 136, 0.9),
        0 0 20px rgba(0, 255, 136, 0.6),
        0 0 30px rgba(0, 255, 136, 0.4),
        0 0 40px rgba(0, 255, 136, 0.2);
}

.floating-icon.color-green::before {
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.3),
        inset 0 -1px 1px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        0 0 25px rgba(0, 255, 136, 0.4),
        inset 0 0 25px rgba(0, 255, 136, 0.15);
    border-color: rgba(0, 255, 136, 0.3);
}

/* Holographic Color Shift Animation */
@keyframes holographicShift {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1) saturate(1.2);
    }
    25% {
        filter: hue-rotate(90deg) brightness(1.1) saturate(1.3);
    }
    50% {
        filter: hue-rotate(180deg) brightness(0.95) saturate(1.1);
    }
    75% {
        filter: hue-rotate(270deg) brightness(1.05) saturate(1.25);
    }
}

.floating-icon i {
    animation: holographicShift 6s ease-in-out infinite;
}

/* Premium 3D Floating Animations */
@keyframes floatUp3D {
    0% {
        transform: translate3d(0, 110vh, -100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.5);
        opacity: 0;
    }
    8% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.75;
        transform: translate3d(0, 50vh, 0) rotateX(180deg) rotateY(90deg) rotateZ(180deg) scale(1);
    }
    92% {
        opacity: 0.5;
    }
    100% {
        transform: translate3d(0, -10vh, -100px) rotateX(360deg) rotateY(180deg) rotateZ(360deg) scale(0.5);
        opacity: 0;
    }
}

@keyframes floatDown3D {
    0% {
        transform: translate3d(0, -10vh, -100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.5);
        opacity: 0;
    }
    8% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.75;
        transform: translate3d(0, 50vh, 0) rotateX(-180deg) rotateY(-90deg) rotateZ(-180deg) scale(1);
    }
    92% {
        opacity: 0.5;
    }
    100% {
        transform: translate3d(0, 110vh, -100px) rotateX(-360deg) rotateY(-180deg) rotateZ(-360deg) scale(0.5);
        opacity: 0;
    }
}

@keyframes floatLeft3D {
    0% {
        transform: translate3d(110vw, 0, -100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.5);
        opacity: 0;
    }
    8% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.75;
        transform: translate3d(50vw, 0, 0) rotateX(90deg) rotateY(180deg) rotateZ(90deg) scale(1);
    }
    92% {
        opacity: 0.5;
    }
    100% {
        transform: translate3d(-10vw, 0, -100px) rotateX(180deg) rotateY(360deg) rotateZ(180deg) scale(0.5);
        opacity: 0;
    }
}

@keyframes floatRight3D {
    0% {
        transform: translate3d(-10vw, 0, -100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.5);
        opacity: 0;
    }
    8% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.75;
        transform: translate3d(50vw, 0, 0) rotateX(-90deg) rotateY(-180deg) rotateZ(-90deg) scale(1);
    }
    92% {
        opacity: 0.5;
    }
    100% {
        transform: translate3d(110vw, 0, -100px) rotateX(-180deg) rotateY(-360deg) rotateZ(-180deg) scale(0.5);
        opacity: 0;
    }
}

@keyframes floatDiagonal1_3D {
    0% {
        transform: translate3d(-10vw, 110vh, -100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.5);
        opacity: 0;
    }
    8% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.75;
        transform: translate3d(50vw, 50vh, 0) rotateX(180deg) rotateY(180deg) rotateZ(180deg) scale(1);
    }
    92% {
        opacity: 0.5;
    }
    100% {
        transform: translate3d(110vw, -10vh, -100px) rotateX(360deg) rotateY(360deg) rotateZ(360deg) scale(0.5);
        opacity: 0;
    }
}

@keyframes floatDiagonal2_3D {
    0% {
        transform: translate3d(110vw, -10vh, -100px) rotateX(0deg) rotateY(0deg) rotateZ(0deg) scale(0.5);
        opacity: 0;
    }
    8% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.75;
        transform: translate3d(50vw, 50vh, 0) rotateX(-180deg) rotateY(-180deg) rotateZ(-180deg) scale(1);
    }
    92% {
        opacity: 0.5;
    }
    100% {
        transform: translate3d(-10vw, 110vh, -100px) rotateX(-360deg) rotateY(-360deg) rotateZ(-360deg) scale(0.5);
        opacity: 0;
    }
}

/* Apply 3D Animations */
.floating-icon.animate-up {
    animation: floatUp3D 28s linear infinite, holographicShift 6s ease-in-out infinite;
}

.floating-icon.animate-down {
    animation: floatDown3D 28s linear infinite, holographicShift 6s ease-in-out infinite;
}

.floating-icon.animate-left {
    animation: floatLeft3D 32s linear infinite, holographicShift 6s ease-in-out infinite;
}

.floating-icon.animate-right {
    animation: floatRight3D 32s linear infinite, holographicShift 6s ease-in-out infinite;
}

.floating-icon.animate-diagonal1 {
    animation: floatDiagonal1_3D 38s linear infinite, holographicShift 6s ease-in-out infinite;
}

.floating-icon.animate-diagonal2 {
    animation: floatDiagonal2_3D 38s linear infinite, holographicShift 6s ease-in-out infinite;
}

/* Repel Effect State */
.floating-icon.repelling {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.floating-icon.repelling::before {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.4),
        inset 0 -1px 1px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 0 35px currentColor,
        inset 0 0 35px currentColor;
    transform: scale(1.1);
}

.floating-icon.repelling i {
    transform: scale(1.15) translateZ(20px);
    filter: drop-shadow(0 0 15px currentColor) brightness(1.2);
}

/* Premium Pulse Effect */
@keyframes premiumPulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.85;
        transform: scale(1.08);
    }
}

.floating-icon.pulse {
    animation: premiumPulse 5s ease-in-out infinite;
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .floating-icon {
        width: 50px;
        height: 50px;
    }
    
    .floating-icon.size-small {
        width: 40px;
        height: 40px;
    }
    
    .floating-icon.size-small i {
        font-size: 1rem;
    }
    
    .floating-icon.size-medium {
        width: 55px;
        height: 55px;
    }
    
    .floating-icon.size-medium i {
        font-size: 1.5rem;
    }
    
    .floating-icon.size-large {
        width: 70px;
        height: 70px;
    }
    
    .floating-icon.size-large i {
        font-size: 2rem;
    }
    
    /* Reduce number of icons on mobile */
    .floating-icon:nth-child(n+10) {
        display: none;
    }
    
    /* Slow down animations on mobile */
    .floating-icon.animate-up,
    .floating-icon.animate-down {
        animation-duration: 35s, 8s;
    }
    
    .floating-icon.animate-left,
    .floating-icon.animate-right {
        animation-duration: 40s, 8s;
    }
    
    .floating-icon.animate-diagonal1,
    .floating-icon.animate-diagonal2 {
        animation-duration: 45s, 8s;
    }
}

/* Small mobile devices - further optimization */
@media (max-width: 480px) {
    .floating-icon {
        width: 45px;
        height: 45px;
    }
    
    .floating-icon.size-small {
        width: 35px;
        height: 35px;
    }
    
    .floating-icon.size-small i {
        font-size: 0.9rem;
    }
    
    /* Further reduce icons */
    .floating-icon:nth-child(n+7) {
        display: none;
    }
    
    /* Reduce animation complexity */
    .floating-icon i {
        animation-duration: 8s;
    }
    
    .floating-icon::after {
        animation-duration: 4s;
    }
}

/* Performance Optimization */
@media (prefers-reduced-motion: reduce) {
    .floating-icon {
        animation: none !important;
        opacity: 0.4;
    }
    
    .floating-icon i {
        animation: none !important;
    }
}

/* Hide grid overlay when floating icons are active */
.animated-bg .grid-overlay {
    opacity: 0.03; /* Very subtle grid */
}

