@php
$articles = \App\Models\NewEventContain::where('individual_zone_id', $individualZone->id)
        ->where('new_event', 'news')
        ->orderByDesc('released_at')
        ->take(3)
        ->get();

@endphp
<div class="article-section">
    <h2 class="article-title">Club Related Articles</h2>
    <div class="article-grid">
        @foreach($articles as $article)
            <div class="article-card" style="background-image: url('{{ asset('storage/' . $article->image) }}')">
                <div class="article-overlay">
                    <div class="article-card-title">{{ $article->title }}</div>
                    <div class="news-content">
                        <h3>{{ $article->title }}</h3>
                        <div class="news-card-footer">
                            <a href="{{ route('individualNews', $article->id) }}" class="news-readmore-btn">READ MORE</a>
                            <a href="{{ route('individualNews', $article->id) }}" class="news-arrow-btn" aria-label="Read more">
                                <svg width="32" height="32" viewBox="0 0 32 32">
                                    <circle cx="16" cy="16" r="15" fill="#fff"/>
                                    <path d="M12 20 L20 12 M20 12 H13 M20 12 V19" stroke="#17486D" stroke-width="2" fill="none" stroke-linecap="round"/>
                                </svg>
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        @endforeach
    </div>
    <div class="article-see-more-wrapper">
        <a href="{{ route('news') }}" class="article-see-more">
            <span>SEE MORE</span>
            <svg width="22" height="16" viewBox="0 0 22 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                <path d="M1 8H21M21 8L15 2M21 8L15 14" stroke="#fff" stroke-width="2" stroke-linecap="round"/>
            </svg>
        </a>
    </div>
