.row-viewport-height {
  height: 80vh;
  /* Die Row nimmt 80% der Höhe des Browserfensters ein */
}

.button-vmin {
  font-size: clamp(1rem, 2vw, 1.5rem);
}

.headerText {
  font-size: clamp(1.8rem, 7.5vw, 4rem);
  color: white;
  outline-color: blue;
  text-shadow: 3px 3px 4px rgb(9, 1, 121);
}

#headerTextDiv {
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 10px;
  max-width: 80%;
  position: absolute;
  /* Zentrierung einleiten */
  left: 50%;
  width: 90%;
  /* Verhindert, dass der Text am Rand klebt */
  max-width: 1200px;
  /* Begrenzung für sehr breite Bildschirme */
  text-align: center;
  z-index: 20;
  /* Damit es über den schrägen Flächen liegt */
  top: clamp(34vh, 35%, 35%);
  transform: translate(-50%, -50%);
}

#headerTextDivUeberuns{
  background-color: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 10px;
  max-width: 80%;
  position: absolute;
  /* Zentrierung einleiten */
  left: 50%;
  width: 90%;
  /* Verhindert, dass der Text am Rand klebt */
  max-width: 1200px;
  /* Begrenzung für sehr breite Bildschirme */
  text-align: center;
  z-index: 20;
  /* Damit es über den schrägen Flächen liegt */
  top: clamp(34vh, 35%, 35%);
  transform: translate(-50%, 10%);
}

@media (min-width: 1920px) {
  #headerTextDivUeberuns {
    top: clamp(38vh, 42%, 42%);
  }
}

#headerTextDivMitglied {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  /* Zentrierung einleiten */
  text-align: center;
  z-index: 10;
  /* Damit es über den schrägen Flächen liegt */
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

#headerTextDivMitglied2 {
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 20px;
  /* Zentrierung einleiten */
  position: relative;
  /* Das Element um die eigene Hälfte zurückschieben */
  /* Begrenzung für sehr breite Bildschirme */
  text-align: center;
  z-index: 10;
  /* Damit es über den schrägen Flächen liegt */
    display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: 20px;
}

.fancy-b {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-family: 'Georgia', serif;
  color: white;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  width: clamp(4rem, 10vw, 7rem);
  aspect-ratio: 1 / 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  margin: 0 auto 1rem;
}

#headerText {
  position: relative;
  transform: translateY(-20%);
  z-index: 10;
}

* {
  box-sizing: border-box;
}

.page-wrapper {
  width: 100%;
  overflow: hidden;
  /* Schneidet alles ab, was übersteht */
  position: relative;
}

html,
body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  /* Verhindert Scrollen auf Root-Ebene */
}

body {
  width: 100%;
}

body h1 {
  font-size: 5rem;
}

body p {
  font-size: clamp(1rem, 5vw, 1.75rem);
  font-weight: 400;
  line-height: 1.1;
}

.leaderP {
  font-size: clamp(0.6rem, 13vw, 2.25rem);
  font-weight: 400;
}

.backgrnd {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  background-image: url(../resources/BackgroundNew.jpg);
  background-size: cover;
  background-position: center;
  overflow: visible;
  background-repeat: no-repeat;
  background-attachment: fixed;
  /* min-height wird jetzt dynamisch von JavaScript gesetzt */
  text-align: center;
  color: blue;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
  min-height: 120vh;
}

.overlay {
  position: absolute;
  top: 60vh; /* oder 50% je nach Geschmack */
  width: 100%;
  transform: translate(-50%, 0);
}

.overlay1 {
  top: 100vh;
  position: relative;
  font-size: clamp(0.5rem, 5vw, 2rem);
  width: 100%;
  max-height: 60%;
  background-size: cover;
  background-position: center;
  background-color: transparent;
  z-index: 15;
}

#newsAndDates .row .col:nth-child(2) {
  max-width: 40%;
  color: black;
  padding: 10px;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 5;
}

#newsAndDates {
  scroll-margin-top: 100px;
  /* Passe diesen Wert an die Höhe deiner Navbar an */
  z-index: 5;
}

#newsAndDatesUeberuns .row .col:nth-child(2) {
  max-width: 40%;
  color: black;
  padding: 10px;
  border-radius: 5px;
  background-color: rgba(0, 0, 0, 0.8);
  position: relative;
  left: 50%;
  transform: translate(-50%, 0);
  z-index: 15;
}

