:root {
  --primary: #16a34a;
  --primary-hover: #15803d;
  --primary-dark: #0f5132;
  --primary-light: #dcfce7;
  --primary-subtle: #f0fdf4;
  --accent: #0284c7;
  --accent-light: #e0f2fe;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-focus: #86efac;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 20px 30px -10px rgba(22, 163, 74, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Header & Hero */
.hero {
  background: linear-gradient(135deg, #0b3d1f 0%, #166534 50%, #15803d 100%);
  color: white;
  padding: 64px 24px 72px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-container {
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #bbf7d0;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-badge svg {
  width: 16px;
  height: 16px;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero p.subtitle {
  font-size: clamp(16px, 2.5vw, 19px);
  color: #dcfce7;
  max-width: 680px;
  line-height: 1.6;
  margin-bottom: 36px;
}

/* Search Box in Hero */
.search-wrapper {
  max-width: 640px;
  position: relative;
}

.search-input-group {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--radius-full);
  padding: 6px 10px 6px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: var(--transition);
}

.search-input-group:focus-within {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(134, 239, 172, 0.6);
}

.search-input-group svg.search-icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-main);
  background: transparent;
  padding: 10px 0;
}

.search-input::placeholder {
  color: #94a3b8;
}

.clear-search-btn {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 8px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.clear-search-btn:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

/* Main Content Container */
.main-container {
  max-width: 1100px;
  margin: -24px auto 80px;
  padding: 0 24px;
  position: relative;
  z-index: 3;
}

/* Stats / Quick Info Bar */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  background: var(--bg-card);
  padding: 18px 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  margin-bottom: 36px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary-dark);
  flex-shrink: 0;
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-text h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
}

.stat-text p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Category Filter Tabs */
.filter-container {
  margin-bottom: 28px;
}

.filter-heading {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.category-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-btn {
  background: white;
  border: 1px solid var(--border);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pill-btn:hover {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-subtle);
}

.pill-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 12px rgba(22, 163, 74, 0.25);
}

/* Post Cards Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.article-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: #86efac;
}

.card-media {
  position: relative;
  width: 100%;
  height: 190px;
  background: #f1f5f9;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.article-card:hover .card-media img {
  transform: scale(1.04);
}

.card-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.badge {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-featured {
  background: #16a34a;
  color: white;
}

.badge-video {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-video svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.badge-category {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(4px);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.badge-draft {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  margin-bottom: 10px;
  transition: color 0.2s;
}

.article-card:hover .card-title {
  color: var(--primary);
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 18px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #f1f5f9;
  padding-top: 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

.card-footer .arrow {
  display: inline-flex;
  align-items: center;
  transition: transform 0.2s;
}

.article-card:hover .card-footer .arrow {
  transform: translateX(4px);
}

/* Card Disabled / Coming Soon */
.article-card.disabled {
  opacity: 0.8;
  cursor: default;
}

.article-card.disabled:hover {
  transform: none;
  box-shadow: var(--shadow-sm);
  border-color: var(--border);
}

.article-card.disabled .card-title {
  color: var(--text-main);
}

/* How to add new post section */
.add-post-guide {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px dashed #86efac;
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 48px;
}

.add-post-guide h3 {
  font-size: 19px;
  color: var(--primary-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.add-post-guide p {
  color: #334155;
  font-size: 14px;
  margin-bottom: 18px;
}

.steps-mini-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.step-mini-card {
  background: white;
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid #bbf7d0;
}

.step-mini-number {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 24px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-mini-card h5 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-main);
}

.step-mini-card p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* Empty State for Search */
.empty-state {
  display: none;
  text-align: center;
  padding: 60px 20px;
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  grid-column: 1 / -1;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  color: #94a3b8;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Footer */
footer.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 48px 24px;
  border-top: 1px solid #1e293b;
  font-size: 14px;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

.footer-brand h4 {
  color: white;
  font-size: 18px;
  margin-bottom: 4px;
}

.footer-brand p {
  font-size: 13px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #4ade80;
}

/* Responsive */
@media (max-width: 768px) {
  .hero {
    padding: 44px 18px 56px;
  }
  .main-container {
    margin-top: -16px;
    padding: 0 16px;
  }
  .articles-grid {
    grid-template-columns: 1fr;
  }
  .stats-bar {
    grid-template-columns: 1fr;
  }
}
