/* Basis */
.custom-news {
  position: relative;
  width: 100%;
  font-family: inherit;
  background: #ffffff;
}

/* Klickbare Karten */
.custom-news-item {
  cursor: pointer;
}
.custom-news-item * {
  cursor: inherit;
}

/* -------- LISTEN-ANSICHT (untereinander) -------- */

.custom-news-list .custom-news-items {
  display: grid;
  gap: 18px;
}

/* Standard: mit Bild links */
.custom-news-list .custom-news-item {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 18px;
  align-items: center;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 16px 20px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
  transition:
    transform 0.15s ease-out,
    box-shadow 0.15s ease-out,
    border-color 0.15s ease-out,
    background-color 0.15s ease-out;
}

.custom-news-list .custom-news-item:hover {
  transform: translateY(-2px);
  border-color: #d1d5db;
  background: #f9fafb;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

/* Variante OHNE Bild: einspaltig, Text zentriert in der Breite */
.custom-news-list .custom-news-item.custom-news-no-thumb {
  grid-template-columns: 1fr;
  text-align: left;
}

/* Thumbnail */
.custom-thumb {
  width: 100%;
  height: auto;
  max-height: 230px;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

/* Textbereich */
.custom-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.custom-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.4;
  font-weight: 700;
  color: #111827;
}

.custom-title > .custom-open {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  color: inherit;
}

.custom-date {
  font-size: 0.85rem;
  color: #6b7280;
}

.custom-desc {
  font-size: 0.96rem;
  color: #374151;
}

/* Responsive Liste */
@media (max-width: 768px) {
  .custom-news-list .custom-news-item {
    grid-template-columns: 1fr;
  }

  .custom-thumb {
    max-height: 260px;
  }
}

/* -------- SLIDER-ANSICHT -------- */

.custom-news-slider {
  padding-inline: 4px;
  background: #ffffff;
}

.custom-news-slider .custom-news-items {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 70%);
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 8px 20px;
  background: #ffffff;
}

/* Slider-Karte */
.custom-news-slider .custom-news-item {
  scroll-snap-align: start;
  border-radius: 20px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 16px 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}

.custom-news-slider .custom-thumb {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 4px;
}

/* KEINE ::before/::after-Overlays mehr */


/* Slider-Pfeile – leicht nach innen gesetzt */
.custom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  padding: 8px 14px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #111827;
}
@media (min-width: 1250px) {
	.custom-prev { left: -32px !important; }
	.custom-next { right: -32px !important; }
}

.custom-prev { left: 0px; }
.custom-next { right: 0px; }

.custom-nav:hover {
  background: #f3f4f6;
}

/* Button-Styling für Thumbnail-Trigger */
.custom-thumb-link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: inherit;
  text-align: inherit;
}

/* -------- MODALES POPUP -------- */

.custom-news-modal {
  position: fixed;
  inset: 0;
  display: none; /* per JS -> display:flex */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.custom-news-modal.active {
  display: flex;
}

.custom-news-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

/* Dialog */
.custom-news-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 22px;
  max-width: 920px;
  width: min(94vw, 920px);
  max-height: 90vh;
  overflow: auto;
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.45);
  animation: customNewsScaleIn 150ms ease-out;
}

@keyframes customNewsScaleIn {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Close-Button – dezent, rund, modern */
.custom-news-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(243, 244, 246, 0.95);
  color: #111827;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  transition: background-color 0.12s ease-out, transform 0.12s ease-out;
  padding: 0;
}

.custom-news-close:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.custom-news-close-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Modal-Inhalt */
.custom-news-modal-content {
  padding: 22px 24px 24px;
}

/* Bild im Popup: zentriert und begrenzt */
.custom-modal-thumb {
  display: block;
  margin: 0 auto 18px;
  width: auto;
  max-width: 90%;
  max-height: 380px;
  object-fit: contain;
  border-radius: 18px;
}

.custom-modal-title {
  margin: 0 0 6px;
  font-size: 1.4rem;
  font-weight: 700;
  color: #111827;
}

.custom-modal-date {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 14px;
}

.custom-modal-body {
  font-size: 0.96rem;
  color: #111827;
  line-height: 1.6;
}

/* Leerer Zustand */
.custom-news-empty {
  border: 1px dashed #d1d5db;
  padding: 12px;
  border-radius: 10px;
  text-align: center;
  color: #6b7280;
  font-size: 0.95rem;
}
