@extends('layouts.front-end.master')
@section('title', 'সান নিউজ২৪ - সর্বশেষ বাংলা সংবাদ')
@section('meta')
<meta name="title" content="সান নিউজ২৪ - সর্বশেষ বাংলা সংবাদ">
<meta name="description" content="বাংলাদেশ ও বিশ্বের সর্বশেষ সংবাদ, রাজনীতি, অর্থনীতি, খেলাধুলা, বিনোদনসহ সব খবর একসাথে।">

<meta property="og:type" content="website" />
<meta property="og:title" content="সান নিউজ২৪ - সর্বশেষ বাংলা সংবাদ" />
<meta property="og:description" content="বাংলাদেশ ও বিশ্বের সর্বশেষ সংবাদ, রাজনীতি, অর্থনীতি, খেলাধুলা, বিনোদনসহ সব খবর একসাথে।" />
<meta property="og:image" content="{{asset($setting->logo_png)}}" />
<meta property="og:url" content="https://sunnews24.com" />
<meta property="og:site_name" content="Sun News24" />

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="সান নিউজ২৪ - সর্বশেষ বাংলা সংবাদ">
<meta name="twitter:description" content="বাংলাদেশ ও বিশ্বের সর্বশেষ সংবাদ, রাজনীতি, অর্থনীতি, খেলাধুলা, বিনোদনসহ সব খবর একসাথে।">
<meta name="twitter:image" content="{{asset($setting->logo_png)}}">
@endsection

@section('body')
<style>
    .post-img img {
    width: 100%;
    height: auto;
}

@media (max-width: 576px) {
    .post-img img {
        width: 50%;   /* mobile এ ছোট হবে */
        object-fit: cover;
    }
}
.post-card {
    gap: 12px;
    align-items: flex-start;
}

.post-img {
    width: 140px;
    height: 90px;
    flex-shrink: 0;
    overflow: hidden;
}

.post-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

/* Mobile Responsive */
@media (max-width: 768px) {

    .post-img {
        width: 100px;
        height: 70px;
    }

    .post-title {
        font-size: 14px;
    }

}

/* Extra Small Mobile */
@media (max-width: 480px) {

    .post-img {
        width: 90px;
        height: 65px;
    }

}
</style>



<!-- ================ -->
 <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
{{-- ============================= --}}
{{-- RUNNING HEADLINE FINAL VERSION --}}
{{-- ============================= --}}

<style>
.headline-bar{
    background:#ffffff;
    border-bottom:1px solid #e6edf2;
    overflow:hidden;
    margin-top:20px;               /* ✅ Header থেকে gap */
    border-radius:8px;
    box-shadow:0 2px 8px rgba(0,0,0,0.05);
}

.headline-wrapper{
    display:flex;
    align-items:center;
    gap:15px;
    padding:6px 10px;
}

.headline-badge{
    background:#1f5f73;
    color:#fff;
    font-weight:800;
    padding:6px 12px;
    border-radius:6px;
    font-size:14px;
    white-space:nowrap;
}

/* Ticker */
.ticker{
    position:relative;
    overflow:hidden;
    flex:1;
}

.ticker-track{
    display:flex;
    width:max-content;
    animation: scrollTicker 25s linear infinite;
}

/* ✅ Hover করলে pause */
.ticker:hover .ticker-track{
    animation-play-state: paused;
}

.ticker-item{
    padding-right:60px;
    font-weight:700;
    font-size:16px;
    white-space:nowrap;
}

.ticker-item a{
    text-decoration:none;
    color:#111;
    transition:0.3s;
}

.ticker-item a:hover{
    color:#1f5f73;
}

