/* ========================================
   SOLUTION SHOWCASE
   ======================================== */

.solution-showcase {
    position: relative;
    padding: 1.5rem;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.1);
    backdrop-filter: blur(12px);
}

.dark .solution-showcase {
    background: rgba(15, 23, 42, 0.7);
    border-color: rgba(71, 85, 105, 0.5);
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
}

/* ========================================
   SOLUTION VISUAL HERO (Enhanced Effects)
   ======================================== */

.solution-visual-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .solution-visual-hero {
        min-height: 500px;
    }
}

.solution-visual-hero img {
    width: 100%;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

/* Gentle floating animation for solution images */
@media (prefers-reduced-motion: no-preference) {
    .solution-visual-hero .svg-shape-effects {
        animation: gentleFloat 12s ease-in-out infinite;
        will-change: transform;
    }

    @keyframes gentleFloat {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(-8px);
        }
    }
}

@media (prefers-reduced-motion: reduce) {
    .solution-visual-hero .svg-shape-effects {
        animation: none;
    }
}

.showcase-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    align-items: center;
}

@media (min-width: 768px) {
    .showcase-grid {
        grid-template-columns: 1fr auto 1fr auto 1fr;
        gap: 1.5rem;
    }
}

.showcase-step {
    position: relative;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.showcase-step:hover {
    transform: translateY(-5px);
}

.showcase-image-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 10px 20px -10px rgba(15, 23, 42, 0.2);
    border: 1px solid rgba(226, 232, 240, 1);
    transition: box-shadow 0.3s ease;
}

.dark .showcase-image-wrapper {
    border-color: rgba(71, 85, 105, 0.8);
    box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.4);
}

.showcase-step:hover .showcase-image-wrapper {
    box-shadow: 0 15px 30px -10px rgba(15, 23, 42, 0.3);
}

.dark .showcase-step:hover .showcase-image-wrapper {
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.5);
}

.showcase-image {
    width: 100%;
    display: block;
    height: auto;
}

.showcase-step-number {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
}

.showcase-step-body {
    padding: 0 0.5rem;
}

