/* ==========================================================================
   Fontit
   ========================================================================== */

@font-face {
  font-family: 'Kanit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/Kanit/Kanit-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Kanit';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Kanit/Kanit-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Kanit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/Kanit/Kanit-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/Rubik/Rubik-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Rubik/Rubik-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Rubik';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/Rubik/Rubik-500.woff2') format('woff2');
}
@font-face {
  font-family: 'MobiriseIcons';
  font-style: normal;
  font-weight: normal;
  font-display: swap;
  src: url('../fonts/mobirise-icons/mobirise-icons.woff') format('woff');
}

/* ==========================================================================
   Perusasetukset
   ========================================================================== */

html,
body {
  height: auto;
  min-height: 100vh;
}

body {
  position: relative;
  font-family: 'Rubik', sans-serif;
  font-style: normal;
  line-height: 1.5;
  color: #232323;
}

:focus {
  outline: none;
}

section,
.container,
.container-fluid {
  position: relative;
  word-wrap: break-word;
}

section {
  background-color: #eeeeee;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  background-size: cover;
}

a {
  font-style: normal;
  font-weight: 400;
  cursor: pointer;
}

a,
a:hover {
  color: #149dcc;
  text-decoration: none;
}

/* Kuvan korkeus skaalautuu leveyden mukaan, vaikka width/height-attribuutit on annettu */
img {
  height: auto;
}

h1,
h2,
h3,
.display-1,
.display-2,
.display-4 {
  line-height: 1;
  word-break: break-word;
  word-wrap: break-word;
}

/* ==========================================================================
   Typografia
   ========================================================================== */

/* Nämä ennen .display-*-sääntöjä: mobiilin line-height tulee .display-*-luokista */
.mbr-section-title {
  font-style: normal;
  line-height: 1.2;
}

.mbr-section-subtitle {
  line-height: 1.3;
}

.mbr-text {
  font-style: normal;
  line-height: 1.6;
}

.display-1,
.display-2,
.display-5 {
  font-family: 'Kanit', sans-serif;
}

.display-4,
.display-7 {
  font-family: 'Rubik', sans-serif;
}

.display-1 { font-size: 3.6rem; }
.display-2 { font-size: 3rem; }
.display-4 { font-size: 0.8rem; }
.display-5 { font-size: 1.5rem; }
.display-7 { font-size: 1.2rem; }

/* Sujuva typografia mobiilissa: 20rem (320px) – 48rem (768px) */
@media (max-width: 768px) {
  .display-1 {
    font-size: calc(1.91rem + (3.6 - 1.91) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.4 * (1.91rem + (3.6 - 1.91) * ((100vw - 20rem) / (48 - 20))));
  }
  .display-2 {
    font-size: calc(1.7rem + (3 - 1.7) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.4 * (1.7rem + (3 - 1.7) * ((100vw - 20rem) / (48 - 20))));
  }
  .display-4 {
    font-size: calc(0.93rem + (0.8 - 0.93) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.4 * (0.93rem + (0.8 - 0.93) * ((100vw - 20rem) / (48 - 20))));
  }
  .display-5 {
    font-size: calc(1.175rem + (1.5 - 1.175) * ((100vw - 20rem) / (48 - 20)));
    line-height: calc(1.4 * (1.175rem + (1.5 - 1.175) * ((100vw - 20rem) / (48 - 20))));
  }
}

.mbr-light { font-weight: 300; }
.mbr-semibold { font-weight: 500; }
.mbr-bold { font-weight: 700; }

.mbr-white {
  color: #ffffff;
}

.align-left { text-align: left; }
.align-center { text-align: center; }
.align-right { text-align: right; }

@media (max-width: 767px) {
  .align-left,
  .align-center,
  .align-right,
  .mbr-section-btn,
  .mbr-section-title {
    text-align: center;
  }
}

/* ==========================================================================
   Asettelu
   ========================================================================== */

