<%- include('partials/header') %>

<!-- GLightbox CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/glightbox/dist/css/glightbox.min.css" />

<!-- ============================
     HOME PAGE DARK THEME STYLES
     ============================ -->
<style>
/* ---- Global Dark Override for home page ---- */
body { background: #080b12; }

/* ---- HERO ---- */
.hero {
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: white;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(8,11,18,0.85) 0%, rgba(15,23,42,0.6) 50%, rgba(8,11,18,0.92) 100%);
    z-index: 1;
}
/* Animated orb blobs */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    animation: orbFloat 8s ease-in-out infinite alternate;
}
.hero-orb-1 { width:500px; height:500px; background: radial-gradient(circle, rgba(245,158,11,0.25), transparent 70%); top:-100px; left:-100px; }
.hero-orb-2 { width:400px; height:400px; background: radial-gradient(circle, rgba(99,102,241,0.2), transparent 70%); bottom:-80px; right:-80px; animation-delay: -4s; }
@keyframes orbFloat { from { transform: translate(0,0) scale(1); } to { transform: translate(30px,20px) scale(1.1); } }

.hero-content {
    position: relative; z-index: 2;
    max-width: 850px; padding: 0 20px;
}
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(245,158,11,0.15);
    border: 1px solid rgba(245,158,11,0.4);
    color: #f59e0b;
    padding: 6px 18px; border-radius: 50px;
    font-size: 0.85rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase;
    margin-bottom: 24px;
}
.hero-title {
    font-size: 5rem !important;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 20px !important;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 60%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}
.hero-subtitle {
    font-size: 1.25rem !important;
    color: #94a3b8;
    font-weight: 300;
    max-width: 580px;
    margin: 0 auto 35px;
    line-height: 1.7;
    opacity: 1 !important;
}
.hero-cta-group { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.btn-hero-primary {
    display: inline-flex; align-items: center; gap: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a; padding: 14px 34px;
    border-radius: 50px; font-weight: 700; font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(245,158,11,0.35);
}
.btn-hero-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(245,158,11,0.5); color: #0f172a; }
.btn-hero-outline {
    display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.2);
    color: white; padding: 14px 34px;
    border-radius: 50px; font-weight: 600; font-size: 0.95rem;
    transition: all 0.3s ease; backdrop-filter: blur(10px);
}
.btn-hero-outline:hover { background: rgba(255,255,255,0.15); transform: translateY(-3px); color: white; }

