
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  padding: 0;
  font-family: sans-serif;
  color: white;
  background-color: #000;
  overflow-x: hidden;
}
body, #slider-background {
  margin-top: 0;
}
#slider-background {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover;
  background-position: center;
  z-index: -1;
  opacity: 0.6;
  transition: opacity 1s ease-in-out;
}
#slider-background::after {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.4) 0%,
    rgba(0,0,0,0.6) 75%
  );
  pointer-events: none;
}

.hero-text {
  position: absolute;
  top: 40%;
  width: 100%;
  text-align: center;
  z-index: 1;
  padding: 0 1rem;
}
.hero-text h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}
.hero-text p {
  font-size: 1.2rem;
  color: #ccc;
}
footer {
  background: rgba(0, 0, 0, 0.0);
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  text-align: center;
  padding: 0.75rem 1rem;
  z-index: 20;
  /*position: relative;*/
  box-sizing: border-box;
  
}
footer a {
  color: #ccc;
  text-decoration: none;
  margin: 0 0.75rem;
  display: inline-block;
}

/* RESPONSIVE ERGÄNZUNGEN */
@media (max-width: 1024px) {
  .hero-text h1 {
    font-size: 2rem;
  }
  .hero-text p {
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .hero-text {
    top: 35%;
  }
  .hero-text h1 {
    font-size: 1.6rem;
  }
  .hero-text p {
    font-size: 0.9rem;
  }
  footer {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .hero-text h1 {
    font-size: 1.4rem;
  }
  .hero-text p {
    font-size: 0.8rem;
  }
  footer {
    font-size: 0.8rem;
    bottom: 10px;
  }
}



/* Grundlayout */
.main-nav {
  /*background: rgba(0,0,0,0.0);
  position: fixed;
  width: 100%;
  z-index: 10;*/
  top: 0;
  padding-top: 0;
}
.nav-container {
  display: flex;
  align-items: center;
  justify-content: end;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  text-decoration: none;
}
.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #fff;
}

/* Desktop-Menü */
.nav-menu {
  display: flex;
  list-style: none;
}
.nav-menu li {
  position: relative;
}
.nav-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.nav-menu a:hover { background: rgba(255,255,255,0.1); }

/* Dropdown (ein Level tief) */
.has-dropdown .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: rgba(0,0,0,0.0);
  list-style: none;
  min-width: 200px;
}
.has-dropdown:hover .dropdown {
  display: block;
}
.dropdown li a {
  padding: 0.5rem 1rem;
}

/* Mobile-Breakpoint */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }
  .nav-menu {
    flex-direction: column;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    width: 100%;
  }
  .nav-menu li {
    width: 100%;
  }
  .has-dropdown .dropdown {
    position: static;
  }
  .has-dropdown .dropdown li a {
    padding-left: 2rem;
  }
  /* wenn geöffnet */
  .nav-menu.open {
    max-height: 100vh; /* groß genug für alle Einträge */
  }
}

/* Overlay-Card zentriert, 75 % vom Viewport */
#overlay-card {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 75vw;           /* 75% der Viewport-Breite */
  height: 75vh;          /* 75% der Viewport-Höhe */
  transform: translate(-50%, -50%); /* zentriert */
  background: #fff;
  color: #000;
  border-radius: 1rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease, transform 0.5s ease;
  opacity: 0;
  z-index: 100;
  padding: 1.5rem;
  overflow-y: auto;      /* Scroll bei zu viel Inhalt */
}

/* Sichtbar-Status: Fade-In und Rücksetzen der Transform */
#overlay-card.card-visible {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Optional: leichter Scale-Effekt beim Einblenden */
#overlay-card.card-hidden {
  transform: translate(-50%, -50%) scale(0.8);
}

/* Full-Width/Height auf sehr kleinen Bildschirmen */
@media (max-width: 480px) {
  #overlay-card {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
  }
}

/* Standard: Navigation sichtbar */
.main-nav,
.nav-toggle {
  transition: opacity 0.3s ease;
}

