/* CARD DESIGN */
.course-card {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: 0.4s;
  position: relative;
  cursor: pointer;
  height: 100%; /* 🔥 FIX */
  display: flex;
  flex-direction: column;
}

/* IMAGE FIX (BEST HYBRID) */
.card-img {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  overflow: hidden;
}

.card-img img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* 🔥 FULL IMAGE FIX */
  transition: 0.5s;
}

/* CONTENT */
.card-content {
  padding: 15px;
  color: var(--brand-blue);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* TITLE FIX */
.course-title {
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* max 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px; /* 🔥 equal height */
}

/* TEXT */
.card-content span {
  font-size: 14px;
}

/* HOVER */
.course-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 255, 255, 0.3);
}

.course-card:hover img {
  transform: scale(1.05);
}

/* GLOW BORDER */
.course-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 2px;
  background: linear-gradient(45deg, #00f2fe, #4facfe, #00f2fe);
  -webkit-mask: 
    linear-gradient(#000 0 0) content-box, 
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* SLIDER */
.course-wrapper {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  gap: 20px;
}

.course-wrapper::-webkit-scrollbar {
  display: none;
}

.course-item {
  flex: 0 0 calc((100% - 60px) / 4);
}

.search-box
{
  width:50%;
  margin: 10px auto;
}

@media (max-width: 768px) {
  .course-item {
    flex: 0 0 100%;
  }
  .search-box
{
  width:100%;
}

}

/* ARROWS */
.slider-container {
  position: relative;
}

.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  padding: 12px 16px;
  font-size: 20px;
  cursor: pointer;
  border-radius: 50%;
}

.arrow.left { left: -10px; }
.arrow.right { right: -10px; }

.arrow:hover {
  background: var(--brand-yellow);
  color: black;
}

