/* Print button — visible in browser, hidden when printing */
.print-btn {
  position: fixed;
  top: 28px;
  right: 40px;
  background: transparent;
  border: 1.5px solid rgba(234,120,69,0.5);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary);
  z-index: 1000;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.print-btn:hover {
  background: var(--primary);
  color: white;
}

/* Presentation (fullscreen) button — sits left of the PDF button */
.present-btn {
  position: fixed;
  top: 28px;
  right: 158px;
  background: transparent;
  border: 1.5px solid rgba(234,120,69,0.5);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--primary);
  z-index: 1000;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.present-btn:hover {
  background: var(--primary);
  color: white;
}

/* When in fullscreen, the PDF button is irrelevant — hide it; show only Exit */
:fullscreen .print-btn { display: none; }

@media print {
  @page {
    /* 16:9 presentation format — matches screen layout exactly */
    size: 1280px 720px;
    margin: 0;
  }

  /* Force background colors and images to print */
  *, *::before, *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Reset scroll/overflow so all slides are visible */
  html, body {
    overflow: visible !important;
    height: auto !important;
  }

  .deck {
    height: auto !important;
  }

  /* Each slide is normally position:absolute + display:none until .active.
     For print, stack every slide in flow and let page-break-after split them. */
  section {
    position: static !important;
    display: flex !important;
    page-break-after: always;
    break-after: page;
    page-break-inside: avoid;
    break-inside: avoid;
    height: 720px !important;
    width: 1280px !important;
    overflow: hidden !important;
    box-sizing: border-box;
  }

  /* Avoid blank page after the last slide */
  section:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  /* Hide on-page controls when printing */
  .print-btn,
  .present-btn,
  .nav-dots,
  .slide-counter {
    display: none !important;
  }
}
