/* ==========================================================================
   MOTOR DE APRESENTAÇÃO (ESTILO POWERPOINT PARA PC + FLUIDEZ MOBILE)
   ========================================================================== */

/* Barra de Progresso Superior (Visível em Mobile e Desktop) */
.presentation-progress-bar {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  height: 3px;
  background: var(--gradient-primary);
  width: 0%;
  z-index: 1001;
  transition: width 0.2s ease-out;
}

/* Container Principal de Slides */
.presentation-container {
  width: 100%;
}

/* Cada Seção / Slide da Apresentação */
.presentation-slide {
  width: 100%;
  position: relative;
  box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   EXPERIÊNCIA DESKTOP (PC) - NAVEGAÇÃO ESTILO POWERPOINT COM SCROLL-SNAP
   -------------------------------------------------------------------------- */
@media (min-width: 993px) {
  body.page-presentation,
  html:has(body.page-presentation) {
    height: 100%;
    overflow: hidden; /* Scroll delegado ao container de slides */
  }

  .presentation-container {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--border-hover) transparent;
  }

  .presentation-container::-webkit-scrollbar {
    width: 6px;
  }

  .presentation-container::-webkit-scrollbar-thumb {
    background-color: var(--border-hover);
    border-radius: var(--radius-pill);
  }

  .presentation-slide {
    height: 100vh;
    min-height: 100vh;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: calc(var(--nav-height) + 1.25rem);
    padding-bottom: calc(var(--dock-bottom-height) + 1.75rem);
    box-sizing: border-box;
    overflow-y: auto;
  }

  .presentation-slide > .container {
    margin: auto 0;
    width: 100%;
  }

  /* Dock Lateral de Indicadores de Slide (PowerPoint Dots) */
  .presentation-dock {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 990;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    background: var(--bg-surface-glass);
    padding: 0.85rem 0.6rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
  }

  .dock-dot {
    position: relative;
    width: 12px;
    height: 12px;
    border-radius: var(--radius-pill);
    background: var(--border-hover);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
  }

  .dock-dot:hover {
    background: var(--primary);
    transform: scale(1.3);
  }

  .dock-dot.active {
    height: 28px;
    background: var(--gradient-primary);
    box-shadow: 0 0 12px var(--primary-glow);
  }

  /* Tooltip flutuante ao passar o mouse no dot */
  .dock-dot .dot-tooltip {
    position: absolute;
    right: calc(100% + 14px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-surface-elevated);
    color: var(--text-main);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-subtle);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    transform-origin: right center;
  }

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

  /* Barra Inferior Flutuante de Controle de Apresentação */
  .presentation-toolbar {
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 990;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-surface-glass);
    padding: 0.45rem 1.2rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-subtle);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
  }

  .toolbar-counter {
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--text-main);
    letter-spacing: 0.05em;
    padding: 0 0.4rem;
  }

  .toolbar-btn {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-pill);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
  }

  .toolbar-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: scale(1.08);
  }

  .toolbar-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
  }

  .toolbar-keyboard-hint {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-light);
    border-left: 1px solid var(--border-subtle);
    padding-left: 0.85rem;
  }

  .kbd-key {
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-family: monospace;
    font-weight: 700;
    font-size: 0.7rem;
    color: var(--text-muted);
  }
}

/* --------------------------------------------------------------------------
   EXPERIÊNCIA MOBILE (CELULARES E TABLETS) - SCROLL NATURAL E CONFORTÁVEL
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
  html, body {
    height: auto;
    overflow-y: auto;
  }

  .presentation-container {
    height: auto;
    overflow: visible;
    scroll-snap-type: none;
  }

  .presentation-slide {
    height: auto;
    min-height: auto;
    scroll-snap-align: none;
    padding-top: 5rem;
    padding-bottom: 5rem;
  }

  /* Oculta docks específicos do modo slide rígido em mobile */
  .presentation-dock,
  .presentation-toolbar {
    display: none;
  }

  /* Barra de navegação rápida flutuante no rodapé mobile */
  .mobile-slide-indicator {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    background: var(--gradient-primary);
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
}
