/* Galeria "Fotos" — ogólny, losowy pokaz autorskich zdjęć Tomasza. Ten sam
   silnik zanikania + winiety, ten sam pasek sterowania i siatka miniatur co
   na stronie Magdy (magda.css) — tu bez wideo "oczu" (start od razu od
   pierwszego zdjęcia) i bez trwałego bąbla z imieniem (nie ma jednego
   tematu/osoby do podpisania). */

.foto-stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  background: #000;
  overflow: hidden;
  cursor: grab;
}

.foto-stage.dragging {
  cursor: grabbing;
}

.foto-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  opacity: 0;
  transition: opacity 3.5s ease-in-out;

  -webkit-mask-image: radial-gradient(ellipse 92% 92% at center, black 20%, transparent 100%);
  mask-image: radial-gradient(ellipse 92% 92% at center, black 20%, transparent 100%);

  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.foto-photo.visible {
  opacity: 1;
}

/* --- Pasek sterowania, strzałki, siatka miniatur — identycznie jak magda.css --- */

.foto-bar {
  position: absolute;
  top: 0;
  /* Bez "left: 0" — patrz magda.css: box tylko tak szeroki jak przyciski,
     inaczej niewidzialna pusta część (nad logo) łapałaby kliknięcia. */
  right: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 2vmin;
  z-index: 13;
}

.foto-bar button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.foto-bar button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.foto-prev,
.foto-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  z-index: 13;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.foto-prev:hover,
.foto-next:hover {
  background: rgba(255, 255, 255, 0.24);
}

.foto-prev {
  left: 2vmin;
}

.foto-next {
  right: 2vmin;
}

@media (max-width: 600px) {
  .foto-bar button,
  .foto-prev,
  .foto-next {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }
}

/* Hamburger menu (mobile-nav.css) pokazuje się też na dotyku (tablet, nie
   tylko wąski telefon) — bez tego odstępu przycisk play chowałby się pod
   nim wszędzie tam, gdzie oba są widoczne naraz. */
@media (max-width: 600px), (pointer: coarse) {
  .foto-bar {
    padding-right: calc(2vmin + 56px);
  }
}

.foto-grid {
  display: none;
  position: absolute;
  inset: 0;
  top: 64px;
  overflow-y: auto;
  padding: 2vmin 2vmin 4vmin;
  columns: 200px;
  column-gap: 14px;
  background: #000;
  z-index: 14;
}

.foto-grid.open {
  display: block;
}

.foto-thumb {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 14px 0;
  break-inside: avoid;
  cursor: pointer;
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 14px 4px rgba(0, 0, 0, 0.75);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.foto-thumb:hover {
  transform: scale(1.03);
  box-shadow: 0 0 18px 6px rgba(0, 0, 0, 0.6);
}

.foto-grid-toggle.active {
  background: rgba(255, 255, 255, 0.32);
}

@media (max-width: 600px) {
  .foto-grid {
    columns: 130px;
    column-gap: 8px;
  }
  .foto-thumb {
    margin-bottom: 8px;
  }
}

/* Podpis — dyskretny, jak .magda-caption/.site-intro, głównie dla SEO/AI. */
.foto-caption {
  position: fixed;
  right: 3vw;
  bottom: 3vh;
  z-index: 9;
  max-width: 260px;
  text-align: right;
  color: rgba(255, 255, 255, 0.5);
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

@media (max-width: 600px) {
  .foto-caption {
    max-width: 60vw;
  }
}
