/* ============================================================
   FORJANDOPERU COURSES.CSS
   Catálogo de Cursos + Curso Individual
   ============================================================ */

/* ============================================================
   1. CATÁLOGO DE CURSOS — Hero Banner
   ============================================================ */
.forjandoperu-courses-catalog #primary {
  padding: 0;
  background: var(--color-gray, #f4f7f9);
}

.forjandoperu-catalog-hero {
  background:
    radial-gradient(1100px 520px at 50% -10%, rgba(0,180,105,0.18) 0%, rgba(0,180,105,0) 60%),
    linear-gradient(160deg, #00405f 0%, var(--color-primary, #003c5a) 45%, var(--color-primary-dark, #00293f) 100%);
  padding: 92px 40px 84px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;

  /* Full-bleed: rompe el contenedor padre */
  width: 100vw;
  max-width: 1920px;
  margin-left: calc(50% - 50vw);
}

/* Acento verde inferior */
.forjandoperu-catalog-hero::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-secondary, #00b469), #00d986);
  pointer-events: none;
}

.forjandoperu-catalog-hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
}

/* Eyebrow */
.forjandoperu-hero-eyebrow {
  display: inline-block;
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #6fe3b0;
  background: rgba(0,180,105,0.12);
  border: 1px solid rgba(0,180,105,0.35);
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}

.forjandoperu-catalog-hero h1 {
  color: #fff;
  font-family: var(--font-head, 'Montserrat', sans-serif);
  font-size: 2.9rem;
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}

.forjandoperu-catalog-hero p.subtitle {
  color: rgba(255,255,255,0.82);
  font-size: 1.15rem;
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto 30px;
}

