/*
 * IUG 2026 Custom Theme for Reveal.js
 * Matches the official IUG 2026 PowerPoint template design:
 *   - Title slide: split layout (white left / beige right) with logo
 *   - Content slides: white body with beige footer bar + small logo
 *
 * Color Palette (from template):
 *   (Old IUG Navy: #00223D — replaced by CHPL Navy #0C2340)
 *   Charcoal:     #53575A (body text)
 *   Blue:         #156082 (primary accent)
 *   Light Blue:   #0F9ED5 (links, highlights)
 *   Orange:       #E97132 (accent, emphasis)
 *   Teal:         #467886 (hyperlinks)
 *   Beige:        #F3E4C5 (footer bar, title slide background)
 *   Light Gray:   #E8E8E8 (subtle backgrounds)
 *   White:        #FFFFFF (slide backgrounds)
 */

/* -- Web font fallback (Inter is closest free match to Aptos/BrownStd) -- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

/* -- Base overrides on top of white.css -- */

/*
 * Font stack priority:
 *   1. Aptos / Aptos Display — IUG 2026 template font (Windows/Office)
 *   2. BrownStd — CHPL brand font (licensed, Lineto)
 *   3. Inter — closest free web match
 *   4. Arial — CHPL-approved digital fallback
 *
 * Color palette merges IUG 2026 template with CHPL brand:
 *   CHPL Navy:    #0C2340 (headings — nearly identical to IUG #00223D)
 *   Charcoal:     #53575A (body text)
 *   CHPL Cream:   #F6F1EB (warm backgrounds, title slides)
 *   IUG Beige:    #F3E4C5 (footer bar)
 *   Blue:         #156082 (primary accent)
 *   Light Blue:   #0F9ED5 (links, highlights)
 *   Orange:       #E97132 (accent, emphasis)
 *   Teal:         #467886 (hyperlinks)
 */

.reveal {
  font-family: 'Aptos', 'BrownStd', 'Inter', Arial, sans-serif;
  font-size: 42px;
  font-weight: 300;
  color: #53575A;
}

.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
  font-family: 'Aptos Display', 'Aptos', 'BrownStd', 'Inter', Arial, sans-serif;
  color: #0C2340;
  font-weight: 700;
  text-transform: none;
  letter-spacing: normal;
}

.reveal h1 { font-size: 1.8em; }
.reveal h2 { font-size: 1.4em; }
.reveal h3 { font-size: 1.1em; }

.reveal a {
  color: #467886;
  text-decoration: none;
}

.reveal a:hover {
  color: #0F9ED5;
  text-decoration: underline;
}

/* Accent class for emphasis text */
.reveal .accent {
  color: #E97132;
  font-weight: 700;
}

.reveal .blue {
  color: #156082;
}

.reveal .navy {
  color: #0C2340;
}

/* =============================================
   NAVIGATION CONTROLS — move above footer bar
   ============================================= */

.reveal .controls {
  bottom: 110px !important;
}

/* Slide number: top-right, e.g. "3/16" */
.reveal .slide-number {
  position: fixed;
  top: 12px;
  right: 16px;
  bottom: auto;
  left: auto;
  font-size: 0.5em;
  color: #808285;
  background: none;
}

/* =============================================
   TITLE / CLOSING SLIDES — split layout
   Left: white panel with logo
   Right: beige background (via data-background)
   ============================================= */

.reveal .title-slide {
  text-align: left;
  padding: 0 !important;
}

/* White logo panel — lives OUTSIDE .reveal in the DOM
   so CSS transforms don't break position: fixed centering */
.title-logo-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 28%;
  height: 100vh;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.title-logo-panel img {
  width: 80%;
  max-width: 300px;
}

/* Title content positioned on the right */
.reveal .title-slide .title-content {
  margin-left: 30%;
  padding: 0 2em;
  text-align: left;
  z-index: 51;
  position: relative;
}

.reveal .title-slide .title-content h1 {
  font-size: 1.6em;
  color: #0C2340;
  margin: 0 0 0.15em 0;
  line-height: 1.2;
}

.reveal .title-slide .title-content h2 {
  font-size: 0.7em;
  color: #0C2340;
  font-weight: 400;
  margin: 0 0 1em 0;
  opacity: 0.75;
}

