/* ==========================================================================
   Engine CSS — Motor de Apresentação Educare
   Layout 100dvh, Controles Flutuantes, Dock Lateral, Barra de Progresso e Estados
   ========================================================================== */

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  user-select: none;
}

/* Background com padrão sutil de confetes e texturas */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(255, 196, 0, 0.05) 0%, transparent 20%),
    radial-gradient(circle at 90% 80%, rgba(2, 136, 209, 0.04) 0%, transparent 25%),
    radial-gradient(circle at 80% 15%, rgba(229, 57, 53, 0.03) 0%, transparent 20%),
    radial-gradient(circle at 20% 85%, rgba(0, 168, 89, 0.04) 0%, transparent 20%);
  pointer-events: none;
  z-index: 0;
}

/* Barra de Progresso Superior */
.top-progress-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: rgba(21, 27, 79, 0.06);
  z-index: 1000;
}

#slide-progress {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--educare-yellow) 0%, var(--educare-orange) 50%, var(--educare-blue-bright) 100%);
  transform-origin: left center;
  transform: scaleX(0.055);
  transition: transform 0.4s var(--ease-out);
}

/* Barra de Topo Discreta (Marca & Contexto) */
.deck-topbar {
  position: fixed;
  top: 14px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  pointer-events: none;
}

.brand-mini {
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  cursor: pointer;
}

.brand-mini-logo {
  height: 42px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(21, 27, 79, 0.12));
}

.brand-mini-text {
  display: flex;
  flex-direction: column;
}

.brand-mini-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--educare-blue-deep);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-mini-title span {
  color: var(--educare-yellow-dark);
}

.brand-mini-sub {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.meeting-badge {
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--educare-blue-deep);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.meeting-badge .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--educare-green);
  box-shadow: 0 0 8px var(--educare-green);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.4;
    transform: scale(0.85);
  }
}

/* Container de Slides */
.deck-container {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
  z-index: 10;
}

.slide-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 84px 90px 84px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px) scale(0.985);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out), visibility 0.55s;
  overflow: hidden;
}

.slide-stage.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  z-index: 20;
}

/* Dock Lateral de Seções / Slides (18 Slides) — Posicionado no Topo */
.dock-nav {
  position: fixed;
  right: 32px;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 120;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 8px 6px;
  border-radius: var(--radius-pill);
  box-shadow: 0 8px 24px rgba(21, 27, 79, 0.08);
  border: 1px solid var(--border-subtle);
  transition: all 0.3s var(--ease-out);
}

.dock-dot {
  position: relative;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(21, 27, 79, 0.22);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.22s var(--ease-out);
}

.dock-dot:hover {
  background: var(--educare-blue);
  transform: scale(1.35);
}

.dock-dot.is-active {
  background: var(--educare-yellow);
  box-shadow: 0 0 0 3px var(--educare-blue-deep);
  transform: scale(1.4);
}

/* Tooltip do Dock Lateral */
.dock-dot .dock-tooltip {
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: var(--educare-blue-deep);
  color: #FFFFFF;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s var(--ease-out);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}

.dock-dot .dock-tooltip::after {
  content: '';
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 5px 0 5px 5px;
  border-style: solid;
  border-color: transparent transparent transparent var(--educare-blue-deep);
}

.dock-dot:hover .dock-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Controles Flutuantes Verticais (Slide Prev / Counter / Next / Utilitários) */
.deck-controls {
  position: fixed;
  bottom: 22px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  z-index: 120;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  padding: 8px 6px;
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(21, 27, 79, 0.12);
  border: 1px solid var(--border-subtle);
  width: 48px;
  transition: all 0.3s var(--ease-out);
}

.nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--educare-blue-deep);
  background: var(--educare-yellow);
  color: var(--educare-blue-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  padding: 0;
}

.nav-btn svg {
  width: 17px;
  height: 17px;
  display: block;
}

.nav-btn:hover {
  background: var(--educare-yellow-glow);
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(255, 196, 0, 0.45);
}

