/* album.css */

section {
  position: relative;
  padding: 70px 0 90px;
}

/* Album Section */
.album-section {
  padding: 70px 0 90px;
  background: var(--light-bg);
  text-align: center;
}

.album-section .content-wrapper {
  content-visibility: visible;
  contain: none;
  overflow: visible;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: var(--primary-color);
  position: relative;
  text-align: center
}

h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: var(--accent-color);
  margin: 10px auto 0;
}

.album-section p {
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 40px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Join Section CTA */
.join-section {
  background: var(--light-bg);
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
}

.join-content {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 32px;
  align-items: stretch;
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  border: 1px solid #f1f1f1;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.06);
}

.join-copy h2 {
  text-align: left;
  margin-bottom: 12px;
  color: #1f1f23;
}

.join-copy h2::after {
  margin: 12px 0 0;
}

.join-copy p {
  color: var(--secondary-color);
  margin-bottom: 16px;
  text-align: left;
}

.join-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
}

.join-benefits {
  list-style: none;
  padding: 0;
  margin: 18px 0 12px;
  display: grid;
  gap: 10px;
}

.join-benefits li {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 16px 1fr;
  gap: 8px;
  align-items: center;
  color: var(--secondary-color);
}

.join-benefits li::before {
  content: "•";
  color: var(--accent-color);
  font-size: 1.1rem;
  align-self: start;
}

.join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.join-actions .btn {
  text-align: center;
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 1.5px solid rgba(51, 51, 51, 0.12);
  box-shadow: none;
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--primary-color);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.btn-secondary:focus-visible {
  box-shadow: 0 0 0 4px rgba(201, 167, 180, 0.35);
}

.join-card {
  background: #fff;
  border-radius: 14px;
  padding: 20px 18px 16px;
  border: 1px solid #eee;
  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.02);
  align-self: stretch;
  position: relative;
}

.join-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.join-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-color);
  box-shadow: 0 0 0 5px rgba(201, 167, 180, 0.22);
}

.join-card-title {
  font-weight: 700;
  color: var(--primary-color);
  letter-spacing: 0.02em;
}

.join-card p {
  color: var(--secondary-color);
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.join-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  position: relative;
  z-index: 1;
}

.join-pills span {
  background: rgba(0, 0, 0, 0.05);
  color: var(--primary-color);
  padding: 7px 11px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.93rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

@media (max-width: 960px) {
  .join-content {
    grid-template-columns: 1fr;
  }

  .join-card {
    margin-top: 8px;
  }

  .join-actions {
    justify-content: flex-start;
  }
}

/* Gallery Grid using CSS Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 Spalten auf großen Bildschirmen */
  gap: 20px;
  padding: 0 20px 30px;
  max-width: 1200px; /* Maximale Breite der Galerie */
  margin: 0 auto; /* Zentriert die Galerie */
  overflow: visible;
}

/* Bilder innerhalb des Grids */
.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  cursor: pointer;

  margin-top: 20px;

  /* Animation */
  animation: fadeInUp 1s forwards;
  opacity: 0;

  /* Transition für Hover-Effekte */
  transition: -webkit-transform 0.5s ease, box-shadow 0.5s ease !important;
  transition: transform 0.5s ease, box-shadow 0.5s ease !important;

  /* Verhindern von Zeilenumbrüchen */
  display: block;
  break-inside: avoid; /* Verhindert das Brechen von Bildern zwischen Spalten */
}

/* Animation abschließen */
@keyframes fadeInUp {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Hover-Effekt */
.gallery-grid img:hover {
  transform: scale(1.05) !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Responsive Anpassungen */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 Spalten */
  }
}

@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 Spalten */
  }
}

@media (max-width: 600px) {
  .gallery-grid {
    grid-template-columns: 1fr; /* 1 Spalte */
    padding: 0 10px;
    gap: 0px;
  }
}

/* Lightbox Styles */

/* Lightbox Container */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 80%;
  max-height: 80%;
}

.lightbox-img {
  width: 100%;
  border-radius: 5px;
  display: block;
  max-height: 80vh;
  object-fit: contain;
  background: #222;
}

/* Entfernen von Hintergrund und Rahmen, Setzen der Farbe */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed; /* Feste Position relativ zum Viewport */
  background: transparent; /* Kein Hintergrund */
  border: none; /* Kein Rahmen */
  padding: 0; /* Kein Padding */
  cursor: pointer;
  user-select: none;
  transition: color 0.3s ease; /* Nur Farbtransition */
  color: var(--accent-color); /* Akzentfarbe */
  z-index: 3000; /* Überlagert die Bilder */
}

/* Spezifische Positionierung und Größe */
.lightbox-close {
  top: 20px; /* Symmetrische Abstände */
  right: 20px;
  font-size: 3rem; /* Größere Schriftgröße */
}

.lightbox-prev,
.lightbox-next {
  top: 50%; /* Vertikale Zentrierung */
  transform: translateY(-50%); /* Vertikale Zentrierung */
  font-size: 3rem; /* Größere Schriftgröße */
}

.lightbox-prev {
  left: 20px; /* Symmetrische Abstände */
}

.lightbox-next {
  right: 20px; /* Symmetrische Abstände */
}

/* Definieren der Bounce-Animation */
@keyframes bounceOnHover {
  0% {
    transform: translateY(-50%) scale(1);
  }
  50% {
    transform: translateY(-50%) scale(1.4);
  }
  100% {
    transform: translateY(-50%) scale(1);
  }
}

/* Anwenden der Bounce-Animation und Farbänderung beim Hover */
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #ffffff; /* Weiß bei Hover */
  animation: bounceOnHover 0.3s ease-out 1;
}

/* Optional: Platzhalter-Stil während des Ladens */
.gallery-grid img.fade-in-init {
  background: #f0f0f0; /* Heller Platzhalter-Hintergrund */
  min-height: 150px; /* Mindesthöhe für Platzhalter */
}
