/* =========================================================
   Centro de Demostraciones — Odoo Marketplugin
   Reutiliza variables y patrones de odoomktp.css
   ========================================================= */

/* ---------- HUB / Index ---------- */

.demos-hero {
  padding: 90px 0 50px;
  position: relative;
  overflow: hidden;
}
.demos-hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(
    circle at center,
    rgba(6, 182, 212, 0.10) 0%,
    rgba(244, 114, 182, 0.06) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}
.demos-hero > * { position: relative; z-index: 1; }

.demos-hero-inner {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}
.demos-hero h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  margin-bottom: 18px;
}
.demos-hero .lede {
  font-size: 1.1rem;
  max-width: 580px;
  margin: 0 auto 32px;
  line-height: 1.55;
}

.demos-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 36px 0 12px;
  flex-wrap: wrap;
}
.demos-stat {
  text-align: center;
}
.demos-stat .n {
  font-family: var(--font-mono);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--brand);
  display: block;
  line-height: 1;
}
.demos-stat .l {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  margin-top: 6px;
}

/* ---------- Learning paths (rutas curadas) ---------- */

.paths-section {
  padding: 60px 0;
  background:
    linear-gradient(180deg, transparent, rgba(6, 182, 212, 0.025) 50%, transparent),
    var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.paths-section h2 {
  text-align: center;
  margin-bottom: 12px;
}
.paths-section .sub {
  text-align: center;
  color: var(--ink-soft);
  margin-bottom: 40px;
  font-size: 0.98rem;
}

.paths-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.path-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.path-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  opacity: 0;
  transition: opacity 0.25s;
}
.path-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.35);
}
.path-card:hover::before { opacity: 1; }

.path-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-dim), var(--accent-dim));
  border: 1px solid var(--brand-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 18px;
}
.path-icon svg { width: 22px; height: 22px; }

.path-card h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--ink);
}
.path-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  flex-grow: 1;
  margin-bottom: 18px;
}
.path-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.78rem;
  color: var(--ink-mute);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.path-meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-mute); }
.path-cta {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--brand);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}
.path-card:hover .path-cta { gap: 10px; }

/* ---------- Filtros ---------- */

.demos-toolbar {
  padding: 30px 0 20px;
  position: sticky;
  top: 64px;
  z-index: 9;
  background: rgba(6, 9, 15, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.toolbar-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar-label {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-right: 4px;
}
.filter-chip {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.filter-chip:hover {
  color: var(--ink);
  border-color: var(--border-hover);
}
.filter-chip.active {
  background: var(--brand-dim);
  border-color: var(--brand);
  color: var(--brand);
}
.filter-chip.active.accent {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Grid de capítulos ---------- */

.chapters-section { padding: 50px 0 100px; }
.chapters-section .area-group {
  margin-bottom: 60px;
}
.area-group h2 {
  font-size: 1.5rem;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.area-group .area-line {
  flex-grow: 1;
  height: 1px;
  background: var(--border);
}
.area-group .area-count {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-mute);
  font-weight: 500;
}

.chapters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.chapter-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}
.chapter-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand);
  box-shadow: 0 12px 32px rgba(6, 182, 212, 0.15);
}

.chapter-card-thumb {
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(6, 182, 212, 0.08), rgba(244, 114, 182, 0.05)),
    var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.chapter-card-thumb .num {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.06);
  letter-spacing: -0.03em;
}
.chapter-card-thumb .play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.chapter-card-thumb .play-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.5);
  transition: transform 0.2s;
}
.chapter-card:hover .play-btn { transform: scale(1.1); }
.chapter-card-thumb .play-btn svg {
  width: 20px;
  height: 20px;
  color: #06090f;
  margin-left: 2px;
}

.chapter-card-thumb .badge-soon {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.66rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.55);
  color: var(--ink-soft);
  border: 1px solid var(--border);
}

.chapter-card-body {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}
.chapter-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.chapter-card-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-mute); }
.chapter-card h3 {
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
}
.chapter-card p {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0;
  flex-grow: 1;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.chip.intro { background: rgba(6, 182, 212, 0.15); color: var(--brand); }
.chip.core { background: rgba(244, 114, 182, 0.15); color: var(--accent); }
.chip.advanced { background: rgba(245, 158, 11, 0.15); color: var(--warn); }

/* ---------- Página de capítulo ---------- */

.chap-back {
  padding: 24px 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s;
}
.chap-back:hover { color: var(--brand); }

.chap-header {
  padding: 30px 0 40px;
}
.chap-header .crumb {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chap-header h1 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  margin-bottom: 16px;
  line-height: 1.15;
}
.chap-header .lede {
  font-size: 1.1rem;
  max-width: 680px;
  color: var(--ink-soft);
  line-height: 1.55;
}
.chap-header .meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
  align-items: center;
}

