
@import url(https://fonts.bunny.net/css?family=acme:400,400i|merriweather-sans:300,400|quicksand:400,500,600,700|ubuntu:400);

:root {
  /* color-scheme: light dark; */
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  --tumma: rgb(45,45,45);
  --vaalea: rgb(245,245,245);
  --sini: rgb(6,84,161);
  --harmaa: rgb(120, 120, 120);
  --hopea: rgb(200,200,200);
  background-color: var(--hopea);
}

body {
  color: var(--tumma);
  height: auto;
  width: 100%;
  margin: 0 auto;
  margin-bottom: 24px;
  max-width: 1000px;
  border-radius: 40px;
  overflow-y: scroll;

  /* Multiple backgrounds */
  background: 
  url('../Images/ylatausta1.webp') no-repeat center top,  /* Top image, no repeat */
  url('../Images/bglogo.png') repeat;         /* Repeating image */

  /* Background sizes */
  background-size:
    contain,           /* Size of top image */
    auto;           /* Size of repeating image */

  /* Background positions */
  background-position-y:
    160px,     /* Position of top image */
    160px;       /* Position of repeating image */

  /* Background attachment */
  background-attachment:
    scroll,         /* Top image scrolls with the page */
    scroll;         /* Repeating image scrolls with the page */

  /* Background blend mode (optional) */
  background-blend-mode: normal;
}

html * {
  font-family: 'quicksand', -apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif;
  font-size: 100%;
  line-height: 1;
  font-weight: 500;
  box-sizing: border-box;   
}
h1,h2,h3,h4,h5,p
{
  margin: 0;
  line-height: 1;
}

h1 {
  font-family: 'acme', serif;
  font-size: 220%;
  font-size: clamp(2em, 2.2vw, 2.2em);
}

h2 {
  font-family: 'acme', serif;
  font-size: 180%;
  font-size: clamp(1.6em, 1.7vw, 1.8em);
  color: var(--sini);
  font-style: normal;
  font-weight: 400;
  margin-top: 2px;
  margin-bottom: 12px;
}

h3
{
  font-family: 'acme', serif;
  font-size: 150%;
  font-size: clamp(1.3em, 1.5vw, 1.5em);
  line-height: 1.1;
  font-weight: 400;
  margin-top: 3px;
}
h4
{
  font-family: 'acme', serif;
  font-size: 100%;
  font-size: clamp(0.92em, 0.96vw, 0.96em);
}
h5
{
  font-size: 90%;
  font-size: clamp(0.8em, 0.9vw, 0.9em);
}

p, p.para, h5.kump
{
  font-size: 100%;
  font-weight: 600;
  line-height: 1.2;
}
.kump a, .google a
{
  text-decoration: underline;
  text-decoration-thickness: 2px;
  color: var(--sini);
}
.kump a:visited, .google a:visited
{
  color: var(--harmaa);
}
.kump a:hover, .google a:hover
{
  color: var(--sini);
  text-decoration: underline;
  text-decoration-color: var(--sini);
  text-decoration-thickness: 4px;
}
p.para
{
  margin-top: 2px;
}
p.huom, p.apu
{
  margin-top: 10px;
}

.linkkipalkki
{
  background: linear-gradient(to bottom, var(--sini) 50%, var(--vaalea) 50%); 
  background-size: 100% 100%;
  display: flex;
  height: max-content;
}
.linkit
{
  display: flex;
  flex-direction: row;
  width: 100%;
  padding: 12px 30px 12px 30px;
  position: relative;
  background-color: var(--hopea);
  justify-content: center;
  align-items: center;
  gap: 40px;
  border-radius: 25%;
  margin: 10px auto;
  margin-bottom: -15px;
  box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;
  -webkit-box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;

}
a.mainlink
{
  color: var(--tumma);
  margin: 0 0 6px 0;
  text-decoration: none;
}

a.mainlink:hover
{
  color: var(--sini);
  text-decoration: underline;
  text-decoration-color: var(--vaalea);
  text-decoration-thickness: 4px;
}
.flex-container
{
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  height: 100%;
  max-width: 1000px;
  padding: 0;
}

.osio-yla, .osio-yla2, .osio-yla-yht, .osio-keski, osio-kump
{
  display: flex;
  flex-direction: column;
}
.osio-yla
{
  width: 60%;
  padding: 30px 10px 10px 20px;
}
.osio-yla2
{
  width: 60%;
  padding: 0px 10px 30px 20px;
}
.osio-yla-yht
{
  width: 75%;
  padding: 30px 10px 30px 20px;
}

.osio-keski, .osio-gal-keski
{
  width: 65%;
  padding: 5px 10px 5px 20px;
}
.osio-kump
{
  width: 100%;
  padding: 5px 10px 5px 20px;
}
.osio-map
{
  padding: 20px 10px 0px 20px;
}

.kump
{
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 20px;
}

.map
{
  display: flex;
  margin-top: 10px;
}

.nimet
{
  display: flex;
  flex-direction: row;
}
.nimi
{
  margin: 0 50px 0 0;
}

.kuvia-etu img, .karttakuva img
{
  width: 100%;
  height: auto;
  max-width: 720px;
  max-height: 520px;
}
.karttakuva img
{
  box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;
  -webkit-box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;
}

.gallink
{
  width: fit-content;
  margin-bottom: 20px;
}

/* navbar
---------------------------------- */

.nav-wrapper {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 25px;
  background-color: var(--sini);
  height: 108px;
  max-width: 1000px;
  justify-content: center;
  border-top-right-radius: 40px;
  border-top-left-radius: 40px;
  z-index: 1000;
}
  
.logo {
  
  margin: 0;
}

.logo img {
  background-color: transparent;
  height: 100px;
}
h2.slogan
{
  color: var(--hopea);
  margin: 0;
}

/* footer 
----------------------------------- */

#footer {
  margin-top: 25px;
  background-color: var(--sini);
  max-width: 1000px;
  padding-bottom: 25px;
  border-radius: 0 0 40px 40px;
}

