/*! HTML5 Boilerplate v7.3.0 | MIT License | https://html5boilerplate.com/ */

/* main.css 2.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */
:root{
  --white-bg-color: #fcfcfc;
  --dark-bg-color: #434343;
  --dark-fg-color: #333333;
}
html {
  background-color: var(--dark-bg-color);
  color: #fafafa;
  font-size: 20px; /*oli 13*/
  font-family: 'Lato', sans-serif;
  font-weight: 100;
  outline:none;
}

#skylogo{
  background-color: #ffffff;
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:176px;
}
#skyimage{
  position: absolute;
  top:0;
  right:0;
  height:176px;
}
#frontpagecontainer{
  overflow-y: auto;
  background-color: var(--white-bg-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--dark-fg-color);
  text-align: justify;
  /*
    top: 200px;
    left:  min(104px,7vw);
    right: min(104px,7vw);
bottom: 32px;
  display: grid;
  grid-template-columns: 1fr ;
  grid-template-rows: calc( (100vw - 200px)*0.5 ) auto;

   */
}
#highlights{
  margin:0;
  padding:0;
/*  position:absolute;
  top:   232px;
  left:  104px;
  right: 104px;*/
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows:1fr 1fr;
  grid-template-areas: "a b c" "a d e";
  grid-gap: 4px 4px;
/*  height: calc( (100vw - 200px)*0.5 );
  overflow-y: hidden;*/
}

.center-text{
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translate(-5%, -50%);
  color: white;
  opacity: 0.7;
  }

.finput{
  margin-top:4px;
  margin-bottom:4px;
}
#form_content{
  padding: 0;
  color: var(--dark-fg-color);
  font-family: 'Open sans',sans-serif;
  font-weight: 300;
  font-size:   20px;
  line-height: 22px;
  padding: 1rem;
}

#main_display_content{
/*  position:absolute;
  top: calc(232px + (100vw - 200px)*0.5 + 8px);
  left:  104px;
  right: 104px;
  bottom: 32px;*/
  padding: 0;
  background-color: var(--white-bg-color);
  color: var(--dark-fg-color);
  font-family: 'Open sans',sans-serif;
  font-weight: 300;
  font-size:   18px;
  line-height: 1.2;
  padding-bottom: 32px;
}

#contactbar{
  display:flex;
  flex-direction: column;
  align-items: center;
}
.contactitemcontainer{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  width:100%;
  padding-top: 12px;
  padding-bottom: 12px;

}
.contactitem{
  text-align: center;
  font-family: 'Lato', sans-serif;
  width:100%;
}

.menubar{
  background-color: var(--dark-bg-color);
  overflow: hidden;
}

.menubar a {
  float: left;
  display: block;
  text-align: center;
  padding: 16.5px 16px;
}

.menubar .icon {
  display: none;
}

.menubar a:hover {
  background-color: #6f8fb7;
}

.menubar a.highlight {
  background-color: #6f8fb7;
}


@media screen and (max-width: 1000px) {
  .menubar a:not(:first-child) {display: none;}
  .menubar a.icon {
    float: right;
    display: block;
  }
}

@media screen and (max-width: 1000px) {
  .menubar.responsive {position: relative;}
  .menubar.responsive a.icon {
    position: absolute;
    right: 0;
    top: 0;
  }
  .menubar.responsive a {
    float: none;
    display: block;
    text-align: left;
  }
}

a{
  text-decoration: none;
  color:inherit;
}
p{
  margin-block-start: 0;
  margin-block-end: 2em;
}
h1{
  font-size: max(20px, min(48px,8vw) );
  font-family: 'Lato', sans-serif;
  line-height: 1.1;
  color: var(--dark-fg-color);
  margin: 0;
  margin-top: 24px;
  margin-bottom: 12px;
}


.menuitem{
  text-align: center;
  font-family: 'Lato', sans-serif;
  font-weight: 500;
  width:100%;
  overflow: hidden;
  white-space: nowrap;
  padding-left: 4px;
  padding-right:4px;
}

.tflogo {
    border-right:1px solid #888;
    height: 100%;
    padding-top: 2px;
    padding-bottom: 2px;
    padding-left: 4px;
    padding-right: 4px;
}

.twocolumn{
  column-count: 3;
}

.content-text {
  max-width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: left;
  padding: 1rem;
}

.content-text p {
    width: 100%;
}

.content-title {
    width: 100%;
    text-align: left;
}


@media screen and (max-width:1200px){
  .twocolumn{
    column-count: 2;
  }
}
@media screen and (max-width:600px){
  .twocolumn{
    column-count: 1;
  }
}

