/* ================= ROOT VARIABLES ================= */
:root {
  /* Primary Colors */
  --primary-blue: #2563eb;
  --primary-dark: #1e40af;
  --accent-green: #22c55e;

  /* Backgrounds */
  --bg-body: #f4f4f9;
  --bg-card: #ffffff;
  --bg-dark: #0f172a;
  --bg-footer: #020617;

  /* Text */
  --text-main: #111827;
  --text-muted: #6b7280;
  --text-light: #f8fafc;

  /* Misc */
  --border-radius: 8px;
  --box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 5px;
}
/* ================= BLOG LIST ================= */
.blog-list {
  display: flex;
  flex-wrap: wrap; /* allow wrapping to multiple rows */
  gap: 20px;
  justify-content: flex-start; /* align cards to the left */
}

/* ================= BLOG ITEM ================= */
.blog-item {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  display: flex;
  flex-direction: column; /* image above content */
  gap: 15px;
  transition: transform 0.2s, box-shadow 0.2s;

  /* Adjust width for multiple cards per row */
  flex: 1 1 calc(33.333% - 20px); /* 3 cards per row with gap */
  max-width: calc(33.333% - 20px);
  box-sizing: border-box;
}

.blog-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ================= BLOG IMAGE ================= */
.blog-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

/* ================= BLOG CONTENT ================= */
.blog-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.blog-content h3 {
  margin: 0;
  font-size: 20px;
  color: var(--text-main);
}

.blog-content p {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

.blog-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ================= LEARN MORE BUTTON ================= */
.learn-more-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 15px;
  background-color: var(--primary-blue);
  color: var(--white);
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s;
}

.learn-more-btn:hover {
  background-color: var(--primary-dark);
}

/* ================= LIKE BUTTON ================= */
.like-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
}

.like-btn:hover {
  color: #ef4444; /* red on hover */
  transform: scale(1.05);
}

.like-btn.liked {
  color: #ef4444;
  font-weight: 600;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {
  .blog-list {
    flex-direction: column; /* stack vertically on small screens */
    gap: 10px;
  }

  .blog-item {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 1rem;
    padding-bottom: 1rem;
  }
}