.footer-wrapper {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 20px 0;
}

.footer-info h3
{
  color: var(--vaalea);
  line-height: 1.3;
  text-align: center;
}
.footer-info a
{
  font-family: 'acme', serif;
  color: lightgreen;
  line-height: 1.3;
  text-align: center;
}
p.copyright, a.copyright {
  font-family: 'ubuntu', serif;
  text-align: center;
  font-size: 90%;
  color: var(--hopea);
}
a.copyright
{
  font-size: 100%;
}

/* GALLERIA ----------------------------- */

.subpages {
  margin: 20px 0;
}

.subpage-button {
  padding: 6px 10px 10px 10px;
  margin: 5px;
  cursor: pointer;
  background-color: var(--sini);
  color: var(--vaalea);
  border: none;
  border-radius: 5px;
  transition: background-color 0.3s;
}

.subpage-button:hover {
  background-color: var(--tumma);
  color: var(--hopea);
}

.gallery-section {
  width: 100%;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 0 10px 0;
}

.thumbnail {
  width: 120px;
  height: 90px;
  cursor: pointer;
  transition: 0.3s;
  display: block;
  box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;
  -webkit-box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;
  border-radius: 5px;
  object-fit: cover;
}

.thumbnail:hover {
  filter: brightness(1.5); /* Increases brightness by 50% */
  transition: filter 0.3s ease;
}

.popup {
  display: none;
  position: relative;
  z-index: 1;
  padding-top: 20px;
  left: 0;
  top: 0px;
  padding-bottom: 20px;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: transparent;
}

.popup-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;
  -webkit-box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;
}

.close {
  position: absolute;
  padding: 5px;
  top: 0.5vw;
  right: 3vw;
  color: red;
  font-size: 50px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: var(--vaalea);
  text-decoration: none;
  cursor: pointer;
}