.showcase-step-title {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.dark .showcase-step-title {
    color: #f1f5f9;
}

.showcase-step-desc {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.4;
}

.dark .showcase-step-desc {
    color: #94a3b8;
}

.showcase-connector {
    display: none;
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.dark .showcase-connector {
    color: #475569;
}

@media (min-width: 768px) {
    .showcase-connector {
        display: block;
    }
}

.showcase-grid:hover .showcase-connector {
    color: #38bdf8;
}

/* ========================================
   SHOWCASE ANIMATIONS
   ======================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Set initial state for animation */
.solution-showcase .showcase-step,
.solution-showcase .showcase-connector {
    opacity: 0;
}

.solution-showcase.is-visible .showcase-step {
    opacity: 1;
    animation: fadeInUp 0.6s cubic-bezier(0.390, 0.575, 0.565, 1.000) both;
}

.solution-showcase.is-visible .showcase-connector {
    opacity: 1;
    animation: scaleIn 0.5s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

/* Stagger the animations */
.solution-showcase.is-visible .showcase-step:nth-child(1) {
    animation-delay: 0.1s;
}
.solution-showcase.is-visible .showcase-connector:nth-child(2) {
    animation-delay: 0.3s;
}
.solution-showcase.is-visible .showcase-step:nth-child(3) {
    animation-delay: 0.5s;
}
.solution-showcase.is-visible .showcase-connector:nth-child(4) {
    animation-delay: 0.7s;
}
.solution-showcase.is-visible .showcase-step:nth-child(5) {
    animation-delay: 0.9s;
}

@media (prefers-reduced-motion: reduce) {
    .solution-showcase .showcase-step,
    .solution-showcase .showcase-connector {
        opacity: 1 !important;
        animation: none !important;
        transform: none !important;
    }
}

/* ========================================
   3D CARD STACK LAYOUT (Expert Design)
   ======================================== */

.showcase-grid-collage {
    position: relative;
    min-height: 600px;
    padding: 3rem 2.5rem 3.5rem;
    background: radial-gradient(120% 100% at 20% 6%, rgba(99, 102, 241, 0.18) 0%, rgba(15, 23, 42, 0.95) 55%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.90) 50%, rgba(15, 23, 42, 0.97) 100%);
    border-radius: 28px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 30px 70px -28px rgba(15, 23, 42, 0.8);
    overflow: visible;
}

.dark .showcase-grid-collage {
    background: radial-gradient(120% 100% at 18% 6%, rgba(99, 102, 241, 0.35) 0%, rgba(3, 7, 18, 0.97) 52%),
        linear-gradient(145deg, rgba(3, 7, 18, 0.98) 0%, rgba(15, 23, 42, 0.94) 50%, rgba(3, 7, 18, 0.98) 100%);
    border-color: rgba(79, 70, 229, 0.3);
    box-shadow:
        inset 0 1px 0 rgba(148, 163, 184, 0.1),
        0 35px 80px -32px rgba(2, 6, 23, 0.85);
}

@media (min-width: 1024px) {
    .showcase-grid-collage {
        min-height: 650px;
        padding: 4rem 3.5rem 4.5rem;
    }
}

.solution-showcase .showcase-grid-collage {
    display: block;
}

/* Cascade Card Positioning */
.showcase-grid-collage .showcase-step {
    position: absolute;
    transition: transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.45s ease;
    transform-style: preserve-3d;
    cursor: pointer;
    filter: drop-shadow(0 30px 50px rgba(15, 23, 42, 0.45));
    will-change: transform;
}

/* Step 1: Capture */
.showcase-grid-collage .showcase-step:nth-child(1) {
    left: clamp(2%, 4vw, 6%);
    bottom: clamp(8%, 10vw, 14%);
    width: clamp(240px, 26vw, 320px);
    transform: translateY(35px) rotate(-5deg);
    z-index: 1;
}

/* Step 2: Processing */
.showcase-grid-collage .showcase-step:nth-child(2) {
    left: 50%;
    top: 50%;
    width: clamp(200px, 22vw, 280px);
    transform: translate(-50%, -50%) translateY(0px) rotate(-1deg);
    z-index: 2;
}

/* Step 3: Final Output */
.showcase-grid-collage .showcase-step:nth-child(3) {
    right: clamp(2%, 4vw, 6%);
    top: clamp(4%, 6vw, 8%);
    width: clamp(400px, 44vw, 580px);
    transform: translateY(-25px) rotate(3deg);
    z-index: 3;
}

.showcase-grid-collage .showcase-image-wrapper {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.85) 0%, rgba(226, 232, 240, 0.6) 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        0 24px 42px -24px rgba(148, 163, 184, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.dark .showcase-grid-collage .showcase-image-wrapper {
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.96) 100%);
    border-color: rgba(148, 163, 184, 0.25);
    box-shadow:
        0 26px 44px -24px rgba(2, 6, 23, 0.85),
        inset 0 1px 0 rgba(148, 163, 184, 0.45);
}

.showcase-grid-collage .showcase-image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.18) 0%, transparent 55%, rgba(15, 23, 42, 0.18) 100%);
    pointer-events: none;
}

.showcase-grid-collage .showcase-step:nth-child(2) .showcase-image-wrapper::after {
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.14) 0%, transparent 65%, rgba(15, 23, 42, 0.16) 100%);
}

