figcaption {
  width: max-content;
  padding: 10px;
  margin: 0 auto;
}
img {
  box-shadow: #797777cf 0px 6px 10px;
}

#ukrmob {
  visibility: hidden;
}

ol {
  padding: 1.5rem;
  list-style-type: disc;
}

.lista {
  display: flex;
  flex-direction: column;
  align-items: center;
  list-style-type: none;
  margin: 0 auto;
}

#Table1 {
  display: auto;
  table-layout: unset;
  width: 75%;
}
#table1 td h3 {
  height: 90%;
}
.linkit {
  display: block;
  text-align: center;
  margin: 0 auto;
}

footer {
  color: rgb(104, 104, 104);
  font-size: 1rem;
  text-align: center;
  padding: 1rem;
  width: 100%;
}
.kursiivi {
  font-style: italic;
  text-align: center;
  margin: 1.5rem auto;
  width: fit-content;
}
.hyppy {
  break-before: column;
}
.figure {
  max-width: 90%;
}
.kuvaosa {
  columns: 2;
  display: block;
  margin: 0 auto;
  width: fit-content;
}

#kuva-alue {
  display: grid;
  grid-template-columns: repeat(3, minmax(300px, 2fr));
  grid-gap: 1rem;
  /* Väli kuvien välillä */
  padding: 1rem;
}

/* 2. Muotoillaan yksittäiset kuvat */
#kuva-alue img {
  width: 100%;
  /* Kuva täyttää oman ruutunsa */
  height: 200px;
  /* Kaikki kuvat saman korkuisia */
  object-fit: cover;
  /* Rajaa kuvan nätisti, ettei se veny kummalliseksi */
  border-radius: 8px;
  /* Pyöristetyt kulmat (valinnainen) */
  box-shadow: 0 4px 8px rgba(49, 49, 49, 01);
  /* Kevyt varjo (valinnainen) */
  transition: transform 0.2s ease;
  /* Pehmeä liike, kun hiiri 
    menee päälle */
}

/* 3. Efekti, kun hiiri on kuvan päällä */
#kuva-alue img:hover {
  transform: scale(2);
  z-index: 100;
  /* Kuva suurenee hieman */
  cursor: zoom-in;
}
.contact-form {
  max-width: 500px;
  width: 100%;
  margin: 20px auto;
  display: block;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form label {
  font-weight: bold;
}

.contact-form input,
.contact-form textarea {
  padding: 1rem;
  margin: 10px auto;
  border: 1px solid #aaa;
  border-radius: 4px;
  font-size: 1.5rem;
  width: 100%;
}

.contact-form button {
  padding: 1.2rem;
  display: block;
  margin: 0 auto;
  background-color: #005bbb;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
}

.contact-form button:hover {
  background-color: #004999;
}
.ylos-nappi {
  position: fixed; /* Lukitsee napin ikkunaan */
  bottom: 30px; /* Etäisyys pohjasta */
  right: 30px; /* Etäisyys oikeasta reunasta */

  width: 50px; /* Napin leveys */
  height: 50px; /* Napin korkeus */
  background-color: #8484f7; /* Taustaväri (tummansininen/musta) */
  color: white; /* Nuolen väri */

  display: flex; /* Seuraavat kolme riviä keskittävät nuolen */
  align-items: center;
  justify-content: center;

  text-decoration: none; /* Poistaa linkin alleviivauksen */
  border-radius: 50%; /* Tekee napista täysin pyöreän */
  font-size: 2.4rem; /* Nuolen koko */
  box-shadow: 2px 2px 10px rgba(36, 39, 238, 0.3); /* Lisää pienen varjon */
  z-index: 1000; /* Varmistaa, että nappi on muiden päällä */
}
@media only screen and (max-width: 1100px) {
  .kuvaosa {
    columns: 1;
  }
}
@media only screen and (max-width: 768px) {
  #yla-navigointi {
    position: sticky;
    top: 0;
    z-index: 1000;
    /* width: 100%; */
    margin: 0 auto;
  }
  main {
    width: 90%;
    margin: 0 auto;
  }
  #ukrmob {
    visibility: visible;
  }
  .ukr {
    columns: unset !important; /* Poistaa palstat */
  }

  #kuva-alue img:hover {
    transform: none !important;
  }
  #kuva-alue {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
  }

  #kuva-alue img {
    width: 80%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    display: block;
  }

  #Table1 {
    display: table;
    margin: 0 auto;
  }
  #table1 td h3 {
    /* width: fit-content; */
    width: 70%;
  }
  /* Muutetaan taulukon osat block-elementeiksi */
  table,
  thead,
  tbody,
  th,
  td,
  tr {
    display: block;
  }

  /* Piilotetaan varsinainen otsikkorivi */
  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  tr {
    margin-bottom: 1rem;
    border: 1px solid #ccc;
  }

  td {
    text-align: center;
    border-bottom: 1px solid #eee;
  }

  td::before {
    content: attr(data-label);
    position: static;
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    left: 10px;

    text-align: left;
  }

  .nav-menu.active {
    /* display: flex; */
    max-height: none; /* Estää menua venymästä koko ruudun yli */
    overflow: visible; /* Lisää rullauksen vain menun sisälle, jos linkkejä on paljon */
  }

  .navbar {
    max-width: 100%;
  }

  .dropdown-content li {
    padding: 1rem;
  }
}
