/* Customer Showcase Widget - Design Snippet Implementation */

.sp-customer-showcase {
    background-color: var(--nexros-bg);
    color: #111827;
    padding: 100px 0;
    overflow: hidden;
    --fade-width: 150px;
    /* Break out of Elementor Boxed limits */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
}

.sp-customer-showcase__container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Header Title */
.sp-customer-showcase__title {
    font-size: 38px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 30px;
    line-height: 1.2;
    max-width: 800px;
}

/* 3D Float Animation for Badge */
@keyframes sp_float {

    0%,
    100% {
        transform: translateY(0) rotateX(0);
    }

    50% {
        transform: translateY(-10px) rotateX(5deg);
    }
}

.sp-3d-float {
    animation: sp_float 4s ease-in-out infinite;
    perspective: 1000px;
}

.sp-customer-showcase__badge-wrap {
    margin-bottom: 60px;
}

.sp-customer-showcase__badge {
    background: #f8fafc;
    padding: 12px 24px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e2e8f0;
}

.badge-star {
    fill: #fbbf24;
}

.badge-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    margin: 0 !important;
}

.badge-highlight {
    color: #2563eb;
    font-weight: 700;
}

/* Marquee Logic */
.sp-customer-showcase__marquee-outer {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.marquee-container {
    overflow: hidden;
    position: relative;
    width: 100%;
    /* Edge Fades using Mask Image */
    mask-image: linear-gradient(to right, transparent, black var(--fade-width), black calc(100% - var(--fade-width)), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black var(--fade-width), black calc(100% - var(--fade-width)), transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    gap: 3rem;
    padding: 1.5rem 0;
}

@keyframes sp_scroll_forward {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

@keyframes sp_scroll_reverse {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

.animate-forward {
    animation: sp_scroll_forward var(--time, 40s) linear infinite;
}

.animate-reverse {
    animation: sp_scroll_reverse var(--time, 40s) linear infinite;
}

/* Items */
.marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    width: 56px;
    /* Target Size */
    height: 56px;
    /* Target Size */
}

.marquee-logo {
    height: 100%;
    width: 100%;
    object-fit: contain;
    /* Contain to keep logo proportions but filling the space */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
    border-radius: inherit;
    padding: 0;
    /* Full Screen image */
}

.marquee-item:hover .marquee-logo {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Row 2: Card Style - 56x56px Full Screen */
.marquee-item.card-style {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.marquee-item.card-style:hover {
    background-color: #ffffff;
    box-shadow: none !important;
    transform: translateY(-5px);
}

.marquee-item.card-style:hover .marquee-logo {
    transform: scale(1.05);
}

.dark-mode .marquee-item.card-style {
    background: #111;
    border-color: rgba(255, 255, 255, 0.05);
}

.dark-mode .marquee-logo {
    filter: brightness(0) invert(1) opacity(0.6);
}

.dark-mode .marquee-item:hover .marquee-logo {
    filter: brightness(0) invert(1) opacity(1);
}

/* --- Optimized Responsive Section for Customer Showcase --- */

@media (max-width: 1024px) {
    .sp-customer-showcase {
        padding: 80px 0;
        --fade-width: 100px;
    }

    .sp-customer-showcase__title {
        font-size: 32px;
        padding: 0 20px;
    }
}

@media (max-width: 767px) {
    .sp-customer-showcase {
        padding: 60px 0;
        --fade-width: 40px; /* Smaller fade for narrow screens */
    }

    .sp-customer-showcase__container {
        padding: 0 20px !important;
    }

    /* Title Scaling: Starts at 24px and grows to 32px */
    .sp-customer-showcase__title {
        font-size: clamp(1.5rem, 6vw, 2rem); 
        margin-bottom: 24px; /* Standardized to 24px */
    }

    .sp-customer-showcase__badge-wrap {
        margin-bottom: 24px; /* Standardized to 24px */
    }

    .sp-customer-showcase__badge {
        padding: 8px 16px;
        gap: 8px;
    }

    .badge-text {
        font-size: 0.75rem;
    }

    /* Marquee Mobile Adjustments */
    .sp-customer-showcase__marquee-outer {
        gap: 1rem;
    }

    .marquee-track {
        gap: 1.5rem; /* Tighter gap so more logos are visible */
        padding: 1rem 0;
    }

    .marquee-item {
        width: 48px; /* Slightly smaller logos for mobile */
        height: 48px;
    }

    /* Speed up the animation slightly for mobile to keep it dynamic */
    .animate-forward, .animate-reverse {
        animation-duration: 25s; 
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .sp-customer-showcase__title {
        font-size: 22px;
    }

    .marquee-item {
        width: 42px;
        height: 42px;
    }
    
    .marquee-track {
        gap: 1.25rem;
    }
}