body, html {
  height: 100%;
  /*overflow-x: hidden;*/
  }

body {
  /*display: block;*/
  margin: 0px;
  min-width: fit-content;
  width: 100%;
  max-width: 100%;
}

body:focus {
  outline: none;
}
@font-face {
  font-family: Lato;
  src: url(Lato-Regular.ttf);
}

.content .header {
  position: fixed; /*Pitää yläpalkin paikoillaan*/
  top: 0;
  left: 0;
  background: #2f462c;
  height: 100px;
  width: 100%; /* Full width */
  transition: 0.2s; /* Add a transition effect (when scrolling - and font size is decreased) */
  z-index: 2;
}

.grid-container1 {
  display: grid;
  margin-top: 0.25%;
  margin-left: auto;
  margin-right: auto;
  padding: 0px 25px 25px 25px;
  align-items: center;
  grid-template-areas:
  'p5 logo p6';
  gap: 20px;
  /*min-width: 200px;  Set a minimum width for the grid container */
}

.logo-container {
  grid-area: logo; /* Specify the grid area for the logo */
}

.p5-container {
  grid-area: p5; /* Specify the grid area for p5 */
}

.p6-container {
  grid-area: p6; /* Specify the grid area for p6 */
}

p5 {
  top: 0;
  font-family: Lato;
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  color: #DAF0EB;
  margin-top: 0.0%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  grid-area: p5;
}

p6 {
  top: 0;
  font-family: Lato;
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  color: #DAF0EB;
  margin-top: 0.0%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  grid-area: p6;
}

.p5, .p6 {
  width: calc(50% - 10px); /* Set width of p5 and p6 to 50% minus gap space */
}

p7 {
  text-align: center;
  padding: 0px 25px 25px 25px;
  font-family: Lato;
  font-style: italic;
  font-weight: normal;
  font-size: 14px;
  line-height: 30px;
  margin-bottom: auto;
  box-sizing: border-box;
  color: #363636;
  display:block;
}


.hero-image {
  /* Use "linear-gradient" to add a darken background effect to the image (photographer.jpg). This will make the text easier to read */
  background-image: url("nurmi.jpg");

  /* Set a specific height */
  height: 50%;

  /* Position and center the image to scale nicely on all screens*/
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
  margin-top: 75px;
  width: 100%;
}
/* Place text in the middle of the image */
.hero-text {
  font-family: Lato;
  font-size: 280%;
  font-style: italic;
  text-align: center;
  position: relative;
  color: #26414a;
  width: 100%;
  top: 50%;
  left: 50%; /* Add this to horizontally center the element */
  transform: translate(-50%, -50%); /* Use transform to center both vertically and horizontally */
}
#logo {
  max-width: 100%;
  min-width: 100px; /* Set a minimum width for the logo */
  height: 70px;
  padding-top: 0.5%;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 50%;
  grid-area: logo;
  justify-self: center;
 align-self: center;
}
.container {
  display: flex;
  justify-content: center;
  align-items: center;
  /* Additional CSS properties for the container as needed */
}

.polaroid {
  max-width: 100%;
  /*background-color: #EBF2D6;*/
  margin: auto;
  margin-bottom: 20px;
  margin-top: 15px;
  display: table;
}

.polaroid3 {
  max-width: 100%;
  /*background-color: #EBF2D6;*/
  margin: auto;
  margin-bottom: 20px;
  margin-top: 15px;
}
.polaroid, .polaroid2 {
  display: flex;
  justify-content: center;
  align-items: center;
}

#kaulahermo {
  max-width: 44%;
  padding:  25px 25px 25px 25px;
  object-fit: contain;
  float: left;
  margin-top: 30px;
  margin-bottom: 20px;

}

#sauna {
  max-width: 44%;
  padding:  25px 25px 25px 25px;
  object-fit: contain;
  float: left;
  margin-top: 30px;
  margin-bottom: 20px;

}

