/* === FOTO GALLERY === */

.gallery {
  max-width: 1920px;
  background-color: black;
  margin: 0 auto;
  padding: 7rem 1rem;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.gallery-header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.gallery-header h2 {
  width: 90%;
  text-align: start;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

/* Grid */
.gallery-grid {
  width: 90%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

/* Responsive columns */
@media (min-width: 576px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

/* Item */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  transition:
    transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.35s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: brightness(1.05);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
  animation: fadeZoom 0.35s ease;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 0.75rem;
}

.lightbox-caption {
  margin-top: 0.5rem;
  color: #e9ecef;
  font-size: 0.95rem;
}

/* Controls */
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: 0;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.lightbox-nav::before {
  content: "";
  display: block;
  width: 12px;
  height: 12px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  margin: auto;
}

.lightbox-nav.prev {
  left: 1rem;
}
.lightbox-nav.prev::before {
  transform: rotate(135deg);
}

.lightbox-nav.next {
  right: 1rem;
}
.lightbox-nav.next::before {
  transform: rotate(-45deg);
}

/* Animation */
@keyframes fadeZoom {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* === TEAM GALLERYS === */

.roster {
  max-width: 1600px;
  margin: 0 auto;
  padding: 1.25rem 1rem;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3rem;
}

.roster-header {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.roster-header h2 {
  width: 100%;
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.8rem;
}

/* =========================
   GEMEINSAME GRID BASIS
========================= */

.vorstand-grid,
.coaches-grid,
.roster-grid {
  width: 100%;
  display: grid;
  gap: 1rem;
  justify-content: center;
  grid-template-columns: repeat(auto-fill, 260px);
}

/* =========================
   SPALTEN-STEUERUNG
========================= */

@media (min-width: 992px) {
  .vorstand-grid {
    grid-template-columns: repeat(4, 260px);
  }

  .coaches-grid {
    grid-template-columns: repeat(2, 260px);
  }

  .roster-grid {
    grid-template-columns: repeat(5, 260px);
  }
}

/* =========================
   CARD BASIS
========================= */

.player-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 0.75rem;
  overflow: hidden;
  text-align: center;
  width: 260px;
}

.player-card img {
  width: 100%;
  height: auto;
  max-height: 260px;
  object-fit: contain;
  display: block;
}

.player-info {
  padding: 0.75rem 0.5rem 1rem;
}

.player-name {
  margin: 0.25rem 0 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.player-number {
  margin: 0.15rem 0;
  font-weight: 700;
  color: #0d6efd;
}

.player-meta {
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: #6c757d;
  line-height: 1.35;
}
