/**
 * Robinson College of Business theme for reveal.js
 * Georgia State University
 *
 * GSU Blue: #003478
 * GSU Crimson: #CC0000
 */

/*********************************************
 * GLOBAL STYLES
 *********************************************/
:root {
  --r-background-color: #fff;
  --r-main-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r-main-font-size: 28px;
  --r-main-color: #333;
  --r-block-margin: 20px;
  --r-heading-margin: 0 0 12px 0;
  --r-heading-font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --r-heading-color: #003478;
  --r-heading-line-height: 1.2;
  --r-heading-letter-spacing: normal;
  --r-heading-text-transform: none;
  --r-heading-text-shadow: none;
  --r-heading-font-weight: 700;
  --r-heading1-text-shadow: none;
  --r-heading1-size: 2.2em;
  --r-heading2-size: 1.5em;
  --r-heading3-size: 1.2em;
  --r-heading4-size: 1em;
  --r-code-font: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --r-link-color: #003478;
  --r-link-color-dark: #002255;
  --r-link-color-hover: #0056b3;
  --r-selection-background-color: #003478;
  --r-selection-color: #fff;
  --r-overlay-element-bg-color: 0, 0, 0;
  --r-overlay-element-fg-color: 240, 240, 240;
}

.reveal-viewport {
  background: #fff;
  background-color: var(--r-background-color);
}

.reveal {
  font-family: var(--r-main-font);
  font-size: var(--r-main-font-size);
  font-weight: normal;
  color: var(--r-main-color);
}

.reveal ::selection {
  color: var(--r-selection-color);
  background: var(--r-selection-background-color);
  text-shadow: none;
}

.reveal ::-moz-selection {
  color: var(--r-selection-color);
  background: var(--r-selection-background-color);
  text-shadow: none;
}

.reveal .slides section,
.reveal .slides section > section {
  line-height: 1.3;
  font-weight: inherit;
  text-align: left;
  padding: 20px 50px;
}

/*********************************************
 * HEADERS
 *********************************************/
.reveal h1,
.reveal h2,
.reveal h3,
.reveal h4,
.reveal h5,
.reveal h6 {
  margin: var(--r-heading-margin);
  color: var(--r-heading-color);
  font-family: var(--r-heading-font);
  font-weight: var(--r-heading-font-weight);
  line-height: var(--r-heading-line-height);
  letter-spacing: var(--r-heading-letter-spacing);
  text-transform: var(--r-heading-text-transform);
  text-shadow: var(--r-heading-text-shadow);
  word-wrap: break-word;
}

.reveal h1 { font-size: var(--r-heading1-size); }
.reveal h2 { font-size: var(--r-heading2-size); }
.reveal h3 { font-size: var(--r-heading3-size); }
.reveal h4 { font-size: var(--r-heading4-size); }

/* Title slide: centered */
.reveal .slides section:first-child {
  text-align: center;
}

/*********************************************
 * TEXT
 *********************************************/
.reveal p {
  margin: 10px 0;
  line-height: 1.3;
}

.reveal h1:last-child,
.reveal h2:last-child,
.reveal h3:last-child,
.reveal h4:last-child {
  margin-bottom: 0;
}

.reveal strong,
.reveal b {
  font-weight: bold;
}

.reveal em {
  font-style: italic;
}

/*********************************************
 * LISTS
 *********************************************/
.reveal ol,
.reveal dl,
.reveal ul {
  display: block;
  text-align: left;
  margin: 0 0 0 1em;
}

.reveal ol { list-style-type: decimal; }
.reveal ul { list-style-type: disc; }
.reveal ul ul { list-style-type: square; }
.reveal ul ul ul { list-style-type: circle; }

.reveal ul ul,
.reveal ul ol,
.reveal ol ol,
.reveal ol ul {
  display: block;
  margin-left: 40px;
}

.reveal li {
  margin-bottom: 0.2em;
}

/*********************************************
 * IMAGES & MEDIA
 *********************************************/
.reveal img,
.reveal video,
.reveal iframe {
  max-width: 95%;
  max-height: 95%;
}

.reveal img {
  margin: var(--r-block-margin) 0;
}

