<!DOCTYPE html>
<html lang="id" data-theme="dark">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Kumpulan Artikel & Berita - WYZSTORE</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Outfit:wght@400;600;800&display=swap" rel="stylesheet">
    <style>
        :root {
            --bg-color: #0b0d0f;
            --surface: #141619;
            --primary: #f39c12;
            --primary-glow: rgba(243, 156, 18, 0.4);
            --text-main: #ffffff;
            --text-muted: #e2e8f0; /* Warna pilihan Anda untuk visibilitas maksimal */
            --border: rgba(255,255,255,0.08);
            --nav-bg: rgba(11, 13, 15, 0.85);
        }

        body.light-mode {
            --bg-color: #f8fafc;
            --surface: #ffffff;
            --border: #e2e8f0;
            --text-main: #0f172a;
            --text-muted: #475569;
            --nav-bg: rgba(255, 255, 255, 0.95);
        }
        

        body { font-family: 'Plus Jakarta Sans', sans-serif; background-color: var(--bg-color); color: var(--text-main); transition: 0.3s; }
        
        /* PAKSA BOOTSTRAP MENGIKUTI TEMA */
        .text-muted { color: var(--text-muted) !important; }
        .text-secondary { color: var(--text-muted) !important; }
        
        /* NAVBAR STYLE MATCHING MAIN PAGE */
        .navbar-custom {
            position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
            background: var(--nav-bg); backdrop-filter: blur(15px);
            border-bottom: 1px solid var(--border); padding: 15px 0;
        }
        .navbar-brand { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 1.5rem; color: #fff; text-decoration: none; display: flex; align-items: center; gap: 10px; }
        .navbar-brand span {
            background: linear-gradient(135deg, var(--primary) 0%, var(--text-main) 50%, var(--primary) 100%);
            background-size: 200% auto;
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            animation: text-slide 3s linear infinite;
        }
        @keyframes text-slide {
            to { background-position: 200% center; }
        }
        .navbar-logo { height: 35px; width: auto; }
        .nav-link { color: var(--text-muted); text-decoration: none; font-weight: 600; font-size: 0.95rem; transition: 0.3s; }
        .nav-link:hover { color: var(--primary); }
        
        .theme-toggle {
            background: var(--border); border: none; color: var(--text-main);
            width: 40px; height: 40px; border-radius: 12px;
            display: flex; align-items: center; justify-content: center; transition: 0.3s;
        }
        .theme-toggle:hover { background: var(--primary); color: #000; }

        /* ORIGINAL ARTICLE CARD STYLE */
        .article-card {
            background: var(--surface);
            border-radius: 16px;
            overflow: hidden;
            border: 1px solid var(--border);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            height: 100%;
            cursor: pointer;
            text-decoration: none;
            display: block;
            color: inherit;
        }
        .article-card:hover {
            transform: translateY(-5px);
            border-color: var(--primary);
            box-shadow: 0 10px 30px rgba(0,0,0,0.5);
        }
        .art-img-container {
            width: 100%;
            position: relative;
            overflow: hidden;
            background-color: transparent;
        }
        .art-img-full {
            width: 100%;
            height: auto;
            display: block;
            transition: transform 0.5s ease;
        }
        .article-card:hover .art-img-full {
            transform: scale(1.05);
        }
        .art-badge {
            position: absolute;
            top: 15px;
            left: 15px;
            background: var(--primary);
            color: #000;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 800;
            text-transform: uppercase;
        }
        .art-body { padding: 20px; }
        .art-title { font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; line-height: 1.4; color: var(--text-main); }
        .art-text { font-size: 0.9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 0; }
        
        .page-header {
            padding: 150px 0 60px 0;
            background: linear-gradient(180deg, rgba(243, 156, 18, 0.05) 0%, var(--bg-color) 100%);
            text-align: center;
        }
        /* PREMIUM FOOTER STYLES */
        footer { 
            background: rgba(10, 12, 16, 0.95); 
            border-top: 1px solid var(--border); 
            padding: 40px 0 20px; 
            margin-top: 0;
        }
        .footer-brand { 
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 1.8rem; 
            font-weight: 800; 
            margin-bottom: 20px; 
            text-decoration: none !important;
        }
        .footer-brand span {
            background: linear-gradient(135deg, #fff, var(--primary)); 
            -webkit-background-clip: text; 
            -webkit-text-fill-color: transparent; 
        }
        .footer-logo { 
            height: 45px; 
            width: auto; }
        .footer-text { 
            color: var(--text-muted); 
            font-size: 0.95rem; 
            line-height: 1.8; 
            max-width: 350px; }
        .footer-heading { 
            font-weight: 700; 
            font-size: 1.1rem; 
            color: var(--text-main); 
            margin-bottom: 25px; 
            position: relative; }
        .footer-heading::after { content: ''; position: absolute; bottom: -8px; left: 0; width: 35px; height: 3px; background: var(--primary); border-radius: 10px; }
        .footer-link { display: block; color: var(--text-muted); text-decoration: none; font-size: 0.95rem; margin-bottom: 12px; transition: all 0.3s; }
        .footer-link:hover { color: var(--primary); padding-left: 5px; }
        .social-circle { 
            width: 40px; height: 40px; 
            border-radius: 50%; 
            background: rgba(255,255,255,0.05); 
            display: flex; align-items: center; justify-content: center; 
            color: #fff; text-decoration: none; 
            transition: all 0.3s; border: 1px solid var(--border);
        }
        .social-circle:hover { background: var(--primary); transform: translateY(-5px); box-shadow: 0 5px 15px var(--primary-glow); border-color: transparent; }
        .footer-copy { 
            text-align: center; 
            color: var(--text-muted); 
            font-size: 0.8rem; 
            margin-top: 20px; 
            padding: 15px 0; 
            border-top: 1px solid var(--border); 
            letter-spacing: 1px; 
            text-transform: uppercase;
            font-weight: 600;
            opacity: 0.8;
        }

        .footer-banner-full {
            width: 100%;
            background: var(--bg-color);
            margin-top: 0;
            overflow: hidden;
            position: relative;
        }
        @media (max-width: 768px) {
            .footer-banner-full { margin-top: -15px !important; }
            footer { padding: 15px 0 0 0 !important; }
            footer .row { --bs-gutter-y: 0 !important; margin-bottom: 0 !important; }
            .footer-heading { margin-bottom: 10px !important; font-size: 1rem !important; }
            .footer-link { margin-bottom: 5px !important; font-size: 0.85rem !important; }
            .footer-copy { margin: 0 !important; padding: 5px 0 !important; border-top: none !important; }
            .footer-copy .container { padding: 0 !important; }
            body { padding-bottom: 0 !important; }
        }
        .footer-banner-wrapper {
            width: 100%;
            position: relative;
            background: var(--bg-color);
            display: flex;
            justify-content: center;
        }
        .footer-promo-image {
            width: 100%;
            max-width: 100vw;
            height: auto;
            display: block;
            object-fit: cover;
        }
        .footer-promo-image.dark-banner {
            mask-image: radial-gradient(ellipse 90% 80% at center, black 10%, transparent 100%);
            -webkit-mask-image: radial-gradient(ellipse 90% 80% at center, black 10%, transparent 100%);
            opacity: 0.9;
            filter: brightness(1.1) contrast(1.05);
        }
        .footer-promo-image.light-banner { display: none; }
        body.light-mode .footer-promo-image.dark-banner { display: none; }
        body.light-mode .footer-promo-image.light-banner { 
            display: block; 
            mask-image: none !important;
            -webkit-mask-image: none !important;
            opacity: 1 !important;
            filter: none !important;
        }
        .banner-glow {
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: radial-gradient(circle at center, transparent 30%, var(--bg-color) 100%);
            pointer-events: none;
        }
        body.light-mode .banner-glow { display: none; }
        
        body.light-mode footer { background: #ffffff; border-top-color: rgba(0,0,0,0.05); }
        body.light-mode .footer-heading { color: #111827; }
        body.light-mode .footer-brand { background: linear-gradient(135deg, #111827, var(--primary)); -webkit-background-clip: text; }
        body.light-mode .social-circle { background: rgba(0,0,0,0.03); color: #111827; border-color: rgba(0,0,0,0.08); }
        body.light-mode .social-circle:hover { color: #fff; background: var(--primary); border-color: transparent;}
        
        .pay-slider-container { overflow: hidden; white-space: nowrap; position: relative; padding: 5px 0; }
        .pay-slider { display: flex; gap: 40px; width: max-content; animation: pay-scroll 25s linear infinite; }
        .pay-slider:hover { animation-play-state: paused; }
        @keyframes pay-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
        .pay-logo { height: 22px; width: auto; object-fit: contain; }
</style>
</head>
<body>

    <!-- NAVBAR (MATCHING HOME) -->
    <nav class="navbar-custom">
        <div class="container d-flex align-items-center justify-content-between">
            <a href="/" class="navbar-brand">
                <img src="{{ asset('images/logo.png') }}" alt="Logo" class="navbar-logo">
                <span>WYZSTORE</span>
            </a>
            <div class="d-flex align-items-center gap-4">
                <div class="d-none d-md-flex gap-4 me-3">
                    <a href="/" class="nav-link">Home</a>
                    <a href="/#games" class="nav-link">Games</a>
                    <a href="/#how-to" class="nav-link">Cara Top Up</a>
                </div>
                <button class="theme-toggle" id="themeBtn" onclick="toggleTheme()">
                    <i class="fas fa-moon"></i>
                </button>
            </div>
        </div>
    </nav>

    <div class="page-header">
        <div class="container">
            <h1 class="fw-bold mb-3" style="font-family: 'Outfit', sans-serif;">Berita & Artikel Terkini</h1>
            <p class="text-muted">Kumpulan informasi update patch, esports, tips dan trik dunia game.</p>
        </div>
    </div>

    <!-- ARTICLES -->
    <div class="container mb-5 pb-5">
        <div class="row g-4">
            @forelse($articles as $article)
            <div class="col-md-6 col-lg-4">
                <a href="/article/{{ $article->id }}" class="article-card">
                    <div class="art-img-container">
                        <img src="{{ \Illuminate\Support\Str::startsWith($article->image_url, ['http', '/']) ? $article->image_url : asset('storage/' . $article->image_url) }}" alt="{{ $article->title }}" class="art-img-full">
                        <span class="art-badge">{{ $article->category }}</span>
                    </div>
                    <div class="art-body">
                        <h5 class="art-title">{{ $article->title }}</h5>
                        <p class="art-text">{{ Str::limit($article->content, 100) }}</p>
                        <div class="d-flex justify-content-between align-items-center mt-3">
                            <span class="small text-muted"><i class="far fa-calendar-alt me-1"></i> {{ $article->created_at->format('d M Y') }}</span>
                            <span class="small text-primary fw-bold">Baca Selengkapnya <i class="fas fa-arrow-right ms-1"></i></span>
                        </div>
                    </div>
                </a>
            </div>
            @empty
            <div class="col-12 text-center py-5">
                <h4 class="text-muted">Belum ada artikel.</h4>
            </div>
            @endforelse
        </div>
    </div>

    <!-- FOOTER PROMO BANNER FULL WIDTH -->
    <div class="footer-banner-full">
        <div class="footer-banner-wrapper">
            <!-- Gambar Dark Mode -->
            <img src="{{ asset('images/footer-banner.png') }}" alt="WYZSTORE Promo" class="footer-promo-image dark-banner">
            <!-- Gambar Light Mode -->
            <img src="{{ asset('images/bg-light.png') }}" alt="WYZSTORE Promo" class="footer-promo-image light-banner">
            <div class="banner-glow"></div>
        </div>
    </div>

<footer>
    <div class="container">
        <div class="row g-4">
            <div class="col-lg-4 col-md-6 mb-3">
                <a href="/" class="footer-brand mb-2 d-inline-flex align-items-center gap-2">
                    <img src="{{ $homepage['logo_url'] ?? asset('images/logo.png') }}" alt="Logo" class="navbar-logo">
                    <span>WYZSTORE</span>
                </a>
                <p class="text-muted small mb-3" style="max-width: 300px;">Solusi top up game tercepat, termurah, dan terpercaya di Indonesia. Otomatis masuk dalam hitungan detik 24 jam nonstop.</p>
                <div class="d-flex gap-3 mb-3">
                    <a href="{{ $homepage['wa_link'] ?? '#' }}" class="social-circle"><i class="fab fa-whatsapp"></i></a>
                    <a href="{{ $homepage['ig_link'] ?? '#' }}" class="social-circle"><i class="fab fa-instagram"></i></a>
                    <a href="{{ $homepage['tiktok_link'] ?? '#' }}" class="social-circle"><i class="fab fa-tiktok"></i></a>
                </div>
            </div>
            <div class="col-6 col-lg-2 mb-3">
                <h5 class="footer-heading">Navigasi</h5>
                <a href="/" class="footer-link">Home</a>
                <a href="/#games" class="footer-link">Daftar Game</a>
                <a href="/articles" class="footer-link">Berita & Artikel</a>
            </div>
            <div class="col-6 col-lg-3 mb-3">
                <h5 class="footer-heading">Bantuan</h5>
                <a href="https://wa.me/{{ env('WA_ADMIN_PHONE') }}" class="footer-link">Hubungi Kami</a>
                <a href="/#how-to" class="footer-link">Metode Pembayaran</a>
                <a href="#" class="footer-link">Syarat & Ketentuan</a>
            </div>
            <div class="col-12 col-lg-3 mb-3">
                <h5 class="footer-heading">Metode Pembayaran</h5>
                <div class="pay-slider-container">
                    <div class="pay-slider">
                        @php
                            $logos = isset($homepage['pay_logos']) && !empty($homepage['pay_logos']) 
                                ? explode(',', $homepage['pay_logos']) 
                                : [
                                    'https://upload.wikimedia.org/wikipedia/commons/e/e1/QRIS_logo.svg',
                                    'https://upload.wikimedia.org/wikipedia/commons/7/72/Logo_dana_blue.svg',
                                    'https://upload.wikimedia.org/wikipedia/commons/8/86/Gopay_logo.svg',
                                    'https://upload.wikimedia.org/wikipedia/commons/e/eb/Logo_ovo_purple.svg',
                                    'https://upload.wikimedia.org/wikipedia/commons/9/9d/Logo_Indomaret.png'
                                ];
                        @endphp

                        @foreach($logos as $logo)
                            <img src="{{ trim($logo) }}" class="pay-logo">
                        @endforeach
                        
                        {{-- Duplikasi untuk marquee seamless --}}
                        @foreach($logos as $logo)
                            <img src="{{ trim($logo) }}" class="pay-logo">
                        @endforeach
                    </div>
                </div>
            </div>
        </div>
        <div class="footer-copy">
            <div class="container">
                <div class="mb-2">&copy; 2025 <span class="text-primary">WYZSTORE</span>. ALL RIGHTS RESERVED.</div>
                <div style="font-size: 0.65rem; opacity: 0.6; letter-spacing: 2px;">POWERED BY GER</div>
            </div>
        </div>
    </div>
</footer>

    <script>
        function toggleTheme() {
            document.body.classList.toggle('light-mode');
            const isLight = document.body.classList.contains('light-mode');
            localStorage.setItem('theme', isLight ? 'light' : 'dark');
            const icon = document.querySelector('#themeBtn i');
            icon.className = isLight ? 'fas fa-sun' : 'fas fa-moon';
        }
        if(localStorage.getItem('theme') === 'light') {
            document.body.classList.add('light-mode');
            document.querySelector('#themeBtn i').className = 'fas fa-sun';
        }
    </script>
</body>
</html>
