/*
Theme Name: Jarette
Author: Mainostoimisto Halminen Oy
Author URI: https://halminen.net
Version: 1.4
*/

@import url('https://use.fontawesome.com/releases/v6.2.0/css/all.css');

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  background-color: #FAFAFA!important;
  font-family: var(--wp--preset--font-family--primary)!important;
  margin: 0;
  padding: 0;
  color: black;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--wp--preset--font-family--header);
}

/* WP-OVERRIDET */

.wp-element-button {
  background-color: var(--wp--preset--color--primary);
  border-radius: 5px;
  font-family: var(--wp--preset--font-family--primary)!important;
  font-size: 16px;
}

/* CUSTOM BLOCKKIJUTUT */

.suggested_products {
  margin: auto;
  justify-content: center;
  align-items: stretch;
}

.suggested_products .wp-block-column {
  max-width: 400px!important;
  display: flex;
  align-items: stretch;
}

.suggested_products .wp-block-group {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.suggested_products .wp-block-image {
  display: flex;
  flex: 0 0 150px;
  align-items: center;
  justify-content: center;
  margin: 0 0 20px;
}

.suggested_products .wp-block-image img {
  width: 130px!important;
  height: 130px!important;
  object-fit: contain!important;
}

.suggested_products h2 {
  min-height: 2.4em;
  margin: 0 0 10px;
}

.suggested_products p {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin: 0 0 24px;
  text-align: center;
}

.suggested_products .wp-block-buttons {
  margin-top: auto;
}

.services_box {
  margin: auto;
  justify-content: center;
  align-items: stretch;
}

.services_box .wp-block-column {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 40px!important;
  min-height: 390px;
  overflow: hidden;
}

.services_box .wp-block-column::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--lastu-watermark);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: 70%;
  opacity: 0.03;
  pointer-events: none;
}

.services_box .wp-block-column > * {
  position: relative;
  z-index: 1;
  width: 100%;
}

.services_box .wp-block-column > h2,
.services_box .wp-block-column > h3,
.services_box .wp-block-column > h4 {
  margin: 0 0 20px;
}

.services_box .wp-block-column > p {
  margin: auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.services_box .wp-block-column .wp-block-buttons {
  margin-top: 20px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.wp-block-columns.infobox {
  display: grid !important;
  grid-template-columns: 60% 40%;
  align-items: stretch;
  gap: 0;
}

.wp-block-columns.infobox > .wp-block-column {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: auto;
}

.wp-block-columns.infobox > .wp-block-column:first-child {
  justify-content: center;
}

.wp-block-columns.infobox > .wp-block-column > figure,
.wp-block-columns.infobox > .wp-block-column .wp-block-image {
  height: 100%;
  margin: 0;
  flex: 1;
}

.wp-block-columns.infobox > .wp-block-column img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* YLÄPALKKI */
.top_bar {
  display: flex;
  padding: 55px 45px;
  width: 100%;
  justify-content: space-between;
  z-index: 100;
  position: relative;
  height: 120px;
  background-color: var(--wp--preset--color--primary);
  align-items: center;
}

.top_bar #right {
  float: right;
  display: flex;
  align-items: center;
  gap: 20px;
}

.top_bar #right .wp-element-button {
  background-color: white;
  color: var(--wp--preset--color--primary);
}

/* BANNERI */

.top {
  width: 100%;
  object-position: center center;
  position: relative;
  top: 0px;
}

.top_img {
  width: 100%;
  height: 580px;
  position: relative;
}

.top .top_img #bgimg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  position: relative;
  top: 0px;
}

.top .top_img #lastu {
  height: 80%;
  position: absolute;
  bottom: 0px;
  right: 65px;
  filter: opacity(0.3);
}

.top .top_content {
  width: 100%;
  height: 100%;
  padding: 55px 65px;
  position: absolute;
  top: 0px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.top .top_texts {
  position: relative;
  color: white;
  width: 40%;
  min-width: 300px;
  max-width: 900px;
}

.top .top_texts h1 {
  font-size: 45px;
}

.top .top_texts p {
  margin-top: 20px;
}

#backupcta-container .cta-button {
  display: none;
}

/* PÄÄSISÄLTÖ */

.main {
  padding: 50px 65px 50px 65px;
  width: 90%;
  margin: auto;
  margin-top: 30px;
  margin-bottom: 30px;
  max-width: 1700px;
  min-height: 300px;
}

/* FOOTERI */

footer {
  background-color: var(--wp--preset--color--primary);
  width: 100%;
  padding: 65px;
  color: white;
}

.footer_content {
  display: flex;
}

.footer_content #left {
  width: 33.33%;
  text-wrap: nowrap;
}

.footer_content #center {
  width: 33.33%;
  text-wrap: nowrap;
}

.footer_content #center ul {
  list-style-type: none;
  padding: 0;
  margin-top: 30px;
}

.footer_content #center li a {
  color: white;
  text-decoration: none;
}

.footer_content #right {
  width: 33.33%;
  text-wrap: nowrap;
}

.footer_content #right p {
  text-wrap: wrap;
}

.footer_content .footer-text {
  margin-top: 30px;
  color: white;
}

.footer_content #right #icons {
  margin-top: 30px;
  font-size: 38px;
}

.footer_content #right #icons a {
  color: white;
  text-decoration: none;
}

.funding-logos img {
  height: 40px;
  margin: 10px 10px 10px 0px;
}

.footerlogos {
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 30px;
  padding: 15px;
}

/* MOBIILIKÄYTTÖ */

@media only screen and (max-width: 1440px) {
  .main {
    padding: 50px 30px 50px 30px;
    width: unset;
    margin: auto;
    max-width: unset;
  }

  .services_box h3 {
    font-size: 25px;
  }
}

@media (min-width: 901px) and (max-width: 1200px) {
  .services_box {
    display: grid!important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
  }

  .services_box .wp-block-column {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .services_box {
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: auto;
  }

  .services_box .wp-block-column {
    min-height: auto;
    margin-bottom: 24px;
    justify-content: flex-start;
  }

  .services_box .wp-block-column .wp-block-buttons {
    margin-top: 20px;
    width: auto;
  }

  .top .top_img #lastu {
    filter: opacity(0.12);
    height: unset;
    width: 250px;
  }
}

@media only screen and (max-width: 1024px) {
    footer {
        padding: 40px;
    }

    .footer_content {
        flex-direction: column;
    }

    .footer_content {
        justify-content: flex-start;
    }

    .footer_content #left, .footer_content #center, .footer_content #right {
      width: 100%;
    }

    .footer_content div {
        margin-top: 30px;
    }
    
    .infobox {
      grid-template-columns: 1fr!important;
    }

    .infobox .infobox_img {
      height: 350px!important;
    }

    .top_bar #right {
      flex-direction: row-reverse;
    }
}


@media (max-width: 600px) {
  .top .top_content {
    padding: 30px 30px;
  }

  .top .top_bar {
    padding: 30px 30px;
  }

  .top .top_texts {
    width: 90%;
  }

  .top .top_texts h1 {
    font-size: 35px;
  }

  .top #sitelogo {
    height: 65px;
  }

  .cta-button {
    display: none;
  }

  #backupcta-container .cta-button {
    display: inline-block;
    margin-top: 15px;
  }

  .footer_content .funding-logos img {
    height: 30px;
  }

  .footerlogos img {
    height: 65px;
  }

  .footerlogos #hnetlogo {
    height: 45px;
  }
}