/* Player / video placeholder */
.chap-player {
  margin: 30px 0 50px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
}
.chap-player .placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  padding: 30px;
  background:
    radial-gradient(circle at 30% 50%, rgba(6, 182, 212, 0.10), transparent 50%),
    radial-gradient(circle at 70% 50%, rgba(244, 114, 182, 0.08), transparent 50%);
}
.chap-player .placeholder .icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 36px rgba(6, 182, 212, 0.4);
}
.chap-player .placeholder .icon svg { width: 26px; height: 26px; color: #06090f; margin-left: 3px; }
.chap-player .placeholder .label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
}
.chap-player .placeholder .hint {
  font-size: 0.92rem;
  color: var(--ink-soft);
  max-width: 380px;
}
.chap-player video {
  width: 100%;
  height: 100%;
  display: block;
}

/* Animated diagram container */
.diagram-stage {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  margin: 28px 0;
  overflow: hidden;
}
.diagram-stage > svg {
  width: 100%;
  height: auto;
  max-height: 460px;
  display: block;
  margin: 0 auto;
}
.diagram-caption {
  text-align: center;
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--ink-mute);
  font-style: italic;
}

/* Content layout: two-column on desktop */
.chap-content {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 48px;
  padding-bottom: 80px;
}
@media (max-width: 920px) {
  .chap-content { grid-template-columns: 1fr; gap: 32px; }
}
.chap-main h2 {
  font-size: 1.4rem;
  margin: 36px 0 16px;
  letter-spacing: -0.01em;
}
.chap-main h2:first-child { margin-top: 0; }
.chap-main p {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 16px;
}
.chap-main ul {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}
.chap-main ul li {
  padding: 10px 0 10px 28px;
  position: relative;
  color: var(--ink);
  line-height: 1.55;
  font-size: 0.97rem;
}
.chap-main ul li::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 18px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.takeaways-card {
  background: linear-gradient(180deg, rgba(6, 182, 212, 0.04), transparent);
  border: 1px solid var(--brand-dim);
  border-radius: var(--radius);
  padding: 22px;
  margin: 24px 0 36px;
}
.takeaways-card h3 {
  font-size: 0.78rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand);
  margin-bottom: 12px;
}
.takeaways-card ul li { padding: 6px 0 6px 22px; font-size: 0.93rem; }
.takeaways-card ul li::before { background: var(--brand); top: 14px; }

.detail-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 16px 0;
}
.detail-section h3 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--ink);
}
.detail-section p { font-size: 0.93rem; line-height: 1.6; margin: 0; }

/* Sidebar */
.chap-sidebar {
  position: sticky;
  top: 100px;
  align-self: start;
  height: max-content;
}
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}
.sidebar-card h4 {
  font-size: 0.72rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  margin-bottom: 14px;
}
.sidebar-card .prereq-item,
.sidebar-card .nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: color 0.2s;
  border-bottom: 1px solid var(--border);
}
.sidebar-card .prereq-item:last-child,
.sidebar-card .nav-item:last-child { border-bottom: none; }
.sidebar-card a.prereq-item:hover,
.sidebar-card a.nav-item:hover { color: var(--brand); }
.sidebar-card .num-pill {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg-elevated);
  color: var(--brand);
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

/* Navigation between chapters */
.chap-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.chap-nav a {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.25s;
}
.chap-nav a:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
}
.chap-nav .nav-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
}
.chap-nav .nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.chap-nav .next { text-align: right; align-items: flex-end; }
@media (max-width: 720px) {
  .chap-nav { grid-template-columns: 1fr; }
}

/* ---------- Path page ---------- */
.path-header {
  padding: 60px 0 30px;
  text-align: center;
}
.path-header .icon-wrap {
  width: 60px;
  height: 60px;
  margin: 0 auto 22px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-dim), var(--accent-dim));
  border: 1px solid var(--brand-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}
.path-header .icon-wrap svg { width: 28px; height: 28px; }
.path-header h1 { margin-bottom: 12px; }
.path-header p {
  max-width: 580px;
  margin: 0 auto 18px;
  font-size: 1.02rem;
}
.path-header .total {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.path-list {
  padding: 30px 0 100px;
  max-width: 780px;
  margin: 0 auto;
}
.path-step {
  display: flex;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s;
  border-radius: 10px;
  padding-left: 18px;
  padding-right: 18px;
  margin: 0 -18px;
}
.path-step:hover { background: var(--bg-card); }
.path-step:last-child { border-bottom: none; }
.path-step-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand);
  flex-shrink: 0;
}
.path-step-body { flex-grow: 1; }
.path-step-body h3 {
  font-size: 1.05rem;
  margin-bottom: 6px;
  color: var(--ink);
}
.path-step-body p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin-bottom: 8px;
  line-height: 1.5;
}
.path-step-meta {
  display: flex;
  gap: 10px;
  font-size: 0.72rem;
  font-family: var(--font-mono);
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.path-step-arrow {
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  transition: transform 0.2s, color 0.2s;
}
.path-step:hover .path-step-arrow {
  color: var(--brand);
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 820px) {
  .paths-grid { grid-template-columns: 1fr; }
  .demos-stats { gap: 24px; }
  .demos-stat .n { font-size: 1.8rem; }
}