#asko {
  max-width: 38%;
  min-width: 38%;
  padding:  5px 5px 5px 5px;
  object-fit: contain;
  float: left;
  margin: 5%;
}
  .cards {
  margin: 0 auto;
  display: block;
  padding-left:5%;
  padding-right: 5%;
  }

  .video-container {
    position: relative;
    padding-bottom: 31.25%; /* Set the aspect ratio (here 16:9) */
    height: 0;
    overflow: hidden;
    display: flex; /* Use flexbox for centering */
    justify-content: center; /* Horizontally center the iframe */
    align-items: center; /* Vertically center the iframe */
  }

  .video-container iframe {
    position: absolute;
    top: 0;
    left: 20%;
    padding: 5%;
    width: 50%; /* Make the iframe fill the container */
    min-width: 50%;
    height: 100%;
    min-height: 100%;
  }


  #Unisun {
    display: flex;
    justify-content: center; /* Horizontally center the content within the div */
    align-items: center; /* Vertically center the content within the div */
    max-width: 38%;
    margin: auto;
    background-color: white;
    padding: 10px 10px 10px 10px;
    object-fit: contain;
  }


  #ikurinjalkahoitola{
    width: auto;
    max-width: 90%;
    padding: 25px 25px 25px 25px;
    object-fit: contain;
    float: right;
  }

  #shelenius{
    width: auto;
    max-width: 30%;
    min-width: 25%;
    padding: 25px 25px 25px 25px;
    object-fit: contain;
    float: left;
  }

  .text-card {
    float: left;
    background-color: white;
    margin: 5%;
    padding: 10px 10px 10px 10px;
    object-fit: contain;
  }


  .text-card-left {
    display: flex;
    float: left;
    max-width: 38%;
    background-color: white;
    margin: 5%;
    padding: 10px 10px 10px 10px;
    object-fit: contain;
    /* Adjust the margin to center the element horizontally */
  }

  .text-card-right {
    display: flex;
    float: right;
    max-width: 38%;
    background-color: white;
    margin: 5%;
    padding: 10px 10px 10px 10px;
    object-fit: contain;
  }
.polaroid2 {
  max-width: 110%;
  background-image: url(sumennettu.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  display: table;
  position: relative;
}

/* Style the buttons that are used to open and close the accordion panel */
.accordion {
  background-color: #2f462c;
  color: #DAF0EB;
  font-family: Lato;
  font-style: bold;
  font-size: 20px;
  line-height: 25px;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  text-align: center;
  border: none;
  outline: none;
  transition: 0.4s;
}

/* Add a background color to the button if it is clicked on (add the .active class with JS), and when you move the mouse over it (hover) */
.active, .accordion:hover {
  background-color: #66921F;
}

/* Style the accordion panel. Note: hidden by default */
.panel {
  padding: 0 18px;
  background-color: white;
  display: none;
  overflow: hidden;
}

iframe {
  padding: 25px 25px 25px 25px;
}

li {
  list-style-type: circle;
  text-align: center;
  font-family: Lato;
  font-style: bold;
  font-size: 16px;
  line-height: 35px;

}

h1 {
  text-align: center;
  padding: 15px 15px 15px 15px;
  font-family: Lato;
  font-style: bold;
  font-size: 25px;
  line-height: 1.5;
  margin-bottom: auto;
  box-sizing: border-box;
  color: #363636;
  display: block;
}

h2 {
  text-align: center;
  padding: 15px 15px 15px 15px;
  font-family: Lato;
  font-style: bold;
  font-size: 25px;
  box-sizing: border-box;
  color: #363636;
  display: block;
  line-height: 1.5;
}

p1 {
  text-align: center;
  padding: 25px 25px 25px 25px;
  font-family: Lato;
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  line-height: 25px;
  margin-bottom: auto;
  box-sizing: border-box;
  color: #363636;
  display:block;
}

p2 { /*footer-teksti */
  font-style: normal;
  font-weight: normal;
  font-size: 16px;
  line-height: 15px;
  color: #363636;
}

h5 {
  color: #363636;
  font-family: Lato;
  font-style: normal;
  font-size: 22px;
  line-height: 15px;
  padding: 5px;
  margin: auto;

}

.grid-container {
  display: grid;
  margin-top: 0.25%;
  align-items: center;
  grid-template-areas:
  'Edenred Smartum Epasi';
  gap: 20px;
}

#Edenred {
    max-width: 25%;
    object-fit: contain;
    float: left;
    padding-left: 25%;
}
#Smartum {
      max-width: 25%;
      object-fit: contain;
      padding-left: 30%;
      padding-top: 2%;
}

#Epassi {
  max-width: 25%;
  object-fit: contain;
  float: right;
  padding-left: 40%;
  padding-top: 2%;
}

@media only screen and (max-width: 1480px) {

#Unisun {
  object-fit: contain;
  float: right;
  vertical-align: middle;
  max-width: 90%;
  background-color: white;
  margin-top: 5%;
  margin-bottom: 5%;
  padding: 10px;
}

#shelenius {
  min-width: 50%;
  padding: 25px 25px 25px 25px;
  margin-left: 20%;
  object-fit: contain;
}

#logo {
  min-width: 70%;
}

.text-card-right {
  object-fit: contain;
  float: none;
  vertical-align: middle;
  max-width: 90%;
  background-color: white;
  margin-top: 5%;
  margin-bottom: 5%;
  margin-left: 0%;
  padding: 10px;

}


