/* Base presentation styles - shared across all presentations */

/* Fix content overflow issues - NO SCROLLBARS */
.reveal .slides {
  height: 100%;
  width: 100%;
}

.reveal .slides > section,
.reveal .slides > section > section {
  height: 100%;
  overflow: hidden; /* NO SCROLLING - content must fit */
  padding: 20px;
  box-sizing: border-box;
}

/* Ensure sections fit in viewport */
.reveal section {
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden; /* Absolutely no scrollbars */
}

/* Typography - aggressive sizing to prevent overflow */
.reveal h1, .reveal h2, .reveal h3, .reveal h4, .reveal h5, .reveal h6 {
  text-transform: none;
  font-weight: 700;
  margin: 0.15em 0 0.3em 0;
}

.reveal h1 {
  font-size: 2em;
}

.reveal h2 {
  font-size: 1.5em;
}

.reveal h3 {
  font-size: 1.15em;
}

.reveal h4 {
  font-size: 1em;
}

/* Code blocks */
.reveal pre {
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.5);
  font-size: 0.55em;
  line-height: 1.4;
  margin: 20px auto;
  max-width: 98%;
  width: 98%;
}

.reveal code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', 'Monaco', monospace;
  padding: 2px 8px;
  border-radius: 3px;
}

.reveal pre code {
  padding: 20px;
  overflow: auto;
  max-height: 500px;
  display: block;
  white-space: pre;
}

/* Responsive code font sizing - smaller font for larger code blocks */
.reveal pre code {
  font-size: 1em;
}

/* Adjust for very long code samples (15+ lines) */
.reveal section:has(pre code) {
  --code-scale: 1;
}

/* Default font size for slides */
.reveal {
  font-size: 36px; /* Reduced from default 40px */
}

/* Paragraphs - minimal spacing to fit more content */
.reveal p {
  margin: 0.3em 0;
  line-height: 1.25;
}

/* Lists - tight spacing */
.reveal ul, .reveal ol {
  display: block;
  text-align: left;
  margin: 0.3em 0;
  line-height: 1.3;
}

.reveal li {
  margin: 0.2em 0;
}

.reveal ul ul, .reveal ol ol {
  font-size: 0.9em;
}

/* Links */
.reveal a {
  color: #42affa;
  text-decoration: none;
  transition: color 0.15s ease;
}

.reveal a:hover {
  color: #8dcffc;
  text-shadow: none;
  border: none;
}

/* Images */
.reveal img {
  max-width: 90%;
  max-height: 600px;
  margin: 15px auto;
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.reveal img.no-border {
  border: none;
  box-shadow: none;
  background: transparent;
}

/* Two-column layouts */
.reveal .two-col {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

.reveal .two-col > * {
  flex: 1;
}

/* Three-column layouts */
.reveal .three-col {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

.reveal .three-col > * {
  flex: 1;
}

/* Fragments */
.reveal .fragment.highlight-current-blue {
  opacity: 1;
  visibility: inherit;
}

.reveal .fragment.highlight-current-blue.current-fragment {
  color: #42affa;
  font-weight: bold;
}

/* Speaker footer (logo watermark) */
.reveal .speaker-footer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
}

.reveal .speaker-footer img {
  width: 100px;
  height: auto;
  opacity: 0.4;
  transition: opacity 0.3s;
  box-shadow: none;
  margin: 0;
}

.reveal .speaker-footer img:hover {
  opacity: 0.8;
}

/* Progress bar styling */
.reveal .progress {
  height: 3px;
}

.reveal .progress span {
  background: #42affa;
}

/* Controls */
.reveal .controls {
  color: #42affa;
}

/* Speaker notes styling */
.reveal .speaker-notes {
  font-size: 1em;
  line-height: 1.6;
}

/* Tables */
.reveal table {
  margin: auto;
  border-collapse: collapse;
  border-spacing: 0;
}

.reveal table th {
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.1);
}

.reveal table th,
.reveal table td {
  text-align: left;
  padding: 0.5em 1em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

/* Blockquotes */
.reveal blockquote {
  width: 80%;
  margin: 0.5em auto;
  padding: 10px 20px;
  font-style: italic;
  background: rgba(255, 255, 255, 0.05);
  box-shadow: none; /* Remove the weird shadow effect */
  border-left: 3px solid #42affa;
  font-size: 0.9em;
  border-radius: 0; /* Ensure no rounded corners */
}

.reveal blockquote p {
  margin: 0;
}

/* Compact mode for content-heavy slides */
.reveal .compact {
  font-size: 0.8em;
}

.reveal .compact h2 {
  font-size: 1.3em;
  margin: 0.15em 0;
}

.reveal .compact h3 {
  font-size: 1em;
  margin: 0.15em 0;
}

.reveal .compact h4 {
  font-size: 0.9em;
  margin: 0.1em 0;
}

.reveal .compact ul, .reveal .compact ol {
  margin: 0.2em 0;
  line-height: 1.2;
}

.reveal .compact li {
  margin: 0.15em 0;
}

.reveal .compact p {
  margin: 0.2em 0;
  line-height: 1.2;
}

/* Auto-compact for slides with many fragments */
.reveal section:has(.fragment:nth-child(7)) {
  font-size: 0.9em;
}

.reveal section:has(.fragment:nth-child(10)) {
  font-size: 0.85em;
}

/* Section Header Slides - title positioned lower like PowerPoint */
.reveal section.section-header {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  text-align: center;
  padding-bottom: 25vh; /* Position content in lower-middle area */
}

.reveal section.section-header h2 {
  font-size: 2.8em;
  margin: 0.3em 0;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.reveal section.section-header p {
  font-size: 1.3em;
  margin: 0.3em 0;
  opacity: 0.85;
  font-weight: 300;
}

/* Utility classes */
.reveal .text-left {
  text-align: left;
}

.reveal .text-center {
  text-align: center;
}

.reveal .text-right {
  text-align: right;
}

.reveal .text-small {
  font-size: 0.7em;
}

.reveal .text-smaller {
  font-size: 0.5em;
}

.reveal .mt-1 {
  margin-top: 1em;
}

.reveal .mt-2 {
  margin-top: 2em;
}

.reveal .mb-1 {
  margin-bottom: 1em;
}

.reveal .mb-2 {
  margin-bottom: 2em;
}

/* Full-screen content */
.reveal .full-screen {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

/* Grid layouts */
.reveal .grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.reveal .grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

/* Comparison slides */
.reveal .comparison {
  display: flex;
  gap: 40px;
}

.reveal .comparison .pros,
.reveal .comparison .cons {
  flex: 1;
}

.reveal .comparison .pros h3 {
  color: #4caf50;
}

.reveal .comparison .cons h3 {
  color: #f44336;
}

/* Quote slides */
.reveal .quote-slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.reveal .quote-slide blockquote {
  width: 90%;
  font-size: 1.5em;
  margin-bottom: 1em;
}

.reveal .quote-slide .attribution {
  font-size: 0.8em;
  font-style: normal;
  opacity: 0.8;
}

/* Video backgrounds */
.reveal section[data-background-video] h1,
.reveal section[data-background-video] h2,
.reveal section[data-background-video] h3 {
  background-color: rgba(0, 0, 0, 0.7);
  padding: 20px;
  border-radius: 5px;
}

/* Mermaid diagram styling */
.reveal .mermaid {
  background: transparent;
  padding: 20px;
  border-radius: 5px;
}