.nav-btn:active {
  transform: scale(0.94);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

.slide-counter {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  color: var(--educare-blue-deep);
  text-align: center;
  letter-spacing: 0.02em;
  padding: 2px 0;
  white-space: nowrap;
  line-height: 1.1;
  user-select: none;
}

.deck-controls-divider {
  width: 20px;
  height: 1px;
  background: rgba(21, 27, 79, 0.12);
  margin: 1px 0;
}

.deck-controls-utilities {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.utility-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s var(--ease-out);
}

.utility-btn:hover {
  background: var(--educare-blue-soft);
  color: var(--educare-blue);
  border-color: var(--educare-blue);
  transform: scale(1.06);
}

/* Teclado e Dicas de Atalho no Rodapé Esquerdo */
.deck-shortcuts-hint {
  position: fixed;
  bottom: 22px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  color: var(--text-muted);
  z-index: 100;
  pointer-events: none;
  opacity: 0.8;
}

.kbd-badge {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: monospace;
  font-weight: 600;
  color: var(--educare-blue-deep);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

/* Blackout Overlay ('B' de Tela Preta) */
#blackout-overlay {
  position: fixed;
  inset: 0;
  background-color: #070914;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.is-blackout #blackout-overlay {
  opacity: 1;
  pointer-events: auto;
}

.blackout-message {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Painel de Ajuda / Atalhos */
#shortcuts-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 19, 56, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

#shortcuts-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  max-width: 480px;
  width: 90%;
  box-shadow: var(--shadow-floating);
  border: 2px solid var(--educare-yellow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--educare-blue-deep);
  font-size: 1.3rem;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

.shortcuts-list {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 20px;
  font-size: 0.9rem;
}

.shortcuts-list dt {
  color: var(--text-main);
  font-weight: 500;
}

.shortcuts-list dd {
  display: flex;
  gap: 6px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .slide-stage {
    transition: opacity 0.3s ease !important;
    transform: none !important;
  }

  #slide-progress {
    transition: transform 0.1s ease !important;
  }
}

/* Telas com Altura Compacta (ex: notebooks 768p com barras abertas) */
@media (max-height: 720px) {
  .dock-nav {
    top: 66px;
    gap: 4px;
    padding: 6px 5px;
  }

  .dock-dot {
    width: 8px;
    height: 8px;
  }

  .deck-controls {
    bottom: 14px;
    gap: 5px;
    padding: 6px 4px;
  }

  .nav-btn {
    width: 32px;
    height: 32px;
  }

  .nav-btn svg {
    width: 15px;
    height: 15px;
  }

  .utility-btn {
    width: 26px;
    height: 26px;
    font-size: 0.72rem;
  }
}

/* Telas Mobile / Dispositivos Menores */
@media (max-width: 768px) {
  .dock-nav {
    display: none;
    /* Oculta os 18 pontos em celular para não obstruir o conteúdo */
  }

  .deck-controls {
    right: 14px;
    bottom: 14px;
  }

  .deck-shortcuts-hint {
    display: none;
  }
}

height: 13px;
}

.slide-counter {
  font-size: 0.62rem;
}

.utility-btn {
  width: 22px;
  height: 22px;
  font-size: 0.68rem;
}

.deck-shortcuts-hint {
  bottom: 8px;
  left: 14px;
  font-size: 0.66rem;
}
}

@media (max-height: 600px) {
  .slide-stage {
    padding: 36px 14px 30px 14px;
  }

  .deck-topbar {
    top: 6px;
  }

  .brand-mini-sub {
    display: none;
  }

  .dock-nav {
    display: none;
  }
}

/* Telas Mobile / Dispositivos Menores */
@media (max-width: 768px) {
  .dock-nav {
    display: none;
    /* Oculta os 18 pontos em celular para não obstruir o conteúdo */
  }

  .deck-controls {
    right: 12px;
    bottom: 12px;
  }

  .deck-shortcuts-hint {
    display: none;
  }
}