.text-card-left {
  align-self: auto;
  display: flex;
  float: left;
  max-width: 90%;
  background-color: white;
  margin-top: 5%;
  margin-bottom: 5%;
  margin-left: 0%;
  padding: 10px;
  object-fit: contain;
}


.grid-container {
  display: grid;
  margin-top: 0.25%;
  align-items: flex-end;
  grid-template-areas:
  'Edenred Smartum Epasi';
  gap: 20px;
}

}


@media only screen and (max-width: 767px) {

  .hero-text {
    font-family: Lato;
    font-size: 200%;
    font-style: italic;
    text-align: center;
    position: absolute;
    color: #26414a;
    width: 90%;
    bottom: 30%;
    /*top: 50%;*/
    padding: 0%;
  }

  .header {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #88c9b7; /* Add background color to header */
  padding-top: 20px;
  padding-bottom: 20px;
  height: auto; /* Set height to auto to allow header to expand */
}

  .grid-container1 {
    display: grid;
    margin-right: auto;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Update grid-template-columns property */
    justify-content: center;
    align-items: center;
    grid-gap: 10px;
    grid-template-areas:
      "logo logo" /* Define grid areas for logo */
      "p5 p6" /* Define grid area for p5 */
  }

  .logo-container {
    grid-area: logo; /* Set grid area for logo container */
  }

  /* Set grid areas for p5 and p6 containers */
.p5-container {
  grid-area: p5;
}

.p6-container {
  grid-area: p6;
}

  /* Reset grid template areas to default for smaller screens */
  .grid-container1::before {
    content: '';
    grid-area: unset;
  }

  #logo {
    max-width: 70%; /* Adjust the max-width as needed */
    height: auto; /* Allow the height to adjust proportionally */
    min-width: 250px; /* Set a minimum width for the logo to ensure visibility */
  }

  /*p5, p6 {
    width: 100%; /* Set width of p5 and p6 to 100% in smaller screens
    margin-top: 10px;
  } */


    .video-container {
      min-width: 320px; /* Set a minimum width for the video container */
      padding-bottom: 56.25%; /* Set the original aspect ratio for very small screens */
    }

  #kaulahermo {
    width: auto;
    max-width: 90%;
    padding: 20px 20px 20px 20px;
    margin:auto;
    object-fit: contain;
    float:none;
    vertical-align: middle;
  }

  #asko {
    width: auto;
    max-width: 90%;
    padding: 20px 20px 20px 20px;
    margin:auto;
    object-fit: contain;
    float:none;
    vertical-align: middle;
  }
  #ikurinjalkahoitola{
    width: auto;
    max-width: 90%;
    padding: 20px 20px 20px 20px;
    margin:auto;
    object-fit: contain;
    float:left;
    vertical-align: middle;
  }

  #shelenius {
    min-width: 45%;
    max-width: 95%;
    padding: 20px 20px 20px 20px;
    margin:auto;
    object-fit: contain;
    vertical-align: middle;
  }

p5 {
  font-size: 14px;
  margin-top: 0.0%;
}

p6 {
  font-size: 14px;
  margin-top: 0.0%;
}



.container {
  flex-direction: column;
  align-items: center; /* Add align-items: center; to center vertically */
  /* Additional CSS properties for the container in smaller views as needed */
}

.text-card-left,
.text-card-right {
  margin: 0 auto; /* Add margin: 0 auto; to center horizontally */
}


  @media (max-width: 600px) {
    .cards {
      grid-template-columns: repeat(1, 1fr);
    }

    #Edenred {
        min-width: 45%;
    }

    #Smartum {
      min-width: 45%;
    }

    #Epassi {
      min-width: 45%;
    }

    #kaulahermo {
      width: auto;
      max-width: 90%;
      padding: 20px 20px 20px 20px;
      margin:auto;
      object-fit: contain;
      float:none;
      vertical-align: middle;
    }

    #asko {
      width: auto;
      max-width: 90%;
      padding: 20px 20px 20px 20px;
      margin:auto;
      object-fit: contain;
      float:none;
      vertical-align: middle;
    }
    #sauna{
    width: auto;
    max-width: 90%;
    padding: 20px 20px 20px 20px;
    margin:auto;
    object-fit: contain;
    float:none;
    vertical-align: middle;
  }
   #ikurinjalkahoitola{
     width: auto;
     max-width: 90%;
     padding: 20px 20px 20px 20px;
     margin:auto;
     object-fit: contain;
     float:left;
     vertical-align: middle;
   }


  .text-card-right {
    object-fit: contain;
    float: left;
    vertical-align: middle;
    max-width: 90%;
    background-color: white;
    margin-top: 5%;
    margin-bottom: 5%;
    padding: 10px;

  }


  }