.showcase-grid-collage .showcase-step-number {
    position: absolute;
    top: -18px;
    left: -18px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(130deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.35rem;
    border: 3px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 18px 38px -18px rgba(96, 165, 250, 0.6),
        inset 0 2px 0 rgba(255, 255, 255, 0.45);
    z-index: 12;
    backdrop-filter: blur(14px);
}

.dark .showcase-grid-collage .showcase-step-number {
    background: linear-gradient(130deg, #2563eb 0%, #1d4ed8 50%, #1e40af 100%);
    border-color: rgba(148, 163, 184, 0.4);
    box-shadow:
        0 20px 38px -18px rgba(37, 99, 235, 0.7),
        inset 0 2px 0 rgba(148, 163, 184, 0.5);
}

.showcase-grid-collage .showcase-step:hover {
    filter: drop-shadow(0 42px 70px rgba(59, 130, 246, 0.45));
    z-index: 20;
}

.showcase-grid-collage .showcase-step:nth-child(1):hover {
    transform: translateY(15px) rotate(-2deg) scale(1.05);
}

.showcase-grid-collage .showcase-step:nth-child(2):hover {
    transform: translate(-50%, -50%) translateY(-15px) rotate(0deg) scale(1.05);
}

.showcase-grid-collage .showcase-step:nth-child(3):hover {
    transform: translateY(-35px) rotate(1deg) scale(1.02);
}

/* Hide text labels for cleaner look */
.showcase-grid-collage .showcase-step-body {
    display: none;
}

/* Mobile Responsive: Simplified Stack */
@media (max-width: 1023px) {
    .showcase-grid-collage {
        min-height: 500px;
        padding: 2rem 1rem;
    }

    .showcase-grid-collage .showcase-step {
        position: relative;
        width: 100% !important;
        max-width: 100% !important;
        left: auto !important;
        right: auto !important;
        top: auto !important;
        bottom: auto !important;
        transform: none !important;
        opacity: 1 !important;
        margin-bottom: 2rem;
    }

    .showcase-grid-collage .showcase-step:hover {
        transform: translateY(-8px) scale(1.02) !important;
    }

    .showcase-grid-collage .showcase-step:last-child {
        margin-bottom: 0;
    }

    .showcase-grid-collage .showcase-step-number {
        top: -15px;
        left: -15px;
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .showcase-grid-collage .showcase-step-body {
        display: block;
        padding: 1rem 0.5rem 0;
        text-align: center;
    }

    .showcase-grid-collage .showcase-step-title {
        font-size: 1rem;
        font-weight: 700;
        color: #f1f5f9;
        margin-bottom: 0.5rem;
    }

    .showcase-grid-collage .showcase-step-desc {
        font-size: 0.875rem;
        color: #cbd5e1;
    }
}

/* Animation Reveal */
.solution-showcase.is-visible .showcase-grid-collage .showcase-step:nth-child(1) {
    animation: cardReveal1 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.2s;
}

.solution-showcase.is-visible .showcase-grid-collage .showcase-step:nth-child(2) {
    animation: cardReveal2 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.4s;
}

.solution-showcase.is-visible .showcase-grid-collage .showcase-step:nth-child(3) {
    animation: cardReveal3 1s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.6s;
}

@keyframes cardReveal1 {
    from {
        opacity: 0;
        transform: translateY(180px) rotate(-12deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(35px) rotate(-5deg);
    }
}

@keyframes cardReveal2 {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) translateY(180px) rotate(-8deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) translateY(0px) rotate(-1deg);
    }
}

@keyframes cardReveal3 {
    from {
        opacity: 0;
        transform: translateY(160px) rotate(8deg) scale(0.85);
    }
    to {
        opacity: 1;
        transform: translateY(-25px) rotate(3deg);
    }
}

/* Tablet Specific */
@media (min-width: 768px) and (max-width: 1023px) {
    .showcase-grid-collage {
        min-height: 640px;
    }

    .showcase-grid-collage .showcase-step:nth-child(1) {
        width: clamp(240px, 34vw, 320px);
        left: 8%;
        bottom: 12%;
    }

    .showcase-grid-collage .showcase-step:nth-child(2) {
        width: clamp(210px, 30vw, 280px);
        left: 40%;
        top: 60%;
    }

    .showcase-grid-collage .showcase-step:nth-child(3) {
        width: clamp(360px, 60vw, 520px);
        right: 8%;
        top: 10%;
    }
}
