@php
    use App\Models\DepositCoin;
    use App\Models\Bot;
    use Faker\Factory as Faker;

    $page_title = 'Home';
    $faker = Faker::create();
    $logos = DepositCoin::inRandomOrder()->take(20)->get('logo_url');

    $bots = Bot::get();

    // $deposit_methods = ['usdttrc20'];
    // $methods = DepositCoin::where('status', 1)->get();
    // foreach ($methods as $method) {
    //     array_push($deposit_methods, $method->code);
    // }

    // // Check if the count is less than 20
    // while (count($deposit_methods) < 20) {
    //     $deposit_methods[] = 'usdttrc20';
    // }

    $actions = [
        'deposited',
        'withdrew',
        'withdrew',
        'deposited',
        'withdrew',
        'deposited',
        'withdrew',
        'withdrew',
        'withdrew',
        'withdrew',
        'withdrew',
        'withdrew',
    ];

    $whys = [
        'Cutting-Edge Precision',
        'Trendsetter Advantage',
        'Adaptive Excellence',
        'Seamless Profits',
        'Data-Driven Triumph',
        'Strategic Partner',
        'Constant Success',
        'Market Pioneer',
        'Automated Mastery',
    ];
    $reviews = [
        [
            'image' => 'review-image-1.jpg',
            'name' => 'Adrian',
            'country' => 'UK',
            'testimony' =>
                site('name') .
                "'s precision trading is a game-changer, consistently delivering impressive profits. I trust it for my financial success.",
            'date' => '5/03/2023',
        ],
        [
            'image' => 'review-image-2.jpg',
            'name' => 'Madison',
            'country' => 'USA',
            'testimony' =>
                'Effortless trading with ' .
                site('name') .
                '. Its adaptability and data-driven approach make it a standout choice. Highly recommended!',
            'date' => '7/02/2024',
        ],
        [
            'image' => 'review-image-3.jpg',
            'name' => 'Schneider',
            'country' => 'Germany',
            'testimony' =>
                'Seamless trades, constant profits - ' .
                site('name') .
                " simplifies trading. It's a must-have for anyone in the market.",
            'date' => '5/04/2024',
        ],
        [
            'image' => 'review-image-4.jpg',
            'name' => 'Tommy',
            'country' => 'South Africa',
            'testimony' =>
                site('name') .
                "'s innovative strategies and consistent returns have transformed my trading experience. It's a valuable asset to any trader.",
            'date' => '2/05/2024',
        ],
        [
            'image' => 'review-image-5.jpg',
            'name' => 'Jannet',
            'country' => 'USA',
            'testimony' =>
                'I rely on ' .
                site('name') .
                " for its adaptability in fluctuating markets. It's a proven partner in achieving financial goals.",
            'date' => '13/06/2024',
        ],
        [
            'image' => 'review-image-6.jpg',
            'name' => 'Thomas',
            'country' => 'England',
            'testimony' =>
                site('name') .
                "'s automated precision is remarkable. It's a powerful tool for navigating today's complex trading landscape.",
            'date' => '27/08/2024',
        ],
        [
            'image' => 'review-image-7.jpg',
            'name' => 'Atlan',
            'country' => 'Germany',
            'testimony' =>
                'Maximized profits with ' .
                site('name') .
                '. Its results speak volumes. A reliable and intelligent trading companion.',
            'date' => '1/10/2024',
        ],
        [
            'image' => 'review-image-8.jpg',
            'name' => 'Kelvin',
            'country' => 'UK',
            'testimony' =>
                'Trading with ' .
                site('name') .
                ' is effortless and rewarding. It adapts to market changes seamlessly. Truly impressive!',
            'date' => '15/10/2024',
        ],
        [
            'image' => 'review-image-9.jpg',
            'name' => 'Jude',
            'country' => 'Canada',
            'testimony' =>
                site('name') .
                ' has changed my trading game. Its data-driven approach delivers consistent gains. An invaluable tool for success.',
            'date' => '7/11/2024',
        ],
        [
            'image' => 'review-image-10.jpg',
            'name' => 'Jude',
            'country' => 'Australia',
            'testimony' =>
                'Effortless trading made possible by ' .
                site('name') .
                ' .  Its strategic prowess sets it apart. A game-changer for traders.',
            'date' => '23/1/2025',
        ],
    ];

    $short_description = site('seo_description');

@endphp

@extends('templates.' . site('template') . '.layouts.front')

@section('css')
@endsection


