
img {
  display: block;
  width: 100%;
  height: auto;
}

.przerywnik {
  max-height: 70px;
  width: auto;
}

#duzyobrazek {
  display: block;
  width: 100%;
  max-height: 350px;
  object-fit: cover;
  margin-bottom: 20px;
}

.podklasa {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;             
  padding: 20px;         
  justify-items: center; 
  max-width: 90%
}

.podklasa .opis {
  padding: 10px;
  margin: 0;
  width: 95%;
  max-width: 600px;      
}

.obrazki {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;   
  row-gap: 60px;      
  width: 90%;
  max-width: 900px;
  padding: 30px;
}

.obrazki img {
  width: 100%;
  aspect-ratio: 1 / 1;  
  object-fit: cover;    
  cursor: pointer;
}


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

.lightbox img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
}

.controls {
  position: absolute;
  top: 50%;
  width: 100%;
  display: flex;
  justify-content: space-between;
  transform: translateY(-50%);
}

.controls button {
  background: #fff;
  border: none;
  padding: 10px;
  cursor: pointer;
}


@media (min-width: 900px) {
 
  .podklasa {
    grid-template-columns: 35% 65%;
    justify-items: start;  
  }
  .podklasa .opis {
    max-width: none;
  }
}

@media (max-width: 500px) {
  .przerywnik {
    max-height: 50px;
  }

  .lightbox img {
    max-width: 80vw;
    max-height: 80vh;
  }
  .podklasa {
    max-width: 97%
  }
    .obrazki {
    width: 100%;       
    max-width: none;   
    padding: 15px 15px 15px 0;        
    margin: 0 auto;    
    gap: 20px;         
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
  
}
