 /* ===== styles.css ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f4f7fa;
  color: #333;
  line-height: 1.6;
}

header {
  background: linear-gradient(135deg, #1e3c72, #2a5298);
  color: white;
  padding: 2rem 1rem;
  text-align: center;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.search-container {
  max-width: 600px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.search-bar {
  display: flex;
  background: white;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.search-bar input {
  flex: 1;
  border: none;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  outline: none;
}

.search-bar button {
  background: #2a5298;
  color: white;
  border: none;
  padding: 0 1.5rem;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.3s;
}

.search-bar button:hover {
  background: #1e3c72;
}

.categories {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.category-btn {
  background: white;
  border: 2px solid #ddd;
  padding: 0.8rem 1.5rem;
  border-radius: 30px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
  background: #2a5298;
  color: white;
  border-color: #2a5298;
}

.blog-section {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.article-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: none;
}

.article-card.visible {
  display: block;
}

.article-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
}

.article-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-content {
  padding: 1.5rem;
}

.article-content h3 {
  font-size: 1.4rem;
  margin-bottom: 0.8rem;
  color: #1e3c72;
}

.article-content p {
  margin-bottom: 1rem;
  color: #555;
}

.read-more {
  display: inline-block;
  background: #2a5298;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: background 0.3s;
}

.read-more:hover {
  background: #1e3c72;
}

footer {
  background: #1e3c72;
  color: white;
  text-align: center;
  padding: 2rem 1rem;
  margin-top: 3rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }

  .categories {
    flex-direction: column;
    align-items: center;
  }

  .search-bar input {
    font-size: 1rem;
    padding: 0.9rem 1.2rem;
  }
}
/* Make sure new cards look consistent */
.article-card {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

.article-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Better spacing on mobile */
@media (max-width: 768px) {
  .categories {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .category-btn {
    padding: 8px 14px;
    font-size: 0.9rem;
  }
}

/* Optional: hover effect on cards */
.article-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.12);
  transition: all 0.3s ease;
}