:root {
  --primary: #007bff; /* Deep Blue */
  --accent: #00cc99; /* Bright Teal/Green */
  --white: #ffffff;
  --dark-blue: #0f172a;
  --text-dark: #1a2434;
  --text-light: #64748b;
  --light-bg: #f8fcfd;
  --card-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}
/* Base styles for sections */
.blog-section {
  padding: 6rem 5%;
  overflow: hidden;
}

/* Common Header Styles */
.blog-header {
  text-align: center;
  margin-bottom: 4rem;
}
.blog-header h1 {
  font-size: 3.5rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.blog-header p {
  font-size: 1.3rem;
  color: var(--text-light);
  max-width: 900px;
  margin: 0 auto;
}

/* ------------------------------------------- */
/* --- 1. FILTER & SEARCH BAR --- */
/* ------------------------------------------- */
.filter-bar-container {
  background-color: var(--white);
  padding: 20px 5%;
  border-bottom: 1px solid #e0e7ff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  position: sticky;
  top: 0;
  z-index: 10;
}
.filter-bar {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 20px;
  align-items: center;
}
.search-input {
  flex-grow: 1;
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s;
}
.search-input:focus {
  border-color: var(--primary);
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}
.filter-select {
  padding: 12px 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: var(--light-bg);
  color: var(--text-dark);
  font-size: 1rem;
  cursor: pointer;
}
.filter-select i {
  margin-right: 8px;
  color: var(--primary);
}

/* ------------------------------------------- */
/* --- 2. BLOG POSTS GRID --- */
/* ------------------------------------------- */
.blog-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 40px;
}
.blog-post-card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid #e6f0ff;
}
.blog-post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.blog-image-placeholder {
  width: 100%;
  height: 200px;
  background-color: var(--dark-blue);
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
}
.blog-image-placeholder.tcca {
  background-color: #00cc99;
}
.blog-image-placeholder.etp {
  background-color: #007bff;
}
.blog-image-placeholder.general {
  background-color: #ff9900;
}

.blog-content {
  padding: 25px;
}
.blog-tag {
  display: inline-block;
  background-color: var(--accent);
  color: var(--dark-blue);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 15px;
  text-transform: uppercase;
}
.blog-content h3 {
  font-size: 1.5rem;
  color: var(--text-dark);
  margin-bottom: 10px;
}
.blog-content p {
  font-size: 1rem;
  color: var(--text-light);
  margin-bottom: 20px;
  /* Limit description to 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.read-more-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s;
}
.read-more-link:hover {
  color: var(--accent);
}

/* ------------------------------------------- */
/* --- RESPONSIVENESS --- */
/* ------------------------------------------- */
@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-section {
    padding: 4rem 5%;
  }
}
