* {
  box-sizing: border-box;
}

:root {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background-color: rgb(26, 27, 37);
}

body {
  margin: 0;
}

.header {
  width: 100%;
  height: 5rem;
  left: 0;
  top: 0;
  background-color: rgba(34, 34, 34, 0.85);
  color: white;
  position: fixed;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
}

.header p {
  font-size: 20px;
  height: 4rem;
  width: 15rem;
  margin-top: 2rem;
  margin-left: 7rem;
  text-align: center;
  font-weight: bold;
  text-shadow: 0px 0px 1px lightgray;
}

.header p {
  @media screen and (max-width: 700px) {
    margin-left: 1rem;
  }
}

.logo {
  height: 5rem;
  width: 5rem;
}

.contact {
  height: 3rem;
  width: 5rem;
  margin-right: 7rem;

  @media screen and (max-width: 700px) {
    margin-right: 1rem;
  }
}

.contact img {
  height: 2rem;
  width: 2rem;
}

.contact button {
  width: 10rem;
  border: 0.5px solid #ffd700;
  border-radius: 2rem;
  background-color: black;
  color: white;
  padding: 1rem;
  transition: background-color 0.3s ease, transform 0.2s ease;

  @media screen and (max-width: 700px) {
    width: 5rem;
    padding: 0.5rem;
  }
}

.contact button:hover {
  background-color: #333;
  transform: scale(1.05);
}

.description-container {
  height: 35rem;
  margin-top: 5em;
  background-image: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url("assets/Description\ bild.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position-y: center;

  @media screen and (max-width: 600px) {
    height: 35rem;
    background-position-x: center;
  }
  @media screen and (max-width: 800px) {
    height: 32rem;
    background-position-x: center;
  }
}

.welcome {
  color: rgb(255, 255, 255);
  font-size: 2rem;
  text-align: center;
  padding-top: 2rem;

  @media screen and (max-width: 600px) {
    font-size: 1.5rem;
  }
}

.description {
  margin: auto;
  margin-top: 2rem;
  width: 30rem;
  text-align: center;
  color: white;
  font-size: 1.2rem;
  line-height: 1.6;
  color: #e0e0e0;
  padding: 1rem 2rem;
  background: rgba(50, 50, 50, 0.7);
  border-radius: 0.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  @media screen and (max-width: 600px) {
    width: 21rem;
    height: 18rem;
  }
  @media screen and (max-width: 800px) {
    font-size: 14px;
  }
}

.service-header {
  color: white;
  text-align: center;
  font-size: 2rem;
}

.services {
  height: 25rem;
  display: flex;
  justify-content: space-around;
  gap: 2rem;
  flex-direction: row;
  text-align: center;

  p {
    font-size: 1rem;
    color: #e0e0e0;
    line-height: 1.5;
    padding: 0.5rem 1rem;
    text-align: center;
    transition: transform 0.3s ease;
  }

  h3 {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
  }

  @media screen and (max-width: 1000px) {
    height: 60rem;
    flex-direction: column;
    align-items: center;
  }

  @media screen and (max-width: 600px) {
    height: 60rem;
    flex-direction: column;
    align-items: center;
  }
}

.fence,
.repair,
.planing {
  height: 20rem;
  width: 30rem;
  background-color: #2c2f38;
  color: #e6e6e6;
  border-radius: 1rem;
  overflow: hidden;

  img {
    filter: opacity(0);
    filter: drop-shadow(0px 1000px 0 rgb(224, 224, 224));
    transform: translateY(-1000px);
  }

  @media screen and (max-width: 600px) {
    width: 20rem;
  }
}

.fence:hover,
.repair:hover,
.planing:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-5px);
}

.slideshow-container {
  max-width: 95%;
  position: relative;
  margin: auto;
  margin-top: 2rem;
  overflow: hidden; /* Prevent overflow for the slider */
  display: flex; /* Allow flex properties for the slides */
  gap: 1rem;
}

.mySlides {
  display: none; /* Hide all slides initially */
  flex: 1 0 auto; /* Allow slides to grow and shrink */
  text-align: center;
  position: relative;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

.mySlides img {
  width: 100%; /* Images take full width of their container */
  height: auto; /* Maintain aspect ratio */
  max-height: 25rem; /* Set a maximum height */
  object-fit: cover; /* Crop image to fit the container */
  border-radius: 2rem;
}

.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  padding: 16px;
  margin-top: -22px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  user-select: none;
  background-color: rgba(0, 0, 0, 0.5);
}

.prev {
  left: 0;
}

.next {
  right: 0;
}

.prev:hover,
.next:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.dot {
  cursor: pointer;
  height: 15px;
  width: 15px;
  margin: 0 2px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.active,
.dot:hover {
  background-color: #717171;
}

.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {
    opacity: 0.4;
  }
  to {
    opacity: 1;
  }
}

.footer {
  width: 100%;
  height: 5rem;
  left: 0;
  top: 0;
  background-color: rgba(34, 34, 34, 0.85);
  color: white;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
}

.footer a {
  color: white;
}

/* Media Queries */
@media screen and (max-width: 768px) {
  .mySlides {
    width: 100%; /* Show one image at a time on smaller screens */
  }

  .prev,
  .next {
    padding: 12px;
    font-size: 16px;
  }

  .mySlides img {
    max-height: 30rem; /* Ensure the images don't overflow */
  }

  .dot {
    height: 10px;
    width: 10px;
  }
}

@media screen and (max-width: 480px) {
  .prev,
  .next {
    padding: 8px;
    font-size: 14px;
  }

  .dot {
    height: 8px;
    width: 8px;
  }

  .mySlides {
    width: 95%; /* Show one image at a time on smaller screens */
  }
}

.text-container {
  width: 95%;
  margin: auto;
  margin-top: 3rem;
  margin-bottom: 3rem;
  background-color: #333;
  padding: 2rem;
  color: white;
  border-radius: 2rem;

  h1 {
    @media screen and (max-width: 520) {
      font-size: 2px;
    }
  }
}

.back {
  margin: auto;
  height: 4rem;
  width: 12rem;
  border-radius: 2rem;
  background-color: black;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #ffd700;
  margin-bottom: 2rem;
  

  a {
    color: white;
    text-decoration: none;
  }
}

.back:hover {
  background-color: #333;
  transform: scale(1.05);
}