#course-container {
  height: 63vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  color: white;
  padding: 20px;
  flex-wrap: wrap;
  gap: 15px;
  overflow-y: auto;
  text-align: center;
}

.course-content {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  width: 100%;
  max-width: 1200px;
}

.course-container {
  background: linear-gradient(to top, #082c63, #082c63);
  border: 1px solid #ddd;
  width: 300px;
  height: 300px; /* Fixed height */
  padding: 15px;
  position: relative;
  overflow: hidden;
  text-align: left;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: flex-end; /* Align content to the bottom */
}

.course-container h2 {
  font-size: 2rem;
  margin-bottom: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: white; /* Title text is white */
}

.course-container p {
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 12px;
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  color: white; /* Description text is white */
}

.course-container::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80%; /* Height of the gradient */
  background: linear-gradient(to top, rgb(8, 47, 105), rgba(1, 15, 36, 0));
  pointer-events: none; /* Gradient doesn't block interactions */
}

.course-container button {
  z-index: 2;
  text-decoration: none;
  color: white;
  background-color: #002d57;
  padding: 10px;
  border: none;
  border-radius: 0; /* Sharp borders for the button */
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%; /* Make button span most of the card */
  transition: background-color 0.3s ease;
}

.course-container button:hover {
  background-color: #001f3b;
}

.course-container a {
  text-decoration: none;
  color: white;
}

.course-container a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  #course-container {
    padding: 10px;
  }

  .course-container {
    width: 220px;
    height: 280px;
    padding: 10px;
  }

  .course-container h2 {
    font-size: 1.5rem;
  }

  .course-container p {
    font-size: 0.85rem;
  }

  .course-container button {
    padding: 8px;
    font-size: 0.85rem;
  }
}
