/* ===================================
   THREE FLOATING IMAGES - SHAPE PRESERVED
   ================================== */

.floating-images {
    padding: 80px 0;
    background: #ebedef;
    width: 100%;
    position: relative;
    overflow: visible;
}

.floating-images .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

/* Enhanced Title */
.floating-title {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    opacity: 0;
    animation: titleFloat 1s ease-out 0.3s forwards;
}

.floating-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #0066cc, #004499);
    border-radius: 2px;
    animation: lineExpand 0.8s ease-out 1s forwards;
    transform-origin: center;
    scale: 0;
}

@keyframes titleFloat {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes lineExpand {
    to {
        scale: 1;
    }
}

.floating-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 60px;
    width: 100%;
    align-items: center;
    justify-items: center;
}

/* Floating Items - No Background */
.floating-item {
    position: relative;
    width: auto;
    height: auto;
    opacity: 0;
    animation: floatUp 1.2s ease-out forwards;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-item:nth-child(1) {
    animation-delay: 0.5s;
}

.floating-item:nth-child(2) {
    animation-delay: 0.7s;
}

.floating-item:nth-child(3) {
    animation-delay: 0.9s;
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Images - Preserve Original Shape */
.floating-img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 300px;
    display: block;
    /* NO border-radius, NO background, NO box-shadow initially */
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    filter: brightness(1.05) contrast(1.05);
    position: relative;
    z-index: 1;
}

/* Floating Animation - More Dynamic */
.floating-item {
    animation:
        floatUp 1.2s ease-out forwards,
        continuousFloat 8s ease-in-out infinite 1.5s;
}

.floating-item:nth-child(1) {
    animation:
        floatUp 1.2s ease-out 0.5s forwards,
        continuousFloat 8s ease-in-out infinite 2s;
}

.floating-item:nth-child(2) {
    animation:
        floatUp 1.2s ease-out 0.7s forwards,
        continuousFloat 8s ease-in-out infinite 2.5s reverse;
}

.floating-item:nth-child(3) {
    animation:
        floatUp 1.2s ease-out 0.9s forwards,
        continuousFloat 8s ease-in-out infinite 3s;
}

@keyframes continuousFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    25% {
        transform: translateY(-25px) rotate(1deg);
    }
    50% {
        transform: translateY(-15px) rotate(-0.5deg);
    }
    75% {
        transform: translateY(-30px) rotate(0.5deg);
    }
}

/* Enhanced Hover Effects - Preserve Shape */
.floating-item:hover {
    animation-play-state: paused;
}

.floating-item:hover .floating-img {
    transform: scale(1.1) translateY(-10px);
    filter: brightness(1.15) contrast(1.15) saturate(1.1);
    /* Add subtle glow without changing shape */
    filter: brightness(1.15) contrast(1.15) saturate(1.1) drop-shadow(0 15px 30px rgba(0, 102, 204, 0.3));
}

/* Subtle Glow Effect that follows image shape */
.floating-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 102, 204, 0.2) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
    z-index: -1;
    filter: blur(20px);
}

.floating-item:hover::after {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .floating-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 50px;
    }

    .floating-title {
        font-size: 2.5rem;
        margin-bottom: 50px;
    }

    .floating-img {
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .floating-images {
        padding: 60px 0;
    }

    .floating-title {
        font-size: 2.2rem;
        margin-bottom: 40px;
    }

    .floating-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .floating-img {
        max-height: 200px;
    }

    @keyframes continuousFloat {
        0%, 100% {
            transform: translateY(0px);
        }
        50% {
            transform: translateY(-20px);
        }
    }
}

@media (max-width: 480px) {
    .floating-images {
        padding: 40px 0;
    }

    .floating-images .container {
        padding: 0 15px;
    }

    .floating-title {
        font-size: 1.9rem;
        margin-bottom: 30px;
    }

    .floating-grid {
        gap: 30px;
    }

    .floating-img {
        max-height: 180px;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .floating-item {
        animation: fadeIn 0.8s ease-out forwards;
    }

    .floating-item:hover .floating-img {
        transform: scale(1.05);
    }

    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

/* High Performance Mode */
.floating-item {
    will-change: transform;
}

.floating-img {
    will-change: transform, filter;
}