<div class="top-bar">
    CLUB/{{ $individualZone->main_title }}
</div>
<div class="club_news_container">
    @php
        $latestNews = \App\Models\NewEventContain::where('individual_zone_id', $individualZone->id)
        ->whereIn('new_event', ['news', 'events'])
            ->orderByDesc('released_at')
            ->take(2)
            ->get();
    @endphp

    <div class="news-grid">
        @foreach($latestNews as $news)
            <div class="news-card" style="background-image: url('{{ asset('storage/' . $news->image) }}')">
                <div class="news-overlay">
                    <div class="news-date">{{ \Carbon\Carbon::parse($news->released_at)->format('jS F, Y') }}</div>
                    <div class="news-title">{{ $news->title }}</div>
                </div>
            </div>
        @endforeach
    </div>
    <div class="news-arrow-separator">
        <div class="arrow-circle">
            <svg width="28" height="28" viewBox="0 0 28 28" fill="none">
                <circle cx="14" cy="14" r="14" fill="#34507B"/>
                <path d="M14 8V20" stroke="#fff" stroke-width="2" stroke-linecap="round"/>
                <path d="M9 15L14 20L19 15" stroke="#fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
            </svg>
        </div>
    </div>
</div>
<div class="clubzone-banner">
    <span class="clubzone-title">
        @php
            $words = explode(' ', $individualZone->main_title);
            $firstWord = $words[0] ?? '';
            $secondWord = $words[1] ?? '';
        @endphp
        <span class="clubzone-grey">{{ $firstWord }}</span><span class="clubzone-white">{{ $secondWord }}</span>
    </span>
    <div class="clubzone-desc" style="background: {{ $individualZone->background_color }};">
        <p>{{ $individualZone->main_description }}</p>
    </div>
</div>

