/* Basislayout */
body {
  font-family: Calibri, sans-serif;
  font-size: 11px;
  margin: 0;
  padding: 0;
}

@media (min-width: 1024px) {
  body {
    padding: 0;
  }
}

h1 {
  font-size: 1.5rem;
  color: #00497a;
  margin: 1rem 0;
  text-align: center;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 20px;
}

@media (max-width: 900px) {
  .news-grid {
    grid-template-columns: 1fr;
  }
}

.news-preview {
  background-color: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.news-preview h2 {
  color: #00497a;
  font-size: 1.2rem;
  margin-top: 0.5rem;
}

.news-preview p {
  color: #555;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.news-preview .teaser {
  color: #555;
  font-size: 0.95rem;
  margin-top: 0.5rem;
  line-height: 1.4;
}

.news-preview img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 8px;
}

/* Pop-Up Image für das Detailfenster */
.popup-image {
  width: 100%;
  height: auto;
  max-width: 1000px;
  margin-bottom: 1rem;
}

/* Formatierung für das Datum */
.news-preview small,
.news-preview p small {
  font-size: 0.85rem;
  color: #777;
}

.news-preview a {
  text-decoration: none;
  color: inherit;
}

/* Overlay-Stil */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999 !important;
}

.overlay.visible {
  display: block;
}

.overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.overlay-box {
  position: fixed;
  top: 10vh;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  z-index: 10001;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, 10%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@media (max-width: 767px) {
  .overlay-box {
    top: 5vh;
    bottom: 5vh;
    left: 5vw;
    right: 5vw;
    width: auto;
    transform: none;
    padding: 1rem;
    border-radius: 12px;
  }
}



.close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  font-size: 1.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10002; /* über allem im Overlay */
  padding: 0.25rem;
  line-height: 1;
}

@media (max-width: 600px) {
  h1 {
    font-size: 1.25rem;
  }

  .news-preview h2 {
    font-size: 1rem;
  }

  .news-preview .teaser,
  .popup-window p {
    font-size: 0.9rem;
  }

  .news-preview img {
    height: 180px;
  }

  .overlay-box {
    margin: 1rem;
    padding: 1rem;
  }
}

/* Lesbare Schrift im Overlay */
#news-overlay-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

#news-overlay-content h2 {
  font-size: 1.4rem;
  margin-top: 0;
  color: #00497a;
}

#news-overlay-content p,
#news-overlay-content li {
  font-size: 1rem;
  margin-top: 0.75rem;
  color: #444;
}

#news-overlay-content small {
  font-size: 0.9rem;
  color: #777;
}


