/*
 * CMS-/zeitgesteuertes Aktions-Popup
 * Farben an das Theme angelehnt (Primär #3A9FD8, Sekundär/Grün #8FAE44).
 */
.khw-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(35, 31, 32, 0.55);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.khw-popup-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.khw-popup {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
  border-top: 6px solid #8fae44;
}

.khw-popup-overlay.is-visible .khw-popup {
  transform: translateY(0) scale(1);
}

.khw-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #58595b;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.khw-popup__close:hover {
  background: #f0f0f0;
  color: #231f20;
}

.khw-popup__image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px 14px 0 0;
}

.khw-popup__body {
  padding: 28px 30px 30px;
}

.khw-popup__title {
  margin: 0 0 12px;
  font-size: 26px;
  font-weight: 700;
  color: #231f20;
  line-height: 1.2;
}

.khw-popup__content {
  margin: 0 0 22px;
  color: #58595b;
  font-size: 16px;
  line-height: 1.6;
}

.khw-popup__content p {
  margin: 0 0 10px;
}

.khw-popup__content p:last-child {
  margin-bottom: 0;
}

.khw-popup__cta {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 6px;
  background: #8fae44;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.khw-popup__cta:hover {
  background: #718936;
  color: #fff;
  text-decoration: none;
}

@media (max-width: 575.98px) {
  .khw-popup__body {
    padding: 22px 20px 24px;
  }
  .khw-popup__title {
    font-size: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .khw-popup-overlay,
  .khw-popup {
    transition: none;
  }
}
