<style>
/* ================================================================
   BLOG STYLES – refined & modern
   ================================================================ */

:root {
/* Primary colors */
  --primary: #3CAF36 !important;
  --primary-light: #B7EDAF !important;

  /* Primary gradient (Dark → Light) */
  --primary-gradient: linear-gradient(
    180deg,
    #3CAF36 0%,
    #56BF50 25%,
    #79D573 50%,
    #CBEFC8 75%,
    #FFFFFF 100%
  ) !important;
  
  /* Background gradient (Top → Bottom) */
  --background: linear-gradient(
    180deg,
    #3CAF36 0%,
    #66C961 25%,
    #A7E5A2 60%,
    #EAF8E8 85%,
    #FFFFFF 100%
  ) !important;

  /* ----- Typography ----- */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* ----- Transitions ----- */
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ----- Dark mode (optional) ----- */
@media (prefers-color-scheme: dark) {
:root {
  /* Primary colors */
  --primary: #3CAF36 !important;
  --primary-light: #B7EDAF !important;

  /* Primary gradient (Dark → Light) */
  --primary-gradient: linear-gradient(
    180deg,
    #3CAF36 0%,
    #56BF50 25%,
    #79D573 50%,
    #CBEFC8 75%,
    #FFFFFF 100%
  ) !important;
  
  /* Background gradient (Top → Bottom) */
  --background: linear-gradient(
    180deg,
    #3CAF36 0%,
    #66C961 25%,
    #A7E5A2 60%,
    #EAF8E8 85%,
    #FFFFFF 100%
  ) !important;

  /* Background and surface colors */
  --bg: var(--background); /* Use gradient for background */
  --surface: #FFFFFF;
  --surface-light: #F8FFF8;
  
  /* Text colors (dark for light background) */
  --text-primary: #0D1A1F;
  --text-secondary: #2A3A40;
  --text-tertiary: #4A5A60;
  
  /* Borders and shadows */
  --border: rgba(0, 0, 0, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.16);
  --shadow-hover: 0 20px 60px rgba(60, 175, 54, 0.2);
}

/* ================================================================
   BASE & RESET
   ================================================================ */

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================================
   PAGE HEADER (if used)
   ================================================================ */

.blog-page-header {
  text-align: center;
  padding: 60px 24px 20px;
  max-width: 800px;
  margin: 0 auto;
  animation: fadeUp 0.8s var(--spring) forwards;
  opacity: 0;
  transform: translateY(20px);
}

.blog-page-header h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}

.blog-page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto;
}

/* ================================================================
   HERO
   ================================================================ */

.blog-hero {
  position: relative;
  padding: 60px 24px 40px;
  margin: 0 auto;
  max-width: 1100px;
  min-height: 320px;
  border-radius: var(--radius-lg);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeUp 1s var(--spring) forwards;
  opacity: 0;
  transform: translateY(20px);
  isolation: isolate;
}

.blog-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(11, 26, 31, 0.75) 0%, rgba(0, 168, 107, 0.3) 100%);
  border-radius: var(--radius-lg);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
  text-align: center;
  color: white;
  padding: 20px;
}

.hero-content .category-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(4px);
  padding: 6px 18px;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 1rem;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.hero-content h1 a {
  color: white;
  text-decoration: none;
  transition: color 0.2s;
}

.hero-content h1 a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.hero-content p {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-content .meta {
  display: flex;
  justify-content: center;
  gap: 24px;
  font-size: 0.9rem;
  opacity: 0.85;
}

.hero-content .meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* ================================================================
   CATEGORIES
   ================================================================ */

.blog-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.blog-categories ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-categories li {
  margin: 0;
}

.blog-categories a {
  display: inline-block;
  padding: 10px 24px;
  background: var(--surface);
  border-radius: 40px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.25s var(--ease);
  box-shadow: var(--shadow-sm);
}

.blog-categories a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.blog-categories a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ================================================================
   FEATURED POSTS (grid)
   ================================================================ */

.featured-posts {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}

.featured-posts h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.featured-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s var(--spring);
  border: 1px solid var(--border);
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.featured-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--primary-light);
}

