/* =========================================================
   PRESENTACIÓN — ESTILO PRINCIPAL
   ========================================================= */

:root {
  --bg-dark:    #0f172a;
  --bg-card:    #1e293b;
  --bg-card2:   #273549;
  --accent:     #6366f1;
  --accent2:    #818cf8;
  --gold:       #f59e0b;
  --green:      #22c55e;
  --text:       #f1f5f9;
  --text-muted: #94a3b8;
  --border:     #334155;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,.45);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  background: var(--bg-dark);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

/* ── SLIDE WRAPPER ── */
#presentation {
  width: 100vw;
  height: 100vh;
  position: relative;
  overflow: hidden;
}

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .45s ease, transform .45s ease;
  transform: translateX(60px);
  padding: 0;
}

.slide.active {
  opacity: 1;
  pointer-events: all;
  transform: translateX(0);
}

.slide.prev {
  opacity: 0;
  transform: translateX(-60px);
}

/* ── TOP BAR ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  background: rgba(15,23,42,.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  z-index: 10;
}

.topbar-logos {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar-logos img {
  height: 44px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
}

.topbar-logos .logo-placeholder {
  height: 44px;
  padding: 6px 14px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  font-size: .72rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  white-space: nowrap;
}

.topbar-meta {
  text-align: right;
  font-size: .78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.topbar-meta strong { color: var(--text); }

/* ── SLIDE CONTENT AREA ── */
.slide-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 52px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.slide-body::-webkit-scrollbar { width: 6px; }
.slide-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── BOTTOM NAV ── */
.bottombar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 32px;
  background: rgba(15,23,42,.9);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.nav-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 22px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  transition: background .2s, border-color .2s;
}

.nav-btn:hover  { background: var(--accent); border-color: var(--accent); }
.nav-btn:disabled { opacity: .35; cursor: not-allowed; }

.slide-counter {
  font-size: .85rem;
  color: var(--text-muted);
  min-width: 80px;
  text-align: center;
}

.progress-bar {
  position: fixed;
  bottom: 0; left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transition: width .4s ease;
  z-index: 100;
}

/* =========================================================
   TIPOGRAFÍA GLOBAL
   ========================================================= */
.slide-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 6px;
  color: var(--text);
}

.slide-title span { color: var(--accent2); }

.section-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent2);
  margin-bottom: 18px;
}

.badge {
  display: inline-block;
  background: rgba(99,102,241,.15);
  border: 1px solid var(--accent);
  color: var(--accent2);
  padding: 4px 14px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* =========================================================
   SLIDE 1 — PORTADA
   ========================================================= */
.cover-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100%;
  padding: 20px;
}

.cover-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.03em;
  background: linear-gradient(135deg, #e0e7ff, var(--accent2), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 18px;
}

.cover-subtitle {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  color: var(--text-muted);
  max-width: 700px;
  line-height: 1.6;
  margin-bottom: 36px;
}

.cover-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cover-meta li {
  list-style: none;
  font-size: .9rem;
  color: var(--text-muted);
}

.cover-meta li:first-child { color: var(--text); font-weight: 600; font-size: 1rem; }

.cover-divider {
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  border-radius: 2px;
  margin: 24px auto;
}

/* =========================================================
   SLIDE 2 — OBJETIVOS
   ========================================================= */
.ra-box {
  background: rgba(99,102,241,.1);
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: .95rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.ra-box strong { color: var(--accent2); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 6px; }

.oe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.oe-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: .88rem;
  color: var(--text-muted);
  line-height: 1.5;
  transition: border-color .2s;
}

.oe-card:hover { border-color: var(--accent); }

.oe-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; color: #fff;
}

.og-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.og-box strong { color: var(--gold); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; display: block; margin-bottom: 6px; }

/* =========================================================
   SLIDE 3 — SECUENCIA
   ========================================================= */
.sequence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.seq-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}

.seq-card:hover { transform: translateY(-3px); border-color: var(--accent); }

.seq-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.seq-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.seq-n {
  font-size: .7rem;
  font-weight: 700;
  color: var(--accent2);
  letter-spacing: .1em;
}

.seq-tiempo {
  font-size: .7rem;
  background: rgba(245,158,11,.12);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}

.seq-icono { font-size: 1.5rem; margin-bottom: 6px; }

.seq-nombre {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.seq-herramienta {
  font-size: .75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.seq-herramienta::before {
  content: '🔧';
  font-size: .7rem;
}

/* =========================================================
   SLIDE 4 — HERRAMIENTAS
   ========================================================= */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: block;
}

.tool-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

.tool-accent-bar {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
}

.tool-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  margin-top: 4px;
}

