.elementor-widget-html .tfys-wege,
.elementor-widget-html .tfys-wege *,
.elementor-widget-shortcode .tfys-wege,
.elementor-widget-shortcode .tfys-wege *,
.tfys-wege-modal,
.tfys-wege-modal * {
  box-sizing: border-box;
}

.elementor-widget-shortcode:has(.tfys-wege),
.elementor-widget-html:has(.tfys-wege),
.elementor-element:has(.tfys-wege) > .elementor-widget-container,
.elementor-element:has(.tfys-wege) {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}

.tfys-wege,
.tfys-wege__inner,
.tfys-wege__grid,
.tfys-wege__card {
  background: transparent !important;
  background-color: transparent !important;
}

.tfys-wege {
  --tfys-text: #3E4A3A;
  --tfys-ocher: #C9A05A;
  --tfys-sage-dark: #3E4A3A;
  --tfys-max: 1120px;
  position: relative;
  width: 100%;
  max-width: var(--tfys-max);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 32px) clamp(8px, 2vw, 16px);
  font-family: 'Montserrat', Arial, sans-serif !important;
  color: var(--tfys-text);
}

.tfys-wege__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.5vw, 18px);
  align-items: stretch;
}

.tfys-wege__card {
  margin: 0;
  min-width: 0;
}

.tfys-wege button.tfys-wege__hit {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: clamp(18px, 2.2vw, 28px) clamp(14px, 1.8vw, 22px) clamp(22px, 2.4vw, 30px) !important;
  text-align: center;
  cursor: pointer;
  border-radius: 24px !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(201, 160, 90, 0.7) !important;
  box-shadow:
    0 0 0 1px rgba(201, 160, 90, 0.18),
    0 0 28px rgba(201, 160, 90, 0.35),
    0 12px 28px rgba(90, 70, 40, 0.08) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font: inherit;
  color: inherit;
  margin: 0 !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.tfys-wege button.tfys-wege__hit:hover,
.tfys-wege button.tfys-wege__hit:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(201, 160, 90, 0.25),
    0 0 36px rgba(201, 160, 90, 0.45),
    0 16px 36px rgba(90, 70, 40, 0.1) !important;
  outline: none;
}

/* Icons: echte Transparenz (PNG ohne Schwarz) */
.tfys-wege__icon-wrap {
  display: block !important;
  width: min(280px, 94%) !important;
  height: auto !important;
  aspect-ratio: 3 / 2;
  margin: 0 auto 8px !important;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
  flex: 0 0 auto;
}

.tfys-wege button.tfys-wege__hit .tfys-wege__icon {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  mix-blend-mode: normal !important;
  filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

.tfys-wege__title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: clamp(1.5rem, 2vw, 1.8rem) !important;
  font-weight: 500 !important;
  color: var(--tfys-sage-dark) !important;
  margin: 10px 0 12px !important;
  padding: 0 !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.tfys-wege__teaser {
  font-family: 'Montserrat', Arial, sans-serif !important;
  font-size: clamp(0.88rem, 1.05vw, 0.96rem) !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
  color: var(--tfys-sage-dark) !important;
  margin: 0 !important;
  padding: 0 !important;
  text-align: center;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* —— Modal —— */
.tfys-wege-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
}

.tfys-wege-modal.is-open,
.tfys-wege-modal.is-open[hidden] {
  display: flex !important;
}

.tfys-wege-modal .tfys-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(40, 45, 38, 0.55);
  backdrop-filter: blur(2px);
}

.tfys-wege-modal .tfys-modal__dialog,
.tfys-wege-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(92vh, 920px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  background: #ffffff !important;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(201, 160, 90, 0.35),
    0 0 28px rgba(201, 160, 90, 0.25),
    0 20px 60px rgba(0, 0, 0, 0.22);
}

/* Single close only */
.tfys-wege-modal .tfys-modal__close {
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  z-index: 5;
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  border: 1.5px solid #C28E4D !important;
  background: #fff !important;
  color: #3E4A3A !important;
  font-size: 1.7rem !important;
  line-height: 1 !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
}

.tfys-wege-modal .tfys-modal__x,
.tfys-wege-modal .tfys-modal__topbar {
  display: none !important;
}

.tfys-wege-modal__content {
  overflow: auto;
  padding: 28px 28px 32px;
  -webkit-overflow-scrolling: touch;
  text-align: center;
}

.tfys-wege-modal__icon-wrap {
  width: min(320px, 78%) !important;
  aspect-ratio: 3 / 2;
  margin: 8px auto 18px !important;
  background: transparent !important;
  border-radius: 0 !important;
  overflow: visible !important;
}

.tfys-wege-modal__icon {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  mix-blend-mode: normal !important;
  filter: none !important;
}

.tfys-wege-modal .tfys-modal__title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: clamp(1.65rem, 3vw, 2.05rem) !important;
  font-weight: 500 !important;
  color: #3E4A3A !important;
  text-align: center;
  line-height: 1.25 !important;
  margin: 0 0 12px !important;
  padding: 0 36px !important;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.tfys-wege-modal .tfys-modal__line {
  display: block;
  width: 48px;
  height: 2px;
  margin: 0 auto 22px !important;
  background: #C28E4D !important;
  border: 0 !important;
}

.tfys-wege-modal__text {
  font-family: 'Montserrat', Arial, sans-serif !important;
  font-size: 0.98rem !important;
  font-weight: 400 !important;
  line-height: 1.7 !important;
  color: #3E4A3A !important;
  margin: 0 0 1em !important;
  padding: 0 !important;
  text-align: left;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.tfys-wege-modal__bridge {
  margin: 1.5em 0 1.2em;
  padding-top: 1em;
  border-top: 1px solid rgba(194, 142, 77, 0.28);
  text-align: left;
}

.tfys-wege-modal__bridge-title,
.tfys-wege-modal__offer-title {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 1.22rem !important;
  font-weight: 500 !important;
  color: #3E4A3A !important;
  margin: 0 0 0.55em !important;
  padding: 0 !important;
  text-align: left;
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

.tfys-wege-modal__offers {
  display: grid;
  gap: 1.15em;
  margin: 0.2em 0 1.5em;
  text-align: left;
}

.tfys-wege-modal__offer {
  padding: 0.95em 0 0;
  border-top: 1px solid rgba(194, 142, 77, 0.2);
}

.tfys-wege-modal__offer:first-child {
  border-top: 0;
  padding-top: 0;
}

.tfys-wege-modal__actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.tfys-wege-modal .tfys-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 0.4em;
  padding: 0.9em 1.35em !important;
  border-radius: 10px !important;
  background: #5C6652 !important;
  color: #fff !important;
  text-decoration: none !important;
  font-family: 'Montserrat', Arial, sans-serif !important;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.tfys-modal-open {
  overflow: hidden;
}

@media (max-width: 900px) {
  .tfys-wege__grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
    gap: 16px;
  }

  .tfys-wege__icon-wrap {
    width: min(240px, 88%) !important;
  }

  .tfys-wege-modal__icon-wrap {
    width: min(220px, 72%) !important;
  }
}