#newsAndDatesUeberuns {
  scroll-margin-top: 100px;
  position: absolute;
  top: calc(clamp(40vh, 34%, 42%) + 40vh);
  left: 0;
  width: 100%;
  /* Passe diesen Wert an die Höhe deiner Navbar an */
  z-index: 15;
}

.overlay h1 {
  font-size: clamp(1rem, 8vw, 3rem);
}

.fade-in {
  position: absolute;
  opacity: 0;
  transform: translateY(80px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}


#newsListe {
  list-style-type: none;
  /* Entfernt die Punkte */
  padding: 0;
  /* Entfernt das Standard-Einrücken */
  margin: 0;
  /* Entfernt Standard-Abstände */
  z-index: 9999;
  position: relative;

}

.speech-bubble {
  position: relative;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #ccc;
  min-width: 75%;
  max-width: 95%;
  max-height: 40%;
  padding: 1rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  color: #000;
  text-align: center;
  background-color: rgba(0, 0, 0, 0.6);
  margin: 0 auto;
  /* Zentriert die Speech-Bubble horizontal */
}

.speech-bubble h1 {
  font-size: clamp(0.7rem, 12vw, 2.5rem);
  color: white;
  outline-color: blue;
  text-shadow: 3px 3px 4px rgb(9, 1, 121);
  margin-top: 5%;
}

.speech-bubble h2 {
  font-size: clamp(0.5rem, 10vw, 1.8rem);
  color: white;
  outline-color: blue;
  text-shadow: 3px 3px 4px rgb(9, 1, 121);
}

.speech-bubble p {
  font-size: clamp(0.4rem, 8vw, 1.6rem);
  color: white;
  outline-color: blue;
  text-shadow: 3px 3px 4px rgb(9, 1, 121);
}

#veranstaltungen {
  padding-top: 2.5%;
  overflow: visible;
}

#veranstaltungen h1 {
  font-size: clamp(0.6rem, 20vw, 5rem);
  text-align: center;
  line-height: 1.2;
  overflow: visible;
}

#impressum{
  padding: 5%;
}

#impressum h1{
  font-size: clamp(1.2rem, 8vw, 3.5rem);
}

#impressum p{
  font-size: clamp(1rem, 5vw, 1.75rem);
}

.bhvkhDivBlue {
  position: absolute;
  left: 0;
  top: 10vh;
  width: 100%;
  min-height: 40vh;
  background-color: rgba(70, 188, 233, 1);
  /* Das Blau der Urkunde */
  z-index: 2;
  /* Über dem Hintergrund, unter dem Text */
  clip-path: polygon(0% 0%, 75% 0%, 50% 32.5%, 0% 100%);
}

.bhvkhDivRed {
  position: absolute;
  left: 0;
  top: 10vh;
  width: 100%;
  min-height: 40vh;
  background-color: rgba(217, 83, 79, 1);
  /* Das Rot der Urkunde */
  z-index: 2;
  /* Über dem Hintergrund, unter dem Text */
  clip-path: polygon(0% 0%, 67.5% 0%, 50% 22.5%, 0% 90%);
}

#logoDivBlueRed {
  position: absolute;
  top: 10vh;
  left: 20%;
  transform: translateX(-50%);
  z-index: 4;
  height: auto;
  width: clamp(150px, 15vw, 350px);
  height: auto;
}

.aktuelles-image-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  padding: 20px;
  margin-top: 115vh !important;
  margin-bottom: 4vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 15;
}

