/* Business Growth Bento Widget - Tailwind to CSS Conversion */

.sp-business-growth {
    padding: 72px 0 40px;
    background: linear-gradient(180deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%) !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
}

.sp-business-growth__container {
    max-width: 1440px;
    /* Matched from 1280px to Hero Banner's 1440px XXL */
    margin: 0 auto;
    padding: 0 40px;
    /* Matching Hero Banner container padding */
}


/* Header Section */
.sp-business-growth__header {
    text-align: center;
    margin-bottom: 32px;
}

.sp-business-growth__title {
    font-weight: 800;
    font-size: 28px !important;
    color: #0f172a;
    margin-top: 0;
    margin-bottom: 8px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

@media (min-width: 768px) {
    .sp-business-growth__title {
        /* Already handled by clamp on desktop */
        letter-spacing: -0.03em;
    }
}

.sp-gradient-text {
    background: linear-gradient(24.92deg, #15997E 6.27%, #2ED8B6 94.96%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

.sp-business-growth__desc {
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
}

/* Grid Container / Slider */
.sp-business-growth__grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    overflow-x: auto;
    padding-bottom: 2rem;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    perspective: 1000px;
}

.sp-business-growth__grid::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Edge */
}

@media (min-width: 1024px) {
    .sp-business-growth__grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow-x: visible;
        padding-bottom: 0;
    }
}

@keyframes sp-slide-in {
    from {
        transform:
            translateY(8rem) rotate(calc(var(--side, 0) * var(--amp, 1) * 8deg)) scale(0.85) !important;
        opacity: 0 !important;
    }

    to {
        transform: translateY(0) rotate(0) scale(1) !important;
        opacity: 1 !important;
    }
}

.sp-bg-card {
    width: 324px;
    max-width: 85vw;
    height: 400px;
    padding: 32px;
    gap: 0;
    border: none;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    flex: 0 0 auto;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);

    /* Initial state variables */
    --side: 0;
    --amp: 1;
    transform-origin: center bottom;

    /* Fallback transition if animation-timeline is not used */
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.6s ease;
}

/* Scroll-driven animation logic - specifically for animate-fan-in */
.animate-fan-in {
    @media (prefers-reduced-motion: no-preference) {
        @supports (animation-timeline: view()) {
            animation: sp-slide-in linear both !important;
            animation-timeline: view() !important;
            animation-range: cover 0% contain 25% !important;
        }
    }
}

/* Pivot Points & Sides - Staggered columns */
.sp-bg-card:nth-of-type(2n + 1) { transform-origin: 25vw 100%; --side: -1; }
.sp-bg-card:nth-of-type(2n)     { transform-origin: -25vw 100%; --side: 1; }

@media (min-width: 1024px) {
    .sp-bg-card:nth-of-type(4n + 1) { transform-origin: 50vw 100%; --side: -1; --amp: 2; }
    .sp-bg-card:nth-of-type(4n + 2) { transform-origin: 25vw 100%; --side: -1; }
    .sp-bg-card:nth-of-type(4n + 3) { transform-origin: -25vw 100%; --side: 1 }
    .sp-bg-card:nth-of-type(4n)     { transform-origin: -50vw 100%; --side: 1; --amp: 2; }
}

@media (min-width: 1024px) {
    .sp-bg-card {
        width: 100%;
        max-width: 324px;
        margin: 0 auto;
    }
}

/* Allow spans to override default widths */
@media (min-width: 1024px) {
    .sp-bg-card.span-2 {
        max-width: none;
    }

    .sp-bg-card.span-3 {
        max-width: none;
    }

    .sp-bg-card.span-4 {
        max-width: none;
    }
}

/* Card Type 1: Visual Image Card */
.sp-bg-visual {
    justify-content: flex-end;
    align-items: flex-start;
    color: white;
    text-align: left;
}

.sp-bg-visual__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.sp-bg-visual__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.sp-bg-visual:hover .sp-bg-visual__bg img {
    transform: scale(1.1);
}

.sp-bg-visual__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 80%);
    z-index: 1;
}

.sp-bg-visual__content {
    position: relative;
    z-index: 100 !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
    height: 100%;
    flex: 1;
}

