:root {
  --text: #ffffff;
  --content-bg: #0f1b30;
  --card-bg: #172641;
  --headline: #ffffff;
  --body: #e6eefc;
  --accent: #7ea2e6;
  --line: #2c3f60;
  --radius: 14px;
  --shadow: 0 14px 30px rgba(4, 10, 23, 0.36);
}

.bilder-hero {
  position: relative;
  min-height: clamp(220px, 38vh, 340px);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.bilder-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(9, 20, 44, 0.35), rgba(9, 20, 44, 0.35)), url("../Startseite-Hintergrund.webp");
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.bilder-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--headline);
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.1;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.45);
}

.bilder-main {
  padding: clamp(2.2rem, 5vw, 4rem) 1rem;
  background: linear-gradient(180deg, #10203a 0%, #0f2a4e 100%);
  min-height: 50vh;
}

/* --- Karussell --- */
.carousel-section {
  max-width: 1200px;
  margin: 0 auto 5rem;
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

.carousel-container {
  display: flex;
  align-items: center;
  position: relative;
  width: 100%;
}

.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none; /* Firefox */
  gap: 1rem;
  width: 100%;
}

.carousel-track::-webkit-scrollbar {
  display: none; /* Chrome, Safari, Edge */
}

.carousel-slide {
  flex: 0 0 100%;
  height: 450px;
  object-fit: contain;
  scroll-snap-align: center;
  border-radius: var(--radius);
  background: #091122; /* dunkler Hintergrund für transparenten Platz um die Bilder */
}

.carousel-btn {
  background: rgba(15, 27, 48, 0.7);
  color: #fff;
  border: 1px solid var(--line);
  font-size: 2rem;
  cursor: pointer;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.carousel-btn:hover {
  background: var(--accent);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

@media (max-width: 768px) {
  .carousel-slide {
    height: 300px;
  }
}

/* --- Galerie --- */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto 4rem;
}

.gallery-title {
  color: var(--headline);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  margin-bottom: 1.5rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.5rem;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.gallery-grid img {
  height: 250px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (max-width: 768px) {
  .gallery-grid img {
    height: auto;
    max-height: 250px;
  }
}

.gallery-grid img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}
/* --- Modal (Lightbox) --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(9, 20, 44, 0.9);
  backdrop-filter: blur(5px);
}

.modal.show {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  border-radius: var(--radius);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.6);
  animation: zoomIn 0.3s ease;
  object-fit: contain;
}

#modal-caption {
  margin-top: 15px;
  text-align: center;
  color: var(--text);
  font-size: 1.2rem;
  animation: zoomIn 0.3s ease;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.modal-close:hover,
.modal-close:focus {
  color: var(--accent);
  text-decoration: none;
  cursor: pointer;
}

@keyframes zoomIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-content:hover { cursor: zoom-out; }