.media-content {
  flex-basis: 100%;
}

.media-container-row {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: start;
}

@media (min-width: 992px) {
  .media-container-row {
    flex-wrap: nowrap;
  }
}

.media-container-column {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: center;
  align-content: center;
  align-items: stretch;
}

.media-container-column > * {
  width: 100%;
}

.mbr-figure {
  align-self: center;
}

.mbr-figure img {
  display: block;
  width: 100%;
}

@media (max-width: 991px) {
  .mbr-figure {
    width: 100% !important;
  }
}

.mbr-overlay {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  background-color: #000;
  opacity: .5;
  pointer-events: none;
}

.inactive {
  -webkit-user-select: none;
  user-select: none;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* ==========================================================================
   Kortit
   ========================================================================== */

.card {
  background-color: transparent;
  border: none;
}

.card-box {
  width: 100%;
}

.card-img {
  flex-shrink: 0;
  width: auto;
  text-align: center;
}

.card-img img {
  width: 100%;
}

/* ==========================================================================
   Painikkeet
   ========================================================================== */

.mbr-section-btn {
  margin-left: -0.25rem;
  margin-right: -0.25rem;
  font-size: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: .4rem .8rem;
  padding: 1rem 3rem;
  border-width: 2px;
  border-radius: 100px;
  font-style: normal;
  font-weight: 500;
  letter-spacing: 1px;
  white-space: normal;
  word-break: break-word;
  transition: all .3s ease-in-out;
}

.btn:hover,
.btn:focus {
  box-shadow: 0 10px 40px 0 rgba(0, 0, 0, 0.2) !important;
}

@media (max-width: 767px) {
  .btn {
    font-size: .75rem !important;
  }
}

.btn-secondary,
.btn-secondary:active {
  color: #ffffff !important;
  background-color: #5ab359 !important;
  border-color: #5ab359 !important;
}

.btn-secondary:hover,
.btn-secondary:focus {
  color: #ffffff !important;
  background-color: #3d833c !important;
  border-color: #3d833c !important;
}

.btn-white,
.btn-white:active {
  color: #808080 !important;
  background-color: #ffffff !important;
  border-color: #ffffff !important;
}

.btn-white:hover,
.btn-white:focus {
  color: #808080 !important;
  background-color: #d9d9d9 !important;
  border-color: #d9d9d9 !important;
}

/* ==========================================================================
   Ikonit
   ========================================================================== */

.mbri-arrow-down {
  /* !important estää selainlaajennuksia vaihtamasta ikonifonttia */
  font-family: 'MobiriseIcons' !important;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.mbri-arrow-down::before {
  content: "\e908";
}

/* Nuoli ylös, kun haitarin paneeli on auki */
.panel-title[aria-expanded="true"] .mbri-arrow-down::before {
  content: "\e90b";
}

/* ==========================================================================
   Osiot: välistys ja taustat
   ========================================================================== */

.hero {
  padding-top: 90px;
  padding-bottom: 120px;
}

.intro,
.contact,
.about {
  padding-top: 90px;
  padding-bottom: 90px;
}

.service-details {
  padding-top: 90px;
  padding-bottom: 0;
}

.faq {
  padding-top: 60px;
  padding-bottom: 90px;
}

.references {
  padding-top: 90px;
  padding-bottom: 60px;
}

.site-footer {
  padding-top: 30px;
  padding-bottom: 30px;
  background-color: #2e2e2e;
}

.intro,
.references {
  background-color: #ffffff;
}

.accordion-section,
.contact {
  background-color: #efefef;
}

.about {
  background-color: #5ab359;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  isolation: isolate;
  overflow: hidden;
  view-timeline-name: --hero;
}

/* Taustakuva ja parallax-tehoste */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../images/0w0a7403-2000x1333.jpg");
  background-size: cover;
  background-position: center;
}

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .hero::before {
      animation: hero-parallax linear both;
      animation-timeline: --hero;
      animation-range: exit;
    }
  }
}