.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  /* width: auto; */
  padding: 5px;
  color: var(--sini);
  font-weight: bold;
  font-size: 50px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
  z-index: 10;
  text-shadow: -1.3px -1.3px 0 rgb(245,245,245),  
  1.3px -1.3px 0 rgb(245,245,245),
 -1.3px  1.3px 0 rgb(245,245,245),
  1.3px  1.3px 0 rgb(245,245,245),
 0px 0px 8px rgb(245,245,245);
}

.prev {
  left: 20px;
  border-radius: 15px;
}

.next {
  right: 20px;
  border-radius: 15px;
}

.prev:hover, .next:hover {
  color: var(--tumma);
}

/* SLIDER ----------------- */

.image-comparison-container {
  position: relative;
  width: 100%;
  height: auto;
  max-width: 600px;
  min-height: 450px;
  overflow: hidden;
  box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;
  -webkit-box-shadow:rgba(45,45,45, 0.5) 0px 0px 8px 2px;
  margin: 30px auto 0;
}

/* .image-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
} */

.image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.before {
  z-index: 1;
}

.after {
  z-index: 2;
  width: 50%;
}

.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 5px;
  height: 100%;
  background-color: var(--vaalea);
  cursor: ew-resize;
  z-index: 3;
  transform: translateX(-50%);
  transition: background-color 0.3s ease;
}

.slider-handle:hover {
  background-color: var(--hopea);
}

/* The Knob */
.knob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px; /* Increased width for arrows */
  height: 30px; /* Height of the knob */
  background-color: var(--vaalea);
  border-radius: 50%; /* Makes it circular */
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); /* Adds shadow for depth */
  transform: translate(-50%, -50%); /* Center the knob over the slider handle */
  z-index: 4; /* Ensure the knob is above the slider handle */
  display: flex;
  justify-content: space-between; /* Space arrows evenly */
  align-items: center; /* Center arrows vertically */
  padding: 0 4px; /* Padding for arrows */
  color: var(--sini); /* Arrow color */
  font-size: 16px; /* Arrow size */
}

/* Arrow styles */
.arrow {
  pointer-events: none; /* Ensure arrows do not interfere with dragging */
}

.slider-handle:hover .knob {
  background-color: white /* Change color on hover */
}
/* Close button for comparison viewer */
.close-comparison {
  position: absolute;
  padding: 3px;
  top: 0.1vw;
  right: 1.5vw;
  color: red;
  font-size: 50px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 2000;
}

.close-comparison:hover,
.close-comparison:focus {
  color: var(--vaalea);
  text-decoration: none;
  cursor: pointer;
}


/* responsiivisyys SISÄLTÖ
---------------------------------- */
@media (max-width: 1000px) 
{
  body
  {
    width: calc(100% - 20px);
  }
}
@media (max-width: 800px)
{
  body
  {
    background-position-y: 140px, 140px;
  }
  a.mainlink, a.mainlink:hover
  {
    font-size: 95%;
  }
}

