/*
 * =====================================================================
 * COLEGIO DE TERAPEUTAS Y ALQUIMISTAS
 * Dashboard del Estudiante — Estilos CSS
 * Version: 1.21 — 2026-04-10
 * =====================================================================
 *
 * CÓMO USAR:
 * Opción A: Guardar como /css/dashboard.css en tu child theme de Divi
 * Opción B: Pegar en Divi → Opciones del tema → CSS personalizado
 * Opción C: Usar en un bloque HTML personalizado de Divi (con <style>)
 *
 * Fuente: Nunito — ya incluida en Google Fonts
 * =====================================================================
 */

/* ── VARIABLES ─────────────────────────────────────────────────── */
.dashboard-page, .db-wrap *, .db-fm-wrap * {
  --teal:        #016d77;
  --teal-light:  #018a96;
  --teal-pale:   #e0f4f6;
  --purple:      #74117a;
  --purple-mid:  #aa59ae;
  --purple-pale: #f5e8f6;
  --white:       #ffffff;
  --bg:          #f4f6f9;
  --sidebar-bg:  #016d77;
  --card:        #ffffff;
  --text:        #1e2a2b;
  --text-muted:  #6b7d7e;
  --border:      #e0e7e8;
  --shadow:      0 2px 16px rgba(1,109,119,0.10);
  --radius:      14px;
  --font:        'Nunito', sans-serif;
}

/* ── RESET ─────────────────────────────────────────────────────── */
.db-wrap *, .db-wrap *::before, .db-wrap *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font);
}

/* ── LAYOUT PRINCIPAL ──────────────────────────────────────────── */
.db-wrap {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
  font-family: var(--font);
}

/* ── SIDEBAR ────────────────────────────────────────────────────── */
.db-sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.db-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex;
  align-items: center;
  gap: 12px;
}
.db-logo-icon {
  width: 48px; height: 48px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
  background: rgba(255,255,255,0.95);
  padding: 4px;
}
.db-logo-icon img {
  width: 100%; height: 100%; object-fit: contain;
}
.db-logo-text { color: var(--white); }
.db-logo-line {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  color: rgba(255,255,255,0.92);
  font-family: var(--font);
}

.db-nav { flex: 1; padding: 20px 16px; }

/* Selectores con .db-sidebar para ganarle la especificidad a Divi */
.db-sidebar .db-nav-label {
  font-size: 11px; font-weight: 700; letter-spacing: 1.2px;
  color: rgba(255,255,255,0.3) !important; text-transform: uppercase;
  padding: 0 8px; margin: 10px 0 4px;
}
.db-sidebar .db-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 14px; border-radius: 10px;
  color: rgba(255,255,255,0.92) !important; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .2s; margin-bottom: 1px;
  text-decoration: none !important;
}
.db-sidebar .db-nav-item:hover {
  background: rgba(255,255,255,0.07);
  color: #fff !important;
}
.db-sidebar .db-nav-item.active {
  background: rgba(255,255,255,0.22);
  color: #fff !important;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.db-sidebar .db-nav-icon { font-size: 18px; width: 22px; text-align: center; }
.db-sidebar .db-nav-badge {
  margin-left: auto; background: var(--purple-mid);
  color: white !important; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 20px;
}

.db-sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.db-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 10px;
  background: rgba(255,255,255,0.05);
}
.db-user-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--purple-mid));
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800; color: white; flex-shrink: 0;
}
.db-user-name { color: white; font-size: 14px; font-weight: 700; }
.db-user-role { color: rgba(255,255,255,0.4); font-size: 12px; }

/* ── MAIN AREA ─────────────────────────────────────────────────── */
.db-main {
  margin-left: 260px;
  flex: 1;
  min-height: 100vh;
}

/* ── TOP BAR ───────────────────────────────────────────────────── */
.db-topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 14px 32px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  /* Extiende la línea inferior por detrás del sidebar para evitar corte visual */
  margin-left: -260px;
  padding-left: calc(260px + 32px);
  box-sizing: border-box;
}
.db-topbar-left h1 { font-size: 22px; font-weight: 800; color: var(--text); }
.db-topbar-left p  { font-size: 14px; color: var(--text-muted); margin-top: 2px; }
.db-topbar-right   { display: flex; align-items: center; gap: 12px; }
.db-topbar-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; text-decoration: none;
}
.db-topbar-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--purple-mid));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; color: white; font-size: 14px;
}

/* ── CONTENT ───────────────────────────────────────────────────── */
.db-content { padding: 28px 32px; }