@section('contents')
    {{-- hero section  --}}
    <section class="pt-8 md:pt-20 px-6">
        <div class="max-w-6xl mx-auto text-center text-white relative ">
            <div class="absolute -left-20 -top-10 hidden lg:block animate-pulse">
                <img src="{{ asset('/assets/templates/trello/images/left-cone-object.png') }}" alt="">
            </div>
            <div class="absolute -right-20 -bottom-10 hidden lg:block animate-pulse">
                <img src="{{ asset('/assets/templates/trello/images/right-cone-object.png') }}" alt="">
            </div>
            <div class="absolute -left-20 -bottom-10 hidden lg:block animate-pulse">
                <img src="{{ asset('/assets/templates/trello/images/pink-circle-object-bigger.png') }}" alt="">
            </div>
            <div class="absolute -right-20 -top-10 hidden lg:block animate-pulse">
                <img src="{{ asset('/assets/templates/trello/images/pink-circle-object-smaller.png') }}" alt="">
            </div>

            {{-- mobile only objects start  --}}
            <div class="absolute -left-28 -bottom-0 lg:hidden -z-10">
                <img src="{{ asset('/assets/templates/trello/images/pink-circle-object-smaller.png') }}" alt="">
            </div>
            {{-- mobile only objects end  --}}

            <div class="absolute -left-72 -top-28 p-40 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10"></div>
            <div
                class="absolute -right-40 -top-28 p-40 md:p-80 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10">
            </div>
            <div
                class="absolute left-40 md:left-96 -top-60 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
            </div>
            <div
                class="absolute left-40 md:left-96 -bottom-40 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
            </div>

            <h1 class="text-3xl md:text-6xl font-bold mb-4  p-1 md:p-4 leading-normal"><span
                    class="text-transparent bg-clip-text bg-gradient-to-r from-[#9e79e5] via-[#ff8ac7] to-[#feba75]">Easy
                    Trading, Steady Profits -</span>

                <span class="md:block text-[#cad1e9]">Enabled by AI Brilliance</span>
            </h1>
            <p class="text-sm md:text-xl text-white p-1 md:leading-relaxed">
                Rescron AI leverages cutting-edge AI robots, meticulously trained on
                vast trading data and sophisticated algorithms, to decode market
                trends and execute trades with pinpoint accuracy. Our AI bots
                consistently deliver an impressive average of 5% daily PNL.
            </p>

            <!-- auth  -->
            <div class="flex justify-center space-x-4 md:gap-16 mt-8 md:mt-12 lg:mt-16 pb-16 md:pb-60">
                <button
                    class="px-12 py-3 rounded-xl white bg-gradient-to-r from-[#5823c1] to-[#ff8ac7] hover:scale-105 transition duration-300 cursor-pointer">
                    Sign In
                </button>
                <button
                    class=" px-12 py-3 rounded-xl border border-white bg-white/10 hover:scale-105 transition duration-300 cursor-pointer">
                    Sign up
                </button>
            </div>
        </div>
    </section>

    {{-- coin carousel --}}
    <section class="w-full px-5 md:px-20 py-4 mb-4 md:mb-8 bg-white/5 flex items-center">
        <div class="glide w-full">
            <div class="glide__track" data-glide-el="track">
                <ul class="glide__slides flex items-center">
                    @foreach ($logos as $logo)
                        <li class="glide__slide w-auto flex items-center">
                            <div class="w-16 h-16 flex items-center justify-center">
                                <img class="rounded-full h-8 w-8 cursor-pointer"
                                    src="{{ 'https://nowpayments.io' . $logo->logo_url }}" alt="">
                            </div>
                        </li>
                    @endforeach
                </ul>
            </div>
        </div>
    </section>

    {{-- unlocking markets section  --}}
    <section class="pt-8 md:pt-20 px-6 mb-4 md:mb-8 relative">
        <!-- Desktop Only -->
        <div class="absolute left-72 -top-28 p-40 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10"></div>
        <div class="absolute right-40 -top-28 p-40 md:p-80 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div class="absolute left-40 md:left-96 -top-60 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div
            class="absolute left-40 md:left-96 -bottom-40 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>

        <!-- Mobile & Tablet Only -->
        <div class="absolute left-10 top-10 p-20 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute right-10 top-10 p-20 md:p-40 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 top-20 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 bottom-10 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10"></div>

        <div class="max-w-6xl mx-auto text-center text-white">
            <h2 class="text-white text-3xl md:text-4xl font-semibold">Unlocking Markets, Amplifying Returns</h2>
            <p class="text-gray-400 text-center mt-4 md:mt-6 text-sm md:text-base lg:text-lg">
                Your ultimate trading companion, utilizing cutting-edge technology to unlock new market potentials and
                amplify your investment returns like never before.
            </p>

            <div class="grid grid-cols-1 md:grid-cols-2 gap-6 lg:gap-20 mt-4 md:mt-8 lg:mt-12">
                <!-- Card 1 -->
                <div
                    class="bg-slate-800/70 py-8 px-2 rounded-2xl backdrop-blur-4xl relative overflow-hidden border border-white/15">
                    <div
                        class="absolute p-28 bottom-0 right-0 rounded-full -z-10 blur-2xl 
                                bg-[conic-gradient(#561BBE_0deg,#70E6FB_90deg,#FBF8B3_180deg,#FA8792_270deg)]">
                    </div>
                    <div
                        class="border border-white/15 w-32 md:w-48 mx-auto rounded-xl bg-gradient-to-r from-[#1b1c36]/50 to-[#70717a]/50">
                        <img src="{{ asset('/assets/templates/trello/images/bullish-image.png') }}" alt=""
                            class="w-24 md:w-40 mx-auto" />
                    </div>
                    <div class="p-6 text-center">
                        <h3 class="text-xl font-bold mb-2">Bullish Or Bearish</h3>
                        <p class="text-white/60 text-sm">
                            Utilizing cutting-edge technology to tackle tough market
                            conditions, keeping your financial goals within reach even during
                            bearish trends.
                        </p>
                    </div>
                </div>

                <!-- Card 2 -->
                <div
                    class="bg-slate-800/70 py-8 px-2 rounded-2xl backdrop-blur-4xl relative overflow-hidden border border-white/30">
                    <div
                        class="absolute p-28 bottom-0 right-0 rounded-full -z-10 blur-2xl 
                                bg-[conic-gradient(#561BBE_0deg,#70E6FB_90deg,#FBF8B3_180deg,#FA8792_270deg)]">
                    </div>
                    <div
                        class="border border-white/15 w-32 md:w-48 mx-auto rounded-xl bg-gradient-to-r from-[#1b1c36]/50 to-[#70717a]/50">
                        <img src="{{ asset('/assets/templates/trello/images/guaranteed-profit-image.png') }}" alt=""
                            class="w-24 md:w-40  mx-auto" />
                    </div>
                    <div class="p-6 text-center">
                        <h3 class="text-xl font-bold mb-2">Guaranteed Profit</h3>
                        <p class="text-white/60 text-sm">
                            Harness the power of our Guaranteed Profit approach and let AI
                            elevate your trading endeavors, ensuring consistent gains.
                        </p>
                    </div>
                </div>


            </div>
            <div class="mt-4 md:mt-8 lg:mt-12">
                <div class="bg-slate-800/70 p-6 md:p-10 rounded-2xl text-white backdrop-blur-4xl border border-white/15">
                    <div class="flex flex-col md:flex-row items-center md:items-center gap-6">
                        <!-- Left Content -->
                        <div class="flex-1">
                            <h2 class="text-xl font-semibold mb-2">Automated Process</h2>
                            <p class="text-gray-400 text-sm">
                                Our advanced technology streamlines processes, allowing you to navigate markets seamlessly
                                and achieve maximum success.
                            </p>
                        </div>

                        <!-- Right Box -->
                        <div
                            class="bg-gradient-to-r from-[#1b1c36]/50 to-[#70717a]/50 p-4 md:p-6 rounded-xl flex items-center gap-4 border border-white/15">
                            <div class="w-24 h-24 flex items-center justify-center">
                                <img src="{{ asset('/assets/templates/trello/images/automated-process-image.png') }}"
                                    alt="Gears" class="w-full h-full object-contain">
                            </div>
                            <p class="text-gray-300 text-sm">Navigate uncertainty with {{ site('name') }}</p>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </section>


    {{-- pricing section  --}}
    <section class="pt-8 md:pt-20 px-6 mb-4 md:mb-8 max-w-custom mx-auto relative">
        <!-- Desktop Only -->
        <div class="absolute left-72 -top-28 p-40 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10"></div>
        <div class="absolute right-40 -top-28 p-40 md:p-80 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div class="absolute left-40 md:left-96 -top-60 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div
            class="absolute left-40 md:left-96 -bottom-40 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>

        <!-- Mobile & Tablet Only -->
        <div class="absolute left-10 top-10 p-20 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute right-10 top-10 p-20 md:p-40 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 top-20 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 bottom-10 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10"></div>

        <h4 class="text-white text-center text-sm gradient-border-text w-fit mx-auto uppercase px-12 py-1 rounded-2xl">
            Pricing
        </h4>

        <h2 class="text-white font-bold text-2xl md:text-3xl lg:text-4xl text-center mt-4 md:mt-6 lg:mb-20">
            AI-Trading Portfolios
        </h2>

        <!-- Cards Section -->
        <div class="w-full my-10">
            <div class="grid lg:grid-cols-3 grid-cols-1 gap-10">

                @foreach ($bots as $bot)
                    <div
                        class="col-span-1 relative text-white p-6 rounded-4xl  overflow-hidden bg-slate-800/30 backdrop-blur-sm border border-white/50 
                    {{ $loop->index == 1 ? 'lg:scale-y-110 ' : '' }}">
                        <div class="flex gap-4 mb-4">
                            <img src="{{ asset('storage/bots/' . $bot->logo) }}" alt="icon"
                                class="rounded-full h-7 w-7">
                            <p class="text-white">{{ $bot->name }}</p>
                        </div>

                        <div class="flex text-white py-4 justify-start items-center gap-4">
                            <p class="text-3xl lg:text-5xl font-bold">{{ $bot->daily_min }}% -
                                {{ $bot->daily_max }}%</p>
                            <p class="font-bold">/day</p>
                        </div>

                        <div class="block lg:py-7 py-4 md:space-y-2">
                            <p class="flex justify-between">
                                <span class="block text-[#d8d8d8]/50 text-left">Portfolio Range</span>
                                <span class="block text-[#cac6dd] text-right">{{ site('currency_symbol') . $bot->min }} -
                                    {{ site('currency_symbol') . $bot->max }}</span>
                            </p>

                            <p class="flex justify-between">
                                <span class="block text-[#d8d8d8]/50 text-left">Daily PNL</span>
                                <span class="block text-[#cac6dd] text-right">{{ $bot->daily_min }}% -
                                    {{ $bot->daily_max }}%</span>
                            </p>

                            <p class="flex justify-between">
                                <span class="block text-[#d8d8d8]/50 text-left">Trading Duration</span>
                                <span class="block text-[#cac6dd] text-right">{{ $bot->duration }}
                                    {{ $bot->duration_type }}</span>
                            </p>

                            <p class="flex justify-between">
                                <span class="block text-[#d8d8d8]/50 text-left">Capital Returned</span>
                                <span class="block text-[#cac6dd] text-right">Yes</span>
                            </p>
                        </div>



                        <div class="block lg:py-7 py-4">
                            <p class="text-white font-bold mb-3">Tradings Days</p>
                            @php
                                $trading_days_display = [
                                    'monday' => in_array('monday', json_decode(site('trading_days'))),
                                    'tuesday' => in_array('tuesday', json_decode(site('trading_days'))),
                                    'wednesday' => in_array('wednesday', json_decode(site('trading_days'))),
                                    'thursday' => in_array('thursday', json_decode(site('trading_days'))),
                                    'friday' => in_array('friday', json_decode(site('trading_days'))),
                                    'saturday' => in_array('saturday', json_decode(site('trading_days'))),
                                    'sunday' => in_array('sunday', json_decode(site('trading_days'))),
                                ];
                            @endphp
                            @foreach ($trading_days_display as $day => $day_display)
                                <p
                                    class="flex flex-row-reverse justify-between items-center border-b-2 border-[#ffffff]/10 last:border-b-0 py-2">
                                    @if ($day_display)
                                        <img src="{{ asset('/assets/templates/trello/images/checkmark-icon.svg') }}"
                                            alt="">
                                    @else
                                        <svg xmlns="http://www.w3.org/2000/svg" fill="currentColor"
                                            class="w-4 h-4 text-red-500" viewBox="0 0 16 16">
                                            <path
                                                d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z" />
                                        </svg>
                                    @endif
                                    <span class="block text-[#B4B1B1] text-left">{{ ucfirst($day) }}</span>
                                </p>
                            @endforeach
                        </div>

                        <div class="block text-center lg:py-7">
                            <a href="{{ route('user.bots.index') }}"
                                class="px-12 py-3 rounded-xl border border-white bg-white/10 hover:bg-white/70 hover:text-black transition duration-300 cursor-pointer">Activate</a>
                        </div>
                    </div>
                @endforeach

            </div>
        </div>
    </section>


    {{-- slider for coins --}}
    <section class="pt-8 md:pt-20 mb-4 md:mb-8">
        <div class="w-full mb-4 bg-gradient-to-r from-[#6e30ad]/10 via-[#d7cbf7]/10 to-[#4e217b]/10">
            <div class="flex justify-center pt-5">
                <div class="livecoinwatch-widget-5" lcw-base="USD" lcw-color-tx="#ffffff" lcw-marquee-1="coins"
                    lcw-marquee-1="movers" lcw-marquee-items="10" lcw-width="100%">
                </div>
            </div>
        </div>

    </section>

    {{-- why choose rescron section  --}}
    <section class="pt-8 md:pt-20 px-6 mb-4 relative">
        <!-- Desktop Only -->
        <div class="absolute left-72 -top-28 p-40 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10"></div>
        <div class="absolute right-40 -top-28 p-40 md:p-80 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div class="absolute left-40 md:left-96 -top-60 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div
            class="absolute left-40 md:left-96 -bottom-40 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>

        <!-- Mobile & Tablet Only -->
        <div class="absolute left-10 top-10 p-20 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute right-10 top-10 p-20 md:p-40 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 top-20 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 bottom-10 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10">
        </div>


        <div class="max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-16 items-center">

            <div class="">
                <h4
                    class="text-white text-center text-sm gradient-border-text w-fit uppercase px-12 py-1 rounded-2xl mb-8  lg:hidden mx-auto">
                    Supercharged AI
                </h4>
                <img src="{{ asset('/assets/templates/trello/images/why-choose-img.svg') }}" alt=""
                    class="w-full max-h-custom" />
            </div>
            <div class="">
                <h4
                    class="text-white text-center text-sm gradient-border-text w-fit uppercase px-12 py-1 rounded-2xl mb-4 md:mb-8 hidden lg:block">
                    Supercharged AI
                </h4>
                <h2 class="text-white text-2xl md:text-4xl lg:text-5xl mt-4 font-semibold mb-4 md:mb-8">
                    Why Choosing
                    Rescron AI
                </h2>

                <p class="text-sm md:text-xl text-[#cac6dd] p-1 md:leading-relaxed">
                    Rescron AI doesn't just follow trends - it pioneers them. It
                    empowers traders to navigate both bullish and bearish market
                    conditions with unwavering confidence. By leveraging sophisticated
                    algorithms and real-time data streams, Rescron AI adapts to
                    ever-changing market dynamics, seizing opportunities while
                    minimizing risks.
                </p>
                <!-- auth  -->
                <div class="flex justify-start space-x-4 md:gap-16 mt-8 md:mt-12 lg:mt-16">
                    <button
                        class="px-12 py-3 rounded-xl white bg-gradient-to-r from-[#5823c1] to-[#ff8ac7] hover:scale-105 transition duration-300 cursor-pointer text-white">
                        Sign In
                    </button>
                    <button
                        class=" px-12 py-3 rounded-xl border border-white bg-white/10 hover:scale-105 transition duration-300 cursor-pointer text-white">
                        Sign up
                    </button>
                </div>
            </div>
        </div>
    </section>

    {{-- trade from anywhere section  --}}
    <section class="pt-8 md:pt-20 px-6 mb-4 relative">
        <!-- Desktop Only -->
        <div class="absolute left-72 -top-28 p-40 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10"></div>
        <div class="absolute right-40 -top-28 p-40 md:p-80 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div class="absolute left-40 md:left-96 -top-60 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div
            class="absolute left-40 md:left-96 -bottom-40 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>

        <!-- Mobile & Tablet Only -->
        <div class="absolute left-10 top-10 p-20 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute right-10 top-10 p-20 md:p-40 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 top-20 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 bottom-10 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10">
        </div>

        <div class="max-w-7xl mx-auto">
            <h2
                class="text-white text-2xl md:text-4xl lg:text-5xl mt-4 lg:mt-20 font-semibold mb-4 md:mb-8 lg:mb-12 text-center">
                Trade From Anywhere
            </h2>

            <p class="text-[#cac6dd] text-sm md:text-xl text-center md:leading-relaxed">
                Whether you're at home or on the go, seize market opportunities anytime,
                anywhere, and secure your financial future effortlessly. Trade from any
                and every city
            </p>

            <div class="relative w-full mt-8">
                <!-- Background container -->
                <div class="absolute inset-0 bg-cover bg-center bg-no-repeat opacity-100 blur-xs"
                    style="background-image: url('{{ asset('/assets/templates/trello/images/world-map.svg') }}')">
                </div>

                <!-- Content container with blur -->
                <div class="relative border border-white/40 p-4 md:p-8 rounded-3xl ">
                    <h2 class="text-lg font-semibold mb-4 text-white">
                        Recent Trades by Rescron AI
                    </h2>
                    <div class="w-full px-2 md:px-10  text-white">
                        <div class="w-full">
                            <div class="w-full p-3">
                                <div class="w-full overflow-x-auto max-h-[50vh] overflow-y-auto"
                                    id="recentTradesContainer">
                                    <table class="w-full">
                                        <thead class="  ">
                                            <tr class="text-left text-gray-400">
                                                <th class="p-4">Trading Pair</th>
                                                <th class="p-4 text-right">Amount</th>
                                                <th class="p-4 text-right">Time</th>
                                                <th class="p-4 text-right">Profit</th>
                                            </tr>
                                        </thead>
                                        <tbody class="w-full" id="recentTrades">
                                            <!-- Trades will be populated here -->
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>


    {{-- testimonial section  --}}
    <section class="pt-8 md:pt-20 px-6 mb-4 relative">
        <!-- Desktop Only -->
        <div class="absolute left-72 -top-28 p-40 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10"></div>
        <div class="absolute right-40 -top-28 p-40 md:p-80 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div class="absolute left-40 md:left-96 -top-60 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div
            class="absolute left-40 md:left-96 -bottom-40 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>

        <!-- Mobile & Tablet Only -->
        <div class="absolute left-10 top-10 p-20 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute right-10 top-10 p-20 md:p-40 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 top-20 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 bottom-10 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10">
        </div>

        <div class="max-w-7xl mx-auto lg:py-10 px-3">
            <div class="w-full lg:flex justify-between">
                <div class="max-w-2xl">
                    <p class="text-white font-bold lg:text-5xl text-2xl lg:mb-3 leading-relaxed lg:text-left text-center">
                        <span class="font-bold text-white leading-relaxed">Dont
                            Just Take Our Word <br> for it</span>
                    </p>
                </div>

                <div class="max-w-md">
                    <p class="text-[#B4B1B1]  lg:text-2xl text-lg lg:text-left text-center leading-relaxed font-light ">
                        Here is what our many users around the world are saying about our amazing product.</p>
                </div>
            </div>

            <div class="w-full relative testimonial-contaiiner">

                <!-- Custom Navigation Buttons -->
                <div class="lg:flex hidden justify-between w-full absolute top-1/2 -translate-y-1/2 testimonial-button">
                    <button id="prevBtn"
                        class="bg-gradient-to-r from-white/30 to-white/5 text-white px-3 py-2 rounded-l-3xl border-l border-opacity-15 border-white h-28">
                        <img src="{{ asset('/assets/templates/trello/images/left-arrow.svg') }}" alt="icon">
                    </button>
                    <button id="nextBtn"
                        class="bg-gradient-to-l from-white/30 to-white/5 text-white px-3 py-2 rounded-r-3xl border-r border-opacity-15 border-white h-28">
                        <img src="{{ asset('/assets/templates/trello/images/right-arrow.svg') }}" alt="icon">
                    </button>
                </div>


                <!--slide-->
                <div id="testimonial-slider" class="splide lg:w-[90%] mx-auto">
                    <div class="splide__track">
                        <ul class="splide__list gap-2">
                            <!-- Testimonial 1 -->
                            @foreach ($reviews as $review)
                                <li class="splide__slide p-4">
                                    <div
                                        class="block lg:p-20 p-10  bg-slate-800/70 border border-gray-400 rounded-lg lg:min-h-[500px] 
                                        relative overflow-hidden backdrop-blur-4xl">
                                        <div
                                            class="absolute p-28 bottom-0 right-0 rounded-full -z-10 blur-2xl 
                                                bg-[conic-gradient(#561BBE_0deg,#70E6FB_90deg,#FBF8B3_180deg,#FA8792_270deg)]">
                                        </div>
                                        <div class="lg:flex justify-between items-center">
                                            <div class="flex gap-4">
                                                <img src="{{ asset('/assets/templates/trello/images/' . $review['image']) }}"
                                                    alt="icon" class="rounded-full h-10 w-10">
                                                <div>
                                                    <p class="text-lg text-white">{{ $review['name'] }}</p>
                                                    <p class="text-[#B4B1B1] ">{{ $review['country'] }}</p>
                                                </div>
                                            </div>

                                            <div class="flex gap-2">
                                                <img src="{{ asset('/assets/templates/trello/images/yellow-star.svg') }}"
                                                    alt="star" class="h-4 w-4">
                                                <img src="{{ asset('/assets/templates/trello/images/yellow-star.svg') }}"
                                                    alt="star" class="h-4 w-4">
                                                <img src="{{ asset('/assets/templates/trello/images/yellow-star.svg') }}"
                                                    alt="star" class="h-4 w-4">
                                                <img src="{{ asset('/assets/templates/trello/images/yellow-star.svg') }}"
                                                    alt="star" class="h-4 w-4">
                                                <img src="{{ asset('/assets/templates/trello/images/yellow-star.svg') }}"
                                                    alt="star" class="h-4 w-4">
                                            </div>
                                        </div>

                                        <div class="w-full py-14">
                                            <p class="lg:text-lg text-sm text-white">{{ $review['testimony'] }}</p>
                                        </div>

                                        <div class="w-full">
                                            <p class="text-[#B4B1B1] ">{{ $review['date'] }}</p>
                                        </div>

                                    </div>
                                </li>
                            @endforeach

                        </ul>
                    </div>
                </div>

            </div>
        </div>
    </section>


    {{-- how it works  --}}
    <section class="pt-8 md:pt-20 px-6 mb-4 relative">
        <!-- Desktop Only -->
        <div class="absolute left-72 -top-28 p-40 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10"></div>
        <div class="absolute right-40 -top-28 p-40 md:p-80 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div class="absolute left-40 md:left-96 -top-60 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div
            class="absolute left-40 md:left-96 -bottom-40 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>

        <!-- Mobile & Tablet Only -->
        <div class="absolute left-10 top-10 p-20 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute right-10 top-10 p-20 md:p-40 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 top-20 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 bottom-10 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10">
        </div>

        <div class="max-w-7xl mx-auto grid grid-cols-1 lg:grid-cols-2 gap-8 lg:gap-16 items-center">

            <div class="">
                <h4
                    class="text-white text-center text-sm gradient-border-text w-fit uppercase px-12 py-1 rounded-2xl mb-4 md:mb-8 ">
                    Getting Started
                </h4>
                <h2 class="text-white text-2xl md:text-4xl lg:text-5xl mt-4 font-semibold mb-4 md:mb-8">
                    How It Works
                </h2>

            </div>
            <div class="">

                <p class="text-sm md:text-xl text-[#cac6dd] p-1 md:leading-relaxed">
                    Our user-friendly interface and intuitive features ensure that even newcomers can quickly grasp the
                    essentials and embark on a seamless journey into the world of efficient and profitable trading.
                </p>

            </div>
        </div>

        <div class="max-w-7xl mx-auto overflow-x-scroll md:overflow-hidden">
            <img src="{{ asset('/assets/templates/trello/images/how-it-works-image.svg') }}" alt=""
                class="min-w-[700px] md:w-full mx-auto">
        </div>



    </section>


    {{-- market heatmap section  --}}
    <section class="pt-8 md:pt-20 px-6 mb-4 relative">
        <!-- Desktop Only -->
        <div class="absolute left-72 -top-28 p-40 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10"></div>
        <div class="absolute right-40 -top-28 p-40 md:p-80 bg-[#552481]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div class="absolute left-40 md:left-96 -top-60 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>
        <div
            class="absolute left-40 md:left-96 -bottom-40 p-40 bg-[#1f4470]/50 rounded-full blur-3xl hidden lg:block -z-10">
        </div>

        <!-- Mobile & Tablet Only -->
        <div class="absolute left-10 top-10 p-20 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute right-10 top-10 p-20 md:p-40 bg-[#552481]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 top-20 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10"></div>
        <div class="absolute left-10 md:left-40 bottom-10 p-20 bg-[#1f4470]/50 rounded-full blur-3xl lg:hidden -z-10">
        </div>

        <div class="max-w-7xl mx-auto">
            <h4
                class="text-white text-center text-sm gradient-border-text w-fit mx-auto uppercase px-12 py-1 rounded-2xl mb-4 md:mb-8 ">
                Market Data
            </h4>

            <h2
                class="text-white text-2xl md:text-4xl lg:text-5xl mt-4 lg:mt-12 font-semibold mb-4 md:mb-8 lg:mb-12 text-center">
                Market Heatmap
            </h2>

            <div id="cryptoApp" class="p-4">
                <div class="w-full grid lg:grid-cols-5 grid-cols-2 md:grid-cols-3 lg:gap-10 gap-3">
                    <!-- Coins will be appended here by jQuery -->
                </div>
            </div>
        </div>
    </section>

    {{-- unlocking wealth section  --}}
    <section class="pt-8 md:pt-20 px-6 mb-4">
        <div
            class="max-w-7xl mx-auto bg-slate-800/70 relative overflow-hidden backdrop-blur-4xl md:flex md:items-center rounded-2xl py-4 mb-4">
            <div
                class="absolute p-28 bottom-0 right-0 rounded-full -z-10 blur-2xl 
                bg-[conic-gradient(#561BBE_0deg,#70E6FB_90deg,#FBF8B3_180deg,#FA8792_270deg)]">
            </div>
            <img src="{{ asset('/assets/templates/trello/images/unlocking-wealth-image.png') }}" alt=""
                class="blur-xs">
            <h2 class="text-white text-2xl md:text-5xl font-bold text-center">Unlocking Wealth with Simplicity</h2>
        </div>

    </section>

    <div
        class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mt-4 md:mt-8 mb-14 bg-gradient-to-r from-white/5 to-white/10 py-2 md:py-4">
        <!-- Column 1 -->
        <div class="flex flex-col gap-4">
            <div class="text-white font-semibold text-4xl md:text-5xl text-center">
                3.5K+
                <span class="text-white block text-lg mt-2 md:mt-4">Users</span>
            </div>
        </div>
        <!-- Column 2 -->
        <div class="flex flex-col gap-4">
            <div class="text-white font-semibold text-4xl md:text-5xl text-center">
                USD5.5M+
                <span class="text-white block text-lg mt-2 md:mt-4">Deposits</span>
            </div>
        </div>
        <!-- Column 3 -->
        <div class="flex flex-col gap-4">
            <div class="text-white font-semibold text-4xl md:text-5xl text-center">
                USD10.2M+
                <span class="text-white block text-lg mt-2 md:mt-4">Withdrawals</span>
            </div>
        </div>
        <!-- Column 4 -->
        <div class="flex flex-col gap-4">
            <div class="text-white font-semibold text-4xl md:text-5xl text-center">
                200+
                <span class="text-white block text-lg mt-2 md:mt-4">Countries Supported</span>
            </div>
        </div>
    </div>
@endsection

@section('scripts')
    <script>
        document.addEventListener("DOMContentLoaded", function() {
            new Glide('.glide', {
                type: 'carousel',
                perView: Math.floor(window.innerWidth / 80), // Adjust based on screen width
                focusAt: 'center',
                autoplay: 2000, // Speed of slide
                hoverpause: true,
                gap: 20,
                animationDuration: 1000,
                rewind: false, // Disable rewind for continuous effect
                breakpoints: {
                    1024: {
                        perView: 6
                    },
                    768: {
                        perView: 4
                    },
                    480: {
                        perView: 2
                    }
                }
            }).mount();
        });
    </script>
    <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script>

    {{-- recent trades script --}}
    <script>
        let tradeData = @json(recentTrades());


        function updateTradeTable() {
            const tableBody = document.getElementById("recentTrades");
            tableBody.innerHTML = ""; // Clear existing rows

            tradeData.forEach((trade) => {
                const row = document.createElement("tr");
                row.className = `border-b border-white/10 hover:bg-white/5 transition-colors ${
                trade.profit.startsWith("-") ? "text-[#EA0A0E]" : "text-[#00AA39]"
                }`;

                row.innerHTML = `
                    <td class="p-4">${trade.pair}</td>
                    <td class="p-4 text-right">${trade.amount}</td>
                    <td class="p-4 text-right"><span class="recent_trade_time"></span></td>
                    <td class="p-4 text-right">${trade.profit}</td>
                `;

                tableBody.appendChild(row);
            });
        }

        function updateTradeTimes() {
            const tradeTimeElements = document.querySelectorAll('.recent_trade_time');
            const currentTime = new Date().toLocaleTimeString();

            tradeTimeElements.forEach((element) => {
                element.textContent = currentTime;
            });
        }

        // Function to swap first row to last every 2 seconds
        function rotateRows() {
            if (tradeData.length > 1) {
                const firstRow = tradeData.shift(); // Remove first row
                tradeData.push(firstRow); // Add it to the end
                updateTradeTable(); // Refresh the table with new order
                updateTradeTimes();
            }
        }

        // Initial table setup
        updateTradeTable();

        // Start row rotation every 2 seconds
        setInterval(rotateRows, 1000);
    </script>

    {{-- splide js cdn  --}}
    <script src="https://cdn.jsdelivr.net/npm/@splidejs/splide@3.6.1/dist/js/splide.min.js"></script>

    {{-- testimonial script  --}}
    <script>
        ////////////////////// testimonials customized button
        $(document).ready(function() {
            var splide = new Splide('#testimonial-slider', {
                type: 'loop',
                perPage: 2,
                perMove: 1,
                autoplay: true,
                interval: 4000, // Adjust autoplay speed
                pauseOnHover: true,
                pagination: false, // Hide default pagination
                arrows: false, // Hide default arrows
                breakpoints: {
                    1024: {
                        perPage: 1, // Display 1 slide at a time on smaller screens
                    },
                },
            }).mount();

            // Custom Buttons Functionality
            $('#prevBtn').on('click', function() {
                splide.go('-1');
            });

            $('#nextBtn').on('click', function() {
                splide.go('+1');
            });
        });
    </script>

    {{-- market heatmap script  --}}
    <script>
        //////////////////////// Market heatmap data
        $(document).ready(function() {
            const coins = [{
                    id: "bitcoin",
                    name: "Bitcoin",
                    logo: "https://cryptologos.cc/logos/bitcoin-btc-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "BTC"
                },
                {
                    id: "ethereum",
                    name: "Ethereum",
                    logo: "https://cryptologos.cc/logos/ethereum-eth-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "ETH"
                },
                {
                    id: "ripple",
                    name: "Ripple",
                    logo: "https://cryptologos.cc/logos/xrp-xrp-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "XRP"
                },
                {
                    id: "binancecoin",
                    name: "Binance Coin",
                    logo: "https://cryptologos.cc/logos/binance-coin-bnb-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "BNB"
                },
                {
                    id: "solana",
                    name: "Solana",
                    logo: "https://cryptologos.cc/logos/solana-sol-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "SOL"
                },
                {
                    id: "dogecoin",
                    name: "Dogecoin",
                    logo: "https://cryptologos.cc/logos/dogecoin-doge-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "DOGE"
                },
                {
                    id: "cardano",
                    name: "Cardano",
                    logo: "https://cryptologos.cc/logos/cardano-ada-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "ADA"
                },
                {
                    id: "tron",
                    name: "Tron",
                    logo: "https://cryptologos.cc/logos/tron-trx-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "TRX"
                },
                {
                    id: "avalanche-2",
                    name: "Avalanche",
                    logo: "https://cryptologos.cc/logos/avalanche-avax-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "AVAX"
                },

                {
                    id: "sui",
                    name: "Sui",
                    logo: "https://cryptologos.cc/logos/thumbs/sui.png",
                    price: 0,
                    change: 0,
                    symbol: "SUI"
                },
                {
                    id: "pepe",
                    name: "Pepe",
                    logo: "https://cryptologos.cc/logos/thumbs/pepe.png",
                    price: 0,
                    change: 0,
                    symbol: "PEPE"
                },
                {
                    id: "the-open-network",
                    name: "Toncoin",
                    logo: "https://cryptologos.cc/logos/thumbs/toncoin.png",
                    price: 0,
                    change: 0,
                    symbol: "TON"
                },
                {
                    id: "stellar",
                    name: "Stellar",
                    logo: "https://cryptologos.cc/logos/thumbs/stellar.png",
                    price: 0,
                    change: 0,
                    symbol: "XLM"
                },

                {
                    id: "chainlink",
                    name: "Chainlink",
                    logo: "https://cryptologos.cc/logos/chainlink-link-logo.png",
                    price: 0,
                    change: 0,
                    symbol: "LINK"
                },
                {
                    id: "shiba-inu",
                    name: "Shiba Inu",
                    logo: "https://cryptologos.cc/logos/thumbs/shiba-inu.png",
                    price: 0,
                    change: 0,
                    symbol: "SHIB"
                },
            ];

            function fetchData() {
                const apiUrl =
                    `https://api.coingecko.com/api/v3/simple/price?ids=${coins.map(coin => coin.id).join(",")}&vs_currencies=usd&include_24hr_change=true`;

                $.ajax({
                    url: apiUrl,
                    type: "GET",
                    success: function(data) {
                        coins.forEach(coin => {
                            if (data[coin.id]) {
                                coin.price = parseFloat(data[coin.id].usd).toFixed(2);
                                coin.change = parseFloat(data[coin.id].usd_24h_change);
                            }
                        });
                        renderCoins();
                    },
                    error: function(error) {
                        console.error("Error fetching cryptocurrency data:", error);
                    }
                });
            }

            function renderCoins() {
                const container = $('#cryptoApp .grid');
                container.empty(); // Clear previous data before appending new

                coins.forEach(coin => {
                    const coinElement = `
                        <div class="bg-slate-800/70 bg-opacity-10 text-white p-4 rounded-lg shadow-md relative overflow-hidden backdrop-blur-2xl">
                            <div
                                            class="absolute p-10 bottom-0 right-0 rounded-full -z-10 blur-xl 
                                                bg-[conic-gradient(#561BBE_0deg,#70E6FB_90deg,#FBF8B3_180deg,#FA8792_270deg)]">
                                        </div>
                            <div class="flex items-center mb-4">
                                <img src="${coin.logo}" alt="${coin.name}" class="w-8 h-8 mr-2" />
                                <div>
                                    <h3 class="font-bold">${coin.name}</h3>
                                    <p class="text-sm text-gray-400">${coin.symbol}</p>
                                </div>
                            </div>
                            <p class="text-sm text-[#6F6A6A]">Price</p>
                            <p class="text-lg font-bold">$${coin.price}</p>
                            <p class="text-sm mt-2 ${coin.change > 0 ? 'text-green-500' : 'text-red-500'}">
                                ${coin.change > 0 ? '+' : ''}${coin.change.toFixed(2)}%
                            </p>
                        </div>
                    `;
                    container.append(coinElement);
                });
            }

            fetchData(); // Fetch data on page load
            setInterval(fetchData, 30000); // Refresh data every 30 seconds
        });
    </script>
@endsection