/*********************************************
 * TABLES
 *********************************************/
.reveal table {
  margin: auto;
  border-collapse: collapse;
  border-spacing: 0;
  border: 1px solid #ccc;
  font-size: 0.75em;
}

.reveal table th {
  font-weight: bold;
  background-color: #e8e8e8;
  border: 1px solid #ccc;
  padding: 0.3em 0.6em;
}

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

.reveal table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/*********************************************
 * CODE
 *********************************************/
.reveal pre {
  display: block;
  position: relative;
  width: 90%;
  margin: 10px auto;
  text-align: left;
  font-size: 0.50em;
  font-family: var(--r-code-font);
  line-height: 1.5em;
  word-wrap: break-word;
  box-shadow: 0px 3px 10px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.reveal code {
  font-family: var(--r-code-font);
  text-transform: none;
  tab-size: 2;
}

.reveal pre code {
  display: block;
  padding: 10px;
  overflow: auto;
  max-height: 600px;
  word-wrap: normal;
}

.reveal .code-wrapper {
  white-space: normal;
}

.reveal .code-wrapper code {
  white-space: pre;
}

/*********************************************
 * BLOCKQUOTES
 *********************************************/
.reveal blockquote {
  display: block;
  position: relative;
  width: 85%;
  margin: 10px auto;
  padding: 10px 16px;
  font-style: italic;
  font-size: 0.9em;
  background: #f4f6f9;
  border-left: 4px solid #003478;
  box-shadow: none;
}

/*********************************************
 * LINKS
 *********************************************/
.reveal a {
  color: var(--r-link-color);
  text-decoration: none;
  transition: color 0.15s ease;
}

.reveal a:hover {
  color: var(--r-link-color-hover);
  text-decoration: underline;
}

/*********************************************
 * NAVIGATION CONTROLS — centered, horizontal
 * Layout:  < 4 >
 *********************************************/
.reveal .controls {
  color: #003478;
  right: auto;
  left: 50%;
  bottom: 12px;
  transform: translateX(-50%);
  width: 12em;
}

/* Hide up/down arrows (horizontal slides only) */
.reveal .controls .navigate-up,
.reveal .controls .navigate-down {
  display: none !important;
}

/* Left arrow — left side of container */
.reveal .controls .navigate-left {
  right: auto;
  left: 0;
  bottom: 0;
}

/* Right arrow — right side of container */
.reveal .controls .navigate-right {
  right: 0;
  bottom: 0;
}

/*********************************************
 * PROGRESS BAR
 *********************************************/
.reveal .progress {
  background: rgba(0, 0, 0, 0.1);
  color: #003478;
}

/*********************************************
 * SLIDE NUMBER — centered between chevrons
 *********************************************/
.reveal .slide-number {
  background: transparent;
  color: #666;
  font-size: 16px;
  bottom: 22px;
  right: auto;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
}

/*********************************************
 * FOOTER (logos and branding)
 *********************************************/
.reveal .slide-footer {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  pointer-events: none;
  z-index: 10;
}

.reveal .slide-footer img {
  max-height: 45px;
  margin: 0;
}

.reveal .slide-footer .footer-right img {
  max-height: 30px;
}

/*********************************************
 * BACK-TO-INDEX LINK — upper-left, hover-reveal
 *********************************************/
.reveal .back-to-index {
  position: fixed;
  top: 12px;
  left: 16px;
  z-index: 100;
  font-size: 14px;
  font-family: var(--r-main-font);
  color: #003478;
  text-decoration: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.85);
  pointer-events: none;
}

/* Hover zone: invisible 60×40 area in the upper-left corner */
.reveal .back-to-index::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 80px;
  height: 50px;
  pointer-events: auto;
}

.reveal .back-to-index:hover,
.reveal .back-to-index:focus {
  opacity: 1;
  pointer-events: auto;
}

/*********************************************
 * BACKGROUND JITTER — subtle occasional jitter on break slides
 *********************************************/
