/* public_html/assets/css/cursos.css */
/* Página: Cursos Gratuitos (cards accordion) */

.cursos-wrap{
  display:block;
  width:100%;
}

.cursos-head{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin: 8px 0 14px;
}

.cursos-title{
  margin:0;
  font-size: clamp(22px, 2.2vw, 34px);
  line-height:1.1;
  letter-spacing:-0.02em;
}

.cursos-subtitle{
  margin:6px 0 0;
  color:#4b5563;
  max-width: 860px;
}

.cursos-tools{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
}

.cursos-count{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:12px;
  background:#ffffff;
  border:1px solid rgba(15,23,42,0.10);
  box-shadow:0 6px 18px rgba(15,23,42,0.06);
  color:#0f172a;
  font-weight:600;
}

.cursos-count .dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  display:inline-block;
}

.cursos-search{
  width:min(520px, 100%);
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(15,23,42,0.14);
  background:#ffffff;
  box-shadow:0 6px 18px rgba(15,23,42,0.05);
  outline:none;
}

.cursos-search:focus{
  border-color: rgba(99,102,241,0.55);
  box-shadow:0 0 0 4px rgba(99,102,241,0.15);
}

.cursos-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:14px;
  margin-top: 10px;
}

@media (max-width: 1100px){
  .cursos-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px){
  .cursos-grid{ grid-template-columns: 1fr; }
}

/* Card accordion usando <details> */
.course-card{
  border-radius: 18px;
  border:1px solid rgba(15,23,42,0.12);
  background: rgba(255,255,255,0.72);
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
  overflow:hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.course-card:hover{
  transform: translateY(-2px);
  border-color: rgba(99,102,241,0.25);
  box-shadow: 0 16px 40px rgba(15,23,42,0.10);
}

.course-card > summary{
  list-style:none;
  cursor:pointer;
  padding:14px;
  display:grid;
  grid-template-columns: 84px 1fr;
  gap:12px;
  align-items:center;
}

.course-card > summary::-webkit-details-marker{ display:none; }

.course-cover{
  width:84px;
  height:84px;
  border-radius: 16px;
  background: #eef2ff;
  border:1px solid rgba(15,23,42,0.10);
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}

.course-cover img{
  width:100%;
  height:100%;
  object-fit: contain;
  background: #ffffff;
}

.course-main{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.course-title{
  margin:0;
  font-size: 18px;
  font-weight: 800;
  color:#0f172a;
  letter-spacing:-0.01em;
}

.course-sub{
  margin:0;
  color:#475569;
  font-size: 13px;
  line-height: 1.3;
}

.course-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-top:6px;
}

.course-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  background: linear-gradient(135deg, #ec4899, #a855f7);
  color:#fff;
  font-weight:800;
  text-decoration:none;
  border:1px solid rgba(255,255,255,0.15);
  box-shadow:0 10px 24px rgba(236,72,153,0.20);
  transition: filter .18s ease, transform .18s ease;
  white-space:nowrap;
}

.course-btn:hover{ filter: brightness(1.03); transform: translateY(-1px); }

.course-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#0f172a;
  font-weight:700;
  font-size: 12px;
  opacity: .8;
}

.course-toggle .chev{
  width:10px;
  height:10px;
  border-right:2px solid #0f172a;
  border-bottom:2px solid #0f172a;
  transform: rotate(45deg);
  transition: transform .18s ease;
  opacity:.75;
}

.course-card[open] .course-toggle .chev{
  transform: rotate(225deg);
}

.course-body{
  padding: 12px 14px 14px;
  border-top: 1px solid rgba(15,23,42,0.10);
  background: rgba(255,255,255,0.72);
}

.badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  border-radius:999px;
  font-size: 12px;
  font-weight:800;
  border:1px solid rgba(15,23,42,0.12);
  background:#fff;
  color:#0f172a;
}

.badge .b{
  width:8px;
  height:8px;
  border-radius:999px;
  display:inline-block;
  background:#94a3b8;
}

.badge.ok .b{ background:#22c55e; }
.badge.no .b{ background:#ef4444; }
.badge.dep .b{ background:#f59e0b; }

.course-section{
  margin-top:10px;
}

.course-section h4{
  margin:0 0 6px;
  font-size: 13px;
  color:#0f172a;
  letter-spacing:-0.01em;
}

.course-text{
  margin:0;
  color:#334155;
  line-height:1.4;
}

.course-muted{
  color:#64748b;
  font-size: 12px;
  margin-top:10px;
}

/* Estado “sem resultados” */
.cursos-empty{
  margin-top: 12px;
  padding: 14px;
  border-radius: 14px;
  background:#fff;
  border:1px dashed rgba(15,23,42,0.20);
  color:#334155;
}