@media (max-width: 719px)
{
  body
  {
    width: calc(100% - 8px);

  }
  .osio-yla
  {
    padding: 30px 8px 10px 8px;
  }
  .osio-yla2
  {
    padding: 0px 8px 30px 8px;
  }
  .osio-yla-yht
  {
    padding: 30px 8px 30px 8px;
  }
  .osio-keski, .osio-kump
  {
    width: 100%;
    padding: 5px 8px 5px 8px;
  }
  .osio-gal-keski
  {
    padding: 5px 8px 5px 8px;
  }
  .osio-map
  {
    padding: 20px 8px 0px 8px;
  }
  .kump
  {
    gap: 15px;
  }
  p, p.para, h5.kump
  {
    font-size: 90%;
  }
  .subpage-button {
    padding: 5px 8px 8px 8px;
    margin: 4px 0 4px 0;
  }
}
@media (max-width: 600px)
{
  body
  {
    background: 
    url('../Images/ylatausta1x700.webp') no-repeat center top,  /* Top image, no repeat */
    url('../Images/bglogo.png') repeat;         /* Repeating image */
    /* Background sizes */
    background-size:
    contain,           /* Size of top image */
    25%;           /* Size of repeating image */

    /* Background attachment */
    background-attachment:
      scroll,         /* Top image scrolls with the page */
      scroll;         /* Repeating image scrolls with the page */

    /* Background blend mode (optional) */
    background-blend-mode: normal;

    background-position-y: 155px, 155px;
  }
  .linkit
  {
    padding: 8px 20px 8px 20px;
    gap: 25px;
    margin: 10px auto;
    margin-bottom: -15px;

  }
  .osio-yla, .osio-yla2
  {
    width: 52%;
  }
  .osio-yla-yht
  {
    width: 75%;
  }
  .osio-gal-keski
  {
    width: 60%;
  }
  a.mainlink, a.mainlink:hover
  {
    font-size: 90%;
  }
  .nimet
  {
    flex-direction: column;
  }
  .nimi
  {
    margin-bottom: 10px;
  }
  .huom
  {
    width: 50%;
  }
  .thumbnail {
    width: 100px;
    height: 75px;
  }
  .popup-content {
    width: 94%;
  }
  .prev, .next {
    /* top: 160px; */
    font-size: 42px;
    text-shadow: -1.3px -1.3px 0 rgb(245,245,245),  
    1.3px -1.3px 0 rgb(245,245,245),
   -1.3px  1.3px 0 rgb(245,245,245),
    1.3px  1.3px 0 rgb(245,245,245),
   0px 0px 8px rgb(245,245,245);
  }
  .prev
  {
    left: 10px;
  }
  .next
  {
    right: 10px;
  }
  .image-comparison-container {
    max-width: 520px;
    min-height: 390px;
  }
}
@media (max-width: 520px)
{
  .image-comparison-container 
  {
    max-width: 448px;
    min-height: 336px;
  }
}
@media (max-width: 460px)
{
  .image-comparison-container 
  {
    max-width: 420px;
    min-height: 315px;
  }
  .close-comparison {
    top: -1.5vw;
    right: 1.5vw;
    font-size: 42px;
  }
}