/* Badges de confianza */
.forjandoperu-hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin-top: 26px;
}
.forjandoperu-hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.9);
  font-weight: 500;
}
.forjandoperu-hero-badges span svg { color: var(--color-secondary, #00b469); }

/* Search Bar */
.forjandoperu-search-bar {
  display: flex;
  max-width: 500px;
  margin: 0 auto;
  background: #fff;
  border-radius: 50px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.forjandoperu-search-bar input {
  flex: 1;
  border: none;
  padding: 14px 24px;
  font-size: 0.95rem;
  color: var(--color-text, #333d4b);
  outline: none;
}

.forjandoperu-search-bar button {
  background: var(--color-secondary, #00b469);
  border: none;
  padding: 14px 24px;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 0.9rem;
}

.forjandoperu-search-bar button:hover {
  background: var(--color-secondary-dark, #009955);
}

/* ============================================================
   2. CATÁLOGO — Filtros por Categoría
   ============================================================ */
.forjandoperu-filters {
  background: #fff;
  /* padding horizontal dinámico: alinea el contenido al mismo grid de 1280px que las cards */
  padding: 16px max(40px, calc((100% - 1280px) / 2));
  border-bottom: 1px solid var(--color-gray-mid, #e3e8ec);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  position: sticky;
  top: var(--header-height);
  z-index: 80;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.forjandoperu-filters .filter-label {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--color-text-light, #6b7a8d);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-right: 6px;
}

.forjandoperu-filter-btn {
  padding: 7px 18px;
  border-radius: 50px;
  border: 2px solid var(--color-gray-mid, #e3e8ec);
  background: transparent;
  color: var(--color-text, #333d4b);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
}

.forjandoperu-filter-btn:hover,
.forjandoperu-filter-btn.active {
  background: var(--color-primary, #003c5a);
  border-color: var(--color-primary, #003c5a);
  color: #fff;
}

/* ============================================================
   3. CATÁLOGO — Grid de Tarjetas de Cursos
   ============================================================ */
.forjandoperu-courses-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* xl desktop: 4 cols */
  gap: 28px;
}

@media (max-width: 1279px) {
  .forjandoperu-courses-grid {
    grid-template-columns: repeat(3, 1fr); /* desktop md: 3 cols */
  }
}

/* Tarjeta de Curso */
.forjandoperu-course-card {
  background: #fff;
  border-radius: var(--radius-card, 12px);
  overflow: hidden;
  box-shadow: var(--shadow-card, 0 4px 20px rgba(0,60,90,0.10));
  transition: var(--transition, all 0.25s ease);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}

.forjandoperu-course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover, 0 8px 32px rgba(0,60,90,0.20));
}

/* Imagen de la tarjeta */
.forjandoperu-card-image {
  position: relative;
  width: 100%;
  padding-top: 57.89%; /* 380x220 ratio */
  overflow: hidden;
  background: var(--color-gray, #f4f7f9);
}

.forjandoperu-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.forjandoperu-course-card:hover .forjandoperu-card-image img {
  transform: scale(1.05);
}

/* Badge de categoría sobre imagen */
.forjandoperu-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-secondary, #00b469);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.forjandoperu-card-badge.enrolled {
  background: var(--color-primary, #003c5a);
}

/* Badge de estado (inscrito/completado) */
.forjandoperu-card-status {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.95);
  color: var(--color-primary, #003c5a);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 2;
}

.forjandoperu-card-status.completed {
  color: var(--color-secondary-dark, #009955);
}

/* Cuerpo de la tarjeta */
.forjandoperu-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.forjandoperu-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark, #022a40);
  margin-bottom: 8px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.forjandoperu-card-meta {
  display: flex;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--color-text-light, #6b7a8d);
  margin-bottom: 12px;
  flex-wrap: wrap;
}

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

.forjandoperu-card-meta span::before {
  font-size: 12px;
}

/* Descripción corta */
.forjandoperu-card-excerpt {
  font-size: 0.85rem;
  color: var(--color-text-light, #6b7a8d);
  line-height: 1.5;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

/* Barra de progreso en tarjeta */
.forjandoperu-card-progress {
  margin-bottom: 16px;
}

.forjandoperu-card-progress .progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text, #333d4b);
  margin-bottom: 6px;
}

.forjandoperu-progress-bar {
  background: var(--color-gray-mid, #e3e8ec);
  border-radius: 10px;
  height: 8px;
  overflow: hidden;
}

.forjandoperu-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary, #003c5a), var(--color-secondary, #00b469));
  border-radius: 10px;
  transition: width 0.5s ease;
  animation: progressEntry 0.8s ease forwards;
}

/* Footer de la tarjeta */
.forjandoperu-card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--color-gray, #f4f7f9);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.forjandoperu-card-price {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--color-primary, #003c5a);
}

.forjandoperu-card-price.free {
  color: var(--color-secondary-dark, #009955);
}

.forjandoperu-card-btn {
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--color-secondary, #00b469), var(--color-secondary-dark, #009955));
  color: #fff !important;
  border-radius: var(--radius-btn, 8px);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition, all 0.25s ease);
  display: inline-block;
}

.forjandoperu-card-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,180,105,0.40);
  color: #fff !important;
}

.forjandoperu-card-btn.enrolled {
  background: linear-gradient(135deg, var(--color-secondary, #00b469), var(--color-secondary-dark, #009955));
}

/* ============================================================
   4. CATÁLOGO — Paginación
   ============================================================ */
.forjandoperu-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 20px 40px 60px;
}

.forjandoperu-pagination a,
.forjandoperu-pagination span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 2px solid var(--color-gray-mid, #e3e8ec);
  color: var(--color-text, #333d4b);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: var(--transition, all 0.25s ease);
}

.forjandoperu-pagination a:hover,
.forjandoperu-pagination .current {
  background: var(--color-primary, #003c5a);
  border-color: var(--color-primary, #003c5a);
  color: #fff;
}

/* ============================================================
   5. CURSO INDIVIDUAL — Hero
   ============================================================ */
.forjandoperu-course-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  background: var(--color-dark, #022a40);
  overflow: hidden;
}

.forjandoperu-course-hero .hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.25;
}

.forjandoperu-course-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,60,90,0.9) 0%, rgba(6,125,147,0.85) 100%);
}

.forjandoperu-course-hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 60px 40px;
  width: 100%;
}

.forjandoperu-course-hero .hero-breadcrumb {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}

.forjandoperu-course-hero .hero-breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}

.forjandoperu-course-hero .hero-breadcrumb span {
  margin: 0 8px;
}

.forjandoperu-course-hero h1 {
  color: #fff;
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
  max-width: 720px;
  line-height: 1.2;
}

.forjandoperu-course-hero .hero-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.forjandoperu-course-hero .hero-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.forjandoperu-hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.forjandoperu-hero-badge {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
  color: #fff;
}

.forjandoperu-hero-badge.level {
  background: rgba(0,180,105,0.85);
}

/* ============================================================
   6. CURSO INDIVIDUAL — Layout principal + Sidebar
   ============================================================ */
.forjandoperu-single-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px;
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

/* Contenido principal */
.forjandoperu-course-main {
  background: #fff;
  border-radius: var(--radius-card, 12px);
  overflow: hidden;
  box-shadow: var(--shadow-card, 0 4px 20px rgba(0,60,90,0.10));
}

/* Tabs de navegación */
.forjandoperu-course-tabs {
  display: flex;
  border-bottom: 2px solid var(--color-gray-mid, #e3e8ec);
  padding: 0 28px;
  gap: 6px;
}

.forjandoperu-tab-btn {
  padding: 16px 20px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-light, #6b7a8d);
  cursor: pointer;
  transition: var(--transition, all 0.25s ease);
}

.forjandoperu-tab-btn.active,
.forjandoperu-tab-btn:hover {
  color: var(--color-primary, #003c5a);
  border-bottom-color: var(--color-primary, #003c5a);
}

.forjandoperu-tab-panel {
  padding: 28px;
  display: none;
}

.forjandoperu-tab-panel.active {
  display: block;
}

/* Curriculum / Temario */
.forjandoperu-curriculum-section {
  margin-bottom: 20px;
  border: 1px solid var(--color-gray-mid, #e3e8ec);
  border-radius: 8px;
  overflow: hidden;
}

.forjandoperu-curriculum-section-header {
  background: var(--color-gray, #f4f7f9);
  padding: 14px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-dark, #022a40);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.forjandoperu-curriculum-lesson {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--color-gray, #f4f7f9);
  font-size: 0.88rem;
  color: var(--color-text, #333d4b);
  text-decoration: none;
  transition: background 0.2s;
}

.forjandoperu-curriculum-lesson:hover {
  background: var(--color-gray, #f4f7f9);
}

.forjandoperu-lesson-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-gray-mid, #e3e8ec);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.forjandoperu-lesson-icon.completed {
  background: var(--color-primary, #003c5a);
  color: #fff;
}

/* Sidebar del curso */
.forjandoperu-course-sidebar {
  position: sticky;
  top: 90px;
}

.forjandoperu-sidebar-card {
  background: #fff;
  border-radius: var(--radius-card, 12px);
  box-shadow: var(--shadow-card, 0 4px 20px rgba(0,60,90,0.10));
  overflow: hidden;
}

.forjandoperu-sidebar-preview {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  background: var(--color-gray, #f4f7f9);
}

.forjandoperu-sidebar-body {
  padding: 24px;
}

.forjandoperu-sidebar-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-primary, #003c5a);
  margin-bottom: 16px;
  line-height: 1;
}

.forjandoperu-sidebar-price.free {
  color: var(--color-secondary-dark, #009955);
  font-size: 1.5rem;
}

.forjandoperu-enroll-btn {
  display: block;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-secondary, #00b469), var(--color-secondary-dark, #009955));
  color: #fff !important;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-btn, 8px);
  text-decoration: none;
  transition: var(--transition, all 0.25s ease);
  margin-bottom: 20px;
  border: none;
  cursor: pointer;
}

.forjandoperu-enroll-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,180,105,0.40);
  color: #fff !important;
}

.forjandoperu-enroll-btn.enrolled {
  background: linear-gradient(135deg, var(--color-secondary, #00b469), var(--color-secondary-dark, #009955));
}

/* Info list del sidebar */
.forjandoperu-course-info {
  list-style: none;
  padding: 0;
  margin: 0;
}

.forjandoperu-course-info li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--color-gray, #f4f7f9);
  font-size: 0.875rem;
}

.forjandoperu-course-info li:last-child {
  border: none;
}

.forjandoperu-info-label {
  color: var(--color-text-light, #6b7a8d);
  font-weight: 500;
}

.forjandoperu-info-value {
  color: var(--color-text, #333d4b);
  font-weight: 600;
}

/* ============================================================
   7. CONTENIDO NATIVO LEARNDASH/BUDDYBOSS (dentro de single-sfwd-courses)
      Estos estilos aplican colores de marca sobre el HTML que
      genera LearnDash + BuddyBoss via the_content()
   ============================================================ */

/* Wrapper contenedor */
.forjandoperu-learndash-content-wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 40px 60px;
}

/* Sidebar derecha de LearnDash */
.learndash-wrapper .ld-course-status,
.learndash-wrapper .ld-course-sidebar-trial,
.learndash-wrapper .ld-sidebar-wrapper,
.learndash-wrapper .bb-ld-course-intro-video,
.learndash-wrapper .ld-course-purchase-button {
  border-radius: var(--radius-card, 12px) !important;
  box-shadow: var(--shadow-card, 0 4px 20px rgba(0,60,90,0.10)) !important;
  overflow: hidden !important;
}

/* Botón principal de inscripción / ingreso */
.learndash-wrapper .btn-join,
.learndash-wrapper .ld-button,
.learndash-wrapper input[type="submit"],
.learndash-wrapper .learndash_checkout_button,
.learndash-wrapper .bb-ld-button {
  background: linear-gradient(135deg, var(--color-primary, #003c5a), var(--color-primary-dark, #00293f)) !important;
  border: none !important;
  border-radius: var(--radius-btn, 8px) !important;
  color: #fff !important;
  font-weight: 700 !important;
  padding: 12px 24px !important;
  font-size: 0.95rem !important;
  transition: var(--transition, all 0.25s ease) !important;
  box-shadow: 0 4px 14px rgba(0,60,90,0.3) !important;
  width: 100% !important;
  text-align: center !important;
}

.learndash-wrapper .btn-join:hover,
.learndash-wrapper .ld-button:hover {
  background: linear-gradient(135deg, var(--color-primary-dark, #00293f), var(--color-primary, #003c5a)) !important;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,60,90,0.4) !important;
}

/* Tabla de curriculum (lista de lecciones) */
.learndash-wrapper .ld-item-list-heading,
.learndash-wrapper .ld-section-item,
.learndash-wrapper .ld-accordion-heading {
  background: var(--color-gray, #f4f7f9) !important;
  border-radius: 8px 8px 0 0 !important;
  font-weight: 700 !important;
  color: var(--color-dark, #022a40) !important;
  border-left: 4px solid var(--color-primary, #003c5a) !important;
}

.learndash-wrapper .ld-item-list-item:hover {
  background: rgba(0,60,90,0.04) !important;
}

/* Icono check de lección completada — solo el ícono, no el texto del badge */
.learndash-wrapper .ld-icon-checkmark,
.learndash-wrapper .ld-status-complete .ld-icon {
  color: var(--color-secondary-dark, #009955) !important;
}

/* Badge "Completado" — texto blanco sobre fondo secundario verde */
.learndash-wrapper .ld-status-complete {
  color: #fff !important;
}

/* Barra de progreso */
.learndash-wrapper .ld-progress-bar-percentage {
  background: linear-gradient(90deg, var(--color-primary, #003c5a), var(--color-secondary, #00b469)) !important;
  border-radius: 10px !important;
}

/* Precio */
.learndash-wrapper .ld-course-price {
  color: var(--color-primary, #003c5a) !important;
  font-weight: 800 !important;
  font-size: 1.4rem !important;
}

/* Card "No estás inscrito" */
.learndash-wrapper .ld-course-status-not-enrolled,
.learndash-wrapper .learndash-course-status {
  border-top: 4px solid var(--color-primary, #003c5a) !important;
}

/* Estado "Inscrito" badge */
.learndash-wrapper .ld-badge-enrollment-status {
  background: var(--color-secondary, #00b469) !important;
  color: #fff !important;
  border-radius: 20px !important;
  font-weight: 700 !important;
  font-size: 12px !important;
  padding: 3px 12px !important;
}

/* Tabs de LearnDash */
.learndash-wrapper .ld-tabs-navigation .ld-tab {
  border-radius: 6px 6px 0 0 !important;
  font-weight: 600 !important;
  transition: var(--transition, all 0.25s ease) !important;
}

.learndash-wrapper .ld-tabs-navigation .ld-tab.ld-active,
.learndash-wrapper .ld-tabs-navigation .ld-tab:hover {
  color: var(--color-primary, #003c5a) !important;
  border-bottom-color: var(--color-primary, #003c5a) !important;
}

/* ============================================================
   8. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .forjandoperu-single-layout {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .forjandoperu-course-sidebar {
    position: static;
  }
  .forjandoperu-courses-grid {
    padding: 24px;
    grid-template-columns: repeat(2, 1fr); /* tablet: 2 cols */
    gap: 22px;
  }
}

@media (max-width: 768px) {
  /* Banner reducido en móvil — el cliente lo pidió, ocupa menos
     pantalla y los cursos aparecen más rápido. */
  .forjandoperu-catalog-hero {
    padding: 24px 16px 22px;
  }
  .forjandoperu-catalog-hero h1 {
    font-size: 1.4rem;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
  }
  .forjandoperu-catalog-hero p.subtitle {
    font-size: 0.88rem;
    margin-bottom: 14px;
  }
  .forjandoperu-search-bar input {
    padding: 11px 18px;
    font-size: 0.88rem;
  }
  .forjandoperu-search-bar button {
    padding: 11px 18px;
    font-size: 0.85rem;
  }

  .forjandoperu-filters {
    padding: 10px 16px;
    gap: 6px;
  }
  .forjandoperu-filters .filter-label { display: none; } /* ahorra espacio */
  .forjandoperu-filter-btn {
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  .forjandoperu-course-hero .hero-content {
    padding: 30px 16px;
  }
  .forjandoperu-course-hero h1 {
    font-size: 1.4rem;
  }

  /* Mobile: 2 columnas, cards más densas (no 1 columna).
     Cliente quiere ver varios cursos sin scroll largo. */
  .forjandoperu-courses-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 14px 12px;
  }
  .forjandoperu-card-body { padding: 12px 14px; }
  .forjandoperu-card-title {
    font-size: 0.88rem;
    line-height: 1.25;
  }
  .forjandoperu-card-meta {
    font-size: 0.72rem;
    gap: 8px;
  }
  .forjandoperu-card-excerpt { display: none; } /* en móvil quita el excerpt para card más compacta */
  .forjandoperu-card-footer {
    padding: 8px 14px 12px;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .forjandoperu-card-price { font-size: 0.85rem; }
  .forjandoperu-card-btn { font-size: 0.78rem; padding: 6px 12px; }
}

@media (max-width: 380px) {
  /* Phones muy pequeños: 1 columna para no sentirse cramped */
  .forjandoperu-courses-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .forjandoperu-card-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .forjandoperu-card-footer { flex-direction: row; align-items: center; }
}

@keyframes progressEntry {
  from { width: 0 !important; }
  to { width: var(--progress-width, 100%); }
}

/* ============================================================
   CURSO INDIVIDUAL — REDISEÑO (cg-*)
   ============================================================ */

/* ─── Hero ─── */
.cg-single-course {
  background: var(--color-gray);
}

.cg-hero {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.cg-hero--gradient {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, #0bb5bc 100%);
}

.cg-hero--img {
  background: var(--color-dark);
}

.cg-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.22;
}

.cg-hero__overlay {
  position: absolute;
  inset: 0;
  background: none;
}

.cg-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 56px 40px;
}

/* Breadcrumb */
.cg-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 16px;
}
.cg-breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
}
.cg-breadcrumb a:hover { color: #fff; }
.cg-breadcrumb__sep { opacity: 0.5; }

/* Badges */
.cg-hero__badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cg-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.cg-badge--cat      { background: rgba(255,255,255,0.2); color: #fff; }
.cg-badge--level    { background: rgba(0,180,105,0.85); color: #fff; }
.cg-badge--done     { background: rgba(86,192,42,0.85);  color: #fff; }
.cg-badge--enrolled { background: rgba(255,255,255,0.25); color: #fff; }

/* Título */
.cg-hero__title {
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  max-width: 740px;
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}

/* Excerpt */
.cg-hero__excerpt {
  color: rgba(255,255,255,0.85);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 620px;
  margin: 0 0 20px;
}

/* Meta chips */
.cg-hero__meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.cg-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.92);
  font-weight: 500;
}
.cg-meta-chip__avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
}

/* ─── Barra de fechas/modalidad en hero ─── */
.cg-hero__infobar {
  display: flex;
  gap: 0;
  margin-top: 20px;
  background: rgba(0,0,0,0.35);
  border-radius: 10px;
  overflow: hidden;
  max-width: 480px;
  border: 1px solid rgba(255,255,255,0.12);
}
.cg-infobar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 16px;
  gap: 3px;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.cg-infobar-item:last-child {
  border-right: none;
}
.cg-infobar-item__label {
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.55);
}
.cg-infobar-item__value {
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
  line-height: 1.3;
}

/* ─── Layout principal ─── */
.cg-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 40px 60px;
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
  align-items: start;
}

/* ─── Contenido main ─── */
.cg-main {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

/* Tabs */
.cg-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-gray-mid);
  padding: 0 28px;
}
.cg-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 15px 18px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-light);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.cg-tabs .cg-tab:hover,
.cg-tabs .cg-tab.is-active {
  color: #003c5a !important;
  background: transparent !important;
  border-bottom-color: #003c5a !important;
}
.cg-tab__badge {
  background: #e3e8ec;
  color: #333d4b;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1.4;
}
.cg-tabs .cg-tab.is-active .cg-tab__badge {
  background: #003c5a !important;
  color: #fff !important;
}

/* Panels */
.cg-panel {
  display: none;
  padding: 28px;
}
.cg-panel.is-active {
  display: block;
  animation: cgFadeIn 0.2s ease;
}
@keyframes cgFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Descripción */
.cg-description {
  line-height: 1.75;
  color: var(--color-text);
  font-size: 0.95rem;
}
.cg-description p  { margin: 0 0 14px; }
.cg-description ul,
.cg-description ol { padding-left: 20px; margin-bottom: 14px; }
.cg-description li { margin-bottom: 6px; }
.cg-description h2,
.cg-description h3 { color: var(--color-dark); font-weight: 700; margin: 24px 0 10px; }

/* Curriculum */
.cg-curriculum {}
.cg-curriculum__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--color-gray);
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 0.88rem;
  color: var(--color-dark);
}
.cg-curriculum__duration {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--color-text-light);
  font-weight: 500;
}

/* Lección row */
.cg-lesson {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid var(--color-gray);
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.88rem;
  transition: background 0.15s;
  border-radius: 0;
}
a.cg-lesson:hover { background: rgba(0,60,90,0.04); }
.cg-lesson.is-locked { cursor: default; opacity: 0.75; }

.cg-lesson__num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--color-gray-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--color-text-light);
  flex-shrink: 0;
}
.cg-lesson.is-done .cg-lesson__num {
  background: var(--color-primary);
  color: #fff;
}

.cg-lesson__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--color-text-light);
}
.cg-lesson.is-done .cg-lesson__icon {
  background: rgba(0,60,90,0.12);
  color: var(--color-primary);
}

.cg-lesson__title {
  flex: 1;
  font-weight: 500;
}
.cg-lesson.is-done .cg-lesson__title {
  color: var(--color-text-light);
  text-decoration: line-through;
}

.cg-lesson__lock {
  font-size: 0.75rem;
  color: var(--color-text-light);
  background: var(--color-gray);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Separador antes del quiz */
.cg-quiz-divider {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: rgba(0,180,105,0.08);
  border-top: 1px solid var(--color-gray);
  border-left: 3px solid var(--color-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-secondary-dark);
}

/* Lección tipo quiz */
.cg-lesson--quiz .cg-lesson__num {
  background: rgba(0,180,105,0.15);
  color: var(--color-secondary-dark);
  width: 28px;
  height: 28px;
}
.cg-lesson--quiz .cg-lesson__title {
  font-weight: 600;
  color: var(--color-dark);
}

/* Instructor tab */
/* ─── Panel Ponentes ─── */
.cg-ponentes {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.cg-ponente {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-gray-mid);
}
.cg-ponentes .cg-ponente:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.cg-ponente__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  flex-shrink: 0;
}
.cg-ponente__name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 2px;
}
.cg-ponente__cargo {
  font-size: 0.82rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 10px;
}
.cg-ponente__bio {
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--color-text);
  margin: 0;
  position: relative;
}
.cg-ponente__bio.is-collapsed {
  max-height: 4.95em; /* ~3 líneas */
  overflow: hidden;
}
.cg-ponente__bio.is-collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2em;
  background: linear-gradient(transparent, #fff);
}
.cg-ponente__bio-toggle {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-primary);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: underline;
}
.cg-ponente__bio-toggle:hover {
  color: var(--color-primary-dark);
}
.cg-ponente__bio p {
  margin: 0 0 8px;
}

.cg-empty-msg {
  color: var(--color-text-light);
  font-size: 0.9rem;
  text-align: center;
  padding: 16px 0;
}

/* ─── Sidebar ─── */
.cg-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cg-sidebar__card {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.cg-sidebar__img img {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
}

.cg-sidebar__body {
  padding: 24px;
}

/* Precio */
.cg-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 18px;
  color: var(--color-primary);
}
.cg-price.is-free .cg-price__label {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-secondary-dark);
}
.cg-price__currency {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-light);
}
.cg-price__amount {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--color-primary);
}

/* Progreso sidebar */
.cg-sidebar__progress {
  margin-bottom: 16px;
}
.cg-sidebar__progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-bottom: 7px;
}
.cg-sidebar__progress-row strong {
  color: var(--color-primary);
}
.cg-pbar {
  height: 8px;
  background: var(--color-gray-mid);
  border-radius: 10px;
  overflow: hidden;
}
.cg-pbar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
  border-radius: 10px;
  transition: width 0.6s ease;
}

/* CTA button */
.cg-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark));
  color: #fff !important;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-btn);
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 20px;
  text-align: center;
}
.cg-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,180,105,0.4);
  color: #fff !important;
}

/* Precio subtexto */
.cg-price__sub {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-light);
  margin-top: 2px;
}
.cg-price.is-free .cg-price__sub { color: rgba(86,192,42,0.8); }

/* Botón CTA outline (ya tengo cuenta) */
.cg-cta--outline {
  background: transparent !important;
  border: 2px solid rgba(0,60,90,0.4);
  color: var(--color-primary) !important;
  box-shadow: none;
  margin-top: 8px;
}
.cg-cta--outline:hover {
  background: rgba(0,60,90,0.06) !important;
  border-color: var(--color-primary);
  box-shadow: none;
  color: var(--color-primary) !important;
}

/* Enroll shortcode wrapper */
.cg-enroll {
  margin-bottom: 20px;
}
.cg-enroll .btn-join,
.cg-enroll .ld-button,
.cg-enroll input[type="submit"] {
  display: block;
  width: 100%;
  padding: 14px !important;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-dark)) !important;
  color: #fff !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  border: none !important;
  border-radius: var(--radius-btn) !important;
  text-align: center !important;
  cursor: pointer;
  transition: var(--transition) !important;
}

/* Includes list */
.cg-includes {
  border-top: 1px solid var(--color-gray);
  padding-top: 18px;
  margin-top: 4px;
}
.cg-includes__title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  margin-bottom: 12px;
}
.cg-includes ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cg-includes li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.875rem;
  color: var(--color-text);
}
.cg-includes li svg { color: var(--color-primary); flex-shrink: 0; }

/* Instructor mini */
.cg-sidebar__instructor {
  background: #fff;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.cg-sidebar__instructor img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-primary);
  flex-shrink: 0;
}
.cg-sidebar__instr-role {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-light);
  font-weight: 600;
}
.cg-sidebar__instr-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-top: 2px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .cg-layout {
    grid-template-columns: 1fr;
    padding: 24px 20px 48px;
  }
  .cg-sidebar {
    position: static;
    order: -1; /* Sidebar arriba en mobile */
  }
}

@media (max-width: 768px) {
  .cg-hero__inner { padding: 40px 20px; }
  .cg-hero__title { font-size: 1.5rem; }
  .cg-hero { min-height: 320px; }
  .cg-tabs { padding: 0 16px; overflow-x: auto; }
  .cg-panel { padding: 20px 16px; }
}
