/*
 * Course & Certification Cards - Unipegaso Design
 * Badge positioning: University badge TOP LEFT, Class badge BOTTOM LEFT
 * Design: square corners, thin border, white background
 */

/* ========================================
   COURSE CARD BASE
   ======================================== */
.cf-course-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #dee2e6;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  transition: all 0.2s ease;
  height: 100%;
}

.cf-course-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #adb5bd;
}

/* ========================================
   IMAGE WRAPPER & BADGES
   ======================================== */
.cf-card-image-wrapper {
  position: relative;
  width: 100%;
  height: 167px;
  overflow: hidden;
  background: #e9ecef;
}

.cf-course-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.cf-course-card:hover .cf-course-card-image {
  transform: scale(1.03);
}

/* University badge - TOP LEFT */
.cf-university-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  z-index: 2;
}

.cf-university-badge img {
  height: 24px;
  width: auto;
  display: block;
}

/* Class badge - BOTTOM LEFT */
.cf-course-badges {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.cf-badge-class {
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 10px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========================================
   CARD BODY
   ======================================== */
.cf-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Card title */
.cf-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 10px;
  color: #222;
  min-height: 40px;
}

.cf-card-title a {
  color: inherit;
  text-decoration: none;
}

.cf-card-title a:hover {
  color: #D1184F;
}

/* Metadata (duration, CFU, etc.) */
.cf-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  color: #666;
  font-size: 13px;
}

.cf-card-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cf-card-meta i {
  color: #D1184F;
  font-size: 12px;
}

/* ========================================
   PRICE SECTION - Unipegaso style (white bg)
   ======================================== */
.cf-card-price {
  background: #fff;
  color: #222;
  padding: 10px;
  border: 1px solid #dee2e6;
  border-radius: 0;
  text-align: center;
  margin-bottom: 12px;
}

.cf-card-price strong {
  display: inline;
  font-size: 18px;
  font-weight: 700;
  color: #D1184F;
}

.cf-card-price small {
  display: inline;
  font-size: 12px;
  color: #666;
  margin-left: 4px;
}

.cf-price-original {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
  display: inline;
  margin-left: 8px;
}

/* ========================================
   BUTTONS - Outline style, square corners
   ======================================== */
.cf-btn-primary {
  width: 100%;
  background: #fff;
  color: #D1184F;
  border: 2px solid #D1184F;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
}

.cf-btn-primary:hover {
  background: #D1184F;
  color: #fff;
  text-decoration: none;
}

.cf-btn-primary:active {
  transform: translateY(0);
}

.cf-btn-primary i {
  transition: transform 0.2s ease;
}

.cf-btn-primary:hover i {
  transform: translateX(4px);
}

/* ========================================
   CERTIFICATION CARD
   ======================================== */
.cf-certification-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #dee2e6;
  border-radius: 0;
  overflow: hidden;
  background: #fff;
  transition: all 0.2s ease;
  height: 100%;
}

.cf-certification-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: #adb5bd;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 767px) {
  .cf-card-image-wrapper {
    height: 180px;
  }

  .cf-card-title {
    font-size: 14px;
    min-height: auto;
  }

  .cf-card-meta {
    font-size: 12px;
  }

  .cf-university-badge {
    top: 8px;
    left: 8px;
    padding: 4px 8px;
  }

  .cf-university-badge img {
    height: 20px;
  }

  .cf-course-badges {
    bottom: 8px;
    left: 8px;
  }
}
