/* ---------------------- Kuvien perusrajoitus ---------------------- */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ---------------------- Yläbanneri ---------------------- */
.ylabanneri {
  width: 85vw;                  /* Täysi leveys ikkunasta */
  height: 25vw;                  /* Korkeus suhteessa ikkunaan */
  margin: 0 auto;
  background-image: url('omppu_paaryna.jpg');
  background-size: cover;      /* Säilyttää koko kuvan kuvasuhteen */
  background-position: center;   /* Keskitetään kuva */
  background-repeat: no-repeat;  /* Ei toisteta kuvaa */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  border-radius: 10px;
}

.ylabanneri h1 {
  color: white;
  font-size: 4vw;
  padding: 1rem 2rem;
  text-align: center;
  background: rgba(0,0,0,0.5);
  border-radius: 15px;
  margin: 0;
}

/* ---------------------- Tekstilinkit kuvan päällä ---------------------- */
.teksti-kuvan-paalla a {
  display: inline-block;
  margin-top: 1rem;
  color: #fff;
  padding: 0.6rem 1rem;
  text-decoration: none;
  border-radius: 8px;
  font-size: 2vw;
  font-weight: bold;
}

.teksti-kuvan-paalla a:hover {
  background: #005fa3;
}

/* ---------------------- Lomake ---------------------- */
form {
  background-color: #fff;
  padding: 20px;
  max-width: 400px;
  margin: auto;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(127, 83, 83, 0.1);
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: bold;
}

input, textarea {
  width: 100%;
  margin-bottom: 16px;
  border-radius: 4px;
}

button {
  background-color: #0077cc;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background-color: #005fa3;
}

/* ---------------------- Tekstiboxi ---------------------- */
.tekstipoksiin {
  text-align: center;
}

/* ---------------------- Otsikot ---------------------- */
h2 {
  font-style: italic;
  text-align: center;
  font-size: 50px;
  color: rgb(12, 12, 12);
  display: flex;
  justify-content: center;
}

h3 {
  font-style: italic;
  text-align: center;
  font-size: 30px;
  color: rgb(12, 12, 12);
  display: flex;
  justify-content: center;
}

/* ---------------------- Verkkis ---------------------- */
.verkkis {
  width: 85vw;
  height: 30vh;
  margin: 0 auto;
  background-image: url('work.JPG');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  padding: 1rem;
}

.verkkis a {
  color: white;
  text-decoration: none;
  font-size: 4vw;
  font-weight: bold;
  background: rgba(0, 0, 0, 0.5);
  padding: 1rem 2rem;
  border-radius: 12px;
  text-shadow: 2px 2px 5px rgba(0,0,0,0.8);
  transition: background 0.3s ease;
}

.verkkis a:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* ---------------------- Esittelyteksti ---------------------- */
.esittely {
  font-style: italic;
  color: rgb(5, 5, 5);
  text-align: center;
  font-size: 30px;
  padding: 1em;
  max-width: 100%;
  margin: 0 auto;
}

/* ---------------------- Slideshow ---------------------- */
.slideshow-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 50px;
  overflow: hidden;
  padding: 1rem;
  gap: 1rem;
}

.slideshow-box {
  flex: 1 1 auto;
  max-width: 100%;
  display: block;
  border-radius: 8px;
}

.slideshow-container {
  width: 100%;
  height: auto;
  margin: auto;
  overflow: hidden;
  position: relative;
}

.slideshow-container img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: none;
  border-radius: 8px;
}

.slideshow-container img.active {
  display: block;
}

.desc {
  text-align: center;
  padding: 10px;
  font-size: 16px;
}

/* ---------------------- Desktop slideshow ---------------------- */
@media (min-width: 768px) {
  .slideshow-wrapper {
    flex-direction: row;
    justify-content: space-around;
  }

  .slideshow-box {
    flex: 1 1 30vw;
    max-width: 30vw;
  }

  .slideshow-container {
    width: 20vw;
    height: 20vw;
  }

  /* Teksti kuvan päällä desktopilla */
  .teksti-kuvan-paalla {
    position: absolute !important;
    top: 85%;
    left: 85%;
    transform: translate(-50%, -50%);
    font-size: 4vw;
    background: none;
    padding: 1rem 2rem;
  }

  .kuva-teksti img {
    position: absolute !important;
    width: 100vw !important;
    height: 100vh !important;
    object-fit: cover !important;
  }
}

/* ---------------------- Mobiiliversio ---------------------- */
@media (max-width: 768px) {
  .ylabanneri {
    height: auto;
    padding-top: 30%;
    padding-bottom: 30%;
  }

  .ylabanneri h1 {
    font-size: 8vw;
    padding: 0.8rem 1.5rem;
  }

  .kuva-teksti {
    position: relative;
    width: 100vw;
    height: auto;
  }

  .kuva-teksti img {
    position: relative;
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }

  .teksti-kuvan-paalla {
    position: relative;
    margin: 1rem auto;
    text-align: center;
    font-size: 5vw;
    color: white;
    background: rgba(0, 0, 0, 0.6);
    padding: 1rem 2rem;
    border-radius: 15px;
    z-index: 10;
    transform: none;
  }

  body {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.4;
  }

  h1, h2, h3 {
    font-family: 'Verdana', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5em;
  }

  h1 {
    font-size: 7vw;
  }

  h2 {
    font-size: 6vw;
  }

  h3 {
    font-size: 4vw;
  }

  p, label, input, textarea, button {
    font-size: 3.5vw;
  }

  button {
    padding: 0.6rem 1rem;
  }
}

.logot {
  display: flex;      /* Asettaa riville */
  gap: 15px;          /* Väli kuvien väliin */
  justify-content: center; /* Keskittää rivin */
  align-items: center;     /* Tasaa pystysuunnassa */
}

.logot img {
  width: 50px;   /* Muuta sopivaksi */
  height: auto;
  cursor: pointer;
}
