.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: 6vw;
  font-family: 'Georgia', serif;
  color: white;
  background: linear-gradient(135deg, #6a11cb, #2575fc);
  width: 20vw;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom-right-radius: 20px;
  border-bottom-left-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

#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 img {
    display: none;
    /* Logo auf Smartphones ausblenden */
  }

  .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;
  }
}