/* ── WELCOME BANNER ────────────────────────────────────────────── */
.db-welcome-banner {
  background: linear-gradient(135deg, var(--teal) 0%, #024d54 50%, var(--purple) 100%);
  border-radius: var(--radius);
  padding: 28px 32px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px;
  overflow: hidden; position: relative;
}
.db-welcome-banner::before {
  content: ''; position: absolute; top: -40px; right: 120px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.db-welcome-banner::after {
  content: ''; position: absolute; bottom: -60px; right: 40px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.db-welcome-text h2 { font-size: 24px; font-weight: 800; color: white; margin-bottom: 6px; }
.db-welcome-text p  { color: rgba(255,255,255,0.75); font-size: 15px; max-width: 400px; }
.db-welcome-cta {
  background: white; color: var(--teal);
  border: none; padding: 12px 24px;
  border-radius: 10px; font-size: 14px; font-weight: 800;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  transition: transform .2s; z-index: 1; position: relative;
  text-decoration: none; display: inline-block;
}
.db-welcome-cta:hover { transform: translateY(-2px); }

/* ── STAT CARDS ────────────────────────────────────────────────── */
.db-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 28px;
}
.db-stat-card {
  background: var(--card); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
}
.db-stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.db-stat-icon.teal   { background: var(--teal-pale); }
.db-stat-icon.purple { background: var(--purple-pale); }
.db-stat-icon.green  { background: #e8f5e9; }
.db-stat-icon.amber  { background: #fff8e1; }
.db-stat-num   { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.db-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 600; }

/* ── CONTINUE CARD ─────────────────────────────────────────────── */
.db-continue-card {
  background: linear-gradient(135deg, #e0f4f6, #f0e8f7);
  border: 1px solid var(--teal-pale); border-radius: var(--radius);
  padding: 20px; margin-bottom: 24px;
  display: flex; align-items: center; gap: 20px;
}
.db-continue-thumb {
  width: 80px; height: 80px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), var(--purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; overflow: hidden;
}
.db-continue-info    { flex: 1; }
.db-continue-label   { font-size: 12px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .8px; }
.db-continue-title   { font-size: 19px; font-weight: 800; color: var(--text); margin: 4px 0 8px; }
.db-continue-lesson  { font-size: 14px; color: var(--text-muted); margin-bottom: 10px; }
.db-progress-bar-wrap { background: rgba(1,109,119,0.15); border-radius: 20px; height: 8px; width: 100%; }
.db-progress-bar-fill { height: 8px; border-radius: 20px; min-width: 4px; }
.db-progress-bar-fill.teal   { background: linear-gradient(90deg, var(--teal), var(--teal-light)); }
.db-progress-bar-fill.purple { background: linear-gradient(90deg, var(--purple), var(--purple-mid)); }
.db-progress-bar-fill.green  { background: linear-gradient(90deg, #2e7d32, #43a047); }
.db-progress-label   { font-size: 11px; color: var(--text-muted); margin-top: 5px; }
.db-btn-continue {
  background: var(--teal); color: white;
  border: none; padding: 12px 22px; border-radius: 10px;
  font-size: 14px; font-weight: 800; cursor: pointer;
  white-space: nowrap; flex-shrink: 0;
  transition: background .2s; text-decoration: none;
}
.db-btn-continue:hover { background: var(--teal-light); color: white; }

/* ── GRIDS ─────────────────────────────────────────────────────── */
.db-grid-3 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px; margin-bottom: 24px;
}

/* ── SECTION CARD ──────────────────────────────────────────────── */
.db-section-card {
  background: var(--card); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); border: 1px solid var(--border);
}
.db-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.db-section-title    { font-size: 18px; font-weight: 800; color: var(--text); }
.db-section-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.db-btn-link {
  font-size: 14px; font-weight: 700; color: var(--teal);
  background: none; border: none; cursor: pointer; text-decoration: none;
}
.db-btn-link:hover { text-decoration: underline; }

/* ── PROGRESS RING ─────────────────────────────────────────────── */
.db-ring-wrap {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 16px; background: var(--bg); border-radius: 12px; margin-bottom: 16px;
}
.db-ring { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.db-ring svg { transform: rotate(-90deg); }
.db-ring-bg   { fill: none; stroke: var(--bg); stroke-width: 8; }
.db-ring-fill { fill: none; stroke-width: 8; stroke-linecap: round; }
.db-ring-fill.teal   { stroke: var(--teal); }
.db-ring-fill.purple { stroke: var(--purple-mid); }
.db-ring-text {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  font-size: 16px; font-weight: 800; color: var(--text);
}
.db-ring-title { font-size: 15px; font-weight: 700; color: var(--text); }
.db-ring-sub   { font-size: 13px; color: var(--text-muted); margin-top: 3px; }

/* ── COURSE LIST ───────────────────────────────────────────────── */
.db-course-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.db-course-item:last-child { border-bottom: none; }
.db-course-thumb {
  width: 54px; height: 54px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; background: var(--teal-pale);
}
.db-course-name { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.db-course-name a { color: var(--text); text-decoration: none; }
.db-course-name a:hover { color: var(--teal); }
.db-course-meta { font-size: 13px; color: var(--text-muted); }

/* ── BADGES ────────────────────────────────────────────────────── */
.badge {
  padding: 4px 10px; border-radius: 20px;
  font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.badge-green  { background: #e8f5e9; color: #2e7d32; }
.badge-teal   { background: var(--teal-pale); color: var(--teal); }
.badge-purple { background: var(--purple-pale); color: var(--purple); }
.badge-amber  { background: #fff8e1; color: #f57f17; }
.badge-red    { background: #fce4ec; color: #c62828; }
.badge-gray   { background: #f5f5f5; color: #757575; }

/* ── MEMBERSHIP CARD ───────────────────────────────────────────── */
.db-membership-card {
  background: linear-gradient(135deg, var(--purple) 0%, #9b0ea2 100%);
  border-radius: var(--radius); padding: 22px; color: white;
  position: relative; overflow: hidden;
}
.db-membership-card::before {
  content: ''; position: absolute; top: -30px; right: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(255,255,255,0.08);
}
.db-mem-label  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: .7; }
.db-mem-plan   { font-size: 20px; font-weight: 800; margin: 6px 0; }
.db-mem-status {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.15); border-radius: 20px;
  padding: 4px 12px; font-size: 11px; font-weight: 700;
}
.db-mem-status.active::before   { content: '●'; color: #69f0ae; }
.db-mem-status.inactive::before { content: '●'; color: #ef9a9a; }
.db-mem-divider { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 14px 0; }
.db-mem-row  { display: flex; justify-content: space-between; margin-bottom: 8px; }
.db-mem-key  { font-size: 12px; opacity: .7; }
.db-mem-val  { font-size: 13px; font-weight: 700; }
.db-btn-renew {
  display: block; width: 100%; margin-top: 16px;
  background: rgba(255,255,255,0.2); color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 10px; border-radius: 10px;
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: background .2s; text-align: center; text-decoration: none;
}
.db-btn-renew:hover { background: rgba(255,255,255,0.3); color: white; }

/* ── QUICK ACCESS ──────────────────────────────────────────────── */
.db-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.db-quick-btn {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  cursor: pointer; transition: all .2s; text-decoration: none;
}
.db-quick-btn:hover {
  background: var(--teal-pale); border-color: var(--teal);
  transform: translateY(-2px);
}
.db-qi { font-size: 24px; }
.db-ql { font-size: 13px; font-weight: 700; color: var(--text); text-align: center; }

/* ── CERTIFICATES ──────────────────────────────────────────────── */
.db-cert-toolbar {
  display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px;
}
.db-cert-search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 20px;
  padding: 7px 16px;
}
.db-cert-search-icon { font-size: 14px; }
.db-cert-search {
  border: none; background: transparent; outline: none;
  font-size: 13px; font-weight: 600; color: var(--text); flex: 1;
  font-family: var(--font);
}
.db-cert-search::placeholder { color: var(--text-muted); }
.db-cert-empty { font-size: 13px; color: var(--text-muted); padding: 12px 0; text-align: center; }


.db-cert-group-label {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted);
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.db-cert-group-label::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.db-cert-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.db-cert-item:last-child { border-bottom: none; }
.db-cert-icon {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.db-cert-icon--group  { background: linear-gradient(135deg, var(--teal-pale), var(--purple-pale)); }
.db-cert-icon--course { background: linear-gradient(135deg, var(--purple-pale), var(--teal-pale)); }
.db-cert-info { flex: 1; min-width: 0; }
.db-cert-type {
  font-size: 11px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .8px; color: var(--teal); margin-bottom: 3px;
}
.db-cert-type--group { color: var(--purple); }
.db-cert-name { font-size: 15px; font-weight: 700; color: var(--text); }
.db-cert-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.db-btn-download {
  margin-left: auto;
  background: var(--teal-pale); color: var(--teal);
  border: none; padding: 7px 14px; border-radius: 8px;
  font-size: 12px; font-weight: 700; cursor: pointer;
  flex-shrink: 0; transition: all .2s; text-decoration: none; white-space: nowrap;
}
.db-btn-download:hover { background: var(--teal); color: white; }

/* ── PAYMENTS TABLE ────────────────────────────────────────────── */
.db-pay-table { width: 100%; border-collapse: collapse; }
.db-pay-table th {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .8px;
  padding: 8px 12px; text-align: left;
  border-bottom: 2px solid var(--border);
}
.db-pay-table td {
  padding: 12px; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--border); vertical-align: middle;
}
.db-pay-table tr:last-child td { border-bottom: none; }
.db-pay-table tr:hover td { background: var(--bg); }
.pay-amount { font-weight: 800; color: var(--teal); }
.db-btn-invoice {
  background: none; border: 1px solid var(--border);
  padding: 5px 12px; border-radius: 7px;
  font-size: 11px; font-weight: 700;
  color: var(--text-muted); cursor: pointer;
  transition: all .2s; text-decoration: none;
}
.db-btn-invoice:hover { border-color: var(--teal); color: var(--teal); }

/* ── TOPBAR BRAND (logo móvil) ──────────────────────────────────── */
.db-topbar-brand {
  display: none; /* oculto en desktop, el logo está en el sidebar */
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.db-topbar-brand img {
  height: 70px !important;
  width: auto !important;
  max-width: none !important;
}

/* ── HAMBURGER BUTTON ───────────────────────────────────────────── */
.db-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  flex-shrink: 0;
}
.db-hamburger:hover { background: rgba(1,109,119,.1); }
.db-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transition: all .25s;
}

/* ── SIDEBAR OVERLAY (móvil) ────────────────────────────────────── */
.db-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
}
.db-sidebar-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .db-stats-row { grid-template-columns: repeat(2, 1fr); }
  .db-grid-3    { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* Wrap: no overflow horizontal */
  .db-wrap { overflow: hidden; }

  /* Sidebar off-canvas — fuera del flujo flex */
  .db-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 260px;
    height: 100vh;
    z-index: 200;
    transform: translateX(-260px);
    transition: transform .3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,.18);
  }
  .db-sidebar.open { transform: translateX(0); }
  .db-sidebar-overlay { display: block; }

  /* Main ocupa todo el ancho disponible */
  .db-main {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .db-content {
    padding: 16px;
    max-width: 100%;
    box-sizing: border-box;
  }
  .db-topbar {
    padding: 12px 16px;
    gap: 8px;
    margin-left: 0 !important;
    padding-left: 16px !important;
    box-sizing: border-box;
  }

  /* Topbar móvil: logo izquierda + avatar/hamburger derecha, saludo abajo */
  .db-topbar { flex-wrap: wrap; align-items: center; padding: 10px 14px; gap: 0; }
  .db-topbar-brand { display: flex; order: 0; flex: 1; }
  .db-topbar-right  { order: 1; flex: 0; display: flex; align-items: center; gap: 8px; }
  .db-topbar-left   { order: 2; flex-basis: 100%; padding-top: 8px; }
  .db-topbar-left h1 { font-size: 15px; }

  /* Mostrar hamburguesa */
  .db-hamburger { display: flex; }

  /* Ocultar avatar y paginación superior en móvil */
  .db-topbar-avatar { display: none !important; }
  #db-pagination-top { display: none !important; }

  .db-stats-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .db-welcome-banner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .db-continue-card  { flex-direction: column; align-items: flex-start; }
  .db-btn-continue   { width: 100%; text-align: center; }

  /* Cursos: truncar título en móvil en 2 líneas */
  .db-course-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 480px) {
  .db-stats-row { grid-template-columns: 1fr; }
}

/* ── DIVI FULL-WIDTH OVERRIDE ───────────────────────────────────── */
.et_pb_row:has(.db-wrap),
.et_pb_section:has(.db-wrap) {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0 !important;
}
.et_pb_column:has(.db-wrap) {
  padding: 0 !important;
}

/* ── ELIMINA LÍNEA VERTICAL DE DIVI ─────────────────────────────── */
#main-content .container::before,
#main-content .container:before {
  display: none !important;
  content: none !important;
  width: 0 !important;
}

/* ── COURSE FILTERS ─────────────────────────────────────────────── */
.db-course-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  align-items: center;
  padding-top: 4px;
}

.db-filter-btn {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
}
.db-filter-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: var(--teal-pale);
}
.db-filter-btn.active {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}
.db-sort-btn.active {
  background: var(--purple);
  border-color: var(--purple);
  color: white;
}
.db-filter-count {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: 800;
}
.db-filter-btn.active .db-filter-count {
  background: rgba(255,255,255,0.25);
}
.db-filter-sep {
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 2px;
  flex-shrink: 0;
}

/* ── QUICK ROW (fila horizontal única) ──────────────────────────── */
.db-quick-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.db-quick-row .db-quick-btn {
  flex-direction: row;
  padding: 12px 16px;
  gap: 10px;
  justify-content: flex-start;
}
.db-quick-row .db-ql {
  font-size: 14px;
  text-align: left;
}

/* ── TOPBAR RESPONSIVE ──────────────────────────────────────────── */
.db-topbar-left { min-width: 0; overflow: hidden; }
.db-topbar-left h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── SEARCH ─────────────────────────────────────────────────────── */
.db-search-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 18px;
  max-width: 480px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
  transition: box-shadow .2s, border-color .2s;
}
.db-search-wrap:focus-within {
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
  border-color: #c5d5d7;
}
.db-search-label {
  font-size: 18px;
  display: flex; align-items: center;
  padding: 0 12px;
  color: var(--teal);
  flex-shrink: 0;
  user-select: none;
}
.db-search-input {
  flex: 1;
  padding: 10px 14px 10px 0;
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  -webkit-appearance: none;
  appearance: none;
  font-size: 14px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  min-width: 0;
}
.db-search-input::placeholder { color: var(--text-muted); }

/* ── PAGINATION ──────────────────────────────────────────────────── */
/* ── FILTERS + TOP PAGINATION — misma fila ───────────────────────── */
.db-filters-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  flex-wrap: wrap;
}
.db-filters-top-row .db-course-filters {
  margin-bottom: 0;
  flex: 1;
  min-width: 0;
}

#db-pagination-top {
  border-top: none;
  border-bottom: none;
  margin: 0; padding: 0;
  justify-content: flex-end;
  flex-shrink: 0;
}
#db-pagination-top .db-pag-info { display: none; }
.db-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}
.db-pag-info {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}
.db-pag-empty {
  width: 100%;
  text-align: center;
  padding: 20px 0;
  color: var(--text-muted);
}
.db-pag-btns {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
}
.db-pag-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  background: white;
  cursor: pointer;
  font-family: var(--font);
  transition: all .2s;
  line-height: 1.4;
}
.db-pag-btn:hover { border-color: var(--teal); color: var(--teal); }
.db-pag-btn.active { background: var(--teal); border-color: var(--teal); color: white; }
.db-pag-dots { font-size: 12px; color: var(--text-muted); padding: 0 4px; }

/* ── FORMACIONES ─────────────────────────────────────────────────── */
.db-formations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.db-formation-card {
  display: flex;
  gap: 14px;
  padding: 14px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  transition: all .2s;
  align-items: flex-start;
}
.db-formation-card:hover {
  border-color: var(--teal);
  background: var(--teal-pale);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.db-formation-thumb {
  width: 68px;
  height: 68px;
  border-radius: 10px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal-pale), var(--purple-pale));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  overflow: hidden;
}
.db-formation-info { flex: 1; min-width: 0; }
.db-formation-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}
.db-formation-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }

/* ── FORMACIONES — layout 3 columnas ────────────────────────────── */
.db-formations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.db-fcard {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  background: white;
}
.db-fcard:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow);
}
.db-fcard-col1 {
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow: hidden;
}
.db-fcard-col1-img {
  width: 100%;
  height: 120px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal-pale), var(--purple-pale));
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; overflow: hidden;
}
.db-fcard-info { padding: 12px; }
.db-fcard-title {
  font-size: 14px; font-weight: 800; color: var(--text);
  margin-bottom: 4px; line-height: 1.3;
}
.db-fcard-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }

.db-fcard-col2 {
  padding: 16px;
  border-right: 1px solid var(--border);
  background: white;
}
.db-fcard-col3 {
  padding: 16px;
  background: white;
}
.db-fcard-col-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--teal); margin-bottom: 10px;
}
.db-fcard-featured {
  display: flex; gap: 10px; align-items: flex-start;
}
.db-fcard-featured-thumb {
  width: 52px; height: 52px; border-radius: 8px; flex-shrink: 0;
  background: var(--teal-pale); overflow: hidden;
}
.db-fcard-featured-info { flex: 1; min-width: 0; }
.db-fcard-featured-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  line-height: 1.3; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.db-fcard-col3-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  gap: 6px;
}
.db-fc3-select {
  font-size: 11px;
  font-family: var(--font);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  padding: 3px 6px;
  color: var(--text-muted);
  background: white;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
}
.db-fc3-select:focus { border-color: var(--teal); }
.db-fcard-others {
  display: flex; flex-direction: column; gap: 5px;
  max-height: 190px;
  overflow-y: auto;
  padding-right: 2px;
}
.db-fcard-others::-webkit-scrollbar { width: 4px; }
.db-fcard-others::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.db-fcard-other {
  display: flex; align-items: center; gap: 7px;
}
.db-fcard-other-title {
  flex: 1; font-size: 13px; font-weight: 600; color: var(--text);
  text-decoration: none; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.db-fcard-other-title:hover { color: var(--teal); }
.db-fcard-other-pct {
  font-size: 11px; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}
.db-fc3-empty {
  font-size: 12px; color: var(--text-muted); padding: 8px 0; font-style: italic;
}

@media (max-width: 1024px) {
  .db-fcard { grid-template-columns: 200px 1fr; }
  .db-fcard-col3 { display: none; }
}
@media (max-width: 680px) {
  .db-fcard { grid-template-columns: 1fr; }
  .db-fcard-col2 { border-right: none; border-top: 1px solid var(--border); }
  .db-fcard-col3 { display: none; }
}

/* ── FORMATION ACCORDION ─────────────────────────────────────────── */
.db-formation-accordion {
  flex-direction: column;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
}
.db-formation-header {
  display: flex;
  gap: 14px;
  padding: 14px;
  align-items: flex-start;
  transition: background .18s;
  width: 100%;
}
.db-formation-accordion:hover .db-formation-header {
  background: var(--teal-pale);
}
.db-formation-accordion.db-open .db-formation-header {
  background: var(--teal-pale);
}
.db-formation-arrow {
  margin-left: auto;
  font-size: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
  padding-top: 2px;
  transition: transform .22s ease;
  line-height: 1;
  user-select: none;
}
.db-formation-accordion.db-open .db-formation-arrow {
  transform: rotate(180deg);
}
.db-formation-panel {
  display: none;
  padding: 4px 14px 14px 14px;
  border-top: 1px solid var(--border);
  animation: dbPanelIn .18s ease;
}
@keyframes dbPanelIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.db-fpanel-course {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.db-fpanel-course:last-of-type { border-bottom: none; }
.db-fpanel-status {
  width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; flex-shrink: 0;
}
.db-fpanel-status.green  { background: #e8f5e9; color: #2e7d32; }
.db-fpanel-status.teal   { background: var(--teal-pale); color: var(--teal); }
.db-fpanel-status.gray   { background: #f5f5f5; color: #9e9e9e; }
.db-fpanel-info { flex: 1; min-width: 0; }
.db-fpanel-title {
  font-size: 13px; font-weight: 700; color: var(--text);
  text-decoration: none; display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.db-fpanel-title:hover { color: var(--teal); }
.db-fpanel-pct {
  font-size: 12px; font-weight: 700; color: var(--text-muted); flex-shrink: 0;
}
.db-fpanel-view-btn {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px; font-weight: 700; color: var(--teal);
  text-decoration: none;
}
.db-fpanel-view-btn:hover { text-decoration: underline; }
.db-fpanel-empty {
  font-size: 13px; color: var(--text-muted); padding: 12px 0;
}

/* ── RESPONSIVE ADICIONAL ───────────────────────────────────────── */
@media (max-width: 900px) {
  .db-topbar-left h1 { font-size: 16px; }
  .db-search-wrap { max-width: 100%; }
}
@media (max-width: 768px) {
  .db-quick-row { grid-template-columns: repeat(2, 1fr); }
  .db-course-filters {
    flex-wrap: wrap;
    gap: 6px;
  }
  .db-filter-btn { padding: 6px 12px; font-size: 12px; white-space: nowrap; flex-shrink: 0; }
  /* Ocultar botones de orden y separador en móvil */
  .db-sort-btn, .db-fsort-btn, .db-filter-sep, .db-fm-sort { display: none !important; }
  .db-formations-grid { grid-template-columns: 1fr; }
  .db-topbar-date { display: none; }
  .db-search-wrap { max-width: 100%; }
}

/* ── CASA MANDALA — nav links externos ───────────────────────────── */
.db-nav-ext-img {
  width: 22px; height: 22px;
  object-fit: contain;
  border-radius: 5px;
  flex-shrink: 0;
  background: white;
}
.db-nav-ext-arrow {
  margin-left: auto;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  flex-shrink: 0;
}
.db-nav-ext:hover .db-nav-ext-arrow {
  color: rgba(255,255,255,0.7);
}

/* ── QUICK ACCESS — logos de imagen ─────────────────────────────── */
.db-qi-img {
  width: 34px; height: 34px;
  object-fit: contain;
  flex-shrink: 0;
}

/* ── USER CARD — como enlace ─────────────────────────────────────── */
a.db-user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border-radius: 10px;
  background: rgba(255,255,255,0.05);
  text-decoration: none;
  transition: background .2s;
}
a.db-user-card:hover {
  background: rgba(255,255,255,0.12);
}


/* ══════════════════════════════════════════════════════════════════════════
   FORMATION DASHBOARD  [cta_formacion]
   ══════════════════════════════════════════════════════════════════════════ */

.db-fm-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 16px;
  font-family: var(--font);
  background: var(--bg);
}

/* ── Reset para evitar interferencia de Divi ───────────────────────────── */
.db-fm-wrap *, .db-fm-wrap *::before, .db-fm-wrap *::after {
  box-sizing: border-box;
  font-family: var(--font);
  margin: 0;
  padding: 0;
}

/* ── Back link ─────────────────────────────────────────────────────────── */
.db-fm-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  margin-bottom: 16px;
  padding: 6px 14px;
  border: 1.5px solid var(--teal);
  border-radius: 20px;
  transition: all .2s;
}
.db-fm-back:hover { background: var(--teal); color: white; text-decoration: none; }

/* ── Shared card base ──────────────────────────────────────────────────── */
.db-fm-header-card,
.db-fm-continue-card,
.db-fm-module {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

/* ── Header card ───────────────────────────────────────────────────────── */
.db-fm-header-card { padding: 24px; }

.db-fm-hero { display: flex; gap: 20px; align-items: flex-start; }

.db-fm-hero-img {
  width: 120px; height: 120px;
  object-fit: cover; border-radius: 10px; flex-shrink: 0;
}

.db-fm-hero-info { flex: 1; min-width: 0; }

.db-fm-title {
  font-size: 20px !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  margin: 0 0 6px !important;
  line-height: 1.25 !important;
  font-family: var(--font) !important;
}

.db-fm-stats {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.db-fm-sep { margin: 0 6px; opacity: .4; }

.db-fm-overall-row { display: flex; align-items: center; gap: 12px; }
.db-fm-overall-bar {
  flex: 1; height: 8px;
  background: var(--border); border-radius: 4px; overflow: hidden;
}
.db-fm-overall-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  border-radius: 4px; transition: width .4s;
}
.db-fm-overall-pct { font-size: 13px; font-weight: 800; color: var(--teal); white-space: nowrap; }

/* ── Continue card — mismo estilo que mi-escritorio ────────────────────── */
.db-fm-continue-card {
  background: linear-gradient(135deg, #e0f4f6, #f0e8f7);
  border-color: var(--teal-pale);
  padding: 22px 24px;
  display: flex; align-items: center; gap: 20px;
}
.db-wrap .db-fm-continue-card .db-fm-continue-label {
  font-size: 12px !important; font-weight: 700 !important; color: var(--teal) !important;
  text-transform: uppercase !important; letter-spacing: .8px !important; margin-bottom: 0 !important;
}
.db-fm-continue-body { display: contents; }
.db-fm-continue-thumb {
  width: 80px; height: 80px; object-fit: cover; border-radius: 12px;
  flex-shrink: 0; background: linear-gradient(135deg, var(--teal), var(--purple));
}
.db-fm-continue-info { flex: 1; min-width: 0; }
.db-fm-continue-title {
  font-size: 19px; font-weight: 800; color: var(--text);
  margin: 4px 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.db-fm-continue-lessons {
  font-size: 14px; color: var(--text-muted); margin-bottom: 10px;
}
.db-fm-mini-bar-wrap { display: block; }
.db-fm-mini-bar {
  background: rgba(1,109,119,0.15); border-radius: 20px;
  height: 8px; width: 100%; overflow: visible;
}
.db-fm-mini-fill { height: 8px; border-radius: 20px; background: linear-gradient(90deg, var(--teal), var(--teal-light)); min-width: 4px; }
.db-fm-mini-pct { font-size: 11px; color: var(--text-muted); margin-top: 5px; display: block; }

.db-wrap .db-fm-btn-teal {
  background: var(--teal) !important; color: white !important; border: none !important;
  border-radius: 22px !important; padding: 11px 24px !important;
  font-size: 13px !important; font-weight: 800 !important; font-family: var(--font) !important;
  text-decoration: none !important; white-space: nowrap !important; display: inline-block !important;
  transition: background .2s !important; flex-shrink: 0 !important;
}
.db-wrap .db-fm-btn-teal:hover { background: var(--teal-light) !important; color: white !important; text-decoration: none !important; }

.db-fm-btn-primary {
  background: var(--purple); color: white; border: none; border-radius: 20px;
  padding: 10px 22px; font-size: 13px; font-weight: 700; font-family: var(--font);
  text-decoration: none; white-space: nowrap; display: inline-block; transition: opacity .2s;
}
.db-fm-btn-primary:hover { opacity: .88; color: white; text-decoration: none; }

/* ── Filter bar (formación) — reutiliza estilos del dashboard ───────────── */
.db-fm-filter-bar {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: nowrap; overflow-x: auto;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  margin-bottom: 14px; padding-bottom: 4px;
}
.db-fm-filter-bar::-webkit-scrollbar { display: none; }
.db-fm-filter-bar .db-filter-btn { flex-shrink: 0; white-space: nowrap; }
.db-fm-filter-bar .db-filter-sep { flex-shrink: 0; }

/* ── Módulos ───────────────────────────────────────────────────────────── */
.db-fm-modules { display: flex; flex-direction: column; gap: 12px; }
.db-fm-module { margin-bottom: 0; overflow: hidden; }

.db-fm-mod-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; cursor: pointer; user-select: none; gap: 12px; transition: background .15s;
}
.db-fm-mod-header:hover { background: var(--teal-pale); }

.db-fm-mod-left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.db-fm-mod-chevron { font-size: 13px; color: var(--teal); transition: transform .25s; flex-shrink: 0; line-height: 1; }
.db-fm-module.db-fm-open .db-fm-mod-chevron { transform: rotate(90deg); }

.db-fm-mod-name { font-size: 15px; font-weight: 700; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-fm-mod-count {
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  background: var(--bg); padding: 2px 8px; border-radius: 10px;
  white-space: nowrap; flex-shrink: 0; border: 1px solid var(--border);
}
.db-fm-mod-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.db-fm-mod-minibar { width: 80px; height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.db-fm-mod-minifill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-light)); border-radius: 3px; }
.db-fm-mod-pct { font-size: 12px; font-weight: 700; color: var(--text-muted); min-width: 32px; text-align: right; }
.db-fm-mod-body { display: none; border-top: 1px solid var(--border); }
.db-fm-module.db-fm-open .db-fm-mod-body { display: block; }

/* ── Course rows ───────────────────────────────────────────────────────── */
.db-fm-course-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px; border-bottom: 1px solid var(--border); transition: background .15s;
}
.db-fm-course-row:last-child { border-bottom: none; }
.db-fm-course-row:hover { background: var(--bg); }
.db-fm-course-row.db-fm-active-course { background: var(--teal-pale); }

.db-fm-course-icon { font-size: 16px; flex-shrink: 0; width: 22px; text-align: center; }
.db-fm-course-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
.db-fm-course-thumb-placeholder { width: 48px; height: 48px; background: var(--border); border-radius: 8px; flex-shrink: 0; }
.db-fm-course-info { flex: 1; min-width: 0; }
.db-fm-course-name { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-fm-course-bar-wrap { display: flex; align-items: center; gap: 8px; }
.db-fm-course-bar { flex: 1; height: 5px; background: var(--border); border-radius: 3px; overflow: hidden; max-width: 220px; }
.db-fm-course-fill { height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-light)); border-radius: 3px; }
.db-fm-course-pct { font-size: 11px; font-weight: 700; color: var(--text-muted); min-width: 26px; }
.db-fm-course-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.db-fm-course-btn {
  color: var(--teal); border: 1.5px solid var(--teal); border-radius: 20px;
  padding: 6px 16px; font-size: 12px; font-weight: 700; font-family: var(--font);
  text-decoration: none; white-space: nowrap; flex-shrink: 0; display: inline-block; transition: all .2s;
}
.db-fm-course-btn:hover { background: var(--teal); color: white; text-decoration: none; }

/* Estado completado → verde */
.db-fm-course-row.done .db-fm-course-fill { background: #22c55e; }
.db-fm-course-row.done .db-fm-course-btn  { border-color: #22c55e; color: #22c55e; }
.db-fm-course-row.done .db-fm-course-btn:hover { background: #22c55e; color: white; }

/* ── Mentorías del Club ─────────────────────────────────────────────────── */
.db-fm-mentorias-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.db-fm-mentoria-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: white;
  display: flex;
  flex-direction: column;
}
.db-fm-mentoria-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.db-fm-mentoria-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.db-fm-mentoria-info {
  padding: 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.db-fm-mentoria-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
}
@media (max-width: 480px) {
  .db-fm-mentorias-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}

/* ── Botón mobile "Volver a mi Escritorio" ──────────────────────────────── */
.db-fm-mobile-back-bar { display: none; }
@media (max-width: 768px) {
  .db-fm-mobile-back-bar {
    display: block;
    padding: 10px 16px;
    background: var(--teal-pale);
    border-bottom: 1px solid #b0dde3;
  }
  .db-fm-mobile-back-link {
    font-size: 13px; font-weight: 800; color: var(--teal);
    text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
  }
  .db-fm-mobile-back-link:hover { text-decoration: underline; }
}

/* ── Topbar en página de formación ─────────────────────────────────────── */
.db-topbar-left .db-fm-back {
  display: inline-block; margin-bottom: 6px;
  font-size: 12px; font-weight: 700; color: var(--teal);
  text-decoration: none; padding: 3px 12px;
  border: 1.5px solid var(--teal); border-radius: 20px; transition: all .2s;
}
.db-topbar-left .db-fm-back:hover { background: var(--teal); color: white; }
.db-topbar-left h1 { font-size: 26px; font-weight: 800; color: var(--text); margin: 0; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .db-fm-hero { flex-direction: column; }
  .db-fm-hero-img { width: 100%; height: 160px; }
  .db-fm-continue-card { flex-direction: column; align-items: flex-start; }
  .db-fm-btn-teal, .db-fm-btn-primary { width: 100%; text-align: center; }
  .db-fm-mod-minibar { display: none; }
  .db-fm-course-thumb, .db-fm-course-thumb-placeholder { display: none; }
  .db-fm-course-bar { max-width: 120px; }
  .db-fm-course-btn { padding: 5px 12px; font-size: 11px; }
  .db-fm-filter-bar { gap: 6px; }
  .db-fm-sort-wrap { margin-left: 0; width: 100%; }
  .db-fm-sort-sel { width: 100%; }
}

/* ── Contenido interno de accordions (intro + video) ───────────────────── */
.db-fm-acc-body {
  padding: 16px 20px 20px;
}

/* Texto del intro */
.db-fm-intro-texto {
  font-size: 14px; color: var(--text-muted); line-height: 1.65;
  margin-bottom: 16px;
}
.db-fm-intro-texto p { margin: 0 0 10px 0; }
.db-fm-intro-texto p:last-child { margin-bottom: 0; }
.db-fm-intro-embed { margin-top: 4px; }

/* Wrapper para videos YouTube/Vimeo */
.db-fm-video-wrap {
  line-height: 0; font-size: 0;
}
.db-fm-video-wrap iframe {
  display: block; border: 0;
}

/* Padlet y embeds con altura propia — respetar height del iframe original */
.db-fm-intro-embed > div > p > iframe,
.db-fm-intro-embed > p > iframe,
.db-fm-intro-embed > iframe {
  width: 100%; border: 0; border-radius: 10px; display: block;
}

@media (max-width: 640px) {
  .db-fm-acc-body { padding: 14px 16px 18px; }
}

/* ── Fin Formation Dashboard ────────────────────────────────────────────── */


/* ══════════════════════════════════════════════════════════════════════════
   LIMPIEZA DE PÁGINAS DE GRUPOS (LearnDash)
   Oculta el encabezado de artículo y la barra de progreso nativa
   para que el contenido de Divi + [cta_formacion] se vea limpio.
   ══════════════════════════════════════════════════════════════════════════ */

/* Título, autor, fecha, categoría — encabezado de artículo de Divi */
.single-groups .et_pb_post_title,
.single-groups .et_pb_title_container,
.single-groups .entry-title,
.single-groups .post-meta,
.single-groups article header.entry-header {
  display: none !important;
}

/* Imagen destacada del artículo (si la muestra el tema) */
.single-groups .entry-featured-image-url {
  display: none !important;
}

/* Barra de progreso nativa de LearnDash en páginas de grupo */
.single-groups .ld-group-status,
.single-groups .learndash-wrapper:not(.db-fm-wrap *),
.single-groups .ld-breadcrumbs {
  display: none !important;
}
