.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* default: 4 per row */
  gap: 15px;
  margin: 40px auto;
  padding: 0 10px;
  max-width: 1400px;   /* keeps grid centered */
  box-sizing: border-box;
}

/* Phone responsive: 2 cards per row */
@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Very small devices */
@media (max-width: 480px) {
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

/* Card styling */
.card {
  background: #fff;
  border-radius: 12px;
  padding: 15px;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  width: 100%;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 10px;
  display: block;
}

.card h3 {
  font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: 700;
  margin-bottom: 8px;
  color: #0b2c55;
}

.card p {
  font-size: clamp(0.7rem, 1.8vw, 0.95rem);
  color: #444;
  line-height: 1.5;
  margin-bottom: 12px;
}

.card a {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  color: #0b2c55;
  border: 2px solid #0b2c55;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: clamp(0.7rem, 1.6vw, 0.9rem);
  transition: all 0.3s ease;
}

.card a:hover {
  background: #0b2c55;
  color: #fff;
}

/* Animation */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-in-out;
}
.fade-up.show {
  opacity: 1;
  transform: translateY(0);
}