.card-content {
  padding: 24px;
}

.card-content .category {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 14px;
  border-radius: 30px;
  margin-bottom: 12px;
}

.card-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 10px;
}

.card-content h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.card-content h3 a:hover {
  color: var(--primary);
}

.card-content p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 14px;
}

.card-content .meta {
  color: var(--text-tertiary);
  font-size: 0.85rem;
  display: flex;
  gap: 16px;
}

/* ================================================================
   BLOG GRID (pagination)
   ================================================================ */

.post-grid {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 28px;
}

.grid-item {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.35s var(--spring);
  border: 1px solid var(--border);
}

.grid-item:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.grid-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: var(--primary-light);
}

.item-content {
  padding: 22px;
}

.item-content .category {
  display: inline-block;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 30px;
  margin-bottom: 10px;
}

.item-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 8px;
}

.item-content h3 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s;
}

.item-content h3 a:hover {
  color: var(--primary);
}

.item-content p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 12px;
}

.item-content .meta {
  color: var(--text-tertiary);
  font-size: 0.8rem;
  display: flex;
  gap: 12px;
}

/* ----- Pagination ----- */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.pagination a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: scale(1.05);
}

.pagination a.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* ================================================================
   POPULAR POSTS
   ================================================================ */

.popular-posts {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
}

.popular-posts h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text-primary);
}

.popular-posts ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.popular-posts li {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease);
  border: 1px solid var(--border);
}

.popular-posts li:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.popular-posts a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 500;
  gap: 12px;
}

.popular-posts a .views {
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 2px 12px;
  border-radius: 30px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ================================================================
   NEWSLETTER
   ================================================================ */

.newsletter {
  max-width: 720px;
  margin: 50px auto 60px;
  padding: 0 24px;
}

.newsletter .newsletter-inner {
  background: var(--surface);
  padding: 48px 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  text-align: center;
  border: 1px solid var(--border);
}

.newsletter h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.newsletter p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 28px;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 14px 20px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text-primary);
  transition: all 0.2s;
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(0, 168, 107, 0.1);
}

.newsletter-form button {
  padding: 14px 32px;
  background: var(--primary-gradient);
  border: none;
  border-radius: 50px;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 168, 107, 0.25);
  white-space: nowrap;
}

.newsletter-form button:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 168, 107, 0.35);
}

.newsletter-form button:active {
  transform: scale(0.96);
}

.newsletter-message {
  margin-bottom: 16px;
  padding: 10px 18px;
  border-radius: 40px;
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 500;
  display: inline-block;
}

/* ================================================================
   ANIMATIONS
   ================================================================ */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .blog-hero,
  .blog-page-header,
  .featured-card,
  .blog-card,
  .popular-card,
  .newsletter-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 768px) {
  .blog-hero {
    padding: 40px 20px 30px;
    min-height: 260px;
  }

  .hero-content h1 {
    font-size: 1.8rem;
  }

  .hero-content .meta {
    flex-wrap: wrap;
    gap: 12px;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }

  .grid-container {
    grid-template-columns: 1fr;
  }

  .popular-posts ul {
    grid-template-columns: 1fr;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form button {
    width: 100%;
  }

  .newsletter .newsletter-inner {
    padding: 32px 20px;
  }

  .pagination a {
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .blog-categories {
    gap: 8px;
  }

  .blog-categories a {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .featured-card img,
  .grid-item img {
    height: 160px;
  }

  .card-content,
  .item-content {
    padding: 18px;
  }
}

/* ================================================================
   UTILITY – touch targets & focus
   ================================================================ */

.read-more-btn,
.newsletter-button,
.blog-categories a,
.pagination a {
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
    </style>