@import 'fonts.css';

/* ---------- Visor de diapositivas ---------- */

.slide-viewer {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(10px, 2vw, 18px);
  box-shadow: var(--shadow);
}

.slide-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}

.slide-stage img,
.slide-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.slide-stage video {
  background: #000;
}

.slide-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 18%;
  border: none;
  background: transparent;
  cursor: pointer;
  color: transparent;
  font-size: 2.4rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.slide-nav:hover,
.slide-nav:focus-visible {
  color: #fff;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent);
}

.slide-nav-prev { left: 0; }
.slide-nav-next { right: 0; }
.slide-nav-next:hover,
.slide-nav-next:focus-visible {
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.35), transparent);
}

.slide-nav[disabled] { display: none; }

.slide-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.slide-controls-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slide-btn {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.slide-btn:hover:not([disabled]) {
  background: rgba(201, 171, 107, 0.18);
  border-color: var(--accent);
}

.slide-btn[disabled] {
  opacity: 0.4;
  cursor: default;
}

.slide-btn-video {
  background: linear-gradient(135deg, rgba(201, 171, 107, 0.88), rgba(197, 151, 69, 0.95));
  color: #08120e;
  font-weight: 700;
  border: none;
}

.slide-counter {
  min-width: 5.5em;
  text-align: center;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.slide-comment {
  margin-top: 14px;
  padding: 14px 18px;
  border-left: 3px solid var(--accent);
  background: rgba(201, 171, 107, 0.08);
  border-radius: 0 12px 12px 0;
}

.slide-comment[hidden] { display: none; }

.slide-comment-label {
  margin: 0 0 4px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.content-page .slide-comment-text {
  margin: 0;
  color: var(--text);
  white-space: pre-line;
  line-height: 1.7;
}

.slide-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: thin;
}

.slide-thumb {
  flex: 0 0 auto;
  width: 112px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 6px;
  background: none;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}

.slide-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 4px;
}

.slide-thumb:hover { opacity: 0.85; }

.slide-thumb.is-active {
  opacity: 1;
  border-color: var(--accent);
}

/* Pantalla completa: la diapositiva ocupa todo, sin marcos. */
.slide-viewer:fullscreen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 0;
  border: none;
  padding: 12px;
  background: #000;
}

.slide-viewer:fullscreen .slide-stage {
  flex: 1 1 auto;
  aspect-ratio: auto;
  border-radius: 0;
}

.slide-viewer:fullscreen .slide-thumbs { display: none; }

@media (max-width: 640px) {
  .slide-thumb { width: 84px; }
  .slide-controls { justify-content: center; }
}
