body {
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to right, #f0f4f8, #e9eff5);
  margin: 0;
  padding: 0;
  color: #222;
}

header {
  background: linear-gradient(90deg, #1e3c72, #2a5298, #3f87a6);
  color: white;
  padding: 30px 15px;
  text-align: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
  border-bottom: 4px solid #e9eff5;
}

h1 {
  margin: 0;
  font-size: 2.8rem;
  letter-spacing: 1px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding: 25px 20px;
  gap: 20px;
}

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

.filters button {
  padding: 10px 18px;
  border: none;
  background: linear-gradient(to right, #d6e0f0, #f0f4fa);
  border-radius: 30px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.05);
}

.filters button:hover {
  background: linear-gradient(to right, #c1d6ea, #e6eff9);
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.filters button.active {
  background: linear-gradient(to right, #2a5298, #1e3c72);
  color: white;
  font-weight: bold;
  transform: scale(1.1);
}

input[type="text"] {
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid #ccc;
  width: 100%;
  max-width: 320px;
  transition: box-shadow 0.3s ease;
  font-size: 16px;
}

input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.2);
}

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

.card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease;
  display: block;
  /* important for JS */
}

.card:hover {
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 18px;
}

.card-content h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  color: #1e3c72;
}

.card-content p {
  margin: 6px 0;
  color: #555;
  line-height: 1.5;
}

.pagination {
  text-align: center;
  padding: 25px;
}

.pagination button {
  margin: 0 6px;
  padding: 8px 14px;
  border: 1px solid #2a5298;
  border-radius: 6px;
  background: transparent;
  color: #2a5298;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
}

.pagination button:hover {
  background: #2a5298;
  color: white;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.pagination button.active {
  background: #1e3c72;
  color: white;
}

/* ✅ Responsive Styling */
@media (max-width: 768px) {
  .controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .filters {
    justify-content: center;
    width: 100%;
  }

  input[type="text"] {
    width: 100%;
    max-width: 100%;
  }

  header h1 {
    font-size: 2rem;
  }
}