.reveal .title-slide .title-content p {
  font-size: 0.5em;
  color: #53575A;
  margin: 0;
  line-height: 1.7;
}

/* CHPL logo on title/closing slides */
.reveal .title-slide .chpl-logo {
  max-width: 200px;
  margin-top: 1.2em;
}

/* =============================================
   CONTENT SLIDES — beige footer bar with logo
   ============================================= */

/* Persistent footer bar on all non-title slides
   Template: 14.4% of slide height, logo is 86% of bar height */
.reveal .footer-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: #F3E4C5;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  box-sizing: border-box;
  z-index: 100;
}

.reveal .footer-bar img {
  height: 86px;
  width: auto;
}

.reveal .footer-bar .footer-chpl-logo {
  height: 52px;
  margin-right: auto;
  margin-left: 12px;
}

/* Ensure slide content doesn't overlap the footer */
.reveal .slides section {
  padding-bottom: 120px;
}

/* Title slides don't need footer padding */
.reveal .slides section.title-slide {
  padding-bottom: 0;
}

/* Dark background slides (navy) */
.reveal section[data-background-color="#0C2340"] h1,
.reveal section[data-background-color="#0C2340"] h2,
.reveal section[data-background-color="#0C2340"] h3,
.reveal section[data-background-color="#0C2340"] p,
.reveal section[data-background-color="#0C2340"] li,
.reveal section[data-background-color="#0E2841"] h1,
.reveal section[data-background-color="#0E2841"] h2,
.reveal section[data-background-color="#0E2841"] h3,
.reveal section[data-background-color="#0E2841"] p,
.reveal section[data-background-color="#0E2841"] li {
  color: #FFFFFF;
}

.reveal section[data-background-color="#0C2340"] a,
.reveal section[data-background-color="#0E2841"] a {
  color: #0F9ED5;
}

/* Lists */
.reveal ul,
.reveal ol {
  text-align: left;
  margin-left: 1em;
}

.reveal li {
  margin-bottom: 0.4em;
  font-size: 0.85em;
}

/* Code blocks */
.reveal pre {
  font-size: 0.55em;
  box-shadow: none;
  border: 1px solid #E8E8E8;
  border-radius: 4px;
}

.reveal code {
  font-family: 'Fira Code', 'JetBrains Mono', 'Source Code Pro', monospace;
}

.reveal p code,
.reveal li code {
  background: #E8E8E8;
  padding: 0.1em 0.3em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* Images */
.reveal img {
  border: none;
  box-shadow: none;
}

/* Two-column layout helper */
.reveal .columns {
  display: flex;
  gap: 2em;
}

.reveal .columns .col {
  flex: 1;
}

/* Screenshot styling */
.reveal .screenshot {
  border: 2px solid #E8E8E8;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Tables */
.reveal table {
  border-collapse: collapse;
}

.reveal table th {
  background: #0C2340;
  color: #FFFFFF;
  padding: 0.4em 0.6em;
  font-weight: 600;
}

.reveal table td {
  border-bottom: 1px solid #E8E8E8;
  padding: 0.3em 0.6em;
}

.reveal table tr:nth-child(even) td {
  background: #f9f7f3;
}

/* =============================================
   MOBILE / SMALL SCREENS
   ============================================= */

@media screen and (max-width: 800px) {
  .reveal {
    font-size: 28px;
  }

  /* Stack title slide vertically instead of split layout */
  .title-logo-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 50;
  }

  .title-logo-panel img {
    width: auto;
    max-width: none;
    max-height: 60px;
  }

  .reveal .title-slide .title-content {
    margin-left: 0;
    margin-top: 60px;
    padding: 0.5em 1em;
    text-align: center;
  }

  .reveal .title-slide .title-content h1 {
    font-size: 1.2em;
  }

  .reveal .title-slide .title-content h2 {
    font-size: 0.6em;
  }

  /* Smaller footer */
  .reveal .footer-bar {
    height: 60px;
  }

  .reveal .footer-bar img {
    height: 50px;
  }

  .reveal .controls {
    bottom: 65px !important;
  }

  .reveal .slides section {
    padding-bottom: 70px;
  }

  .reveal li {
    font-size: 0.75em;
  }

  .reveal pre {
    font-size: 0.45em;
  }
}
