// Custom colors and variables
$primary-color: #7099fa; // Main blue color
$secondary-color: #666; // Secondary gray color
$tertiary-color: #333; // Tertiary dark gray color
$background-color: #ffffff; // White background color

// Unicode character for right arrow
$right-arrow: "\2192";

// Fonts
@import url('https://fonts.googleapis.com/css?family=Roboto:200,200i,300,300i,350,350i,400,400i&display=swap');
$font-family-sans-serif: "Roboto", sans-serif !default;
$presentation-heading-font: "Roboto", sans-serif !default;

// Default colors for various elements
$presentation-heading-color: #7099fa !default;
$presentation-heading-font-weight: strong;
$body-color: #666 !default;
$link-color: $tertiary-color !default;
$selection-bg: $primary-color !default;

/*-- SCSS Rules --*/

// Global reveal.js container styles
.reveal {
  background-image: url('https://github.com/bahadars/images/blob/main/slide-bg-19.jpg?raw=true'); // Path to your background image
  background-size: cover; // Cover the entire slide with your image
  background-position: center; // Center the background image
  background-repeat: no-repeat; // Do not repeat the image
}

.reveal a {
  line-height: 1.5em;
}

.reveal p {
  font-weight: lighter;
  color: #666 ;
  margin-top: 1.25em;
}

// Title slide styles
/* -- Title Slide -- */

#title-slide {
  text-align: center;
  background-color: $jet; // Optional: Change background color for emphasis

  .title {
    color: #7099fa;
    font-size: 2.5em; // Adjust size as needed
    font-weight: bold;
    margin-top: 20vh; // Adjust based on your preference
  }

  .subtitle {
    color: #666;
    font-style: italic;
    margin-top: 1em;
    font-weight: normal;
    font-size: 1.5em; // Adjust size as needed
  }

  .divider {
    margin: 20px auto; // Centered divider
    width: 50%; // Divider width
    border: 0;
    height: 1px;
    background: $accent; // Divider color
  }

  .author {
    color: $body-color;
    margin-top: 1em;
    font-weight: normal;
    font-size: 1em;
  }

  .footer {
    color: $accent;
    font-size: 0.75em;
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
  }
}

// Heading styles

.reveal h1 {
  font-weight: lighter;
  font-size: 1.2em;
  margin-top: 30px;
  margin-bottom: 20px;
  color: #7099fa;
  text-align: center;
}

.reveal h2 {
  font-weight: solid;
  font-size: 1.9em;
  margin-top: 30px;
  margin-bottom: 20px;
  color: #7099fa;
  text-align: center;
}

.reveal h3 {
  color: $secondary-color;
  font-style: italic;
  font-weight: lighter;
  font-size: 0.95em;
}

.reveal h4 {
  color: $primary-color;
  font-weight: normal;
  font-size: 1.4em;
  margin-top: 1.25em;
  margin-bottom: 32px;
}

// Divider/Separator line
.divider {
  height: 2px;
  margin: 20px auto; // Adjust the margin as needed
  width: 100%;
  border-top: 1px solid #ccc; /* Change the color and thickness as needed */
  
}

// Text alignments
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-justify {
  text-align: justify;
}

// Vertical alignments
.vertical-top {
  vertical-align: top;
}

.vertical-middle {
  vertical-align: middle;
}

.vertical-bottom {
  vertical-align: bottom;
}

/* Specific class for centering text or other elements */
.middle-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
}

// Logo styles
.reveal .slide-logo {
  right: 10px; // Align to the left side
  bottom: 10px; // Align to the top
  padding-right: 10px !important; // Padding on the left
  padding-bottom: 10px !important; // Padding on the top
  max-height: 100px !important;
  z-index: 1000 !important; // Ensure the logo is visible
}

// Alert styles
.alert {
  color: $primary-color;
}

.fg {
  color: var(--col, $tertiary-color);
}

.bg {
  background-color: var(--col, $background-color);
  padding: 0.1em;
  border-radius: 5px;
  display: inline-block;
}

// List styles

// Unordered lists
.reveal ul {
  font-weight: lighter;
  padding-left: 16px;

  li::marker {
    color: mix($secondary-color, white, 70%);
  }
}

.reveal ul ul {
  list-style: none;

  li:before {
    content: $right-arrow;
    color: mix($secondary-color, white, 60%);
    display: inline-block;
    width: 1em;
    margin-left: -1em;
    margin-right: 0.5em;
  }
}

// Ordered lists
.reveal ol {
  font-weight: lighter;
  padding-left: 16px;

  li::marker {
    color: $secondary-color;
  }
}

// Move "hamburger" menu button to top right
.reveal .slide-menu-button {
  position: fixed;
  bottom: 25px; // Adjusted to match the chalkboard button's position
  left: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  pointer-events: none;
}

.reveal .slide-menu-button > * {
  pointer-events: auto;
}

// Chalkboard button styles
.reveal .slide-chalkboard-buttons {
  position: fixed;
  bottom: 30px;
  left: 30px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  pointer-events: none;
}

.reveal .slide-chalkboard-buttons > * {
  pointer-events: auto;
}

// Button styles
.button {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.42857143;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  background-color: $secondary-color;
  border: 1px solid $secondary-color;
  color: $background-color !important;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease-in-out;
}

.button:hover {
  background-color: darken($secondary-color, 10%);
  border-color: darken($secondary-color, 10%);
}

.button::before {
  content: "▶";
  margin-right: 5px;
}

// Table styles
.reveal table {
  margin: auto;
  border-collapse: collapse;
  border-spacing: 0;
  font-size: 0.8em;
}

.reveal table th,
.reveal table td {
  border: none;
  padding: .23em;
  text-align: left;
  font-weight: lighter;
}

.reveal table thead th,
.reveal .slides table tr:last-child td,
.reveal .slides table {
  border-bottom: 2px solid $secondary-color;
}

.reveal table thead th {
  font-weight: bold;
}

.reveal table caption {
  color: $secondary-color;
  font-variant: small-caps;
}

// Special styles for etable environment
.etable {
  width: 100%;
  height: calc(100% - 3em); // Adjust based on the height of your header
  display: flex;
  align-items: center;
  justify-content: center;
}

.etable img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

// Code block styles
$code-block-bg: #ded9ca;
$code-block-border-color: #000000;