</div>
<style>
.article-section {
    text-align: center;
    margin: 2.5rem 0 3rem 0;
}
.article-title {
    color: #17406a;
    font-size: 1.6rem;
    font-family: Poppins, Arial, sans-serif;
    font-weight: 600;
    margin-bottom: 2.2rem;
}
.article-grid {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.article-card {
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    width: 300px;
    height: 200px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
}
.article-overlay {
    background: linear-gradient(180deg, rgba(23,64,106,0.05) 0%, rgba(23,64,106,0.7) 100%);
    width: 100%;
    padding: 1.2rem 1.2rem 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    height: 100%;
}
.article-card-title {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.2rem;
    text-align: left;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.news-content {
    position: relative;
    z-index: 3;
    padding: 18px 18px 16px 18px;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.news-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.news-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.news-readmore-btn {
    background: #17486D;
    color: #fff;
    padding: 12px ;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 12px;
    letter-spacing: 1px;
    border: none;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-readmore-btn:hover {
    background: #F6A84F;
    color: #17486D;
}

.news-arrow-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: transparent;
    border: none;
    padding: 0;
    margin-left: 0;
    transition: box-shadow 0.2s;
}

.news-arrow-btn svg {
    display: block;
}

.news-arrow-btn:hover circle {
    fill: #F6A84F;
}
.news-arrow-btn:hover path {
    stroke: #17486D;
}

.article-see-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #17406a;
    color: #fff;
    font-size: 1.1rem;
    font-family: Poppins, Arial, sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    padding: 0.7rem 1.8rem;
    text-decoration: none;
    transition: background 0.2s;
    gap: 0.7rem;
    box-shadow: none;
    margin-top: 0.5rem;
    letter-spacing: 1px;
}

.article-see-more:hover {
    background: #F3881B;
    color: #fff;
}

.article-see-more svg {
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
}
.article-see-more-wrapper {
    margin-top: 0.5rem;
}
@media (max-width: 900px) {
    .article-grid {
        gap: 1rem;
    }
    .article-card {
        width: 90vw;
        max-width: 340px;
        height: 180px;
    }
}
/* Enhanced responsive styles */
@media (max-width: 1200px) {
    .article-section {
        margin: 2.2rem 0 2.8rem 0;
    }
    .article-title {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }
    .article-grid {
        gap: 1.8rem;
        margin-bottom: 2.2rem;
    }
    .article-card {
        width: 280px;
        height: 190px;
    }
    .article-overlay {
        padding: 1.1rem 1.1rem 1.4rem 1.1rem;
    }
    .article-card-title {
        font-size: 1rem;
        margin-bottom: 1.1rem;
    }
    .news-content {
        padding: 16px 16px 14px 16px;
    }
    .news-content h3 {
        font-size: 1rem;
        margin-bottom: 16px;
    }
    .news-card-footer {
        gap: 11px;
        margin-top: 16px;
    }
    .news-readmore-btn {
        padding: 11px;
        font-size: 11px;
    }
    .news-arrow-btn {
        width: 44px;
        height: 44px;
    }
    .article-see-more {
        font-size: 1rem;
        padding: 0.6rem 1.6rem;
    }
}

@media (max-width: 992px) {
    .article-section {
        margin: 2rem 0 2.5rem 0;
    }
    .article-title {
        font-size: 1.4rem;
        margin-bottom: 1.8rem;
    }
    .article-grid {
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    .article-card {
        width: 260px;
        height: 180px;
    }
    .article-overlay {
        padding: 1rem 1rem 1.3rem 1rem;
    }
    .article-card-title {
        font-size: 0.95rem;
        margin-bottom: 1rem;
    }
    .news-content {
        padding: 14px 14px 12px 14px;
    }
    .news-content h3 {
        font-size: 0.95rem;
        margin-bottom: 14px;
    }
    .news-card-footer {
        gap: 10px;
        margin-top: 14px;
    }
    .news-readmore-btn {
        padding: 10px;
        font-size: 10px;
    }
    .news-arrow-btn {
        width: 40px;
        height: 40px;
    }
    .article-see-more {
        font-size: 0.95rem;
        padding: 0.5rem 1.4rem;
    }
}

@media (max-width: 900px) {
    .article-grid {
        gap: 1rem;
    }
    .article-card {
        width: 90vw;
        max-width: 340px;
        height: 180px;
    }
    .article-overlay {
        padding: 1rem 1rem 1.2rem 1rem;
    }
    .article-card-title {
        font-size: 0.9rem;
        margin-bottom: 0.9rem;
    }
    .news-content {
        padding: 12px 12px 10px 12px;
    }
    .news-content h3 {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }
    .news-card-footer {
        gap: 9px;
        margin-top: 12px;
    }
    .news-readmore-btn {
        padding: 9px;
        font-size: 9px;
    }
    .news-arrow-btn {
        width: 36px;
        height: 36px;
    }
    .article-see-more {
        font-size: 0.9rem;
        padding: 0.4rem 1.2rem;
    }
}

@media (max-width: 768px) {
    .article-section {
        margin: 1.8rem 0 2.2rem 0;
    }
    .article-title {
        font-size: 1.3rem;
        margin-bottom: 1.6rem;
    }
    .article-grid {
        gap: 0.8rem;
        margin-bottom: 1.8rem;
    }
    .article-card {
        width: 85vw;
        max-width: 320px;
        height: 170px;
    }
    .article-overlay {
        padding: 0.9rem 0.9rem 1.1rem 0.9rem;
    }
    .article-card-title {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
    }
    .news-content {
        padding: 10px 10px 8px 10px;
    }
    .news-content h3 {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
    .news-card-footer {
        gap: 8px;
        margin-top: 10px;
    }
    .news-readmore-btn {
        padding: 8px;
        font-size: 8px;
    }
    .news-arrow-btn {
        width: 32px;
        height: 32px;
    }
    .article-see-more {
        font-size: 0.85rem;
        padding: 0.3rem 1rem;
    }
}

@media (max-width: 600px) {
    .article-section {
        margin: 1.5rem 0 2rem 0;
    }
    .article-title {
        font-size: 1.2rem;
        margin-bottom: 1.4rem;
    }
    .article-grid {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
        margin-bottom: 1.5rem;
    }
    .article-card {
        width: 98vw;
        max-width: 98vw;
        height: 160px;
    }
    .article-overlay {
        padding: 0.8rem 0.8rem 1rem 0.8rem;
    }
    .article-card-title {
        font-size: 0.8rem;
        margin-bottom: 0.7rem;
    }
    .news-content {
        padding: 8px 8px 6px 8px;
    }
    .news-content h3 {
        font-size: 0.8rem;
        margin-bottom: 8px;
    }
    .news-card-footer {
        gap: 6px;
        margin-top: 8px;
    }
    .news-readmore-btn {
        padding: 6px;
        font-size: 7px;
    }
    .news-arrow-btn {
        width: 28px;
        height: 28px;
    }
    .article-see-more {
        font-size: 0.8rem;
        padding: 0.2rem 0.8rem;
    }
}

@media (max-width: 480px) {
    .article-section {
        margin: 1.2rem 0 1.8rem 0;
    }
    .article-title {
        font-size: 1.1rem;
        margin-bottom: 1.2rem;
    }
    .article-grid {
        gap: 0.5rem;
        margin-bottom: 1.2rem;
    }
    .article-card {
        width: 95vw;
        height: 150px;
    }
    .article-overlay {
        padding: 0.7rem 0.7rem 0.9rem 0.7rem;
    }
    .article-card-title {
        font-size: 0.75rem;
        margin-bottom: 0.6rem;
    }
    .news-content {
        padding: 6px 6px 4px 6px;
    }
    .news-content h3 {
        font-size: 0.75rem;
        margin-bottom: 6px;
    }
    .news-card-footer {
        gap: 5px;
        margin-top: 6px;
    }
    .news-readmore-btn {
        padding: 5px;
        font-size: 6px;
    }
    .news-arrow-btn {
        width: 24px;
        height: 24px;
    }
    .article-see-more {
        font-size: 0.75rem;
        padding: 0.1rem 0.6rem;
    }
}

@media (max-width: 360px) {
    .article-section {
        margin: 1rem 0 1.5rem 0;
    }
    .article-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    .article-grid {
        gap: 0.4rem;
        margin-bottom: 1rem;
    }
    .article-card {
        width: 92vw;
        height: 140px;
    }
    .article-overlay {
        padding: 0.6rem 0.6rem 0.8rem 0.6rem;
    }
    .article-card-title {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }
    .news-content {
        padding: 4px 4px 2px 4px;
    }
    .news-content h3 {
        font-size: 0.7rem;
        margin-bottom: 4px;
    }
    .news-card-footer {
        gap: 4px;
        margin-top: 4px;
    }
    .news-readmore-btn {
        padding: 4px;
        font-size: 5px;
    }
    .news-arrow-btn {
        width: 20px;
        height: 20px;
    }
    .article-see-more {
        font-size: 0.7rem;
        padding: 0.1rem 0.5rem;
    }
}
</style>