@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  --background: #f7f8fa;
  --foreground: #1a2236;
  --card: #ffffff;
  --card-foreground: #1a2236;
  --primary: #2f9e6e;
  --primary-fg: #ffffff;
  --primary-light: rgba(47,158,110,0.1);
  --secondary: #eef0f4;
  --muted: #6b7a90;
  --border: #e2e5eb;
  --input-border: #e2e5eb;
  --ring: rgba(47,158,110,0.35);
  --radius: 16px;
  --radius-sm: 12px;
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow-card: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 16px rgba(0,0,0,0.08);
  --max-w: 960px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-body); background: var(--background); color: var(--foreground); line-height: 1.6; -webkit-font-smoothing: antialiased; }
h1,h2,h3,h4 { font-family: var(--font-display); line-height: 1.25; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ── Header ── */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.site-header .inner { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 24px; }
.site-header .logo { font-family: var(--font-display); font-weight: 700; font-size: 1.125rem; }
.site-header .logo span { color: var(--primary); }
.site-header nav { display: flex; gap: 24px; font-size: 0.875rem; color: var(--muted); }
.site-header nav a:hover { color: var(--foreground); }

/* ── Hero ── */
.blog-hero { background: var(--card); border-bottom: 1px solid var(--border); padding: 56px 24px; text-align: center; }
.blog-hero h1 { font-size: 2.25rem; font-weight: 700; letter-spacing: -0.02em; }
.blog-hero .subtitle { margin-top: 16px; font-size: 1.05rem; color: var(--muted); max-width: 640px; margin-left: auto; margin-right: auto; }
.blog-hero .stats-row { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; font-size: 0.875rem; color: var(--muted); }
.blog-hero .stats-row .stat-icon { color: var(--primary); width: 16px; height: 16px; vertical-align: -2px; margin-right: 4px; }
.blog-hero .stats-row strong { color: var(--foreground); font-weight: 600; }
.blog-hero .search-wrap { margin-top: 28px; max-width: 480px; margin-left: auto; margin-right: auto; position: relative; }
.blog-hero .search-wrap svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); width: 16px; height: 16px; }
.blog-hero .search-wrap input { width: 100%; height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--input-border); background: var(--background); padding: 0 16px 0 40px; font-size: 0.875rem; color: var(--foreground); outline: none; }
.blog-hero .search-wrap input:focus { box-shadow: 0 0 0 3px var(--ring); }

/* ── Section wrapper ── */
.blog-main { max-width: var(--max-w); margin: 0 auto; padding: 40px 24px; display: flex; flex-direction: column; gap: 48px; }
.section-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 24px; }

/* ── Featured ── */
.featured-card { display: flex; flex-direction: column; border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow-card); overflow: hidden; }
.featured-card .img-wrap { aspect-ratio: 16/9; background: var(--secondary); overflow: hidden; }
.featured-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.featured-card .body { padding: 24px 28px; display: flex; flex-direction: column; justify-content: center; }
.featured-badge { display: inline-block; width: fit-content; background: var(--primary-light); color: var(--primary); font-size: 0.75rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }
.featured-card h3 { font-size: 1.35rem; font-weight: 700; }
.featured-card .excerpt { margin-top: 8px; font-size: 0.875rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meta-row { margin-top: 14px; display: flex; align-items: center; gap: 14px; font-size: 0.75rem; color: var(--muted); }
.meta-row svg { width: 14px; height: 14px; margin-right: 2px; vertical-align: -2px; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-family: var(--font-body); font-size: 0.875rem; font-weight: 500; border-radius: var(--radius-sm); cursor: pointer; border: none; transition: background 0.15s, box-shadow 0.15s; }
.btn-primary { background: var(--primary); color: var(--primary-fg); height: 40px; padding: 0 20px; }
.btn-primary:hover { background: #278b5e; }
.btn-outline { background: transparent; color: var(--foreground); border: 1px solid var(--border); height: 36px; padding: 0 16px; font-size: 0.8125rem; }
.btn-outline:hover { background: var(--secondary); }
.btn-lg { height: 46px; padding: 0 28px; font-size: 0.9375rem; font-weight: 600; border-radius: var(--radius-sm); }

/* ── Article Grid ── */
.article-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.article-card { border-radius: var(--radius); border: 1px solid var(--border); background: var(--card); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; }
.article-card .img-wrap { aspect-ratio: 16/9; background: var(--secondary); overflow: hidden; }
.article-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.article-card .body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.article-card h3 { font-size: 1rem; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.article-card .excerpt { margin-top: 6px; font-size: 0.8125rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.article-card .meta-row { margin-top: 10px; }
.article-card .btn-outline { margin-top: 14px; width: 100%; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; font-size: 0.875rem; font-weight: 500; border-radius: 8px; border: 1px solid transparent; color: var(--muted); }
.pagination a:hover { background: var(--secondary); color: var(--foreground); }
.pagination .active { border-color: var(--border); background: var(--card); color: var(--foreground); font-weight: 600; }
.pagination .nav-btn { padding: 0 14px; gap: 6px; color: var(--foreground); }

/* ── Newsletter CTA ── */
.newsletter { background: var(--secondary); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 28px; text-align: center; }
.newsletter h2 { font-size: 1.35rem; font-weight: 700; }
.newsletter .desc { margin-top: 8px; font-size: 0.875rem; color: var(--muted); max-width: 440px; margin-left: auto; margin-right: auto; }
.newsletter form { margin-top: 24px; display: flex; flex-direction: column; gap: 12px; max-width: 440px; margin-left: auto; margin-right: auto; }
.newsletter input[type="email"] { height: 44px; border-radius: var(--radius-sm); border: 1px solid var(--input-border); background: var(--card); padding: 0 16px; font-size: 0.875rem; outline: none; flex: 1; }
.newsletter input[type="email"]:focus { box-shadow: 0 0 0 3px var(--ring); }
.newsletter .icon-mail { color: var(--primary); width: 32px; height: 32px; margin: 0 auto 16px; }

/* ── Browse CTA ── */
.browse-cta { text-align: center; padding: 16px 0; }
.browse-cta h2 { font-size: 1.35rem; font-weight: 700; }
.browse-cta .btn { margin-top: 20px; }

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); padding: 24px; text-align: center; font-size: 0.75rem; color: var(--muted); }

/* ── Responsive ── */
@media (min-width: 640px) {
  .blog-hero h1 { font-size: 2.75rem; }
  .featured-card { flex-direction: row; }
  .featured-card .img-wrap { width: 40%; aspect-ratio: auto; }
  .featured-card .body { width: 60%; padding: 32px; }
  .article-grid { grid-template-columns: repeat(2, 1fr); }
  .newsletter form { flex-direction: row; }
}
@media (min-width: 1024px) {
  .blog-hero h1 { font-size: 3rem; }
  .blog-hero { padding: 72px 24px; }
  .article-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .site-header nav { display: none; }
}