---
import Layout from '../layouts/Layout.astro';

// Placeholder for blog posts - would fetch from CMS
const posts = [
  { slug: 'en-qun-shu-wei-zui-xin-gong-gao', title: '恩群數位最新公告', date: '2023-01-01' },
  { slug: 'google-xiao-xue-tang', title: 'Google小學堂', date: '2023-01-02' },
  // Add more
];
---

<Layout>
  <section class="news-section">
    <div class="container">
      <h1>行銷放大鏡</h1>
      <div class="posts-grid">
        {posts.map(post => (
          <article class="post-card">
            <h2><a href={`/wen-zhang-fen-lei/${post.slug}`}>{post.title}</a></h2>
            <p>{post.date}</p>
          </article>
        ))}
      </div>
    </div>
  </section>
</Layout>

<style>
  .news-section {
    padding: 40px 0;
  }
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  h1 {
    text-align: center;
    margin-bottom: 30px;
  }
  .posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
  }
  .post-card {
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 8px;
  }
  .post-card h2 {
    margin-top: 0;
  }
  .post-card a {
    text-decoration: none;
    color: #333;
  }
  .post-card a:hover {
    color: #007bff;
  }
</style>