.container-fluid { 
  width: 100%;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  background: linear-gradient(to top, #b4d9e7ff, #fff);
  padding: 20px; /* prevent content from touching screen edge */
  box-sizing: border-box;
}

.card1 {
  position: relative;
  width: 18.6rem;
  margin: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
      background: linear-gradient(to right, #b4d9e7ff, #fff);
}

.card1:hover {
  transform: scale(1.05);
}

.card1 .image-icon {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 20px;
  z-index: 2;
}

.card-img-top {
  width: 100%;
  aspect-ratio: 1/1; /* ensures consistent height */
  object-fit: cover;
  border-bottom: 1px solid #0d669aff;
  display: block;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  text-align: center;
}

.card-title h5 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

/* ✅ Responsive Fixes */
@media (max-width: 768px) {
  .card1 {
    width: 100%;
    max-width: 22rem;
  }
}

@media (max-width: 480px) {
  .card1 {
    width: 100%;
    margin: 10px 0;
  }

  .card-title h5 {
    font-size: 0.95rem;
  }
}