.aktuelles-image {
  max-width: 50%;
  height: auto;
  max-height: 800px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Mobile Optimierung (< 480px) */
@media (max-width: 479px) {
  .aktuelles-image-container {
    padding: 10px;
  }

  .aktuelles-image {
    max-height: 600px;
    border-radius: 8px;
    max-width: 95%;
    width: 95%;
  }
}

/* Tablet Optimierung (480px - 768px) */
@media (min-width: 480px) and (max-width: 767px) {
  .aktuelles-image-container {
    padding: 10px;
  }

  .aktuelles-image {
    max-height: 800px;
    border-radius: 10px;
    max-width: 95%;
    width: 95%;
  }
}

/* Desktop Optimierung (> 768px) */
@media (min-width: 768px) {
  .aktuelles-image-container {
    padding: 10px;
  }

  .aktuelles-image {
    max-height: 1000px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    max-width: auto;
    width: auto;
  }
}

/* Große Desktop-Bildschirme (> 1200px) */
@media (min-width: 1200px) {
  .aktuelles-image-container {
    padding: 40px;
  }

  .aktuelles-image {
    max-height: 1000px;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    max-width: auto;
    width: auto;
  }
}


@media (min-width: 768px) {
  .speech-bubble {
    min-width: 35%;
    max-width: 50%;
    padding: 1.5rem;
  }

  .speech-bubble h1 {
    font-size: clamp(1.2rem, 8vw, 3.5rem);
    margin-top: 5%;
    color: white;
    outline-color: blue;
    text-shadow: 3px 3px 4px rgb(9, 1, 121);
  }

  .speech-bubble h2 {
    font-size: clamp(0.9rem, 6vw, 2.2rem);
    color: white;
    outline-color: blue;
    text-shadow: 3px 3px 4px rgb(9, 1, 121);
  }
}

@media (max-width: 970px) {
  .speech-bubble h1 {
    font-size: clamp(0.8rem, 10vw, 3rem);
    margin-top: 5%;
    color: white;
    outline-color: blue;
    text-shadow: 3px 3px 4px rgb(9, 1, 121);
  }
}

@media (max-width: 835px) {
  .speech-bubble h1 {
    font-size: clamp(0.7rem, 12vw, 2.5rem);
    margin-top: 5%;
    color: white;
    outline-color: blue;
    text-shadow: 3px 3px 4px rgb(9, 1, 121);
  }
}

@media (max-width: 768px) {
  .backgrnd {
    background-attachment: scroll;
    background-size: auto 100%;
    background-position: top center;
    /* Hebt das "Fixed" auf */
    /* min-height wird jetzt dynamisch von JavaScript gesetzt */
  }

  .overlay {
    top: 100vh;
  }

  .navbar-brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: visible;
  }

  .navbar-brand img {
    display: none;
    /* Logo auf Smartphones ausblenden */
  }

  .navbar-brand span {
    display: inline-block;
    font-size: clamp(0.8rem, 2.2vw, 0.95rem);
    max-width: calc(100vw - 90px);
    overflow: visible;
    text-overflow: clip;
    white-space: nowrap;
    vertical-align: middle;
    line-height: 1.2;
  }

  .section-title,
  .section-subtitle,
  .event-description,
  .hero-content,
  .event-card,
  .news-card,
  .cta-box {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .navbar-nav .nav-link {
    font-size: 1rem;
    /* Schriftgröße der Nav-Links verkleinern */
    padding: 0.5rem 1rem;
    /* Padding reduzieren */
  }

  .navbar-toggler {
    margin-left: auto;
    /* Toggle-Button rechts positionieren */
  }

  .navbar {
    padding: 0.25rem 1rem;
    /* Navbar-Padding reduzieren */
  }

  #veranstaltungen h1 {
    font-size: clamp(3rem, 80%, 5rem);
    max-width: 90vw;
    margin: 0 auto;
  }

  #ueberuns h1 {
    font-size: clamp(3rem, 80%, 5rem);
    /* Kleinere Schriftgröße für Mobile */
    max-width: 90vw;
    /* Begrenzung der Breite */
    margin: 0 auto;
    /* Zentrieren */
  }

  /* Zusätzliche Regeln für horizontales Scrollen verhindern */
  .container,
  .container-fluid {
    max-width: 100%;
    overflow-x: hidden;
  }

  .speech-bubble {
    max-width: 90vw !important;
    /* Wichtig für mobile - reduziert für bessere Zentrierung */
    margin: 0 auto;
    /* Zentriert die Speech-Bubble horizontal */
  }

  #headerText {
    max-width: 95vw;
    padding: 0 2.5vw;
  }

  #mitgliedWerden {
        background-attachment: scroll !important;
        background-size: cover;
        min-height: 400px; /* Feste Höhe ist oft stabiler auf Mobilgeräten */
    }
}

