
:root {
  --r-main-font-size: 3.8vmin;
  /* By default reveal.js white theme utilize pixels. */
  --r-block-margin: 0.5em;
  --r-heading-margin: 0 0.5em 0 0;
  /* We also need to set font. */
  --r-font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans","Liberation Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

:root {
  --r-background-color: white;
  --r-main-color: black;
  --r-heading-color: #057fa5;
  --r-link-color: #057fa5;
  --r-link-color-hover: #6ca0e8;
  --r-selection-background-color: #98bdef;
  --r-selection-color: white;
  /* Local. */
  --color-background-footer: white;
}

@media (prefers-color-scheme: dark) {
  :root {
    --r-background-color: #111;
    --r-main-color: #ddd;
    --r-heading-color: #3bb5dc;
    --r-link-color: #3bb5dc;
    --r-link-color-hover: #6ca0e8;
    --r-selection-background-color: #98bdef;
    --r-selection-color: #fff;
    /* Local. */
    --color-background-footer: #222;
  }
}

/* Align slides content to the left. */
.reveal .slides {
  text-align: left;
}

/* We need constant background for the first logo. */
#logo-esf {
  background-color: white;
}

@media screen and (max-width: 820px) {
  #up_nav {
    visibility: hidden;
  }
}

/* Keep image aspect ratio. */
img {
  object-fit: contain;
}

/*
 * Page layout. 
 */

body {
  display: flex;
  height: 100vh;
  width: 100vw;
  flex-direction: column;
  font-family: var(--r-main-font);
}

header {
  padding: 2px 5px 2px 5px;
  block-size: fit-content;
  flex-grow: 0;
  flex-shrink: 0;
  align-items: center
}

.presentation {
  margin-bottom: 1px;
}

footer {
  padding: 0.5em;
  block-size: fit-content;
  flex-grow: 0;
  flex-shrink: 0;
  margin-top: auto;
}

section {
  /* Section is top element, it can have size of parent which is 
     sized using JavaScript. */
  height: 100%; 
}

/* 
 * Header, images on both sides of particular size. 
 */

header {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  vertical-align: top;
}

header img {
  max-height:9vh;
  object-fit: contain;
}

/*
 * Style of header and footer. 
 */

header {
  color: var(--r-main-color);
  background-color: var(--color-background-footer);
}

footer {
  color: var(--r-main-color);
  background-color: var(--color-background-footer);
  font-size: max( 2.0vmin, 0.7em) ;
  border-top: 4px solid #31809F;
}

/**
 * Shortcuts.
 */

.flex-column {
  display: flex; 
  flex-direction: column; 
}

.flex-column-fill {
  display: flex; 
  flex-direction: column; 
  height: 100%;
}

.flex-column-cropp {
  display: flex; 
  flex-direction: column; 
  overflow: hidden;
}

.flex-row {
  display: flex; 
  flex-direction: row; 
}

.flex-row-cropp {
  display: flex; 
  flex-direction: row; 
  overflow: hidden;
}

.image-container {
  overflow: hidden;
}

/* As we use image containers inside a flex box, they would span
  full with. In order to prevent that we fit the width to the width
  of the image. */
a.image-container {
  width: fit-content;
}
