/* Shared Card Styles (Programs-style) */

/* Card container */
.program-card {
  background: #1a1a1a;
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.program-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Image */
.program-card__image-container {
  position: relative;
  height: 180px;
  overflow: hidden;
}

.program-card__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Hover overlay (for desktop templates) */
.program-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  gap: 10px;
}

.program-card:hover .program-card__overlay {
  opacity: 1;
}

.program-card:hover .program-card__image {
  transform: scale(1.05);
}

/* Content */
.program-card__content {
  padding: 20px;
}

.program-card__title {
  font-size: 1.2rem;
  margin: 0 0 10px 0;
  color: #fff;
  font-weight: 600;
}

.program-card__meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #888;
}

.program-card__category {
  color: #00ff9d;
  font-weight: 500;
}

.program-card__desc,
.program-card__description {
  color: #b0b0b0;
  font-size: 0.9rem;
  margin: 0.5rem 0 1rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.8em;
}

.program-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #666;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 15px;
  margin-top: 15px;
}

/* Buttons used on cards */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-size: 0.9rem;
}

.btn--primary {
  background: #00ff9d;
  color: #000;
}

.btn--primary:hover {
  background: #00e68a;
  transform: translateY(-2px);
}

.btn--secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn--secondary:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Backwards-compat: programs page uses .program-card__button */
.program-card__button {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  background: linear-gradient(45deg, #00ff9d, #00ccff);
  color: #000;
  text-decoration: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  text-align: center;
  border: none;
  cursor: pointer;
  width: 100%;
}

.program-card__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 255, 157, 0.3);
}

/* Mobile adjustments: compact programs-like cards */
@media (max-width: 767px) {
  .program-card {
    display: flex;
    flex-direction: row;
    padding: 15px;
    height: auto;
  }

  .program-card__image-container {
    width: 120px;
    height: 120px;
    min-width: 120px;
    margin-right: 15px;
    margin-bottom: 0;
  }

  .program-card__content {
    flex: 1;
    padding: 0;
  }

  .program-card__title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  .program-card__desc {
    display: none;
  }

  .program-card__footer {
    flex-direction: column;
    gap: 5px;
  }

  .program-card__meta-item {
    font-size: 0.7rem;
  }
}