#content{
  background-color: var(--white-bg-color);
  color: var(--dark-fg-color);
  font-family: 'Open sans',sans-serif;
  font-weight: 300;
  font-size:   18px;
  line-height: 1.2; /*oli 18px tämä oli 13 px fontilla*/
  overflow-y: auto;
  overflow-x: auto;
}

#content img, #content video {
    border-radius: 5px;
}
/*
position:absolute;
top:200px;
bottom: 32px;
left:  min(104px,7vw);
right: min(104px,7vw);
*/

div.searchcontext{
  font-weight: 100;
  color: var(--dark-fg-color);
}
#searchbox{
  position:absolute;
  right:min(104px,7vw);
  top: 64px;
  width: 200px;
  height: 24px;
  background-color: var(--white-bg-color);
  border: 1px solid var(--dark-bg-color);
  border-radius: 8px;
  padding: 8px;
}
span.title{
  font-weight: 700;
}
a.search{
  font-weight: 300;
  color: #527aac;
}
ul.search{
  list-style: none;
  padding-left:0;
}
li.search{
  padding: 8px;
}
em{
  background-color: #ffff00;
  border-radius: 8px;
}
#searchWindow{
  display:none;
  z-index: 1000; // on top
  position:absolute;
  right:min(104px,7vw);
  top: 88px;
  width: min(400px,80vw);
  height: 300px;
  background-color: var(--white-bg-color);
  border: 1px solid var(--dark-bg-color);
  border-radius: 3px;
  font-family: 'Open sans', sans-serif;
  color: var(--dark-fg-color);
  padding:8px;
  overflow-y: auto;
  overflow-x: hidden;
}

#addbox {
  min-height: 200px;
  background-color: #6f8fb7;
  color: #fafafa;
  display:flex;
  align-content: flex-start;
  width: 100%;
  border-radius: 5px;
}
h1.addbox{
  font-family: 'Open sans', sans-serif;
  font-weight: bold;
  font-size:   20px;   /*oli 13*/
  line-height: 22px; /*oli 16*/
  color:#ffffff;
  margin-bottom: 0;
  margin-top: 0;
  padding-bottom: 0;
}
div.addbox{
  padding: 1rem;
}

#ryhmaoverlay{
  bottom: 0;
  width:100%;

}
#kuvajateksti{
  display:flex;
  flex-direction: row;
  flex-wrap: wrap;
  flex-direction: row;
  align-items: flex-start;
  max-width: calc( 100vw - 2 * min(104px,7vw) - 48px );
  gap: 16px;
}

#ryhmateksti{
  max-width: calc( max(480px, (100vw -  2 * min(104px,7vw) - 48px) * 0.44 - 16px ) );
}


#korttipakka{
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 1rem;
  justify-content: center;
  padding: 1rem;
}
#ryhmaraami{
  display: flex;
  justify-content:center;
  align-items:stretch;
  /* position: absolute; */
  /* width:100%; */
  flex-direction: column;
  overflow-y:scroll;
  gap:8px;
}

#ml4utvideo{
  max-width: 100%;
  max-height: 90%
}
#mlvideo{
  max-width: 100%;
  max-height: 90%
}
#webinarvideo{
  max-width: 100%;
  max-height: 90%
}


#contactraami{
  display: flex;
  flex-flow: row nowrap;
  position: absolute;
  bottom:16px;
  left:0;
  right:0;
  z-index: 1;
  align-content: stretch;
  justify-content: center;
}

.umpf{
  font-weight: 700;
}

a.webinaritem{
  display: inline-flex;
  flex-direction: row;
  gap: 4px;
  align-items: center;
}

#publist{
  display: grid;
  grid-template-columns: 60px auto 60px;
  grid-template-rows: auto;
  grid-gap: 24px 8px;
  width:100%;
}
#rellist{
  display: grid;
  grid-template-columns: 120px auto;
  grid-template-rows: auto;
  grid-gap: 24px;
  width:100%;
}
#webinarlist{
  disploay: flex;
  align-content:flex-start;
  margin-top:8px;
}

#imgmcontent{
  display:flex;
  flex-direction:row;
  flex-wrap:nowrap;
}

.kortti{
  padding:16px 16px 16px 16px;
  background-color: #527aac;
  border-radius:5px;
  border-radius:12px;
  color:rgb(227,228,229);
  display:grid;
  grid-template-columns: 1fr 3fr;
  grid-gap: 24px;
  display:flex;
  flex-direction: row;
  flex-wrap:wrap;
  gap: 16px;
  max-width: 520px;
  align-items: flex-start;
}
div.kort{
  max-width: 280px;
}
h3.kort{
  margin-block-start: 0;
  margin-block-end:1em;
}
p.kort{
  margin-block-end: 1em;
}
p.kort:last-child{
  margin-block-end:0;
}