@media (max-width: 480px) {
  .speech-bubble {
    min-width: 80%;
    max-width: 85%;
    padding: 0.75rem;
  }

  .speech-bubble h1 {
    font-size: clamp(0.6rem, 10vw, 2rem);
    margin-top: 3%;
    color: white;
    outline-color: blue;
    text-shadow: 3px 3px 4px rgb(9, 1, 121);
  }

  .speech-bubble h2 {
    font-size: clamp(0.5rem, 8vw, 1.8rem);
    color: white;
    outline-color: blue;
    text-shadow: 3px 3px 4px rgb(9, 1, 121);
  }

  .speech-bubble p {
    font-size: clamp(0.4rem, 6vw, 1.6rem);
  }
}

/* Navbar-Logo responsive */
@media (min-width: 768px) {
  .navbar-brand img {
    display: none;
  }
}

/* Überuns Cards - responsive styling */
.card-ueberuns {
  overflow: hidden;
  word-break: break-word;
}

.card-ueberuns h2:not(.card-title) {
  font-size: clamp(1.8rem, 5vw, 2.5rem);
  margin: 0.5rem 0;
}

.card-ueberuns .card-title {
  font-size: clamp(0.95rem, 2.5vw, 1.25rem);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.card-ueberuns p {
  font-size: clamp(0.85rem, 2vw, 1.5rem);
  line-height: 1.4;
  margin: 0;
}

.card-ueberuns .card-body {
  padding: clamp(0.75rem, 2vw, 1.5rem);
}

/* Überuns Cards - responsive Layout */
@media (max-width: 767px) {
  .d-flex.flex-wrap.justify-content-center {
    flex-direction: column !important;
    flex-wrap: wrap !important;
  }

  .d-flex.flex-wrap.justify-content-center .card {
    flex: 0 1 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
  }
}

@media (min-width: 768px) {
  .d-flex.flex-wrap.justify-content-center {
    flex-wrap: nowrap !important;
  }

  .d-flex.flex-wrap.justify-content-center .card {
    flex: 0 1 calc(33.333% - 1.5rem) !important;
    min-width: calc(33.333% - 1.5rem) !important;
  }
}

/* ================== Responsive Layout Enhancements ================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  padding: 5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background-image: url('../resources/BackgroundNew.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
  z-index: 1;
  min-height: 100vh;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 960px;
  width: 100%;
  padding: 3rem 1rem 0;
  margin-top: 15rem;
}

.hero-content h1 {
  font-size: clamp(2.8rem, 5vw, 4.5rem);
  line-height: 1.05;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: clamp(1rem, 2.3vw, 1.35rem);
  max-width: 760px;
  margin: 0 auto 1.75rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3.8rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  max-width: 760px;
  margin: 0 auto 2rem;
  color: rgba(33, 37, 41, 0.75);
}

.event-card,
.news-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.event-card {
  padding: 1.75rem;
  border-radius: 1.25rem;
}

.event-card h3 {
  margin-bottom: 1rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.event-description {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.75;
}

.event-image {
  width: 100%;
  height: auto;
  max-width: 100%;
  border-radius: 1rem;
  object-fit: contain;
}

.news-card {
  padding: 1.75rem;
  border-radius: 1.25rem;
}

.membership-section {
  position: relative;
  background-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.55)), url('../resources/BackgroundNew.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 5rem 0;
}

.cta-box {
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.5rem;
  padding: 2.5rem;
}

.cta-box h2 {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  margin-bottom: 1rem;
}

.cta-box p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  line-height: 1.75;
  margin-bottom: 1.75rem;
}

footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

footer .nav-link {
  color: #6c757d;
}

footer .nav-link:hover {
  color: #212529;
}

@media (max-width: 767px) {
  .hero-section {
    min-height: 100vh;
    padding: 3rem 0;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .hero-content p {
    font-size: 1rem;
  }

  .event-card,
  .cta-box,
  .news-card {
    padding: 1.5rem;
  }

  .btn-lg {
    padding: 0.9rem 1.4rem;
  }

  .navbar-brand span {
    display: inline-block;
    font-size: 0.95rem;
    white-space: nowrap;
  }

  .navbar-brand img {
    height: 42px;
  }

  .footer .nav {
    flex-wrap: wrap;
  }

  .footer .nav-item {
    margin-bottom: 0.5rem;
  }
}

@media (max-width: 575px) {
  .navbar {
    padding: 0.5rem 1rem;
  }

  .hero-section {
    min-height: 100vh;
    padding: 2rem 0;
  }

  .hero-content p {
    margin-bottom: 1.5rem;
  }

  .event-image {
    max-height: none;
  }

  .cta-box {
    padding: 1.5rem;
  }

  footer .nav {
    justify-content: center;
  }
}

/* =========================================================
   FOTO GALERIE
   ========================================================= */

.photo-gallery-year-title {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-top: 50px;
  margin-bottom: 20px;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  padding-bottom: 10px;
  color: white;
  text-shadow: 3px 3px 4px rgb(9, 1, 121);
}

.photo-gallery-button {
  padding: 14px 22px;
  margin: 10px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: rgba(0,0,0,0.65);
  color: white;
  font-size: clamp(1rem, 2vw, 1.25rem);
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.photo-gallery-button:hover {
  background: rgba(30,30,30,0.95);
  transform: translateY(-2px);
}

/* =========================================================
   MODAL
   ========================================================= */

.photo-gallery-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.96);
  z-index: 99999;
  overflow-y: auto;
  padding: 40px;
}

