body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f9f9f9;
  padding: 0;
  margin: 0;
}

header, footer {
  background-color:#003366;
  color: white;
  padding: 1rem;
  text-align: center;
}

/*Navigaatiot*/

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px;
}

.skip-link:focus {
  top: 0;
}

/* NAV */

nav {
  background-color: #003366;
}

nav ul {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav li {
  margin: 0;
}

/* Hamburger */

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  width: 30px;
  margin: 1rem auto;
}

.hamburger span {
  height: 4px;
  width: 100%;
  background: white;
  margin: 4px 0;
  border-radius: 2px;
}

/* MOBILE */

@media (max-width: 768px) {

  nav {
    display: none;
    width: 100%;
  }

  nav ul {
    flex-direction: column;
    text-align: center;
  }

  nav.active {
    display: block;
  }

  .hamburger {
    display: flex;
  }
}

/*Tekstit*/
a {
  text-decoration: none;
  color: white;
  text-align: center;
  display: inline-block;
  border-radius: 20px;
  padding: 12px 20px;
}

a:hover {
  background-color: #0055aa;
  text-decoration: none;
}

h2 {
  font-size: 20px;
  font-weight: bold;
}

h3 {
  text-align: left;
}

section {
  background-color: white;
  text-align: center;
  max-width: 800px;
  padding: 1rem;
  margin: 2rem auto;
}

section p {
  text-align: left;
  padding: 1rem;
}

article {
  background-color: #eeeeee;
  outline: #dddddd solid;
  padding: 1rem;
  margin: 1rem;
}

article p{
  text-align: left;
  padding: 0;
}

/* Kuvagalleria */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-grid figure {
  margin: 0;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.gallery-grid figcaption {
  margin-top: 0.5rem;
  font-size: 14px;
}

.gallery-img:focus {
  outline: 3px solid #0055aa;
  outline-offset: 4px;
}

/* Hover-efekti galleriakuviin */

.gallery-grid figure {
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
}

.gallery-grid img {
  transition: transform 0.3s ease;
}

.gallery-grid figure:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.gallery-grid figure:hover img {
  transform: scale(1.05);
}

/* Responsiivisuus */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Lightbox */

.lightbox {
  display: none;
  position: fixed;
  z-index: 999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 1rem;
}

.lightbox-content {
  max-width: 90%;
  max-height: 80%;
  border-radius: 8px;
}

#lightbox-caption {
  color: white;
  margin-top: 1rem;
  text-align: center;
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}