@keyframes hero-parallax {
  from { transform: translateY(0); }
  to { transform: translateY(40%); }
}

.hero .mbr-figure {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 0 auto;
}

.hero .mbr-figure img {
  height: 100%;
  margin: 0 auto;
}

@media (max-width: 991px) {
  .hero .mbr-figure img {
    width: 100% !important;
  }
}

/* ==========================================================================
   Haitarit
   ========================================================================== */

.accordion-section .container-fluid {
  padding: 0 3rem;
}

.accordion-section .underline .line {
  display: inline-block;
  width: 5rem;
  height: 3px;
  background: linear-gradient(to right, #149dcc 50%, #5ab359 120%);
}

.accordion-section .panel-group {
  width: 100%;
  margin: 0 auto 2rem;
}

.accordion-section .card {
  margin-bottom: 1rem;
  border-radius: 25px !important;
  background: #ffffff;
  box-shadow: 0 7px 20px 0 rgba(0, 0, 0, 0.1);
}

.accordion-section .card > .card-header {
  padding: 0;
  border: 0;
  border-radius: 25px;
  background-color: transparent !important;
}

.accordion-section .panel-title {
  display: flex;
  align-items: center;
  margin-top: -1px;
  margin-bottom: 0;
  padding-right: 2rem;
  border-radius: 25px 25px 0 0;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  text-decoration: none !important;
  transition: all .3s;
}

.accordion-section .panel-title.collapsed {
  border-radius: 25px;
}

.accordion-section .header-text {
  margin: 0;
  padding: 2rem 1rem !important;
  color: #232323;
}

.accordion-section .sign {
  position: absolute;
  top: -1px;
  right: 0;
  bottom: 0;
  padding: 36px 2rem 2rem;
  border-radius: 0 25px 25px 0;
  background-color: #4ca7de;
  color: #ffffff;
}

.accordion-section .panel-title:hover .sign {
  background-color: #125b87 !important;
}

.faq .sign {
  background-color: #4f80e0;
}

.faq .panel-title:hover .sign {
  background-color: #2461d8 !important;
}

.accordion-section .panel-body {
  width: calc(100% - 80px);
  border-radius: 0 0 0 25px;
}

@media (max-width: 767px) {
  .accordion-section .container-fluid {
    padding: 0 1rem;
  }
  .accordion-section .header-text {
    padding: 1rem !important;
  }
  .accordion-section .sign {
    padding: 22px 16px 16px !important;
  }
}

/* ==========================================================================
   Referenssit
   ========================================================================== */

.references .media-container-row {
  flex-wrap: wrap;
}

.references .card-block {
  position: relative;
  flex-grow: 0;
  padding: 2rem;
}

.references .testimonial-photo {
  display: inline-block;
  max-width: 180px;
  max-height: 180px;
  overflow: hidden;
  border-radius: 50%;
}

.references .testimonial-photo img {
  width: 100%;
  min-width: 100%;
  min-height: 100%;
}

@media (max-width: 300px) {
  .references .testimonial-photo {
    width: 100% !important;
    height: auto !important;
  }
}

/* ==========================================================================
   Yhteystiedot
   ========================================================================== */

.contact .card-title {
  margin-bottom: 0.3rem;
}

.contact .card-img {
  position: relative;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 0 30px rgba(115, 128, 157, 0.1);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.8rem;
}

.contact-details a,
.site-footer a {
  color: currentColor;
  text-decoration: underline;
}

/* ==========================================================================
   Yritysesittely ja kuvakaista
   ========================================================================== */

.about h2 {
  color: #ffffff;
}

.about .mbr-section-subtitle {
  color: #efefef;
}

.about .btn {
  margin: 0 0 .5rem 0;
}

.image-band img {
  display: block;
  width: 100%;
}
