
.box1 img, .box2 img, .box3 img, .box4 img, .box5 img {
  width: 1000px;
}

.box1, .box2, .box3, .box4, .box5 {
  position: relative;
  width: 90vw;
  min-height: 67vh;
  border-radius: 10px;
  margin: 40px auto;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  align-items: end;
  justify-content: end;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.box1:hover, .box2:hover, .box3:hover, .box4:hover, .box5:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1), 0 5px 10px rgba(0, 0, 0, 0.5);
  transform: translateY(-5px);
}

.arrow1, .arrow2, .arrow3, .arrow4, .arrow5 {
  position: absolute;
  top: 38%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  padding: 10px;
  font-size: 24px;
  cursor: pointer;
  z-index: 100;
  transition: opacity 0.3s ease;
}

.arrow1 img, .arrow2 img, .arrow3 img, .arrow4 img, .arrow5 img {
  width: 45px;
  opacity: 0.7;
}

.arrow1:hover img, .arrow2:hover img, .arrow3:hover img, .arrow4:hover img, .arrow5:hover img {
  opacity: 1;
}

.left-arrow1, .left-arrow2, .left-arrow3, .left-arrow4, .left-arrow5 {
  left: 10px;
}

.right-arrow1, .right-arrow2, .right-arrow3, .right-arrow4, .right-arrow5 {
  right: 10px;
}

.textbox1, .textbox2, .textbox3, .textbox4, .textbox5 {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background-color: hsla(210, 100%, 98%, 0.9);
  backdrop-filter: blur(20px);
  width: 100%;
  padding: 20px;
  overflow: hidden;
  position: relative;
}

.czytaj-dalej1, .czytaj-dalej2, .czytaj-dalej3, .czytaj-dalej4, .czytaj-dalej5 {
  padding-top: 5px;
}

.preview-text1, .preview-text2, .preview-text3, .preview-text4, .preview-text5 {
  max-height: 100px;
  overflow: hidden;
}

.expanded-text1, .expanded-text2, .expanded-text3, .expanded-text4, .expanded-text5 {
  margin-top: 20px;
  max-height: 0;
  height: 0;
  overflow: hidden;
  transition: height 0.5s ease-in-out;
  position: relative;
}

.expanded-text1.open, .expanded-text2.open, .expanded-text3.open, .expanded-text4.open, .expanded-text5.open {
  max-height: 500px;
  overflow-y: auto;
  padding-right: 20px;
}

.expanded-text1::-webkit-scrollbar, .expanded-text2::-webkit-scrollbar, .expanded-text3::-webkit-scrollbar, .expanded-text4::-webkit-scrollbar, .expanded-text5::-webkit-scrollbar {
  width: 8px;
  margin-right: 0px;
  margin-left: 20px;
}

.expanded-text1::-webkit-scrollbar-thumb, .expanded-text2::-webkit-scrollbar-thumb, .expanded-text3::-webkit-scrollbar-thumb, .expanded-text4::-webkit-scrollbar-thumb, .expanded-text5::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

.expanded-text1::-webkit-scrollbar-thumb:hover, .expanded-text2::-webkit-scrollbar-thumb:hover, .expanded-text3::-webkit-scrollbar-thumb:hover, .expanded-text4::-webkit-scrollbar-thumb:hover, .expanded-text5::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.8);
}

.lightbox1, .lightbox2, .lightbox3, .lightbox4, .lightbox5 {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8); 
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox-background1, .lightbox-background2, .lightbox-background3, .lightbox-background4, .lightbox-background5 {
  width: 80%;
  height: 90%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  cursor: zoom-out;
}

.close-lightbox1, .close-lightbox2, .close-lightbox3, .close-lightbox4, .close-lightbox5 {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.lightbox1 .arrow1, .lightbox2 .arrow2, .lightbox3 .arrow3, .lightbox4 .arrow4, .lightbox5 .arrow5 {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: transparent;
  border: none;
  padding: 10px;
  font-size: 24px;
  cursor: pointer;
  z-index: 1000;
  transition: opacity 0.3s ease;
}

.lightbox1 .arrow1 img, .lightbox2 .arrow2 img, .lightbox3 .arrow3 img, .lightbox4 .arrow4 img, .lightbox5 .arrow5 img {
  width: 45px;
  opacity: 0.7;
}

.lightbox1 .arrow1:hover img, .lightbox2 .arrow2:hover img, .lightbox3 .arrow3:hover img, .lightbox4 .arrow4:hover img, .lightbox5 .arrow5:hover img {
  opacity: 1;
}

.lightbox1 .left-arrow1, .lightbox2 .left-arrow2, .lightbox3 .left-arrow3, .lightbox4 .left-arrow4, .lightbox5 .left-arrow5 {
  left: 10px;
}

.lightbox1 .right-arrow1, .lightbox2 .right-arrow2, .lightbox3 .right-arrow3, .lightbox4 .right-arrow4, .lightbox5 .right-arrow5 {
  right: 10px;
}

@media (max-width: 600px) {
  .box1 img, .box2 img, .box3 img, .box4 img, .box5 img {
    width: 100%; /* Zdjęcia dostosowane do ekranu */
  }

  .box1, .box2, .box3, .box4, .box5 {
    width: 95vw;
    min-height: 50vh; /* Mniejsze boksy */
    margin: 20px auto;
    flex-direction: column;
    align-items: flex-start;
  }

  .textbox1, .textbox2, .textbox3, .textbox4, .textbox5 {
    padding: 15px;
  }

  .arrow1 img, .arrow2 img, .arrow3 img, .arrow4 img, .arrow5 img,
  .lightbox1 .arrow1 img, .lightbox2 .arrow2 img, .lightbox3 .arrow3 img, .lightbox4 .arrow4 img, .lightbox5 .arrow5 img {
    width: 30px;
  }

  .arrow1, .arrow2, .arrow3, .arrow4, .arrow5 {
    top: 45%;
    padding: 6px;
    font-size: 20px;
  }

  .expanded-text1.open, .expanded-text2.open, .expanded-text3.open, .expanded-text4.open, .expanded-text5.open {
    max-height: 400px;
    padding-right: 10px;
    font-size: 14px;
  }

  .lightbox-background1, .lightbox-background2, .lightbox-background3, .lightbox-background4, .lightbox-background5 {
    width: 95%;
    height: 80%;
  }

  .close-lightbox1, .close-lightbox2, .close-lightbox3, .close-lightbox4, .close-lightbox5 {
    font-size: 32px;
    top: 10px;
    right: 15px;
  }
}