@media (max-width: 421px)
{
  .osio-yla2
  {
    width: 80%; /* viimeisin muutos, oli 75% */
  }
  .osio-gal-keski
  {
    width: 75%;
  }
  .galapu
  {
    width: 75%;
  }
  a.mainlink, a.mainlink:hover
  {
    font-size: 80%;
  }
  p, p.para, h5.kump
  {
    font-size: 84%; /* viimeisin muutos, oli 80% */
  }
  .thumbnail {
    width: 80px;
    height: 60px;
    box-shadow:rgba(45,45,45, 0.5) 0px 0px 5px 2px;
  -webkit-box-shadow:rgba(45,45,45, 0.5) 0px 0px 5px 2px;
  }
  .prev, .next {
    font-size: 42px;
    text-shadow: -1px -1px 0 rgb(245,245,245),  
    1px -1px 0 rgb(245,245,245),
   -1px  1px 0 rgb(245,245,245),
    1px  1px 0 rgb(245,245,245),
   0px 0px 8px rgb(245,245,245);
  }
  .prev
  {
    left: 6px;
  }
  .next
  {
    right: 6px;
  }
  .image-comparison-container 
  {
    max-width: 408px;
    min-height: 306px;
  }
}
@media (max-width: 400px)
{
  body
  {
    background-position-y: 140px, 140px;
  }
  h2 
  {
    font-size: 160%;
    font-size: clamp(1.5em, 1.6vw, 1.6em);
  }
  .osio-yla2
  {
    width: 85%;
  }
  .galapu
  {
    width: 80%;
  }
  .huom
  {
    width: 75%;
  }
  .subpage-button {
    padding: 4px 6px 6px 6px;
    margin: 3px 0 3px 0;
  }
  .close {
    top: 1.3vw;
    font-size: 42px;
  }
  .image-comparison-container 
  {
    max-width: 384px;
    min-height: 288px;
  }
}
@media (max-width: 360px)
{
  h2 
  {
    font-size: 150%;
    font-size: clamp(1.42em, 1.5vw, 1.5em);
  }
  .osio-yla
  {
    width: 57%;
  }
  .osio-yla2
  {
    width: 100%;
  }
  .osio-gal-keski
  {
    width: 100%;
  }
  .galapu
  {
    width: 65%;
  }
  .image-comparison-container 
  {
    max-width: 348px;
    min-height: 261px;
  }
}
@media (max-width: 340px)
{
  .image-comparison-container 
  {
    max-width: 328px;
    min-height: 246px;
  }
}
@media (max-width: 321px)
{
  a.mainlink, a.mainlink:hover
  {
    font-size: 76%;
  }
  p, p.para, h5.kump
  {
    font-size: 73%;
  }
  h2 
  {
    font-size: 142%;
    font-size: clamp(1.4em, 1.42vw, 1.42em);
  }
  .thumbnail {
    width: 72px;
    height: 54px;
  }
  .image-comparison-container 
  {
    max-width: 308px;
    min-height: 231px;
  }
}
@media (max-width: 300px)
{
  .image-comparison-container 
  {
    max-width: 288px;
    min-height: 216px;
  }
}

/* responsiivisuus NAVBAR ja FOOTER
----------------------------- */

@media (max-width: 900px)
{
  h2.slogan
  {
    font-size: 160%;
    font-size: clamp(1.4em, 1.6vw, 1.7em);
  }
}
@media (max-width: 800px)
{
  .nav-wrapper
  {
    gap: 10px;
    height: 95px;
  }
  .logo img
  {
    height: 84px;
  }
}

@media (max-width: 719px)
{
  .nav-wrapper
  {
    gap: 4px;
    height: 90px;
  }
  .logo img
  {
    height: 76px;
  }
  h2.slogan
  {
    font-size: 140%;
    font-size: clamp(1.3em, 1.4vw, 1.5em);
  }
}
@media (max-width: 600px)
{
  .nav-wrapper
  {
    gap: 0;
    height: 115px;
    flex-direction: column;
  }
  .logo img
  {
    height: 86px;
  }
  h2.slogan
  {
    font-size: 135%;
    font-size: clamp(1.3em, 1.35vw, 1.4em);
  }
  h3.footer
  {
    font-size: 130%;
    font-size: clamp(1.2em, 1.3vw, 1.3em);
  }
}
@media (max-width: 450px)
{
  h3.footer
  {
    font-size: 120%;
    font-size: clamp(1.1em, 1.2vw, 1.2em);
  }
  p.copyright
  {
    font-size: 65%;
  }
  a.copyright
  {
    font-size: 100%;
  }
}
@media (max-width: 400px)
{
  .nav-wrapper
  {
    height: 100px;
  }
  .logo img
  {
    height: 76px;
  }
  h2.slogan
  {
    font-size: 120%;
    font-size: clamp(1.1em, 1.2vw, 1.25em);
  }
  h3.footer
  {
    font-size: 110%;
    font-size: clamp(1em, 1.1vw, 1.1em);
  }
}
@media (max-width: 360px)
{
  .logo img
  {
    height: 70px;
  }
  h2.slogan
  {
    font-size: 110%;
    font-size: clamp(1em, 1.1vw, 1.15em);
  }
}
@media (max-width: 325px)
{
  .logo img
  {
    height: 65px;
  }
  h2.slogan, h3.footer
  {
    font-size: 100%;
    font-size: clamp(0.96em, 1vw, 1em);
  }
}

