/* ===============================
   SECCIÓN CURSOS
================================ */

.courses-section {
  background: #f8fafc;
  padding: 4rem 1rem;
}

.courses-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.courses-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 800;
  color: #0f172a;
}

.courses-header p {
  color: #475569;
  margin-top: .5rem;
}

/* ===============================
   CARRUSEL
================================ */

.courses-carousel-wrapper {
  position: relative;
  max-width: 1200px;
  margin: auto;
  
}

.courses-carousel {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 1rem 0;
}

.courses-carousel::-webkit-scrollbar {
  display: none;
}

/* ===============================
   CARD CURSO
================================ */

.course-card {
  flex: 0 0 280px;
  background: #ffffff;
  border-radius: 18px;
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: 0 10px 30px rgba(0,0,0,.08);
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}

.course-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 45px rgba(0,0,0,.12);
}

/* ===============================
   IMAGEN
================================ */

.course-image {
  position: relative;
  background: #ffffff;
}

.course-image img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  padding: 1rem;
}

.course-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #6366f1;
  color: white;
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-weight: 600;
}

/* ===============================
   CONTENIDO
================================ */

.course-content {
  padding: 1.2rem;
  flex-grow: 1;
}

.course-category {
  font-size: .75rem;
  font-weight: 700;
  color: #6366f1;
}

.course-content h3 {
  font-size: 1rem;
  margin: .4rem 0;
  color: #0f172a;
}

.course-meta {
  display: flex;
  gap: 1rem;
  font-size: .8rem;
  color: #64748b;
  margin: .6rem 0;
}

.course-meta i {
  color: #6366f1;
}

.course-rating {
  font-size: .85rem;
  color: #facc15;
}

.course-rating span {
  color: #64748b;
  margin-left: .3rem;
}

/* ===============================
   FOOTER CARD
================================ */

.course-footer {
  padding: 1rem 1.2rem 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-course {
  background: #6366f1;
  color: white;
  padding: .45rem 1rem;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease;
}

.btn-course:hover {
  background: #4f46e5;
}

.course-price {
  font-weight: 800;
  color: #f97316;
}

/* ===============================
   BOTONES
================================ */

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: #0d48a1;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

.carousel-btn.left {
  left: -30px;
}

.carousel-btn.right {
  right: -30px;
}

.carousel-btn:hover {
  background: #6366f1;
}

/* ===============================
   RESPONSIVE
================================ */

@media (max-width: 768px) {
  .course-card {
    flex: 0 0 85%;
  }

  .carousel-btn {
    display: none;
  }
}
