/* ============================================================
   PRESENTACIÓN IA — Teorías de la Personalidad
   ============================================================ */
:root {
  --p-primary: #6c4bd6;
  --p-secondary: #1fb6a8;
  --p-gold: #e8b64d;
  --p-dark: #12102a;
}
* { margin:0; padding:0; box-sizing:border-box; }
html, body {
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: var(--p-dark);
  overflow: hidden;
}
.deck { position: relative; width: 100%; height: 100vh; }

.slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 80px 90px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(40px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  background: linear-gradient(160deg, #16123a 0%, #1f1a4d 55%, #241a4d 100%);
  overflow: hidden;
}
.slide.active { opacity: 1; visibility: visible; transform: translateX(0); }

.slide-bg.bg-cover {
  position: absolute; inset: 0;
  background: url('../images/hero-bg.png') center/cover no-repeat;
  opacity: 0.35;
}

.slide-content { position: relative; z-index: 2; width: 100%; max-width: 1100px; color: white; }

/* Portada / cierre */
.cover { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ai-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2);
  padding: 8px 18px; border-radius: 30px; font-size: 0.78rem; font-weight: 600;
  color: var(--p-gold); letter-spacing: 1px; text-transform: uppercase;
}
.cover h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
}
.cover h1 span {
  background: linear-gradient(135deg, var(--p-primary), var(--p-secondary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.closing-title { font-family:'Poppins', sans-serif; font-size: 3.4rem; font-weight: 800; }
.cover-sub { color: rgba(255,255,255,0.7); font-size: 1.1rem; max-width: 640px; }
.cover-authors { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.cover-authors span {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.15);
  padding: 8px 18px; border-radius: 30px; font-size: 0.85rem; font-weight: 500;
}
.back-link {
  margin-top: 18px; color: var(--p-gold); font-weight: 600; font-size: 0.95rem;
  display: inline-flex; align-items: center; gap: 8px;
}

/* Two column layout */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.col-visual.order-first { order: -1; }
.slide-tag {
  display: inline-block; font-size: 0.78rem; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--p-gold); margin-bottom: 14px;
}
.slide-tag.center { display:block; text-align:center; }
.two-col h2, h2.center {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700; margin-bottom: 18px;
}
h2.center { text-align: center; }
.two-col h2 small { display:block; font-size: 1rem; color: rgba(255,255,255,0.55); font-weight: 500; margin-top: 6px; }
.two-col > .col-text > p { color: rgba(255,255,255,0.75); font-size: 1.05rem; margin-bottom: 22px; max-width: 480px; }

.bullet-list { display: flex; flex-direction: column; gap: 14px; }
.bullet-list li { color: rgba(255,255,255,0.85); font-size: 0.98rem; display: flex; gap: 10px; }
.bullet-list i { color: var(--p-secondary); margin-top: 3px; }

.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  padding: 9px 18px; border-radius: 30px; font-size: 0.85rem; font-weight: 600;
  color: white;
}

.col-visual { display: flex; justify-content: center; }
.portrait-frame {
  width: 300px; aspect-ratio: 3/3.6; border-radius: 20px; overflow: hidden;
  box-shadow: 0 25px 50px rgba(0,0,0,0.4); border: 4px solid rgba(255,255,255,0.1);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }

.stat-circle {
  width: 260px; height: 260px; border-radius: 50%;
  background: linear-gradient(135deg, var(--p-primary), var(--p-secondary));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; box-shadow: 0 25px 60px rgba(108,75,214,0.4);
}
.stat-circle strong { font-family: 'Poppins', sans-serif; font-size: 3.6rem; }
.stat-circle span { font-size: 0.85rem; max-width: 160px; opacity: 0.9; }

/* Pyramid (Maslow) */
.pyramid { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.p-level {
  padding: 12px 16px; border-radius: 8px; font-weight: 600; font-size: 0.88rem;
  color: white; text-align: center;
}
.p-1 { background: var(--p-gold); width: 55%; align-self: center; color: #2c2004;}
.p-2 { background: #d9a63f; width: 68%; align-self: center; color: #2c2004;}
.p-3 { background: var(--p-secondary); width: 80%; align-self: center; }
.p-4 { background: #1a8f84; width: 92%; align-self: center; }
.p-5 { background: var(--p-primary); width: 100%; align-self: center; }

/* Compare grid */
.compare-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 36px; }
.compare-card {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 28px 20px; text-align: center;
}
.compare-card i { font-size: 1.8rem; color: var(--p-gold); margin-bottom: 14px; }
.compare-card h4 { font-family:'Poppins',sans-serif; font-size: 1rem; margin-bottom: 8px; }
.compare-card p { font-size: 0.82rem; color: rgba(255,255,255,0.65); }

/* Controls */
.deck-controls {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 20px; z-index: 20;
  background: rgba(0,0,0,0.35); backdrop-filter: blur(8px);
  padding: 10px 20px; border-radius: 30px; border: 1px solid rgba(255,255,255,0.12);
}
.deck-controls button {
  width: 38px; height: 38px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--p-primary), var(--p-secondary)); color: white;
  font-size: 0.9rem; display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s ease;
}
.deck-controls button:hover { transform: scale(1.08); }
.deck-controls button:disabled { opacity: 0.35; cursor: not-allowed; }
.deck-counter { color: white; font-size: 0.85rem; font-weight: 600; min-width: 50px; text-align: center; }

.deck-progress { position: fixed; top: 0; left: 0; width: 100%; height: 4px; background: rgba(255,255,255,0.08); z-index: 20; }
.deck-progress-bar { height: 100%; background: linear-gradient(90deg, var(--p-primary), var(--p-secondary), var(--p-gold)); width: 11%; transition: width 0.4s ease; }

@media (max-width: 820px) {
  .slide { padding: 40px 24px 100px; }
  .two-col { grid-template-columns: 1fr; text-align: center; }
  .col-text > p { margin-left: auto; margin-right: auto; }
  .bullet-list { text-align: left; }
  .chip-row, .cover-authors { justify-content: center; }
  .compare-grid { grid-template-columns: 1fr 1fr; }
  .col-visual.order-first { order: 0; }
  .portrait-frame { width: 200px; }
}