.photo-gallery-content {
  max-width: 1600px;
  margin: auto;
}

/* =========================================================
   GRID
   ========================================================= */

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px,1fr));
  gap: 18px;
  margin-top: 30px;
}

/* =========================================================
   THUMBNAILS
   ========================================================= */

.photo-gallery-grid img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.25s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}

.photo-gallery-grid img:hover {
  transform: scale(1.03);
}

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

.photo-gallery-close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 48px;
  color: white;
  cursor: pointer;
  z-index: 100000;
  transition: opacity 0.2s;
}

.photo-gallery-close:hover {
  opacity: 0.7;
}

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

.photo-gallery-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.98);
  z-index: 100001;
  justify-content: center;
  align-items: center;
}

.photo-gallery-lightbox img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.photo-gallery-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(3rem, 6vw, 5rem);
  color: white;
  cursor: pointer;
  user-select: none;
  z-index: 100002;
  padding: 20px;
  transition: opacity 0.2s;
}

.photo-gallery-nav:hover {
  opacity: 0.7;
}

.photo-gallery-prev {
  left: 20px;
}

.photo-gallery-next {
  right: 20px;
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

  .photo-gallery-modal {
    padding: 20px;
  }

  .photo-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
    gap: 12px;
  }

  .photo-gallery-grid img {
    height: 160px;
    border-radius: 10px;
  }

  .photo-gallery-close {
    font-size: 38px;
    top: 15px;
    right: 20px;
  }

  .photo-gallery-nav {
    font-size: 3rem;
    padding: 10px;
  }

  .photo-gallery-year-title {
    font-size: clamp(1.6rem, 7vw, 2.4rem);
  }
}

@media (max-width: 480px) {

  .photo-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-gallery-grid img {
    height: 140px;
  }

  .photo-gallery-button {
    width: 100%;
    margin: 8px 0;
  }
}

/* =========================================================
   LIGHTBOX MOBILE FIX + CLOSE BUTTON IMPROVEMENT
   ========================================================= */

.lightbox-close {
  position: fixed;
  top: 15px;
  right: 20px;
  font-size: 48px;
  color: white;
  cursor: pointer;
  z-index: 100003;
  user-select: none;
  transition: opacity 0.2s ease;
}

.lightbox-close:hover {
  opacity: 0.6;
}

/* bessere Touch-Navigation */
.photo-gallery-nav {
  touch-action: manipulation;
}

/* =========================================================
   MOBILE OPTIMIERUNG LIGHTBOX
   ========================================================= */

@media (max-width: 768px) {

  .photo-gallery-lightbox img {
    max-width: 96%;
    max-height: 85%;
  }

  .photo-gallery-nav {
    font-size: 4rem;
    padding: 15px;
  }

  .lightbox-close {
    font-size: 42px;
    top: 10px;
    right: 15px;
  }
}

@media (max-width: 480px) {

  .photo-gallery-lightbox img {
    max-width: 98%;
    max-height: 80%;
  }

  .photo-gallery-nav {
    font-size: 3.2rem;
    padding: 10px;
  }

  .lightbox-close {
    font-size: 38px;
    top: 8px;
    right: 12px;
  }
}

/* =========================================================
   FIX: MODAL ÜBER NAVBAR / SCROLL PROBLEME
   ========================================================= */

.photo-gallery-modal,
.photo-gallery-lightbox {
  overscroll-behavior: contain;
}

/* verhindert Scroll-Hintergrund auf Mobile */
body.modal-open {
  overflow: hidden;
}