.realizace {
  width: 100%;
  padding: 1rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  box-sizing: border-box;
  margin-bottom: 130px;
}

.realizace-item h2 {
  color: #fdca39;
  margin: 0 0 1rem;
  text-align: left;
  font-family: "Inter", sans-serif;
}

.realizace-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}

.realizace-thumb {
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 0.3rem;
  overflow: hidden;
}

.realizace-thumb img {
  width: 100%;
  display: block;
  transition: transform 0.25s ease;
}

.realizace-thumb:hover img,
.realizace-thumb:focus-visible img {
  transform: scale(1.04);
}

.realizace-thumb:focus-visible {
  outline: 3px solid #fdca39;
  outline-offset: 2px;
}

/* lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(64, 112, 174, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.open {
  display: flex;
}

.lightbox-image {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 0.3rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(0, 0, 0, 0.4);
  color: white;
  border: none;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.lightbox-close img {
  width: 28px;
  height: 28px;
}

.lightbox-prev,
.lightbox-next {
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 64px;
  font-size: 1.5rem;
  border-radius: 0.3rem;
  background: #fdca39;
  color: black;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: #e0b32f;
}

.lightbox-prev {
  left: 1rem;
}
.lightbox-next {
  right: 1rem;
}

.lightbox-close:hover {
  background: rgba(253, 202, 57, 0.9);
  color: black;
}

.lightbox-caption {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-family: "Inter", sans-serif;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 0.4rem 0.9rem;
  border-radius: 0.3rem;
  max-width: 90vw;
  text-align: center;
}

@media (max-width: 768px) {
  .realizace {
    padding: 1rem;
  }
  .realizace-item h2 {
    font-size: 1.4rem;
  }
  .realizace-thumbs {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
  }
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 52px;
  }
}