@keyframes bg-jitter {
  0%, 88%, 100% {
    transform: scale(1.03);
    filter: brightness(1) contrast(1) saturate(1);
  }
  89% {
    transform: scale(1.03);
    filter: brightness(1.15) contrast(1.2) saturate(1.3);
  }
  90% {
    transform: translate(3px, -2px) scale(1.03);
    filter: brightness(0.85) contrast(1.3) saturate(0.7);
  }
  91% {
    transform: translate(1px, 1px) scale(1.03);
    filter: brightness(1.25) contrast(0.9) saturate(1.4);
  }
  92% {
    transform: translate(-2px, 3px) scale(1.03);
    filter: brightness(0.9) contrast(1.2) saturate(0.8);
  }
  93% {
    transform: translate(0px, -1px) scale(1.03);
    filter: brightness(1.1) contrast(1.1) saturate(1.2);
  }
  94% {
    transform: translate(-3px, -2px) scale(1.03);
    filter: brightness(0.8) contrast(1.4) saturate(0.6);
  }
  96% {
    transform: translate(2px, 2px) scale(1.03);
    filter: brightness(1.2) contrast(1.15) saturate(1.1);
  }
  98% {
    transform: translate(-1px, -3px) scale(1.03);
    filter: brightness(0.95) contrast(1.1) saturate(0.9);
  }
}

/* TV static snow — dense grayscale noise */
@keyframes static-snow {
  0%, 88%, 100% { opacity: 0; }
  89%           { opacity: 0.5;  background-position: 0 0; }
  89.5%         { opacity: 0.65; background-position: -50px -30px; }
  90%           { opacity: 0.55; background-position: 20px -60px; }
  90.5%         { opacity: 0.7;  background-position: -70px 40px; }
  91%           { opacity: 0.6;  background-position: 40px 10px; }
  91.5%         { opacity: 0.45; background-position: -20px -50px; }
  92%           { opacity: 0.55; background-position: 60px 30px; }
  93%           { opacity: 0.7;  background-position: -40px -20px; }
  94%           { opacity: 0.5;  background-position: 30px 50px; }
  95%           { opacity: 0.65; background-position: -10px -40px; }
  96%           { opacity: 0.4;  background-position: 50px 20px; }
  97%           { opacity: 0.3;  background-position: -30px 10px; }
  98%           { opacity: 0.15; background-position: 10px -10px; }
  99%           { opacity: 0; }
}

/* Horizontal scanline distortion */
@keyframes scanline-glitch {
  0%, 88%, 100% { opacity: 0; }
  89%           { opacity: 0.3; background-position: 0 0; }
  90%           { opacity: 0.5; background-position: 0 3px; }
  91%           { opacity: 0.4; background-position: 0 -2px; }
  92%           { opacity: 0.6; background-position: 0 5px; }
  93%           { opacity: 0.35; background-position: 0 -1px; }
  94%           { opacity: 0.55; background-position: 0 4px; }
  95%           { opacity: 0.45; background-position: 0 -3px; }
  96%           { opacity: 0.3; background-position: 0 2px; }
  97%           { opacity: 0.2; background-position: 0 0; }
  99%           { opacity: 0; }
}

.jitter .slide-background.present .slide-background-content {
  animation: bg-jitter 12s ease-in-out infinite;
}

/* Dense TV snow overlay */
.jitter .slide-background.present .slide-background-content::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='discrete' tableValues='0 1'/%3E%3CfeFuncG type='discrete' tableValues='0 1'/%3E%3CfeFuncB type='discrete' tableValues='0 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  background-repeat: repeat;
  opacity: 0;
  animation: static-snow 12s ease-in-out infinite;
  pointer-events: none;
}

/* Horizontal scanlines */
.jitter .slide-background.present .slide-background-content::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 0, 0, 0.3) 2px,
    rgba(0, 0, 0, 0.3) 4px
  );
  opacity: 0;
  animation: scanline-glitch 12s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

/*********************************************
 * BACKGROUND BOX — centered overlay for break slides
 *********************************************/
.reveal .slides section:has(.background-box) {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0;
  height: 100%;
}

.reveal .background-box {
  padding: 42px;
  background-color: rgba(0, 0, 0, 0.7);
  text-align: center;
}

/*********************************************
 * PRINT
 *********************************************/
@media print {
  .backgrounds {
    background-color: var(--r-background-color);
  }
}