/* Infinite animation */
@keyframes scrollTicker{
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Responsive */
@media (max-width:576px){
    .ticker-item{
        font-size:14px;
        padding-right:40px;
    }
}
</style>

<!-- ad_top_1 -->
{{--<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-XXXXXXXXXXXXXXXX"
     data-ad-slot=""
     data-ad-format="auto"
     data-full-width-responsive="true"></ins>
<script>
     (adsbygoogle = window.adsbygoogle || []).push({});
</script>--}}


     
@if(isset($setting) && $setting->headline_status == 1 && isset($headlines) && $headlines->count())
<section class="headline-bar py-2">
    <div class="container">
        <div class="headline-wrapper">

            <span class="headline-badge">শিরোনাম</span>

            <div class="ticker">
                <div class="ticker-track">

                    {{-- First set --}}
                    @foreach($headlines as $h)
                        @if($h->post)
                            <div class="ticker-item">
                                <a href="{{ route('news-detail', ['id' => $h->post->id]) }}">
                                     {{ $h->post->title }}
                                </a>
                            </div>
                        @endif
                    @endforeach

                    {{-- Duplicate set for infinite --}}
                    @foreach($headlines as $h)
                        @if($h->post)
                            <div class="ticker-item">
                                <a href="{{ route('news-detail', ['id' => $h->post->id]) }}">
                                     {{ $h->post->title }}
                                </a>
                            </div>
                        @endif
                    @endforeach

                </div>
            </div>

        </div>
    </div>
</section>
@endif
<!-- ================ -->








    <section class="py-4">
        <div class="container">
            <div class="row">
                <div class="col-md-9 mt-md-0 mt-4 border-end border-1">
                    @if($mainPost)
                    <a href="{{ route('news-detail', ['id' => $mainPost->id]) }}" class="text-decoration-none hovera">
                        <div class="col-md-12 ps-2 bg-transparent rounded-0 border-0 border-start border-5 border-primary">
                            <div class="row ">
                                <div class="col-md-6">
                                    <h1 class="fw-bolder fs-2 mb-3 text-color">
                                        {{ Str::limit($mainPost->title, 50) }}
                                    </h1>
                                    <p class="py-2 text-muted">
                                        {{ isset($mainPost->short_description) ? Str::substr($mainPost->short_description, 0, 120) . '...' : '' }}
                                    </p>
                                </div>
                                <div class="col-md-6">
                                    <div class="img-zoom-wrapper">
                                        <img class="w-100 zoom-img" src="{{ asset($mainPost->image) }}" alt="{{ $mainPost->title ?? 'News Image' }}" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </a>
                    @endif
                    <hr />
                    <div class="row g-3">
                        @foreach ($topPosts as $topPost)
                        <!-- Post 1 -->
                        <div class="col-md-6 mb-3">
                            <a href="{{ route('news-detail', ['id' => $topPost->id]) }}" class="text-decoration-none hovera">
                                <div class="post-card d-flex">
                                    
                                    <div class="post-img">
                                        <img src="{{ asset($topPost->image) }}" alt="post image">
                                    </div>

                                    <div class="post-content">
                                        <h6 class="post-title text-color">
                                            {{ Str::limit($topPost->title, 60) }}
                                        </h6>

                                        <p class="post-text d-none d-md-block text-dark">
                                            {{ isset($topPost->short_description) ? Str::substr($topPost->short_description, 0, 100) . '...' : '' }}
                                        </p>
                                    </div>

                                </div>
                            </a>
                        </div>
                        @endforeach
                    </div>
                    <div class="row news-wrapper">
                        @foreach ($topPosts2 as $topPost)
                        <!-- Item 1 -->
                        <div class="col-md-4 col-sm-6 border-end">
                            <a href="{{ route('news-detail', ['id' => $topPost->id]) }}" class="text-decoration-none hovera">
                            <div class="news-item">
                                <div class="news-content">
                                    <h6 class="news-title">
                                        {{ Str::limit($topPost->title, 50) }}
                                    </h6>
                                    <img src="{{ asset($topPost->image) }}" alt="post image">
                                </div>
                            </div>
                            </a>
                        </div>
                        @endforeach
                    </div>
                    <div class="row">
                        @foreach ($topPosts3 as $topPost)
                            <div class="col-md-6 col-6">
                                <a href="{{ route('news-detail', ['id' => $topPost->id]) }}"class="text-decoration-none hovera">
                                <div class="img-zoom-wrapper">
                                    <img class="w-100 zoom-img" src="{{ asset($topPost->image) }}" alt="img8" />
                                </div>
                                <h6 class="text-color fw-bold mt-2">{{ $topPost->title }}</h6>
                                </a>
                            </div>
                        @endforeach
                    </div>
                </div>
                <div class="col-md-3">
                    <div class="row">
                        <div class="col">
                            <div class="card card-body">
                                <div class="row">
                                    <div class="col">
                                        @if($oneAd)
                                        <div class="img">
                                            <a href="{{ $oneAd->ad_link }}" target="_blank">
                                                <img class="w-100 mb-2" 
                                                    src="{{ asset($oneAd->image) }}" 
                                                    alt="ad" />
                                            </a>
                                        </div>
                                        @endif
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    {{-- <div class="row">
                        <div class="col">
                            <img class="w-100" src="{{ asset($secondAd->image) }}" alt="add3" />
                        </div>
                    </div>
                    <div class="row">
                        <div class="col mt-4">
                            <img class="w-100" src="{{ asset($thirdAd->image) }}" alt="add4" />
                        </div>
                    </div> --}}
                    <div class="row">
                        <div class="col">
                            <div class="card card-body shadow-lg">
                                @foreach ($breakingPosts as $breakingPost)
                                    <div class="row">
                                        <div class="col-md-5 col-5">
                                            <img class="w-100" src="{{ asset($breakingPost->image) }}" alt="img9" />
                                        </div>
                                        <div class="col-md-7 col-7">
                                            <h6 class="text-color fw-bold"><a class="text-decoration-none hovera text-color"
                                                    href="{{ route('news-detail', ['id' => $breakingPost->id]) }}">{{ $breakingPost->title }}</a>
                                            </h6>
                                            @php
                                                $date = \Carbon\Carbon::parse($breakingPost->publish_date)
                                                        ->locale('bn')
                                                        ->translatedFormat('d F Y, H:i');

                                                $eng = ['0','1','2','3','4','5','6','7','8','9'];
                                                $ban = ['০','১','২','৩','৪','৫','৬','৭','৮','৯'];

                                                $date = str_replace($eng, $ban, $date);
                                            @endphp

                                            <small class="text-muted">{{ $date }}</small>

                                        </div>
                                    </div>
                                    <hr />
                                @endforeach
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
    <hr />

<section class="py-4">
    <div class="container">
        <div class="row g-3">
            @foreach ($latestPosts as $latestPost)
                <div class="col-md-3 col-6">
                    <a href="{{ route('news-detail', ['id' => $latestPost->id]) }}" class="text-decoration-none hovera">
                        <div class="card h-100 border-0">
                            <div class="img-zoom-wrapper">
                                <img src="{{ asset($latestPost->image) }}" class="card-img-top zoom-img" alt="news" />
                            </div>
                            <div class="card-body p-2">
                                <h6 class="fw-bold">
                                        {{ $latestPost->title }}
                                </h6>
                            </div>
                        </div>
                    </a>
                </div>
            @endforeach
        </div>
    </div>
</section>
    <hr class="section-width mx-auto" />
    <!-- জাতীয় SECTION -->
    <section class="sports-section py-4">
        <div class="container">

            <!-- Section Header -->
            <div class="section-head d-flex align-items-center gap-3 mb-3">
                <span class="bar"></span>
                <h3 class="m-0 title">জাতীয়</h3>
                <span class="line flex-grow-1"></span>
            </div>

            @php
                $lead = $nationalPosts->first();            // 1st post (big)
                $rest = $nationalPosts->slice(1)->values(); // remaining 6
                $col1 = $rest->slice(0, 3);               // next 3
                $col2 = $rest->slice(3, 3);               // last 3
            @endphp

            @if($lead)
            <div class="row g-0">

                <!-- LEFT BIG NEWS -->
                <div class="col-lg-4 pe-lg-4 border-end-lg">

                    <a href="{{ route('news-detail', ['id' => $lead->id]) }}" class="text-decoration-none hovera">
                            <div class="img-zoom-wrapper">
                                <img class="w-100 lead-img zoom-img"
                                src="{{ asset($lead->image) }}"
                                alt="{{ $lead->title }}">
                            </div>
                        
                        <h2 class="lead-title mt-3">
                                {{ $lead->title }}
                        </h2>
                        <p class="lead-excerpt">
                            {{ Str::limit(strip_tags($lead->short_description ?? $lead->description ?? ''), 120) }}
                        </p>
                    </a>
                </div>

                <!-- RIGHT SIDE -->
                <div class="col-lg-8 ps-lg-4">
                    <div class="row g-0">

                        <!-- RIGHT COLUMN 1 -->
                        <div class="col-md-6 pe-md-3 border-end-lg">
                            @foreach($col1 as $item)
                            <a href="{{ route('news-detail', ['id' => $item->id]) }}" class="text-decoration-none hovera">
                                <div class="mini-item">
                                        <h6 class="mini-title">
                                                {{ $item->title }}
                                        </h6>
                                        <div class="mini-thumb img-zoom-wrapper">
                                            <img src="{{ asset($item->image) }}" class="zoom-img" alt="{{ $item->title }}">
                                        </div>
                                    </div>
                                </a>

                                @if(!$loop->last)
                                    <hr>
                                @endif
                            @endforeach
                        </div>

                        <!-- RIGHT COLUMN 2 -->
                        <div class="col-md-6 ps-md-3">
                            @foreach($col2 as $item)
                            <a href="{{ route('news-detail', ['id' => $item->id]) }}" class="text-decoration-none hovera">
                                <div class="mini-item">
                                    <h6 class="mini-title">
                                            {{ $item->title }}
                                    </h6>
                                    <div class="mini-thumb img-zoom-wrapper">  
                                            <img src="{{ asset($item->image) }}" class="zoom-img" alt="{{ $item->title }}">
                                        </div>
                                    </div>
                                </a>
                                @if(!$loop->last)
                                    <hr>
                                @endif
                            @endforeach
                        </div>

                    </div>
                </div>

            </div>
            @endif

        </div>
    </section>

    <style>
        .country-section{
            background:#f3f6f8;
            padding:35px 0;
        }

        /* header */
        .sec-head{
            display:flex;
            align-items:center;
            gap:12px;
            margin-bottom:12px;
        }
        .sec-head .bar{
            width:4px;
            height:28px;
            background:#1f5f73;
        }
        .sec-head .title{
            font-size:34px;
            font-weight:800;
            margin:0;
            color:#0b2f3a;
        }
        .sec-head .line{
            flex:1;
            height:2px;
            background:#b9c9d3;
        }

        .sec-body{
            /* border-top:2px solid #b9c9d3; */
            padding-top:14px;
        }

        /* top lead area */
        .lead-wrap{
            background:#fff;
            border:1px solid #cfd9df;
            padding:14px;
        }
        .lead-img{
            width:100%;
            height:280px;
            object-fit:cover;
            border:1px solid #cfd9df;
        }
        .lead-title{
            font-size:30px;
            font-weight:800;
            line-height:1.2;
            margin:0 0 10px;
            color:#0b2f3a;
        }
        .lead-excerpt{
            font-size:15px;
            color:#6c7b88;
            margin:0;
        }

        .ad-box{
            background:#fff;
            border:1px solid #cfd9df;
            padding:14px;
            height:100%;
            display:flex;
            align-items:center;
            justify-content:center;
        }
        .ad-box img{
            width:100%;
            height:auto;
            display:block;
            border:1px solid #cfd9df;
        }

        /* bottom grid cards */
        .mini-grid{
            margin-top:16px;
            background:#fff;
            border:1px solid #cfd9df;
            padding:14px;
        }
        .mini-card{
            padding:0 10px;
            border-right:1px solid #cfd9df;
            height:100%;
        }
        .mini-card:last-child{
            border-right:0;
        }
        .mini-img{
            width:100%;
            height:150px;
            object-fit:cover;
            border:1px solid #cfd9df;
            margin-bottom:10px;
        }
        .mini-title{
            font-size:18px;
            font-weight:800;
            line-height:1.35;
            margin:0;
            color:#0b2f3a;
        }

        @media (max-width: 991px){
            .mini-card{
                border-right:0;
                border-bottom:1px solid #cfd9df;
                padding:12px 0;
            }
            .mini-card:last-child{
                border-bottom:0;
            }
        }
    </style>
    <section class="country-section">
        <div class="container">

            <!-- Section Header -->
            <div class="sec-head">
                <span class="bar"></span>
                <h3 class="title">সারাদেশ</h3>
                <span class="line"></span>
            </div>

            @php
                $lead = $nationwidePosts->first();              // 1st (lead)
                $grid = $nationwidePosts->slice(1, 4)->values(); // next 4 (bottom)
            @endphp
            <div class="sec-body">
                <!-- TOP ROW -->
                <div class="row g-3">
                    <!-- Lead (image + text) -->
                    <div class="col-lg-8">
                        <div class="lead-wrap">
                            @if($lead)
                            <a href="{{ route('news-detail', ['id' => $lead->id]) }}" class="text-decoration-none hovera">
                                <div class="row g-3 align-items-start">
                                    <div class="col-md-7">
                                        <div class="img-zoom-wrapper">
                                            <img src="{{ asset($lead->image) }}" class="lead-img zoom-img" alt="{{ $lead->title }}">
                                        </div>
                                    </div>
                                    <div class="col-md-5">
                                        <h2 class="lead-title">
                                                {{ $lead->title }}
                                        </h2>
                                        <p class="lead-excerpt">
                                            {{ \Illuminate\Support\Str::limit(strip_tags($lead->short_description ?? $lead->description ?? ''), 160) }}
                                        </p>
                                    </div>
                                </div>
                                </a>
                            @endif
                        </div>
                    </div>

                    <!-- Ad Banner -->
                    <div class="col-lg-4">
                        <div class="ad-box">
                            @if(!empty($secondAd?->image))
                                @if(!empty($secondAd?->ad_link))
                                    <a href="{{ $secondAd->ad_link }}" target="_blank">
                                        <img src="{{ asset($secondAd->image) }}" alt="ad">
                                    </a>
                                @else
                                    <img src="{{ asset($secondAd->image) }}" alt="ad">
                                @endif
                            @endif
                        </div>
                    </div>

                </div>

                <!-- BOTTOM 4 POSTS -->
                <div class="mini-grid">
                    <div class="row g-0">

                        @foreach($grid as $item)
                        <div class="col-lg-3 col-md-6">
                                <a href="{{ route('news-detail', ['id' => $item->id]) }}" class="text-decoration-none hovera text-dark">
                                <div class="mini-card">
                                        <img src="{{ asset($item->image) }}" class="mini-img" alt="{{ $item->title }}"
                                    <h6 class="mini-title">
                                            {{ $item->title }}
                                    </h6>
                                </div>
                            </a>
                            </div>
                        @endforeach

                    </div>
                </div>

            </div>
        </div>
    </section>

    <section>
        <style>
            .bg-color {
                background:  #1f5f73;
            }

            .big-video-img {
                height: 380px;
                object-fit: cover;
            }

            .small-video-img {
                height: 132px;
                object-fit: cover;
            }
            .small-video-img{
                transition: transform 0.4s ease;
            }

            .small-video-img:hover{
                transform: scale(1.01);
            }

            .play-icon {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                background: red;
                color: white;
                width: 55px;
                height: 55px;
                border-radius: 50%;
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 22px;
            }

            .play-icon-sm {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                background: red;
                color: white;
                width: 30px;
                height: 30px;
                border-radius: 50%;
                font-size: 12px;
                display: flex;
                align-items: center;
                justify-content: center;
            }
            .big-video-img{
                transition: transform 0.4s ease;
            }

            .big-video-img:hover{
                transform: scale(1.01);
            }
        </style>


        <div class="row py-5">
            <div class="col bg-color mx-2 mb-2">

               <div class="container">
                 {{-- Header --}}
                <div class="row py-3 px-3 align-items-center">
                    <div class="col-6">
                        <h3 class="text-white fw-bold mb-0">ভিডিও</h3>
                    </div>
                    <div class="col-6 text-end">
                        <a href="{{route('all.video')}}" class="text-decoration-none text-white fw-bold">
                            সব ভিডিও দেখুন
                        </a>
                    </div>
                </div>

                <div class="row px-3 pb-4">
                    @if($videos->count())
                    {{-- LEFT BIG VIDEO --}}
                    <div class="col-md-6 mb-3">
                        <div class="card border-0 card-body rounded-0" style="background-color: #E3D5CA;">
                            <div class="position-relative">
                                <a href="{{ route('video.post', $videos[0]->id) }}">
                                    <img src="{{ asset($videos[0]->image) }}" class="w-100 big-video-img"
                                    alt="">
                                </a>
                                <span class="play-icon">
                                    <a href="{{ route('video.post', $videos[0]->id) }}">
                                        <i class="fa-solid fa-play text-white"></i>
                                    </a>
                                </span>
                            </div>
                            <a class="text-decoration-none" href="{{ route('video.post', $videos[0]->id) }}">
                            <h5 class="fw-bold mt-3 text-dark">
                                    {{ $videos[0]->title }}
                                </h5>
                            </a>
                            <p class="text-muted small">
                                {{ Str::limit($videos[0]->description ?? '', 120) }}
                            </p>
                        </div>
                    </div>
                    @endif
                    {{-- RIGHT SMALL VIDEOS --}}
                    <div class="col-md-6">
                        @foreach ($videos->skip(1)->take(3) as $item)
                            <div class="card mb-3 border-0 bg-light rounded-0">
                                <div class="row g-0 align-items-center">
                                    <div class="col-5 position-relative p-2">
                                        <a href="{{ route('video.post', $item->id) }}">

                                            <img src="{{ asset($item->image) }}" class="w-100 small-video-img"
                                            alt="">
                                        </a>
                                        <span class="play-icon-sm">
                                            <a href="{{ route('video.post', $item->id) }}">
                                                <i class="fa-solid fa-play text-white"></i>
                                            </a>
                                        </span>
                                    </div>
                                    <div class="col-7">
                                        <div class="card-body py-2 rounded-0">
                                            <a href="{{ route('video.post', $item->id) }}"
                                                class="text-dark fw-semibold text-decoration-none small">
                                                {{ Str::limit($item->title, 60) }}
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        @endforeach
                    </div>

                </div>
               </div>
            </div>
        </div>
    </section>


    {{--<section class="py-4">
        <div class="container">
            <div class="row">
                <div class="col">
                    <h1 class="text-color fw-bolder text-center">Features & Category</h1>
                </div>
            </div>
            <div class="row py-4">
                <div class="col-md-2 col-6 mb-2">
                    <div class="card ">
                        <img class="w-100" src="{{ asset('/') }}website/images/faces1.jpg" alt="faces1" />
                        <div class="card-img-overlay bg-dark bg-opacity-25">
                            <div class=" position-absolute  bottom-0">
                                <p class="text-white text-center ">5 patriotic TRAVEL destinations </p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-2 col-6 mb-2 ">
                    <div class="card ">
                        <img class="w-100 " src="{{ asset('/') }}website/images/faces2.jpg" alt="faces2" />
                        <div class="card-img-overlay bg-dark bg-opacity-25">
                            <div class=" position-absolute  bottom-0">
                                <p class="text-white text-center ">Massive 10-pound cinnamon roll </p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-2 col-6 mb-2 ">
                    <div class="card ">
                        <img class="w-100 " src="{{ asset('/') }}website/images/faces3.jpg" alt="faces3" />
                        <div class="card-img-overlay bg-dark bg-opacity-25">
                            <div class=" position-absolute  bottom-0">
                                <p class="text-white text-center ">Michelle Pfeiffer's ‘RISKY’ move </p>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="col-md-2 col-6 mb-2 ">
                    <div class="card ">
                        <img class="w-100 " src="{{ asset('/') }}website/images/faces4.jpg" alt="faces4" />
                        <div class="card-img-overlay bg-dark bg-opacity-25">
                            <div class=" position-absolute  bottom-0">
                                <p class="text-white text-center ">WATCH: Pandemic expert on </p>
                            </div>

                        </div>
                    </div>
                </div>
                <div class="col-md-2 col-6  ">
                    <div class="card ">
                        <img class="w-100 " src="{{ asset('/') }}website/images/faces5.jpg" alt="faces5" />
                        <div class="card-img-overlay bg-dark bg-opacity-25">
                            <div class=" position-absolute  bottom-0">
                                <p class="text-white text-center ">Lost cat travels 900 </p>
                            </div>

                        </div>
                    </div>
                </div>
                <div class="col-md-2 col-6 ">
                    <div class="card ">
                        <img class="w-100 " src="{{ asset('/') }}website/images/faces6.jpg" alt="faces6" />
                        <div class="card-img-overlay bg-dark bg-opacity-25">
                            <div class=" position-absolute  bottom-0">
                                <p class="text-white text-center ">5 patriotic TRAVEL destinations </p>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>--}}


    {{-- <hr />
    <section class="py-4">
        <div class="container">
            <div class="row">
                <div class="col">
                    <h3 class="text-color fw-bold ">Sponsored Stories</h3>
                </div>
            </div>
            <div class="row py-4">
                <div class="col-md-2   col-6  border-end ">
                    <div class="img">
                        <img class="w-100" src="{{ asset('/') }}website/images/card1.jpg" alt="card1.jpg" />
                    </div>
                    <h6 class="text-color fw-bold">
                        Casey Anthony judge warns magistrate murder exposes new reality for justice system</h6>
                </div>
                <div class="col-md-2 col-6  border-end ">
                    <div class="img">
                        <img class="w-100" src="{{ asset('/') }}website/images/card2.jpg" alt="card2" />
                    </div>
                    <h6 class="text-color fw-bold">
                        Casey Anthony judge warns magistrate murder exposes new reality for justice system</h6>
                </div>
                <div class="col-md-2 col-6  border-end ">
                    <div class="img">
                        <img class="w-100" src="{{ asset('/') }}website/images/card3.jpg" alt="card3" />
                    </div>
                    <h6 class="text-color fw-bold">
                        Casey Anthony judge warns magistrate murder exposes new reality for justice system</h6>
                </div>
                <div class="col-md-2  col-6 border-end ">
                    <div class="img">
                        <img class="w-100" src="{{ asset('/') }}website/images/card4.jpg" alt="card4" />
                    </div>
                    <h6 class="text-color fw-bold">
                        Casey Anthony judge warns magistrate murder exposes new reality for justice system</h6>
                </div>
                <div class="col-md-2 col-6 border-end ">
                    <div class="img">
                        <img class="w-100" src="{{ asset('/') }}website/images/card5.jpg" alt="card5" />
                    </div>
                    <h6 class="text-color fw-bold">
                        Casey Anthony judge warns magistrate murder exposes new reality for justice system</h6>
                </div>
                <div class="col-md-2 col-6  border-end ">
                    <div class="img">
                        <img class="w-100" src="{{ asset('/') }}website/images/card6.jpg" alt="card6" />
                    </div>
                    <h6 class="text-color fw-bold">
                        Casey Anthony judge warns magistrate murder exposes new reality for justice system</h6>
                </div>

            </div>
        </div>
    </section>
     --}}

<!-- SPORTS SECTION -->
<style>
    .sports-section{ background:#f3f6f8; }

    .section-head .bar{ width:4px;height:28px;background:#1f5f73; }
    .section-head .title{ font-weight:800;font-size:32px; }
    .section-head .line{ height:2px;background:#b9c9d3; }

    /* ✅ Lead image ছোট করা হলো */
    .lead-img{
        height:210px;              /* আগের 260px ছিল */
        object-fit:cover;
        border:1px solid #cfd9df;
        border-radius:6px;
    }

    .lead-title{ font-size:30px;font-weight:800;line-height:1.15; }
    .lead-excerpt{ font-size:15px;color:#6c7b88; }

    /* ✅ Right side item */
    .mini-item{
        display:flex;
        align-items:flex-start;     /* আগের center ছিল */
        gap:12px;
        padding:2px 0;
    }

    /* ✅ Title সুন্দরভাবে দেখানোর জন্য */
    .mini-title{
        font-size:17px;             /* একটু বড়/রিডেবল */
        font-weight:800;
        line-height:1.35;
        margin:0;
        flex:1;
        color:black
        min-width:0;                /* flex overflow fix */

        /* 3 লাইন পর্যন্ত দেখাবে, বেশি হলে ... */
        display:-webkit-box;
        -webkit-box-orient:vertical;
        -webkit-line-clamp:3;
        overflow:hidden;
    }

    /* ✅ Thumbnail একটু ছোট করা হলো যাতে title বেশি জায়গা পায় */
    .mini-thumb{
        width:120px;                /* আগের 140px ছিল */
        flex:0 0 120px;
    }
    .mini-thumb img{
        width:100%;
        height:86px;                /* আগের 100px ছিল */
        object-fit:cover;
        border-radius:6px;
        border:1px solid #d5dee5;
        display:block;
    }

    hr{ border-top:1px solid #cfd9df;margin:16px 0; }

    @media (min-width: 992px){
        .border-end-lg{ border-right:1px solid #cfd9df; }
    }

    /* ✅ মোবাইলে আরও সুন্দর করতে */
    @media (max-width: 575px){
        .lead-title{ font-size:24px; }
        .lead-img{ height:190px; }
        .mini-thumb{ width:105px; flex:0 0 105px; }
        .mini-thumb img{ height:78px; }
        .mini-title{ font-size:16px; -webkit-line-clamp:4; }
    }
</style>

<!-- SPORTS SECTION -->
<section class="sports-section py-4">
    <div class="container">

        <!-- Section Header -->
        <div class="section-head d-flex align-items-center gap-3 mb-3">
            <span class="bar"></span>
            <h3 class="m-0 title">খেলা</h3>
            <span class="line flex-grow-1"></span>
        </div>

        @php
            $lead = $sportsPosts->first();            // 1st post (big)
            $rest = $sportsPosts->slice(1)->values(); // remaining 6
            $col1 = $rest->slice(0, 3);               // next 3
            $col2 = $rest->slice(3, 3);               // last 3
        @endphp

        @if($lead)
        <div class="row g-0">
            <!-- LEFT BIG NEWS -->
            <div class="col-lg-4 pe-lg-4 border-end-lg">
                <a href="{{ route('news-detail', ['id' => $lead->id]) }}" class="text-decoration-none hovera">
                    <div class="img-zoom-wrapper">
                    <img class="w-100 lead-img zoom-img"
                         src="{{ asset($lead->image) }}"
                         alt="{{ $lead->title }}">
                         </div>
                <h2 class="lead-title mt-3">
                        {{ $lead->title }}
                </h2>
                <p class="lead-excerpt">
                    {{ Str::limit(strip_tags($lead->short_description ?? $lead->description ?? ''), 120) }}
                </p>
                </a>
            </div>
            <!-- RIGHT SIDE -->
            <div class="col-lg-8 ps-lg-4">
                <div class="row g-0">
                    <!-- RIGHT COLUMN 1 -->
                    <div class="col-md-6 pe-md-3 border-end-lg">
                        @foreach($col1 as $item)
                        <a href="{{ route('news-detail', ['id' => $item->id]) }}" class="text-dark text-decoration-none hovera">
                            <div class="mini-item">
                                <h6 class="mini-title">
                                        {{ $item->title }}
                                    </a>
                                </h6>
                                <div class="mini-thumb img-zoom-wrapper">
                                        <img src="{{ asset($item->image) }}" class="zoom-img" alt="{{ $item->title }}">
                                    </div>
                                </div>
                            </a>
                            @if(!$loop->last)
                                <hr>
                            @endif
                        @endforeach
                    </div>
                    <!-- RIGHT COLUMN 2 -->
                    <div class="col-md-6 ps-md-3">
                        @foreach($col2 as $item)
                        <a href="{{ route('news-detail', ['id' => $item->id]) }}" class="text-dark text-decoration-none hovera">
                            <div class="mini-item">
                                <h6 class="mini-title">
                                        {{ $item->title }}
                                </h6>
                                <div class="mini-thumb img-zoom-wrapper">
                                        <img src="{{ asset($item->image) }}" class="zoom-img" alt="{{ $item->title }}">
                                    </div>
                                </div>
                            </a>
                            @if(!$loop->last)
                                <hr>
                            @endif
                        @endforeach
                    </div>
                </div>
            </div>
        </div>
        @endif

    </div>
</section>


<!-- ========================= -->
 <style>
    .three-col-section{
        background:#f3f6f8;
        padding:35px 0;
    }

    /* header */
    .cat-head{
        display:flex;
        align-items:center;
        gap:12px;
        margin-bottom:10px;
    }
    .cat-head .bar{
        width:4px;
        height:28px;
        background:#1f5f73;
    }
    .cat-head .title{
        font-size:34px;
        font-weight:800;
        margin:0;
        color:#0b2f3a;
    }
    .cat-head .line{
        flex:1;
        height:2px;
        background:#b9c9d3;
    }

    .cat-body{
        padding-top:14px;
    }

    /* big politics */
    .lead-img{
        width:100%;
        height:320px;
        object-fit:cover;
        border:1px solid #cfd9df;
    }
    .lead-title{
        font-size:32px;
        font-weight:800;
        line-height:1.2;
        margin:14px 0 8px;
    }
    .lead-excerpt{
        font-size:15px;
        color:#6c7b88;
    }

    /* list items */
    .mini-item{
        display:flex;
        gap:14px;
        padding:14px 0;
        border-bottom:1px solid #cfd9df;
    }
    .mini-item:last-child{
        border-bottom:0;
    }
    .mini-title{
        font-size:18px;
        font-weight:800;
        line-height:1.35;
        margin:0;
        flex:1;
    }
    .mini-thumb{
        width:150px;
        flex:0 0 150px;
    }
    .mini-thumb img{
        width:100%;
        height:90px;
        object-fit:cover;
        border-radius:6px;
        border:1px solid #d5dee5;
    }

    /* vertical divider */
    @media (min-width:992px){
        .border-right{
            border-right:1px solid #cfd9df;
        }
    }
</style>

<section class="three-col-section">
    <div class="container">
        <div class="row g-4">

            <!-- LEFT: রাজনীতি (2 column wide) -->
            <div class="col-lg-8 border-right pe-lg-4">
                <div class="cat-head">
                    <span class="bar"></span>
                    <h3 class="title">রাজনীতি</h3>
                    <span class="line"></span>
                </div>

                <div class="cat-body">
                    @php
                        $politicsLead = $politicsPosts->first();          // 1st post (big)
                        $politicsList = $politicsPosts->slice(1)->values(); // remaining 3
                    @endphp

                    <div class="row g-4">
                        <!-- big lead -->
                        <div class="col-md-6">
                            @if($politicsLead)
                                <a href="{{ route('news-detail', ['id' => $politicsLead->id]) }}" class="text-decoration-none hovera">
                                    <img src="{{ asset($politicsLead->image) }}" class="lead-img" alt="{{ $politicsLead->title }}">
                                <h2 class="lead-title">
                                        {{ $politicsLead->title }}
                                </h2>
                                    <p class="lead-excerpt">
                                        {{ \Illuminate\Support\Str::limit(strip_tags($politicsLead->short_description ?? $politicsLead->description ?? ''), 140) }}
                                    </p>
                                </a>
                            @endif
                        </div>

                        <!-- politics list (3 items) -->
                        <div class="col-md-6">
                            @foreach($politicsList as $item)
                            <a href="{{ route('news-detail', ['id' => $item->id]) }}" class="text-dark text-decoration-none hovera">
                                <div class="mini-item">
                                    <h6 class="mini-title">
                                            {{ $item->title }}
                                    </h6>
                                    <div class="mini-thumb img-zoom-wrapper">
                                            <img src="{{ asset($item->image) }}" class="zoom-img" alt="{{ $item->title }}">
                                        </div>
                                    </div>
                                </a>
                            @endforeach
                        </div>
                    </div>
                </div>
            </div>

            <!-- RIGHT: স্বাস্থ্য (1 column) -->
            <div class="col-lg-4 ps-lg-4">
                <div class="cat-head">
                    <span class="bar"></span>
                    <h3 class="title">স্বাস্থ্য</h3>
                    <span class="line"></span>
                </div>

                <div class="cat-body">
                    @foreach($healthPosts as $item)
                    <a href="{{ route('news-detail', ['id' => $item->id]) }}" class="text-dark text-decoration-none hovera">
                        <div class="mini-item">
                            <h6 class="mini-title">
                                    {{ $item->title }}
                            </h6>
                            <div class="mini-thumb img-zoom-wrapper">
                                    <img src="{{ asset($item->image) }}" class="zoom-img" alt="{{ $item->title }}">
                                </div>
                            </div>
                        </a>
                    @endforeach
                </div>
            </div>

        </div>
    </div>
</section>


<!-- ========================= -->
<!-- International Section -->
<section class="sports-section py-4">
    <div class="container">

        <!-- Section Header -->
        <div class="section-head d-flex align-items-center gap-3 mb-3">
            <span class="bar"></span>
            <h3 class="m-0 title">আন্তর্জাতিক</h3>
            <span class="line flex-grow-1"></span>
        </div>

        @php
            $lead = $internationalPosts->first();          // 1st post (big)
            $rest = $internationalPosts->slice(1)->values(); // remaining 6
            $col1 = $rest->slice(0, 3);             // next 3
            $col2 = $rest->slice(3, 3);             // last 3
        @endphp

        @if($lead)
        <div class="row g-0">
            <!-- LEFT BIG NEWS -->
            <div class="col-lg-5 pe-lg-4 border-end-lg">
                <a href="{{ route('news-detail', ['id' => $lead->id]) }}" class="text-decoration-none hovera">
                    <div class="img-zoom-wrapper">
                        <img class="w-100 lead-img zoom-img" src="{{ asset($lead->image) }}" alt="{{ $lead->title }}" />
                    </div>
               
                <h2 class="lead-title mt-3">
                        {{ $lead->title }}
                    </h2>
                    <p class="lead-excerpt">
                        {{ Str::limit(strip_tags($lead->short_description ?? $lead->description ?? ''), 120) }}
                    </p>
                </a>
            </div>

            <!-- RIGHT SIDE -->
            <div class="col-lg-7 ps-lg-4">
                <div class="row g-0">

                    <!-- RIGHT COLUMN 1 -->
                    <div class="col-md-6 pe-md-3 border-end-lg">
                        @foreach($col1 as $item)
                        <a href="{{ route('news-detail', ['id' => $item->id]) }}" class="text-dark text-decoration-none hovera">
                            <div class="mini-item">
                                <h6 class="mini-title">
                                        {{ $item->title }}
                                </h6>
                                <div class="mini-thumb img-zoom-wrapper">
                                        <img src="{{ asset($item->image) }}" class="zoom-img" alt="{{ $item->title }}">
                                    </div>
                                </div>
                            </a>

                            @if(!$loop->last)
                                <hr>
                            @endif
                        @endforeach
                    </div>

                    <!-- RIGHT COLUMN 2 -->
                    <div class="col-md-6 ps-md-3">
                        @foreach($col2 as $item)
                        <a href="{{ route('news-detail', ['id' => $item->id]) }}" class="text-dark text-decoration-none hovera">
                            <div class="mini-item">
                                <h6 class="mini-title">
                                        {{ $item->title }}
                                    
                                </h6>
                                <div class="mini-thumb img-zoom-wrapper">
                                        <img src="{{ asset($item->image) }}" class="zoom-img" alt="{{ $item->title }}">
                                    </div>
                                </div>
                            </a>

                            @if(!$loop->last)
                                <hr>
                            @endif
                        @endforeach
                    </div>

                </div>
            </div>

        </div>
        @endif

    </div>
</section>

<!-- ============================== -->
 <style>
    body{
  background:#f3f6f8;
  font-family: sans-serif;
}

.lr-section{
  padding:30px 0;
}

/* header */
.sec-head{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:16px;
}
.sec-head .bar{
  width:4px;
  height:26px;
  background:#1f5f73;
}
.sec-head h3{
  margin:0;
  font-size:30px;
  font-weight:800;
}
.sec-head .line{
  flex:1;
  height:2px;
  background:#b9c9d3;
}

/* left top */
.top-row{
  display:flex;
  gap:18px;
}
.top-img img{
  width:520px;
  height:300px;
  object-fit:cover;
  border:1px solid #cfd9df;
}
.top-text h4{
  font-size:26px;
  font-weight:800;
  margin-bottom:6px;
}
.top-text p{
  font-size:14px;
  color:#6c7b88;
  line-height:1.7;
}

hr{
  border-top:1px solid #cfd9df;
  margin:18px 0;
}

/* bottom cards */
.bcard img{
  width:100%;
  height:160px;
  object-fit:cover;
  border:1px solid #cfd9df;
}
.bcard h6{
  font-size:17px;
  font-weight:800;
  margin-top:10px;
}

/* right */
.right-col{
  border-left:1px solid #cfd9df;
}
.r-item{
  display:flex;
  gap:14px;
}
.r-thumb img{
  width:150px;
  height:100px;
  object-fit:cover;
  border:1px solid #cfd9df;
}
.r-text h6{
  font-size:18px;
  font-weight:800;
  margin:0;
}

/* responsive */
@media(max-width:991px){
  .top-row{
    flex-direction:column;
  }
  .top-img img{
    width:100%;
    height:260px;
  }
  .right-col{
    border-left:none;
    margin-top:30px;
  }
}

 </style>
<!-- LIFESTYLE + RELIGION SECTION -->
<section class="lr-section">
  <div class="container">

    <div class="row">

      <!-- LEFT : LIFESTYLE -->
      <div class="col-lg-8 left-col">

        <!-- Header -->
        <div class="sec-head">
          <span class="bar"></span>
          <h3>লাইফস্টাইল</h3>
          <span class="line"></span>
        </div>

        @php
          $lifeTop = $lifePosts->first();     // বড়টা (১ম পোস্ট)
          $lifeBottom = $lifePosts->slice(1,3); // নিচের ৩টা
        @endphp

        @if($lifeTop)
          <!-- Top big -->
          <div class="top-row">
            <div class="top-img">
              <a href="{{ route('news-detail', ['id' => $lifeTop->id]) }}" class="text-decoration-none">
                <img src="{{ asset($lifeTop->image) }}" alt="{{ $lifeTop->title }}">
              </a>
            </div>

            <div class="top-text">
              <h4>
                <a href="{{ route('news-detail', ['id' => $lifeTop->id]) }}" class="text-decoration-none text-dark">
                  {{ $lifeTop->title }}
                </a>
              </h4>
              <p>
                {{ \Illuminate\Support\Str::limit(strip_tags($lifeTop->short_description ?? $lifeTop->description ?? ''), 170) }}
              </p>
            </div>
          </div>
        @endif

        <hr>

        <!-- Bottom 3 cards -->
        <div class="row bottom-cards">
          @foreach($lifeBottom as $post)
            <div class="col-md-4">
              <div class="bcard">
                <a href="{{ route('news-detail', ['id' => $post->id]) }}" class="text-decoration-none">
                  <img src="{{ asset($post->image) }}" alt="{{ $post->title }}">
                </a>
                <h6>
                  <a href="{{ route('news-detail', ['id' => $post->id]) }}" class="text-decoration-none text-dark">
                    {{ $post->title }}
                  </a>
                </h6>
              </div>
            </div>
          @endforeach
        </div>

      </div>

      <!-- RIGHT : RELIGION -->
      <div class="col-lg-4 right-col">

        <!-- Header -->
        <div class="sec-head">
          <span class="bar"></span>
          <h3>ধর্ম</h3>
          <span class="line"></span>
        </div>

        @foreach($religionPosts as $k => $rpost)
          <div class="r-item">
            <div class="r-text">
              <h6>
                <a href="{{ route('news-detail', ['id' => $rpost->id]) }}" class="text-decoration-none text-dark">
                  {{ $rpost->title }}
                </a>
              </h6>
            </div>
            <div class="r-thumb">
              <a href="{{ route('news-detail', ['id' => $rpost->id]) }}" class="text-decoration-none">
                <img src="{{ asset($rpost->image) }}" alt="{{ $rpost->title }}">
              </a>
            </div>
          </div>

          @if($k < $religionPosts->count() - 1)
            <hr>
          @endif
        @endforeach

      </div>

    </div>
  </div>
</section>


@endsection