.sp-bg-visual__icon-wrap {
    margin-bottom: auto;
    /* Push to top */
    margin-top: 0;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sp-bg-visual__icon-wrap img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.sp-bg-visual__title {
    font-family: var(--primaryFont);
    font-size: 20px;
    /* Updated from 24px per user spec */
    font-weight: 700;
    /* Bold */
    margin-bottom: 12px;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: normal;
}

.sp-bg-visual__desc {
    font-family: var(--primaryFont);
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 24px;
    line-height: 1.6;
    letter-spacing: normal;
}

.sp-bg-visual__link {
    width: 117px;
    height: 48px;
    background: linear-gradient(24.92deg, #15997E 6.27%, #2ED8B6 94.96%);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0 10px;
    /* Reduced from 20px to fit 117px width without icon */
    border-radius: 12px;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: none !important;
    letter-spacing: -0.02em;
}

.sp-bg-visual__link svg {
    display: none !important;
    /* Removed per user request */
}

.sp-bg-visual__link:hover,
.sp-bg-card:hover .sp-bg-visual__link {
    transform: translateY(-2px);
    box-shadow: none !important;
    color: #ffffff !important;
}

.sp-bg-visual__link svg {
    flex-shrink: 0;
    margin-left: 0;
    transition: transform 0.3s ease;
}

.sp-bg-visual__link:hover svg,
.sp-bg-card:hover .sp-bg-visual__link svg {
    transform: translateX(4px);
}

.sp-bg-visual__link:hover,
.sp-bg-card:hover .sp-bg-visual__link {
    color: #10b981;
}

.sp-bg-visual__link:hover svg,
.sp-bg-card:hover .sp-bg-visual__link svg {
    transform: translateX(4px);
}

.sp-bg-feature {
    background: var(--Neutral-Light-2, #F8FAFC);
    box-shadow: none !important;
    transition: background 0.3s ease, transform 0.3s ease;
}

.sp-bg-feature:hover {
    background: var(--Neutral-Light-1, #FFFFFF) !important;
}

.sp-bg-feature__icon-wrap {
    margin-bottom: 68px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.sp-bg-feature__icon-wrap img,
.sp-bg-feature__icon-wrap svg {
    width: 100px;
    height: 100px;
    object-fit: contain;
}

/* Force strip ghost shadows from Elementor default image widgets */
.sp-bg-feature__icon-wrap img {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.sp-pos-pricing-wrap .subscription-main-card {
    background: #ffffff;
    border-radius: 1rem;
    /* Standardized to 16px */
    box-shadow: none !important;
    border: none !important;
}

.sp-bg-feature__content {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
    flex: 1;
}

.sp-bg-feature__title {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.sp-bg-feature__desc {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #4b5563;
    margin-bottom: 16px;
    line-height: 1.6;
    letter-spacing: -0.01em;
}

.sp-bg-feature__link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #15997E;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: gap 0.2s;
    margin-top: 0;
    white-space: nowrap;
    text-transform: capitalize;
}

.sp-bg-feature__link svg {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.sp-bg-feature__link:hover,
.sp-bg-card:hover .sp-bg-feature__link {
    color: #34d399;
}

.sp-bg-feature__link:hover svg,
.sp-bg-card:hover .sp-bg-feature__link svg {
    transform: translateX(4px);
}

/* Stretched Link for Card Clickability */
.sp-card-stretched-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 50;
    /* Ensure it covers the whole card */
    cursor: pointer;
}

/* Icon Color Presets */
.icon-blue {
    color: #3b82f6;
}

/* text-blue-500 */
.icon-indigo {
    color: #6366f1;
}

/* text-indigo-500 */
.icon-rose {
    color: #f43f5e;
}

/* text-rose-500 */
.icon-emerald {
    color: #10b981;
}

/* text-emerald-500 */
.icon-amber {
    color: #f59e0b;
}

/* text-amber-500 */

/* --- Mobile Responsive Layout (Matches Mobile Screenshot Exactly) --- */
@media (max-width: 767px) {
    .sp-business-growth {
        padding: 40px 0 24px 0 !important;
        /* Standardized bottom to 24px */
    }

    .sp-business-growth__container {
        padding: 0 16px;
    }

    .sp-business-growth__header {
        margin-bottom: 0.75rem;
        text-align: center;
    }

    .sp-business-growth__title {
        font-size: clamp(28px, 6vw, 42px) !important;
        margin-top: 0 !important;
        /* Removed default top margin */
        margin-bottom: 0.5rem;
        padding: 0 10px;
    }

    .sp-business-growth__desc {
        font-size: clamp(14px, 2vw, 17px);
        line-height: 1.5;
        color: #64748b;
        padding: 0 16px;
    }

    /* Stacked Layout */
    .sp-business-growth__grid {
        flex-direction: column;
        overflow-x: hidden;
        gap: 24px;
        /* Standardized to 24px */
        padding-bottom: 0;
    }

    .sp-bg-card {
        width: 100%;
        max-width: 100%;
        flex: none;
        height: auto;
        border: none;
        background: white;
    }

    /* 1. Visual Card Mobile Style */
    .sp-bg-visual {
        min-height: 380px;
        /* More compact for mobile */
        padding: 24px 20px;
        /* Reduced card padding */
        border-radius: 24px !important;
        display: flex;
        justify-content: flex-end;
        box-shadow: none !important;
    }

    .sp-bg-visual__bg img,
    .sp-bg-visual__overlay {
        border-radius: 24px !important;
    }

    .sp-bg-visual__title {
        font-size: 22px;
        margin-bottom: 12px;
    }

    .sp-bg-visual__desc {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .sp-bg-visual__link {
        width: 130px;
        height: 44px;
        font-size: 14px;
        border-radius: 10px;
    }

    /* 2. Feature Cards Mobile List Style */
    .sp-bg-feature {
        background: white !important;
        border-radius: 24px !important;
        padding: 24px !important;
        box-shadow: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .sp-bg-feature__icon-wrap {
        height: auto !important;
        margin-bottom: 16px !important;
        display: flex !important;
        justify-content: flex-start !important;
    }

    .sp-bg-feature__icon-wrap img {
        width: 70px !important;
        /* Smaller icon size for list view */
        height: auto !important;
    }

    .sp-bg-feature__content {
        margin-top: 0 !important;
        gap: 8px !important;
    }

    .sp-bg-feature__title {
        font-size: 18px !important;
        line-height: 1.3 !important;
        color: #0f172a !important;
        margin-bottom: 8px !important;
    }

    .sp-bg-feature__desc {
        font-size: 14px !important;
        line-height: 1.5 !important;
        color: #64748b !important;
        margin-bottom: 12px !important;
    }

    .sp-bg-feature__link {
        margin-top: 8px !important;
        font-size: 14px !important;
        display: inline-flex !important;
        align-items: center !important;
        color: #15997E !important;
    }

    .sp-bg-feature__link svg {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .sp-business-growth__title {
        font-size: 24px !important;
    }
}