@extends('layouts.front.app')

@section('content')
    <div class="container py-3">
        <div class="row justify-content-center text-center">
            <div class="col-12 col-lg-8 py-5">
                <h2 class="h3 fw-bold">ProductAlert is the place to be for top rated product reviews with recommendation such
                    as the right price, latest trend, from the best brands in {{ get_country_name_by_iso($country_locale->country_iso) }}.</h2>
            </div>
        </div>
    </div>
    <div class="container-fluid py-4 bg-dark text-light">
        <div class="container">
            <h3 class="h4 fw-bold text-center mb-3">Featured Articles</h3>
            <div class="row g-3 justify-content-center">
                @for ($i = 1; $i <= 3; $i++)
                    <div class="col-12 col-xl-3">
                        <a href="{{ route('home.country.post', ['country' => $country_locale->country_iso, 'post' => str_random() ]) }}" class="text-decoration-none">
                            <div class="card shadow-sm">
                                <img src="https://placekitten.com/400/300" alt="" class="card-img-top">
                                <div class="card-body">
                                    <p class="card-text fw-bold">Here is why a kitten catches mice faster than an adult cat.
                                    </p>
                                    <div class="d-flex justify-content-between align-items-center">
                                        <small class="text-body-secondary">5 April 2023</small>
                                        <small class="text-body-secondary">9 mins</small>
                                    </div>
                                </div>
                            </div>
                        </a>
                    </div>
                @endfor

            </div>
        </div>
    </div>
    <div class="container-fluid py-4">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col col-lg-9">
                    <h3 class="h4 fw-bold text-center mb-3">What's New in {{ get_country_name_by_iso($country_locale->country_iso) }}</h3>
                    <div class="row g-3">
                        @for ($i = 1; $i <= 12; $i++)
                            <div class="col-6">
                                <a href="{{ route('home.country.post', ['country' => $country_locale->country_iso, 'post' => str_random() ]) }}" class="text-decoration-none">
                                    <div class="card">
                                        <div class="row g-0">
                                            <div class="col-md-4">
                                                <img src="https://placekitten.com/400/300" class="img-fluid rounded-start"
                                                    alt="...">
                                            </div>
                                            <div class="col-md-8">
                                                <div class="card-body">
                                                    <p class="card-title fw-bold">Here is why a kitten catches mice faster
                                                        than an adult cat.</p>
                                                    <div class="d-flex justify-content-between align-items-center">
                                                      <small class="text-body-secondary">5 April 2023</small>
                                                      <small class="text-body-secondary">9 mins</small>
                                                  </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </a>
                            </div>
                        @endfor

                    </div>
                    <div class="text-center py-3">
                        <a href="{{ route('home.country.posts', ['country' => $country_locale->country_iso ]) }}" class="btn btn-primary">All News & Updates</a>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
