/* Cursos View Styles */
.cursos-header {
  margin-bottom: 2rem;
  text-align: left;
}

.cursos-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.curso-filter-btn {
  background: rgba(30, 41, 59, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  transition: all var(--transition-fast);
}

.curso-filter-btn.active, .curso-filter-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.cursos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.curso-card {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--border-radius-lg);
  overflow: visible; /* Changed to visible for pop-out image */
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
  cursor: pointer;
  margin-top: 55px; /* Reduced space from 100px to make grid tighter while still allowing pop-out */
}

.curso-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  border-color: rgba(56, 189, 248, 0.3);
}

.curso-card-header {
  padding: 1.5rem;
  min-height: 160px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background-image: linear-gradient(rgba(10, 15, 30, 0.3), rgba(10, 15, 30, 0.9)), url('/assets/img/course_bg.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  border-top-left-radius: var(--border-radius-lg);
  border-top-right-radius: var(--border-radius-lg);
}

.curso-prof-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.curso-prof-img {
  position: absolute;
  right: 15%;
  bottom: -10px;
  height: 190px;
  width: auto;
  object-fit: contain;
  z-index: 2;
  filter: drop-shadow(0px 5px 10px rgba(0,0,0,0.5));
}

.curso-prof-name {
  font-weight: 700;
  color: white;
  font-size: 1.15rem;
  text-shadow: 0 2px 6px rgba(0,0,0,0.8);
  letter-spacing: 0.5px;
}

.curso-prof-label {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  margin-bottom: 2px;
}

.curso-year-badge {
  background: linear-gradient(135deg, var(--primary), #0D8ABC);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  z-index: 3;
}

.curso-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 3; /* Keep text above the image if it overlaps */
  border-bottom-left-radius: var(--border-radius-lg);
  border-bottom-right-radius: var(--border-radius-lg);
  background: inherit;
}

.curso-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.5rem;
}

.curso-description {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  flex-grow: 1;
}

.curso-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.curso-modules-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.curso-progress-container {
  width: 100%;
}

.curso-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.curso-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  overflow: hidden;
}

.curso-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.5s ease-out;
}

.curso-card-footer {
  padding: 1rem 1.5rem;
  background: rgba(0,0,0,0.2);
  text-align: center;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background var(--transition-fast);
}

.curso-card:hover .curso-card-footer {
  background: rgba(56, 189, 248, 0.1);
}