<style>
    .top-bar {
        margin-top: 150px;
        color: #36384E;
        padding: 48px;
        font-family: Poppins;
        font-weight: 400;
        font-size: 18px;
        line-height: 38px;
        letter-spacing: 0px;
        text-align: left;
        vertical-align: middle;

    }
    .news-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        position: relative;
    }
    .news-card {
        position: relative;
        aspect-ratio: 16/9;
        background-size: cover;
        background-position: center;
        overflow: hidden;
        display: flex;
        align-items: flex-end;
    }
    .news-overlay {
        width: 100%;
        padding: 1rem;
        background: linear-gradient(0deg, rgba(0,0,0,0.7) 60%, rgba(0,0,0,0.1) 100%);
        color: #fff;
    }
    .news-date {
        font-size: 0.85rem;
        opacity: 0.85;
        margin-bottom: 0.3rem;
    }
    .news-title {
        font-size: 1.1rem;
        font-weight: bold;
    }
    .club_news_container {
        position: relative;
    }
    .news-arrow-separator {
        position: absolute;
        top: 80%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 2;
        pointer-events: none;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .arrow-circle {
        width: 25px;
        height: 25px;
        background: #34507B;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }
    .clubzone-banner {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 5rem;
        margin-bottom: 5rem;
        gap: 0;
    }
    .clubzone-title {
        font-family: Poppins, Arial, sans-serif;
        font-size: 2.2rem;
        font-weight: 700;
        letter-spacing: 1px;
        margin-right: -1.2rem;
        z-index: 2;
        display: flex;
        align-items: center;
    }
    .clubzone-grey {
        color: #B3B3B3;
        font-weight: 700;
    }
    .clubzone-white {
        color: #fff;
        font-weight: 700;
        margin-left: 0.2rem;
        padding: 0.2rem 0.7rem 0.2rem 0.5rem;
        border-radius: 0 0.1rem 0.1rem 0;
        z-index: 2;
    }
    .clubzone-desc {
        margin-left: -6.2rem;
        padding: 1.2rem 2rem 1.2rem 7.5rem;
        background: {{ $individualZone->background_color }};
        color: #fff;
        font-family: Poppins, Arial, sans-serif;
        font-size: 0.95rem;
        line-height: 1.6;
        border-radius: 0.1rem;
        min-width: 350px;
        max-width: 600px;
        z-index: 1;
        display: flex;
        align-items: center;
    }
    .clubzone-desc p {
        margin: 0;
    }

       /* Enhanced responsive styles */
       @media (max-width: 1200px) {
        .top-bar {
            margin-top: 200px;
            padding: 40px;
            font-size: 17px;
            line-height: 36px;
        }
        .news-grid {
            gap: 8px;
        }
        .news-overlay {
            padding: 0.9rem;
        }
        .news-date {
            font-size: 0.8rem;
            margin-bottom: 0.25rem;
        }
        .news-title {
            font-size: 1rem;
        }
        .arrow-circle {
            width: 23px;
            height: 23px;
        }
        .clubzone-banner {
            margin-top: 4.5rem;
            margin-bottom: 4.5rem;
        }
        .clubzone-title {
            font-size: 2rem;
            margin-right: -1rem;
        }
        .clubzone-white {
            padding: 0.2rem 0.6rem 0.2rem 0.4rem;
        }
        .clubzone-desc {
            margin-left: -5.5rem;
            padding: 1.1rem 1.8rem 1.1rem 6.8rem;
            font-size: 0.9rem;
            min-width: 320px;
            max-width: 550px;
        }
    }

    @media (max-width: 992px) {
        .top-bar {
            margin-top: 200px;
            padding: 35px;
            font-size: 16px;
            line-height: 34px;
        }
        .news-grid {
            gap: 7px;
        }
        .news-overlay {
            padding: 0.8rem;
        }
        .news-date {
            font-size: 0.75rem;
            margin-bottom: 0.2rem;
        }
        .news-title {
            font-size: 0.95rem;
        }
        .arrow-circle {
            width: 21px;
            height: 21px;
        }
        .clubzone-banner {
            margin-top: 4rem;
            margin-bottom: 4rem;
        }
        .clubzone-title {
            font-size: 1.8rem;
            margin-right: -0.8rem;
        }
        .clubzone-white {
            padding: 0.2rem 0.5rem 0.2rem 0.3rem;
        }
        .clubzone-desc {
            margin-left: -4.8rem;
            padding: 1rem 1.6rem 1rem 6.2rem;
            font-size: 0.85rem;
            min-width: 300px;
            max-width: 500px;
        }
    }

    @media (max-width: 768px) {
        .top-bar {
            margin-top: 200px;
            padding: 30px;
            font-size: 15px;
            line-height: 32px;
        }
        .news-grid {
            gap: 6px;
        }
        .news-overlay {
            padding: 0.7rem;
        }
        .news-date {
            font-size: 0.7rem;
            margin-bottom: 0.15rem;
        }
        .news-title {
            font-size: 0.9rem;
        }
        .arrow-circle {
            width: 19px;
            height: 19px;
        }
        .clubzone-banner {
            margin-top: 3.5rem;
            margin-bottom: 3.5rem;
        }
        .clubzone-title {
            font-size: 1.6rem;
            margin-right: -0.6rem;
        }
        .clubzone-white {
            padding: 0.2rem 0.4rem 0.2rem 0.2rem;
        }
        .clubzone-desc {
            margin-left: -4.2rem;
            padding: 0.9rem 1.4rem 0.9rem 5.6rem;
            font-size: 0.8rem;
            min-width: 280px;
            max-width: 450px;
        }
    }

    @media (max-width: 700px) {
        .top-bar {

            padding: 25px;
            font-size: 14px;
            line-height: 30px;
        }
        .news-grid {
            gap: 5px;
        }
        .news-overlay {
            padding: 0.6rem;
        }
        .news-date {
            font-size: 0.65rem;
            margin-bottom: 0.1rem;
        }
        .news-title {
            font-size: 0.85rem;
        }
        .arrow-circle {
            width: 17px;
            height: 17px;
        }
        .clubzone-banner {
            flex-direction: column;
            margin-left: 0.5rem;
            margin-top: 3rem;
            margin-bottom: 3rem;
        }
        .clubzone-title {
            font-size: 1.3rem;
            margin-right: 0;
            margin-bottom: 1rem;
        }
        .clubzone-white {
            padding: 0.2rem 0.3rem 0.2rem 0.1rem;
        }
        .clubzone-desc {
            padding: 1rem 1rem 1rem 1rem;
            min-width: unset;
            max-width: 100%;
            margin-left: 0;
        }
    }

    @media (max-width: 600px) {
        .top-bar {

            padding: 20px;
            font-size: 13px;
            line-height: 28px;
        }
        .news-grid {
            gap: 4px;
        }
        .news-overlay {
            padding: 0.5rem;
        }
        .news-date {
            font-size: 0.6rem;
        }
        .news-title {
            font-size: 0.8rem;
        }
        .arrow-circle {
            width: 15px;
            height: 15px;
        }
        .clubzone-banner {
            margin-top: 2.5rem;
            margin-bottom: 2.5rem;
        }
        .clubzone-title {
            font-size: 1.2rem;
            margin-bottom: 0.8rem;
        }
        .clubzone-desc {
            padding: 0.8rem 0.8rem 0.8rem 0.8rem;
            font-size: 0.75rem;
        }
    }

    @media (max-width: 480px) {
        .top-bar {

            padding: 15px;
            font-size: 12px;
            line-height: 26px;
        }
        .news-grid {
            gap: 3px;
        }
        .news-overlay {
            padding: 0.4rem;
        }
        .news-date {
            font-size: 0.55rem;
        }
        .news-title {
            font-size: 0.75rem;
        }
        .arrow-circle {
            width: 13px;
            height: 13px;
        }
        .clubzone-banner {
            margin-top: 2rem;
            margin-bottom: 2rem;
        }
        .clubzone-title {
            font-size: 1.1rem;
            margin-bottom: 0.6rem;
        }
        .clubzone-desc {
            padding: 0.6rem 0.6rem 0.6rem 0.6rem;
            font-size: 0.7rem;
        }
    }

    @media (max-width: 400px) {
        .top-bar {

            padding: 12px;
            font-size: 11px;
            line-height: 24px;
        }
        .news-grid {
            gap: 2px;
        }
        .news-overlay {
            padding: 0.3rem;
        }
        .news-date {
            font-size: 0.5rem;
        }
        .news-title {
            font-size: 0.7rem;
        }
        .arrow-circle {
            width: 11px;
            height: 11px;
        }
        .clubzone-banner {
            margin-top: 1.5rem;
            margin-bottom: 1.5rem;
        }
        .clubzone-title {
            font-size: 1rem;
            margin-bottom: 0.5rem;
        }
        .clubzone-desc {
            padding: 0.5rem 0.5rem 0.5rem 0.5rem;
            font-size: 0.65rem;
        }
    }

    @media (max-width: 360px) {
        .top-bar {

            padding: 10px;
            font-size: 10px;
            line-height: 22px;
        }
        .news-grid {
            gap: 1px;
        }
        .news-overlay {
            padding: 0.2rem;
        }
        .news-date {
            font-size: 0.45rem;
        }
        .news-title {
            font-size: 0.65rem;
        }
        .arrow-circle {
            width: 9px;
            height: 9px;
        }
        .clubzone-banner {
            margin-top: 1.2rem;
            margin-bottom: 1.2rem;
        }
        .clubzone-title {
            font-size: 0.9rem;
            margin-bottom: 0.4rem;
        }
        .clubzone-desc {
            padding: 0.4rem 0.4rem 0.4rem 0.4rem;
            font-size: 0.6rem;
        }
    }
</style>