/* ===== Tarjetas de cursos (imagen + overlay) ===== */
.imagen-container {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 20px;
}

.imagen-curso {
  width: 100%;
  height: 680px;
  object-fit: cover;
  transition: opacity 0.3s ease;
  border-radius: 10px;
  z-index: 0;
}

.imagen-container:hover .imagen-curso {
  opacity: 0.6;
}

/* Overlay centrado */
.cuadro-info {
  position: absolute;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 1;
  background: transparent; /* el color lo pone el tema */
  will-change: opacity;
}

.imagen-container:hover .cuadro-info {
  opacity: 1;
}

/* ===== Soporte de tema ===== */
.light-mode .cuadro-info {
  background-color: rgba(255, 255, 255, 0.88);
  color: #111827;
}

.dark-mode .cuadro-info {
  background-color: rgba(17, 24, 39, 0.88);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Colores internos en overlay */
.light-mode .cuadro-info .text-danger { color: #dc3545; }
.dark-mode  .cuadro-info .text-danger { color: #f87171; }

.dark-mode .cuadro-info .btn-danger { border-color: #fca5a5; }
.dark-mode .cuadro-info .btn-danger:hover { filter: brightness(1.1); }
