/* ================================
   GALERIA I KARUZELA ZDJĘĆ
   ================================ */

.project-gallery {
  margin-top: 40px;
}

.carousel-container {
  position: relative;
  overflow: hidden;
}

.carousel {
  display: flex;
  justify-content: center;
  gap: 1rem;
  overflow-x: hidden;
  scroll-behavior: smooth;
  padding: 1rem 0;
}

.carousel img {
  flex: 0 0 calc(30% - 1rem);
  width: 250px;
  height: 150px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.carousel img:hover {
  transform: scale(1.05);
}

.carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 50%;
  z-index: 1;
}

.carousel-button.left { left: 10px; }
.carousel-button.right { right: 10px; }

.carousel-dots {
  text-align: center;
  margin-top: 10px;
}

.carousel-dots span {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  background: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.carousel-dots span.active {
  background: #555;
}

/* ================================
   LIGHTBOX
   ================================ */

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

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  display: block;
  margin: 0 auto;
  opacity: 0;
  transform: translateX(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.lightbox img.show-left {
  opacity: 1;
  transform: translateX(-20px);
}

.lightbox img.show-right {
  opacity: 1;
  transform: translateX(20px);
}

.lightbox img.show-center {
  opacity: 1;
  transform: translateX(0);
}

/* Tryb jasny */
body[data-theme="light"] .lightbox {
  background-color: rgba(255, 255, 255, 0.95);
}

body[data-theme="light"] .lightbox img {
  filter: brightness(0.9) contrast(1.1);
}

/* ================================
   LIGHTBOX STRZAŁKI
   ================================ */

.lightbox-arrow,
.lightbox .lightbox-prev,
.lightbox .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 50%;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
}

.lightbox .lightbox-prev,
.lightbox-arrow.left { left: 20px; }

.lightbox .lightbox-next,
.lightbox-arrow.right { right: 20px; }

.lightbox-arrow:hover,
.lightbox .lightbox-prev:hover,
.lightbox .lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
}

body[data-theme="light"] .lightbox .lightbox-prev,
body[data-theme="light"] .lightbox .lightbox-next,
body[data-theme="light"] .lightbox-arrow {
  background: rgba(255, 255, 255, 0.5);
  color: #333;
}

body[data-theme="light"] .lightbox .lightbox-prev:hover,
body[data-theme="light"] .lightbox .lightbox-next:hover,
body[data-theme="light"] .lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* ================================
   LIGHTBOX CLOSE BUTTON
   ================================ */

.lightbox .close {
  position: fixed;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1002 !important;
}

body[data-theme="light"] .lightbox .close {
  color: #333;
}

/* ================================
   LIGHTBOX COUNTER
   ================================ */

#lightbox-counter {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 1rem;
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 12px;
  border-radius: 6px;
  z-index: 1002;
}

body[data-theme="light"] #lightbox-counter {
  background: rgba(255, 255, 255, 0.7);
  color: #333;
}