/* Scroll indicator */
.scroll-indicator {
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: rgba(255,255,255,0.4); font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase;
    animation: bounce 2s infinite;
}
.scroll-indicator i { font-size: 1.2rem; color: #f59e0b; }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* ---- SECTION HEADERS ---- */
.dark-section { background: #080b12; padding: 90px 0; }
.dark-section-alt { background: #0d1117; padding: 90px 0; }
.section-tag {
    display: inline-block;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.3);
    color: #f59e0b;
    padding: 4px 14px; border-radius: 50px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
    margin-bottom: 14px;
}
.dark-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    color: #f1f5f9;
    margin-bottom: 12px;
    line-height: 1.2;
}
.dark-subtitle { color: #64748b; font-size: 1.05rem; max-width: 550px; margin: 0 auto; line-height: 1.7; }
.gold-divider { width: 50px; height: 3px; background: linear-gradient(90deg,#f59e0b,#d97706); margin: 16px auto; border-radius: 2px; }

/* ---- STATS STRIP ---- */
.stats-strip {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-top: 1px solid rgba(245,158,11,0.15);
    border-bottom: 1px solid rgba(245,158,11,0.15);
    padding: 50px 0;
}
.stats-strip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 20px; }
.stat-box { text-align: center; padding: 20px; }
.stat-box h3 {
    font-family: 'Inter', sans-serif;
    font-size: 2.8rem; font-weight: 800;
    background: linear-gradient(135deg,#f59e0b,#fbbf24);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 6px;
}
.stat-box p { color: #64748b; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1.5px; }

/* ---- GALLERY ---- */
.gallery-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 14px;
}
.gallery-masonry .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.gallery-masonry .gallery-item:nth-child(5) { grid-column: span 2; }
.gallery-item {
    position: relative; border-radius: 14px; overflow: hidden;
    display: block; cursor: pointer;
    background: #1e293b;
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.25,0.46,0.45,0.94);
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(8,11,18,0.85) 0%, rgba(245,158,11,0.1) 50%, transparent 100%);
    display: flex; align-items: flex-end; justify-content: flex-start;
    padding: 20px; opacity: 0; transition: opacity 0.35s ease;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) scale(0.7);
    color: white; font-size: 2rem;
    transition: transform 0.3s ease;
}
.gallery-item:hover .gallery-overlay-icon { transform: translate(-50%,-50%) scale(1); }

/* ---- ABOUT SECTION ---- */
.about-dark-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.about-img-wrapper {
    position: relative;
}
.about-img-wrapper::before {
    content: '';
    position: absolute;
    inset: -2px; border-radius: 18px;
    background: linear-gradient(135deg, #f59e0b, #d97706, transparent, rgba(99,102,241,0.5));
    z-index: -1;
}
.about-img-wrapper img {
    width: 100%; border-radius: 16px;
    min-height: 450px; object-fit: cover;
    display: block;
}
.about-img-wrapper .img-badge {
    position: absolute; bottom: -20px; right: -20px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0f172a; padding: 16px 20px;
    border-radius: 12px; font-weight: 700; text-align: center;
    box-shadow: 0 10px 30px rgba(245,158,11,0.4);
}
.about-img-wrapper .img-badge span { display: block; font-size: 2rem; font-weight: 800; }
.about-dark-text h2 { font-family: 'Playfair Display', serif; font-size: 3rem; color: #f1f5f9; margin-bottom: 8px; line-height: 1.1; }
.about-dark-text .role { color: #f59e0b; font-size: 0.9rem; font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 20px; display: block; }
.about-dark-text p { color: #94a3b8; font-size: 1.05rem; line-height: 1.85; margin-bottom: 16px; }
.about-features { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }
.feat-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25);
    color: #fbbf24; padding: 6px 14px; border-radius: 50px; font-size: 0.85rem; font-weight: 500;
}
.feat-chip i { font-size: 0.8rem; }
.about-btn-group { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* ---- BLOG CARDS ---- */
.dark-blog-card {
    background: #0d1117;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    overflow: hidden;
    display: flex; flex-direction: column;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.dark-blog-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245,158,11,0.3);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.dark-blog-card .card-img { height: 210px; overflow: hidden; }
.dark-blog-card .card-img img { width:100%; height:100%; object-fit:cover; transition: transform 0.4s ease; }
.dark-blog-card:hover .card-img img { transform: scale(1.06); }
.dark-blog-card .card-body { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; }
.dark-blog-card .card-tag {
    display: inline-block;
    background: rgba(245,158,11,0.1); color: #f59e0b;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
    padding: 3px 10px; border-radius: 50px; margin-bottom: 12px;
}
.dark-blog-card h3 { font-family: 'Playfair Display',serif; font-size: 1.2rem; color: #f1f5f9; margin-bottom: 10px; line-height: 1.45; }
.dark-blog-card p { color: #64748b; font-size: 0.9rem; line-height: 1.7; flex-grow: 1; margin-bottom: 20px; }
.dark-blog-card .card-link {
    display: inline-flex; align-items: center; gap: 8px;
    color: #f59e0b; font-size: 0.9rem; font-weight: 600;
    transition: gap 0.2s ease;
}
.dark-blog-card .card-link:hover { gap: 14px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
    .gallery-masonry { grid-template-columns: repeat(2,1fr); }
    .gallery-masonry .gallery-item:nth-child(1) { grid-column: span 1; grid-row: span 1; }
    .gallery-masonry .gallery-item:nth-child(5) { grid-column: span 1; }
    .about-dark-grid { grid-template-columns: 1fr; gap: 50px; }
    .about-img-wrapper .img-badge { bottom: 10px; right: 10px; }
}
@media (max-width: 768px) {
    .hero-title { font-size: 3rem !important; letter-spacing: -1px; }
    .hero-subtitle { font-size: 1rem !important; }
    .dark-title { font-size: 2rem; }
    .gallery-masonry { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; }
    .gallery-masonry .gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 1; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 2.4rem !important; }
    .hero-cta-group { flex-direction: column; align-items: center; }
    .gallery-masonry { grid-template-columns: 1fr; }
    .gallery-masonry .gallery-item:nth-child(1),
    .gallery-masonry .gallery-item:nth-child(5) { grid-column: span 1; grid-row: span 1; }
}
</style>

<!-- ==================== HERO ==================== -->
<section class="hero" style="background-image: url('<%= sections.hero && sections.hero.image_url ? sections.hero.image_url : '/images/ruhan-reading.jpg' %>');">
    <div class="hero-orb hero-orb-1"></div>
    <div class="hero-orb hero-orb-2"></div>

    <div class="hero-content fade-in-up">
        <div class="hero-badge">
            <i class="fas fa-globe-asia"></i>
            <%= lang==='bn' ? 'বিশ্ব ভ্রমণকারী' : 'World Traveler' %>
        </div>
        <h1 class="hero-title">
            <%= sections.hero ? (lang==='bn' ? sections.hero.title_bn : sections.hero.title_en) : 'Ruhan Vlog' %>
        </h1>
        <p class="hero-subtitle">
            <%= sections.hero ? (lang==='bn' ? sections.hero.content_bn : sections.hero.content_en) : 'Cinematic travel stories from the world\'s most extraordinary places.' %>
        </p>
        <div class="hero-cta-group">
            <a href="/videos<%= lQuery %>" class="btn-hero-primary">
                <i class="fas fa-play-circle"></i>
                <%= lang==='bn' ? 'ভিডিও দেখুন' : 'Watch Videos' %>
            </a>
            <a href="/about<%= lQuery %>" class="btn-hero-outline">
                <%= lang==='bn' ? 'আমার গল্প' : 'My Story' %>
                <i class="fas fa-arrow-right"></i>
            </a>
        </div>
    </div>

    <div class="scroll-indicator">
        <span>Scroll</span>
        <i class="fas fa-chevron-down"></i>
    </div>
</section>

<!-- ==================== STATS STRIP ==================== -->
<div class="stats-strip">
    <div class="container">
        <%- include('partials/stats_strip') %>
    </div>
</div>

<!-- ==================== PHOTO GALLERY ==================== -->
<section class="dark-section-alt">
    <div class="container">
        <div style="text-align:center; margin-bottom:50px;" class="fade-in-up">
            <span class="section-tag"><i class="fas fa-camera"></i> <%= lang==='bn' ? 'ফটো গ্যালারি' : 'Photo Gallery' %></span>
            <h2 class="dark-title"><%= lang==='bn' ? 'মুহূর্তগুলো ধরে রাখা' : 'Captured Moments' %></h2>
            <div class="gold-divider"></div>
            <p class="dark-subtitle"><%= lang==='bn' ? 'ভ্রমণের প্রতিটি মুহূর্তই একটি অনন্য গল্প।' : 'Every frame tells a story from a corner of the world.' %></p>
        </div>

        <div class="gallery-masonry fade-in-up">
            <% if (typeof gallery !== 'undefined' && gallery.length > 0) { %>
                <% gallery.forEach(img => { %>
                    <a href="<%= img.image_url %>" class="glightbox gallery-item" data-gallery="home-gallery">
                        <img src="<%= img.image_url %>" alt="Travel Gallery">
                        <div class="gallery-overlay">
                            <div class="gallery-overlay-icon"><i class="fas fa-expand"></i></div>
                        </div>
                    </a>
                <% }) %>
            <% } else { %>
                <p style="text-align: center; color: #64748b; grid-column: 1 / -1;">
                    <%= lang==='bn' ? 'গ্যালারিতে এখনও কোন ছবি নেই।' : 'No photos in the gallery yet.' %>
                </p>
            <% } %>
        </div>
    </div>
</section>

<!-- GLightbox JS -->
<script src="https://cdn.jsdelivr.net/gh/mcstudios/glightbox/dist/js/glightbox.min.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
    GLightbox({ selector: '.glightbox', touchNavigation: true, loop: true, zoomable: true, autoplayVideos: true });
});
</script>

<!-- ==================== ABOUT SECTION ==================== -->
<section class="dark-section">
    <div class="container">
        <div class="about-dark-grid">
            <!-- Image -->
            <div class="about-img-wrapper fade-in-up">
                <img src="/images/ruhan-reading.jpg" alt="Mohammed Robin - Ruhan Vlog">
                <div class="img-badge">
                    <span>50+</span>
                    <%= lang==='bn' ? 'দেশ' : 'Countries' %>
                </div>
            </div>

            <!-- Text -->
            <div class="about-dark-text fade-in-up">
                <span class="section-tag"><i class="fas fa-user"></i> <%= lang==='bn' ? 'আমার সম্পর্কে' : 'About Me' %></span>
                <h2><%= lang==='bn' ? 'মোহাম্মদ রবিন' : 'Mohammed Robin' %></h2>
                <span class="role"><%= lang==='bn' ? 'ট্রাভেল ভ্লগার ও কন্টেন্ট ক্রিয়েটর' : 'Travel Vlogger & Cinematic Storyteller' %></span>
                <div class="gold-divider" style="margin:0 0 24px 0;"></div>
                <p>
                    <%= lang==='bn'
                        ? 'রোহান ভ্লগ (মোহাম্মদ রবিন) একজন জনপ্রিয় ট্রাভেল ভ্লগার, যিনি বিশ্বজুড়ে তার ভ্রমণের সিনেমাটিক গল্প শেয়ার করেন। তার ভিডিওগুলোতে বিভিন্ন সংস্কৃতি, গ্রামীণ জীবনযাপন এবং স্থানীয় বাজারগুলোর একটি বাস্তবচিত্র ফুটে ওঠে।'
                        : 'Created by Mohammed Robin, Ruhan Vlog offers viewers a cinematic glimpse into different cultures, rural lifestyles, and local experiences around the world.' %>
                </p>
                <p>
                    <%= lang==='bn'
                        ? 'মিয়ানমার, মাদাগাস্কার থেকে শুরু করে উজবেকিস্তান পর্যন্ত, তিনি অনন্য অভিজ্ঞতা এবং সাধারণ মানুষের প্রতিদিনের জীবন ক্যামেরাবন্দী করেন।'
                        : 'From Madagascar\'s wildlife to the ancient streets of Uzbekistan, Robin\'s raw and immersive approach highlights genuine human connection across borders.' %>
                </p>
                <div class="about-features">
                    <span class="feat-chip"><i class="fas fa-film"></i> <%= lang==='bn' ? 'সিনেমাটিক' : 'Cinematic' %></span>
                    <span class="feat-chip"><i class="fas fa-map-marked-alt"></i> <%= lang==='bn' ? 'ভ্রমণ' : 'Adventure' %></span>
                    <span class="feat-chip"><i class="fas fa-heart"></i> <%= lang==='bn' ? 'সংস্কৃতি' : 'Culture' %></span>
                    <span class="feat-chip"><i class="fas fa-camera"></i> <%= lang==='bn' ? 'ফটোগ্রাফি' : 'Photography' %></span>
                </div>
                <div class="about-btn-group">
                    <a href="/about<%= lQuery %>" class="btn-hero-primary">
                        <%= lang==='bn' ? 'আরও জানুন' : 'Learn More' %> <i class="fas fa-arrow-right"></i>
                    </a>
                    <a href="https://www.youtube.com/@RuhanVlogs" target="_blank" class="btn-hero-outline">
                        <i class="fab fa-youtube"></i> <%= lang==='bn' ? 'ইউটিউব চ্যানেল' : 'YouTube Channel' %>
                    </a>
                </div>
            </div>
        </div>
    </div>
</section>

<!-- ==================== LATEST BLOGS ==================== -->
<section class="dark-section-alt">
    <div class="container">
        <div style="text-align:center; margin-bottom:50px;" class="fade-in-up">
            <span class="section-tag"><i class="fas fa-book-open"></i> <%= lang==='bn' ? 'সাম্প্রতিক' : 'Latest' %></span>
            <h2 class="dark-title"><%= lang==='bn' ? 'ভ্রমণের গল্প' : 'Travel Stories' %></h2>
            <div class="gold-divider"></div>
            <p class="dark-subtitle"><%= lang==='bn' ? 'প্রতিটি গন্তব্যের একটি অনন্য গল্প আছে — এখানে কিছু শেয়ার করা হলো।' : 'Every destination has a unique story — here are a few of mine.' %></p>
        </div>

        <div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 28px;">
            <% if(typeof blogs !== 'undefined' && blogs.length > 0) { %>
                <% blogs.forEach(blog => { %>
                    <div class="dark-blog-card fade-in-up">
                        <% if(blog.image_url) { %>
                            <div class="card-img">
                                <img src="<%= blog.image_url %>" alt="<%= lang==='bn' ? blog.title_bn : blog.title_en %>">
                            </div>
                        <% } %>
                        <div class="card-body">
                            <span class="card-tag"><i class="fas fa-globe"></i> Travel</span>
                            <h3><%= lang==='bn' ? blog.title_bn : blog.title_en %></h3>
                            <p><%= lang==='bn' ? blog.content_bn.substring(0, 110) + '...' : blog.content_en.substring(0, 110) + '...' %></p>
                            <a href="/blog/<%= blog.id %><%= lQuery %>" class="card-link">
                                <%= lang==='bn' ? 'আরও পড়ুন' : 'Read Story' %> <i class="fas fa-arrow-right"></i>
                            </a>
                        </div>
                    </div>
                <% }) %>
            <% } else { %>
                <p style="text-align:center; grid-column:1/-1; color:#475569; padding: 60px 0;">
                    <%= lang==='bn' ? 'এখনও কোন ব্লগ পোস্ট করা হয়নি।' : 'No blog posts yet. Check back soon!' %>
                </p>
            <% } %>
        </div>
    </div>
</section>

<%- include('partials/footer') %>