.tool-icono { font-size: 1.8rem; }

.tool-nombre {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.tool-etapa {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 2px 10px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.tool-rol {
  font-size: .86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tool-link-indicator {
  position: absolute;
  bottom: 10px; right: 14px;
  font-size: .72rem;
  color: var(--accent2);
  opacity: 0;
  transition: opacity .2s;
}

.tool-card:hover .tool-link-indicator { opacity: 1; }

/* =========================================================
   SLIDE 5 — PY ARENA
   ========================================================= */
.pyarena-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) { .pyarena-layout { grid-template-columns: 1fr; } }

.pyarena-tagline {
  font-size: 1rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: .03em;
}

.pyarena-desc {
  font-size: .93rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 22px;
}

.pyarena-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: border-color .2s;
}

.feature-card:hover { border-color: var(--gold); }

.feature-icono { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }

.feature-titulo {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}

.feature-detalle {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.pyarena-image-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}

.pyarena-image-box img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.pyarena-image-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: .85rem;
  padding: 32px;
  text-align: center;
}

.pyarena-image-placeholder .big-icon { font-size: 3.5rem; }

.pyarena-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  background: linear-gradient(135deg, #ca8a04, #eab308);
  color: #000;
  font-weight: 700;
  font-size: .88rem;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity .2s;
}

.pyarena-btn:hover { opacity: .85; }

/* =========================================================
   SLIDE 6 — JUPYTER NOTEBOOK
   ========================================================= */
.jupyter-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) { .jupyter-layout { grid-template-columns: 1fr; } }

.jupyter-desc {
  font-size: .92rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 22px;
}

.notebook-steps { display: flex; flex-direction: column; gap: 12px; }

.nb-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.nb-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

.nb-step-n {
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: var(--accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700;
}

.nb-step-title {
  font-size: .86rem;
  font-weight: 600;
  color: var(--text);
}

.nb-code {
  background: #0d1117;
  padding: 12px 16px;
  font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: .78rem;
  color: #e6edf3;
  white-space: pre;
  overflow-x: auto;
  line-height: 1.6;
}

/* Simple syntax highlight */
.nb-code .kw  { color: #ff7b72; }
.nb-code .fn  { color: #d2a8ff; }
.nb-code .str { color: #a5d6ff; }
.nb-code .num { color: #79c0ff; }
.nb-code .cmt { color: #8b949e; font-style: italic; }

.colab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  background: #f9ab00;
  color: #000;
  font-weight: 700;
  font-size: .88rem;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  transition: opacity .2s;
}

.colab-btn:hover { opacity: .85; }

.jupyter-image-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.jupyter-image-box img { width: 100%; height: auto; object-fit: cover; }

.jupyter-image-placeholder {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: .85rem;
  padding: 32px;
  text-align: center;
}

/* =========================================================
   SLIDE 7 — CIERRE
   ========================================================= */
.closing-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 28px;
  align-items: start;
}

@media (max-width: 900px) { .closing-layout { grid-template-columns: 1fr; } }

.marco-list { display: flex; flex-direction: column; gap: 10px; }

.marco-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  gap: 12px;
  transition: border-color .2s;
}

.marco-item:hover { border-color: var(--accent2); }

.marco-icono { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }

.marco-concepto {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
}

.marco-autor {
  font-size: .75rem;
  color: var(--accent2);
  font-style: italic;
  margin-bottom: 4px;
}

.marco-aplicacion {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.closing-right {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.closing-message {
  background: linear-gradient(135deg, rgba(99,102,241,.15), rgba(245,158,11,.1));
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
}

.closing-message .big-text {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent2), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 14px;
}

.closing-message .contacto {
  font-size: .9rem;
  color: var(--text-muted);
}

.closing-message .contacto a {
  color: var(--accent2);
  text-decoration: none;
}

.closing-message .contacto a:hover { text-decoration: underline; }

.closing-magister-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
}

.closing-magister-badge .mag-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.closing-magister-badge .mag-sub {
  font-size: .82rem;
  color: var(--text-muted);
}

/* =========================================================
   FULLSCREEN HINT
   ========================================================= */
.fs-hint {
  position: fixed;
  top: 10px; right: 14px;
  font-size: .72rem;
  color: var(--text-muted);
  background: rgba(15,23,42,.8);
  padding: 4px 10px;
  border-radius: 6px;
  z-index: 999;
  pointer-events: none;
  opacity: .6;
}