/* Wenn Overlay aktiv, Nav ausblenden und Klicks blocken */
body.overlay-active .main-nav,
body.overlay-active .nav-toggle {
  opacity: 0;
  pointer-events: none;
}

/* Optional: auch Page-Scroll verhindern */
body.overlay-active {
  overflow: hidden;
}
body.overlay-active footer {
  opacity: 0;
  poniter-events: none;
}
#news {
  position: relative;
  padding: 0 1rem 2rem;
  max-width: 800px;
  margin: 2.5rem auto 1.5rem;
  box-sizing: border-box;
}
#news h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}
.news-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin: 0 auto;
  max-width: 1200px;  /* Gesamtbreite begrenzen */

}

/* Einzelne News-Karte */
.news-card {
  /*background: #fff;
  color: #000;
  border-radius: 0.5rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 50vh;
  transform: scale(1.2);
  transform-origin: center top;
  /* damit sich die Umgebung nicht verschiebt: 
     gleichen negativen Margin oben aus 
  margin: 0.5rem; 
  width: 100%;*/
  flex: 1 1 45%
  max-width: 600px;
}
.news-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.news-card .content {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
}
.news-card p {
  flex: 1;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}
.news-card a {
  align-self: flex-end;
  text-decoration: none;
  font-weight: bold;
  color: #007BFF;
}
.news-card a:hover {
  text-decoration: underline;
}

/* — News Card: Bild mit Titel-Overlay — */
.news-card {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.2);
}

/* Bildcontainer */
.card-image {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 Aspect Ratio */
  background-size: cover;
  background-position: center;
}
.headline-text h3 {
  
  font-size: 1.75rem;
  color: #222;
  background: transparent;
  padding: 0;
  border-radius: 0.5rem;
  text-align: center;
  margin: 0.5rem 0;
}

/* Overlay mit Gradient & Headline */
.headline-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}
.headline-overlay h3 {
  margin: 0;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
  transition: transform 0.3s ease;
}
.news-card:hover .headline-overlay h3 {
  transform: translateY(-4px);
}

/* Text-Bereich unter dem Bild */
.news-card .content {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.news-card .content p {
  flex: 1;
  font-size: 0.9rem;
  line-hight: 1.4;
  margin-bottom: 0.75rem;
  color: 333;
}
.news-card .content a {
  align-self: flex-end;
  text-decoration: none;
  font-weight: bold;
  color: #0066cc;
  transition: color 0.2s ease;
}
.news-card .content a:hover {
  color: #004999;
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
  .headline-overlay h3 {
    font-size: 1.25rem;
  }
}
/* Bild-Container mit festem Seitenverhältnis */
.card-image-container {
  /*position: relative;*/
  width: 100%;
/*  aspect-ratio: 16/9;*/
  /*padding-bottom: 56.25%;*/
  max-height: 250px;
  height: 30vh;
  overflow: hidden;
}

/* Tatsächliches IMG-Element füllt den Container */
.card-image-container img {
  /*position: absolute;
  top: 0; left: 0;*/
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Overlay für die Headline */
.headline-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 1rem;
  background: rgba(0,0,0,0.3);
}
.headline-overlay h3 {
  margin: 0;
  color: #fff;
  font-size: 1.75rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

/* Card-Grundgerüst */
.news-card {
  background: #fff;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(0,0,0,0.15);
}

/* Textbereich */
.news-card .content {
  padding: 0.75rem 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.news-card .content p {
  flex: 1;
  margin: 0 0 0.75rem;
  color: #333;
  font-size: 0.95rem;
  line-hight: 1.4;
  
}
.news-card .content a {
  align-self: flex-end;
  text-decoration: none;
  font-weight: bold;
  color: #0066cc;
}
.news-card .content a:hover {
  text-decoration: underline;
}

/* Responsive Anpassung */
@media (max-width: 768px) {
  .headline-overlay h3 {
    font-size: 1.25rem;
  }
  .news-card {
    flex: 1 1 100%;
    max-width: none;
  }
  .headline-overlay h3 {
    font-size: 1.4rem;
  }
}
@media (min-width: 768px) {
  #news {
    padding-top: 2rem;
  }
}
