/* Animated Background for Specific Sections - SmartCodeSolutions Style */
.animated-section {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #ffffff 100%);
}

/* Continuous animated background container */
.animated-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.animated-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(74, 108, 247, 0.08) 0%, transparent 60%),
        radial-gradient(circle at 80% 80%, rgba(14, 165, 233, 0.06) 0%, transparent 60%),
        radial-gradient(circle at 40% 20%, rgba(100, 116, 139, 0.04) 0%, transparent 60%);
    animation: float 12s ease-in-out infinite;
    z-index: 0;
}

.animated-container::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg at 50% 50%, 
        rgba(74, 108, 247, 0.03) 0deg, 
        rgba(14, 165, 233, 0.03) 120deg, 
        rgba(74, 108, 247, 0.03) 240deg, 
        rgba(74, 108, 247, 0.03) 360deg);
    animation: rotate 25s linear infinite;
    z-index: 0;
}

.animated-section .container {
    position: relative;
    z-index: 1;
}

.animated-section .section-title,
.animated-section .service-card,
.animated-section .process-card,
.animated-section .case-card,
.animated-section .project-card {
    position: relative;
    z-index: 2;
}

/* Floating particles - SmartCodeSolutions Style */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: rgba(74, 108, 247, 0.6);
    border-radius: 50%;
    pointer-events: none;
    animation: floatUp 10s infinite linear;
    box-shadow: 0 0 12px rgba(74, 108, 247, 0.7);
}

.particle:nth-child(1) {
    width: 12px;
    height: 12px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 8s;
    background: rgba(74, 108, 247, 0.7);
}

.particle:nth-child(2) {
    width: 8px;
    height: 8px;
    left: 30%;
    animation-delay: 1s;
    animation-duration: 10s;
    background: rgba(14, 165, 233, 0.6);
}

.particle:nth-child(3) {
    width: 16px;
    height: 16px;
    left: 50%;
    animation-delay: 2s;
    animation-duration: 12s;
    background: rgba(74, 108, 247, 0.8);
}

.particle:nth-child(4) {
    width: 6px;
    height: 6px;
    left: 70%;
    animation-delay: 3s;
    animation-duration: 6s;
    background: rgba(14, 165, 233, 0.7);
}

.particle:nth-child(5) {
    width: 10px;
    height: 10px;
    left: 90%;
    animation-delay: 4s;
    animation-duration: 14s;
    background: rgba(74, 108, 247, 0.6);
}

.particle:nth-child(6) {
    width: 14px;
    height: 14px;
    left: 15%;
    animation-delay: 5s;
    animation-duration: 9s;
    background: rgba(14, 165, 233, 0.8);
}

.particle:nth-child(7) {
    width: 8px;
    height: 8px;
    left: 35%;
    animation-delay: 6s;
    animation-duration: 7s;
    background: rgba(74, 108, 247, 0.7);
}

.particle:nth-child(8) {
    width: 11px;
    height: 11px;
    left: 55%;
    animation-delay: 7s;
    animation-duration: 11s;
    background: rgba(14, 165, 233, 0.6);
}

.particle:nth-child(9) {
    width: 15px;
    height: 15px;
    left: 75%;
    animation-delay: 8s;
    animation-duration: 13s;
    background: rgba(74, 108, 247, 0.8);
}

.particle:nth-child(10) {
    width: 7px;
    height: 7px;
    left: 85%;
    animation-delay: 9s;
    animation-duration: 8s;
    background: rgba(14, 165, 233, 0.7);
}

/* Additional particles for continuous effect */
.particle:nth-child(11) {
    width: 9px;
    height: 9px;
    left: 25%;
    animation-delay: 10s;
    animation-duration: 15s;
    background: rgba(74, 108, 247, 0.6);
}

.particle:nth-child(12) {
    width: 13px;
    height: 13px;
    left: 65%;
    animation-delay: 11s;
    animation-duration: 16s;
    background: rgba(14, 165, 233, 0.7);
}

.particle:nth-child(13) {
    width: 5px;
    height: 5px;
    left: 45%;
    animation-delay: 12s;
    animation-duration: 9s;
    background: rgba(74, 108, 247, 0.5);
}

.particle:nth-child(14) {
    width: 10px;
    height: 10px;
    left: 95%;
    animation-delay: 13s;
    animation-duration: 17s;
    background: rgba(14, 165, 233, 0.6);
}

.particle:nth-child(15) {
    width: 12px;
    height: 12px;
    left: 5%;
    animation-delay: 14s;
    animation-duration: 11s;
    background: rgba(74, 108, 247, 0.7);
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) translateX(0) scale(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) translateX(150px) scale(2) rotate(720deg);
        opacity: 0;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animated-container::before {
        background-size: 200% 200%;
    }
    
    .animated-container::after {
        animation-duration: 20s;
    }
    
    .particle {
        width: 6px !important;
        height: 6px !important;
    }
}

/* Section specific styles - SmartCodeSolutions Theme */
#services.animated-section {
    background: transparent;
}

#how-it-works.animated-section {
    background: transparent;
}

#case-studies.animated-section {
    background: transparent;
}

/* Make all sections with animated background transparent */
.animated-section {
    background: transparent !important;
}

/* Animated client logos carousel */
.client-logos {
    display: flex;
    animation: scrollLogos 30s linear infinite;
    width: max-content;
    white-space: nowrap;
    overflow: hidden;
}

.client-logos .client-logo {
    flex-shrink: 0;
    margin-right: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 150px;
}

/* Ensure single row layout */
.trusted-by .client-logos {
    flex-wrap: nowrap !important;
}

.trusted-by .client-logos .client-logo {
    margin-bottom: 0 !important;
}

/* Style for clickable logos */
.client-logo a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.client-logo a:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.client-logo a img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* Specific styling for Stone Craft logo */
.client-logo a img[src*="stonecraft"] {
    width: 250px !important;
    height: 120px !important;
    object-fit: contain;
    padding: 0;
    border-radius: 0;
    box-sizing: border-box;
}

/* Specific styling for BG Klima logo */
.client-logo a img[src*="bgclima-logo"] {
    width: 300px !important;
    height: 150px !important;
    object-fit: contain;
    padding: 0;
    border-radius: 0;
    box-sizing: border-box;
}

/* Container for the logos strip */
.trusted-by .container {
    overflow: hidden;
    padding: 20px 0;
}

.trusted-by {
    overflow: hidden;
}

@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.client-logos:hover {
    animation-play-state: paused;
}