.two-column{
  padding:15px 15px 15px 15px;
  background-color: #6f8fb7cc;
  border-radius:5px;
  margin: 16px;
  display:grid;
  grid-template-columns: 2fr 2fr;
  grid-gap: 24px;
}

.mug{
  border-radius:4px;
  max-width:calc(min(160px, 50vw));
}

.piilo{
  display: none;
}

img.icon{
  width:24px;
  height:24px;
  padding: 4px;
}


/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Vendor-prefixed and regular ::selection selectors cannot be combined:
 * https://stackoverflow.com/a/16982510/7133471
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Browser Upgrade Prompt
   ========================================================================== */

.browserupgrade {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden {
  display: none !important;
}

/*
* Hide only visually, but have it available for screen readers:
* https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
*
* 1. For long content, line feeds are not interpreted as spaces and small width
*    causes content to wrap 1 word per line:
*    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
*/

.sr-only {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
* Extends the .sr-only class to allow the element
* to be focusable when navigated to via the keyboard:
* https://www.drupal.org/node/897638
*/

.sr-only.focusable:active,
.sr-only.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
* Hide visually and from screen readers, but maintain layout
*/

.invisible {
  visibility: hidden;
}

/*
* Clearfix: contain floats
*
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
*    `contenteditable` attribute is included anywhere else in the document.
*    Otherwise it causes space to appear at the top and bottom of elements
*    that receive the `clearfix` class.
* 2. The use of `table` rather than `block` is only necessary if using
*    `:before` to contain the top-margins of child elements.
*/

.clearfix:before,
.clearfix:after {
  content: " ";
  /* 1 */
  display: table;
  /* 2 */
}

.clearfix:after {
  clear: both;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
  /* Style adjustments for viewports that meet the condition */
}
@media only screen and (max-width: 760px){
  #imgmcontent{
    display:block;
  }
}

@media only screen and (max-width: 640px) {
  #publist {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  .publink {
    margin-block-end: 2em;
  }

  #rellist {
    display: flex;
    flex-direction: column;
    gap: 0
  }

  a.rellink {
    margin-block-end: 1em;
  }

  div.webinaritem {
    margin-block-end: 0.5em;
  }

  #main_display_content {
    font-size: 16px;
    line-height: 18px;
  }
  html{
    font-size: 16px;
  }

  #content{
    font-size: 14px;
  }
  .leftimg{

  }

}

@media print,
  (-webkit-min-device-pixel-ratio: 1.25),
  (min-resolution: 1.25dppx),
  (min-resolution: 120dpi) {
  /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid the additional HTTP request:
   https://www.phpied.com/delay-loading-your-print-css/
   ========================================================================== */

@media print {
  *,
  *:before,
  *:after {
    background: transparent !important;
    color: #000 !important;
    /* Black prints faster */
    box-shadow: none !important;
    text-shadow: none !important;
  }
  a,
  a:visited {
    text-decoration: none;
    font-weight: bold;
  }
  a[href]:after {
    content: " (" attr(href) ")";
  }
  abbr[title]:after {
    content: " (" attr(title) ")";
  }
  /*
     * Don't show links that are fragment identifiers,
     * or use the `javascript:` pseudo protocol
     */
  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }
  pre {
    white-space: pre-wrap !important;
  }
  pre,
  blockquote {
    border: 1px solid #999;
    page-break-inside: avoid;
  }
  /*
     * Printing Tables:
     * https://web.archive.org/web/20180815150934/http://css-discuss.incutio.com/wiki/Printing_Tables
     */
  thead {
    display: table-header-group;
  }
  tr,
  img {
    page-break-inside: avoid;
  }
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  h2,
  h3 {
    page-break-after: avoid;
  }
}

.padded {
    padding-top: 48px;
    padding-bottom: 48px;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

.prev {
  left: 0;
  border-radius: 3px 0 0 3px;
}

.slideshow-container {
  width: 100%;
  height: 50vh;
  position: relative;
  margin: auto;
  background-color: var(--dark-bg-color);
}

/* Hide the images by default */
.mySlides {
  display: none;
  width: 100%;
  height: 100%;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* Caption text */
.slideshow-text {
  color: #f2f2f2;
  text-align: center;
  position: absolute;
  bottom: 50%;
  width: 100%;
  opacity: 1;
}

.active, .dot:hover {
  background-color: #717171;
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .2}
  to {opacity: 1}
}

.slideshow-card {
  background-color: var(--dark-bg-color);
  opacity: 50%;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.text-card {
    background-color: white;
    border-radius: 5px;
    padding: 1rem;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 24px;
}

.text-card a {
    font-weight: bold;
}

.text-card p, .text-card h2, .text-card h3, .text-card h4 {
    margin-block-end: 1em;
}

.reference-logo {
height: 4rem;
width: 8rem;
object-fit: contain;
}