body {
  font-family: 'Poppins', sans-serif;
  margin-top: 100px;
  padding: 0;
  background-color: #f7f7f7;
}
.gallery-hero h1 {
  text-align: center;
  margin-bottom: 20px;
  color: white;
  font-size: 102px;
}
.gallery-hero {
  background: url(../img/zdj5.jpg) center/cover no-repeat;
  padding: 80px 20px 40px;
  text-align: center;
  mask-image: linear-gradient(to bottom, black 80%, transparent 100%);
}
nav {

  margin-bottom: 20px;
}
nav button {
  margin: 5px;
  padding: 10px 100px;
  background: linear-gradient(135deg, #97fda3, #2aa348);
  border: none;
  border-radius: 10px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: 'Poppins',sans-serif;
}

nav button:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.gallery-section {
  background: white;
  background-size: 100% 100%;
  animation: gradientMove 10s ease infinite;
  padding: 60px 20px;
  border-radius: 0 0 30px 30px;
}


.gallery {
  display: grid;
  gap: 10px;
  justify-content: center;
  padding: 10px;
}

.gallery img, 
.gallery video, .gallery div, .gallery iframe {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.3s;
  outline: none;
  border: none;
}

.gallery img:hover, 
.gallery video:hover,
.gallery iframe:hover,
.gallery div:hover {
  transform: scale(1.05);
}

#lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  margin: auto;
  display: block;
}

#lightbox-prev,
#lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 3em;
  color: white;
  cursor: pointer;
  user-select: none;
  padding: 20px;
}

#lightbox-prev {
  left: 0;
}

#lightbox-next {
  right: 0;
}
#lightbox-video, #lightbox-iframe {
  max-width: 90%;
  max-height: 90%;
  min-width: 80%;
  min-height: 80%;
  display: none;
}

#events{
  display: flex;
  justify-content: center;
}
#events-content, #polkolonie-content{
  margin-top: 50px;
  margin-bottom: 50px;
  display: flex;
  flex-wrap: wrap;
  /* justify-content: center; */
  padding-left: 10px;
  overflow: hidden;
  width: 1200px;
  gap: 20px;
}
#events-content-wrapper{
  width: fit-content;
}
.event-plus{
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 24px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: #1f9f40;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: 0.3s;
}
.event-plus:hover{
  transform: rotateZ(90deg);
  transition: 0.3s;
}
.event-plus > div:nth-child(1){
  position: absolute;
  width: 3px;
  height: 40%;
  background-color: white;
  border-radius: 10px;
}
.event-plus > div:nth-child(2){
  position: absolute;
  height: 3px;
  width: 40%;
  background-color: white;
  border-radius: 10px;
}
.event{
  flex: 0 0 calc(50% - 20px);
  min-width: 45%;
  height: 400px;
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  cursor: pointer;
  background-color: #edeff4;
  border: 1px solid #e4e7ed;
  user-select: none;
}
.event:hover > .event-overlay{
  background-color: rgba(255, 255, 255, 0.5);
}
.event-overlay{
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0px;
  left: 0px;
  z-index: 1;
  background-color: rgba(255, 255, 255, 0.0);
  transition: 0.3s;
  pointer-events: none;
}
.event-image{
  width: 100%;
  height: 90%;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  pointer-events: none;
}
.event-image > img{
  width: 100%;
  height: auto;
}
.event-image-gradient{
  position: absolute;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #00000000, #000000);
}
.event-text-date{
  z-index: 2;
  position: absolute;
  bottom: 0px;
  left: 0px;
  color: white;
  padding: 20px;
}
.event-title{
  font-size: 30px;
}
.polkolonie-section{
  justify-content: center;
}
#loadedEvent, #loadedPK{
  width: 100vw;
  flex-direction: column;
  align-items: center;
  margin-bottom: 50px;
}
#single-event-header{
  background-repeat: no-repeat;
  background-size: cover;
  flex: 0 0 auto;
  width: 100%;
  height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
  color: white;
}
#single-event-header::before{
  content: "";
  display: block;
  position: absolute;
  left: 0px;
  bottom: 0px;
  top: 0px;
  right: 0px;
  opacity: 0.8;
  background-color: #1f9f40;
  background-image: none;
  background-size: auto;
  background-position: 100% 0;
  background-repeat: no-repeat;
  overflow: hidden;
}
#event-title{
  z-index: 1;
  font-size: 35px;
  padding: 0px 20px;
}
#event-date{
  z-index: 1;
  font-size: 13px;
}
#event-video-images{
  width: 80%;
  min-height: 400px;
  background-color: white;
  border: 1px solid #e4e7ed;
  margin-top: -80px;
  z-index: 1;
  border-radius: 15px;
}
#event-images-header{
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: center;
  padding-top: 10px;
  gap: 20px;
}
.events-btn{
  display: flex;
  width: fit-content;
  padding: 10px 20px;
  border-radius: 15px;
  border: 1px solid #1f9f40;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  transition: 0.3s;
}
.events-btn:hover, .events-btn-selected{
  background-color: #1f9f40;
  transition: 0.3s;
}
.events-btn > span {
  pointer-events: none;
}
@media (max-width: 1220px) {
  .event{
    height: 300px;
  }
  .event-title{
    font-size: 26px;
  }
  .event-date{
    font-size: 13px;
  }
  #events-content, #polkolonie-content{
    width: 950px;
  }
}
@media (max-width: 970px) {
  .event{
    height: 210px;
  }
  .event-title{
    font-size: 18px;
  }
  .event-date{
    font-size: 11px;
  }
  #events-content, #polkolonie-content{
    width: 650px;
  }
  .event-plus{
    top: 12px;
    right: 12px;
  }
}
@media (max-width: 660px) {
  .event{
    flex: unset;
    width: 500px;
    height: 300px;
  }
  #events-content, #polkolonie-content{
    flex-direction: column;
    align-items: center;
    padding-left: 0px;
  }
}
@media (max-width: 550px) {
  .event{
    width: 350px;
    height: 220px;
  }
  .events-btn{
    padding: 8px 16px;
    font-size: 15px;
    width: 180px;
  }
  #event-images-header{
    flex-direction: column;
    height: 150px;
    gap: 10px;
    align-items: center;
  }
}
@media (max-width: 400px) {
  .event{
    width: 90%;
    height: 200px;
  }
  
}
/* Do 500px: 2 zdjęcia w rzędzie, mniejsze przyciski i nagłówek */
@media (max-width: 500px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-hero h1 {
    font-size: 48px;
  }
  .gallery-hero {
    padding: 40px 10px 20px;
  }
}

/* 501px - 900px: 3 zdjęcia w rzędzie */
@media (min-width: 501px) and (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-hero h1 {
    font-size: 64px;
  }

  .gallery-hero {
    padding: 50px 15px 25px;
  }
}

/* 901px - 1200px: 4 zdjęcia w rzędzie */
@media (min-width: 901px) and (max-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }

  .gallery-hero h1 {
    font-size: 80px;
  }

  nav button {
    padding: 10px 60px;
    font-size: 17px;
  }
}
@media (max-width: 500px) {
  .nav button{
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
  }
}
/* Powyżej 1200px: 5 zdjęć w rzędzie */
@media (min-width: 1201px) {
  .gallery {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-width: 1200px) {
  .gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* 501–900px → 3 zdjęcia */
@media (max-width: 900px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .gallery-hero h1 {
    font-size: 64px;
  }

  nav button {
    padding: 10px 30px;
    font-size: 14px;
  }
}

