/*
 * FB Referenzen – gezielte Optimierung für beta.27
 * Scope ausschließlich auf das FB-Referenzen-Widget.
 * Bestehende Formensprache bleibt erhalten; ergänzt werden Farbvarianten,
 * bessere Proportionen, Lesbarkeit, Slider-UX und Mobile-Verhalten.
 */

.fbws-references {
  --fbws-ref-tone-bg: #043623;
  --fbws-ref-tone-title: #ffffff;
  --fbws-ref-tone-text: rgba(255,255,255,.88);
  --fbws-ref-tone-kicker: #27ef6e;
  --fbws-ref-tone-accent: #ff0000;
  --fbws-ref-tone-fact-line: #27ef6e;
  --fbws-ref-tone-fact-muted: rgba(255,255,255,.72);
  --fbws-ref-tone-button-bg: #ff0000;
  --fbws-ref-tone-button-hover: #d90000;
}

.fbws-references--tone-red {
  --fbws-ref-tone-bg: #ff0000;
  --fbws-ref-tone-title: #ffffff;
  --fbws-ref-tone-text: rgba(255,255,255,.94);
  --fbws-ref-tone-kicker: #ffffff;
  --fbws-ref-tone-accent: #27ef6e;
  --fbws-ref-tone-fact-line: #ffffff;
  --fbws-ref-tone-fact-muted: rgba(255,255,255,.84);
  --fbws-ref-tone-button-bg: #043623;
  --fbws-ref-tone-button-hover: #0a4d36;
}

.fbws-references--tone-lime {
  --fbws-ref-tone-bg: #27ef6e;
  --fbws-ref-tone-title: #043623;
  --fbws-ref-tone-text: #173f31;
  --fbws-ref-tone-kicker: #043623;
  --fbws-ref-tone-accent: #ff0000;
  --fbws-ref-tone-fact-line: #043623;
  --fbws-ref-tone-fact-muted: #365e50;
  --fbws-ref-tone-button-bg: #ff0000;
  --fbws-ref-tone-button-hover: #d90000;
}

.fbws-references--tone-lightgrey {
  --fbws-ref-tone-bg: #f3f5f4;
  --fbws-ref-tone-title: #043623;
  --fbws-ref-tone-text: #46584f;
  --fbws-ref-tone-kicker: #043623;
  --fbws-ref-tone-accent: #ff0000;
  --fbws-ref-tone-fact-line: #27ef6e;
  --fbws-ref-tone-fact-muted: #647169;
  --fbws-ref-tone-button-bg: #ff0000;
  --fbws-ref-tone-button-hover: #d90000;
}

/* Kartenraster: bestehender Aufbau, sauberere Proportionen. */
.fbws-references--grid .fbws-card-grid--references {
  align-items: stretch;
}

.fbws-references--grid .fbws-reference-card {
  height: 100%;
  overflow: hidden !important;
  border-radius: var(--fbws-ref-card-radius, 30px) !important;
  background: var(--fbws-ref-tone-bg) !important;
}

.fbws-references--grid .fbws-reference-card__body {
  min-height: 0 !important;
  flex: 1 1 auto !important;
  padding: clamp(22px,2.2vw,30px) !important;
  background: var(--fbws-ref-tone-bg) !important;
}

.fbws-references--grid .fbws-reference-card__kicker {
  margin: 0 0 10px !important;
  color: var(--fbws-ref-tone-kicker) !important;
  font-size: 13px !important;
  line-height: 1.2 !important;
  letter-spacing: .08em !important;
}

body .fbws-references--grid .fbws-reference-card__title,
body .fbws-references--grid .fbws-reference-card__title a {
  margin: 0 !important;
  color: var(--fbws-ref-tone-title) !important;
  font-family: var(--fbws-ref-title-font, "Montserrat", Arial, sans-serif) !important;
  font-weight: var(--fbws-ref-title-weight, 900) !important;
  font-size: clamp(30px,2.45vw,42px) !important;
  line-height: 1.01 !important;
  letter-spacing: -.025em !important;
  overflow-wrap: anywhere;
}

.fbws-references--grid .fbws-reference-card__title a::after {
  color: var(--fbws-ref-tone-accent) !important;
}

.fbws-references--grid .fbws-reference-card__text {
  max-width: 58ch;
  margin: 14px 0 0 !important;
  color: var(--fbws-ref-tone-text) !important;
  font-family: var(--fbws-ref-text-font, "Rajdhani", Arial, sans-serif) !important;
  font-weight: var(--fbws-ref-text-weight, 500) !important;
  font-size: 17px !important;
  line-height: 1.48 !important;
}

.fbws-references--grid .fbws-reference-card__footer {
  margin-top: auto !important;
  padding-top: 24px !important;
}

.fbws-references .fbws-reference-card__footer .fbws-button,
.fbws-references .fbws-ref-slide__content .fbws-button {
  border-color: var(--fbws-ref-tone-button-bg) !important;
  background: var(--fbws-ref-tone-button-bg) !important;
  color: #fff !important;
}

.fbws-references .fbws-reference-card__footer .fbws-button:hover,
.fbws-references .fbws-reference-card__footer .fbws-button:focus-visible,
.fbws-references .fbws-ref-slide__content .fbws-button:hover,
.fbws-references .fbws-ref-slide__content .fbws-button:focus-visible {
  border-color: var(--fbws-ref-tone-button-hover) !important;
  background: var(--fbws-ref-tone-button-hover) !important;
}

/* Fakten im Bild bleiben in der bestehenden dunklen Hover-Fläche lesbar. */
.fbws-references--grid .fbws-reference-card__facts {
  background: rgba(4,54,35,.95) !important;
}

/* Slider: gleiche Zweiteilung, lediglich ruhiger proportioniert. */
.fbws-references--slider .fbws-ref-slider,
.fbws-references--slider .fbws-ref-slide__content {
  background: var(--fbws-ref-tone-bg) !important;
}

.fbws-references--slider .fbws-ref-slide {
  grid-template-columns: minmax(0,1.08fr) minmax(360px,.92fr) !important;
  min-height: clamp(500px,46vw,610px) !important;
}

.fbws-references--slider .fbws-ref-slide__media,
.fbws-references--slider .fbws-ref-slide__media img {
  min-height: clamp(500px,46vw,610px) !important;
}

.fbws-references--slider .fbws-ref-slide__content {
  padding: clamp(38px,4.5vw,68px) !important;
}

.fbws-references--slider .fbws-ref-slide__content .fbws-card-kicker {
  color: var(--fbws-ref-tone-kicker) !important;
}

body .fbws-references--slider .fbws-ref-slide__content h3,
body .fbws-references--slider .fbws-ref-slide__content h3 a {
  color: var(--fbws-ref-tone-title) !important;
  font-family: var(--fbws-ref-title-font, "Montserrat", Arial, sans-serif) !important;
  font-weight: var(--fbws-ref-title-weight, 900) !important;
  font-size: clamp(40px,4.25vw,66px) !important;
  line-height: .96 !important;
  overflow-wrap: anywhere;
}

.fbws-references--slider .fbws-ref-slide__content h3 a::after {
  color: var(--fbws-ref-tone-accent) !important;
}

.fbws-references--slider .fbws-ref-slide__content > p {
  max-width: 58ch !important;
  margin: 20px 0 28px !important;
  color: var(--fbws-ref-tone-text) !important;
  font-family: var(--fbws-ref-text-font, "Rajdhani", Arial, sans-serif) !important;
  font-weight: var(--fbws-ref-text-weight, 500) !important;
  font-size: 18px !important;
  line-height: 1.48 !important;
}

.fbws-references--slider .fbws-ref-slide__facts > div {
  border-top-color: var(--fbws-ref-tone-fact-line) !important;
}

.fbws-references--slider .fbws-ref-slide__facts strong {
  color: var(--fbws-ref-tone-title) !important;
  font-size: 27px !important;
}

.fbws-references--slider .fbws-ref-slide__facts span {
  color: var(--fbws-ref-tone-fact-muted) !important;
}

.fbws-references--slider .fbws-ref-slider__arrows button {
  background: var(--fbws-ref-tone-button-bg) !important;
  color: #fff !important;
}

.fbws-references--slider .fbws-ref-slider__arrows button:hover,
.fbws-references--slider .fbws-ref-slider__arrows button:focus-visible {
  background: var(--fbws-ref-tone-button-hover) !important;
}

.fbws-references--slider .fbws-ref-slider__arrows button:disabled {
  opacity: .38 !important;
  cursor: default !important;
  transform: none !important;
}

/* Tastaturfokus sichtbar, ohne die vorhandene Formensprache zu verändern. */
.fbws-references a:focus-visible,
.fbws-references button:focus-visible {
  outline: 3px solid var(--fbws-ref-tone-accent);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .fbws-references--slider .fbws-ref-slide {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }

  .fbws-references--slider .fbws-ref-slide__media,
  .fbws-references--slider .fbws-ref-slide__media img {
    min-height: 360px !important;
  }
}

@media (max-width: 767px) {
  .fbws-references--grid .fbws-card-grid--references {
    gap: 28px !important;
  }

  .fbws-references--grid .fbws-reference-card__body {
    padding: 22px !important;
  }

  body .fbws-references--grid .fbws-reference-card__title,
  body .fbws-references--grid .fbws-reference-card__title a {
    font-size: clamp(28px,8.5vw,36px) !important;
    line-height: 1.02 !important;
  }

  .fbws-references--grid .fbws-reference-card__text {
    font-size: 16px !important;
  }

  .fbws-references--slider .fbws-ref-slide__media,
  .fbws-references--slider .fbws-ref-slide__media img {
    min-height: 260px !important;
  }

  .fbws-references--slider .fbws-ref-slide__content {
    padding: 28px 22px 88px !important;
  }

  body .fbws-references--slider .fbws-ref-slide__content h3,
  body .fbws-references--slider .fbws-ref-slide__content h3 a {
    font-size: clamp(32px,10vw,42px) !important;
    line-height: .98 !important;
  }

  .fbws-references--slider .fbws-ref-slide__content > p {
    font-size: 16px !important;
  }

  .fbws-references--slider .fbws-ref-slide__facts {
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 14px !important;
    margin-bottom: 26px !important;
  }

  .fbws-references--slider .fbws-ref-slide__facts > div:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .fbws-references--slider .fbws-ref-slide__facts strong {
    font-size: 24px !important;
  }
}

@media (max-width: 420px) {
  .fbws-references--slider .fbws-ref-slide__facts {
    grid-template-columns: 1fr !important;
  }

  .fbws-references--slider .fbws-ref-slide__facts > div:last-child:nth-child(odd) {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fbws-references .fbws-ref-slide.is-active {
    animation: none !important;
  }

  .fbws-references .fbws-reference-card__media img,
  .fbws-references .fbws-ref-slide__media img,
  .fbws-references .fbws-ref-slider__arrows button {
    transition: none !important;
  }
}

/* Bestehende Elementor-Regler für Abstand und Bildradius bleiben wirksam,
   obwohl ältere Suite-CSS-Dateien diese Eigenschaften mit !important setzen. */
.fbws-references--grid .fbws-card-grid--references {
  gap: var(--fbws-card-gap,42px) !important;
}

.fbws-references .fbws-reference-card__media,
.fbws-references .fbws-ref-slide__media {
  border-radius: var(--fbws-ref-image-radius,var(--fbws-radius-medium,28px)) !important;
}

/* Beta 42 – listing widget aligned to the current FB page typography. */
.fbws-references .fbws-reference-card__kicker,
.fbws-references .fbws-ref-slide__content .fbws-card-kicker{
  font-family:var(--fbws-ref-kicker-font,"Rajdhani",Arial,sans-serif)!important;
  font-weight:var(--fbws-ref-kicker-weight,700)!important;
  letter-spacing:.10em!important;
}
.fbws-references .fbws-reference-card__text,
.fbws-references .fbws-ref-slide__content>p,
.fbws-references .fbws-ref-slide__facts span{
  font-family:var(--fbws-ref-text-font,"Rajdhani",Arial,sans-serif)!important;
}
.fbws-references .fbws-reference-card__footer .fbws-button,
.fbws-references .fbws-ref-slide__content .fbws-button{
  min-height:50px!important;
  border-color:#ff0000!important;
  background:#ff0000!important;
  color:#fff!important;
  font-family:Rajdhani,Arial,sans-serif;
  font-weight:700;
  letter-spacing:.05em;
  text-transform:uppercase;
  transition:transform .2s ease,background-color .2s ease,border-color .2s ease;
}
.fbws-references .fbws-reference-card__footer .fbws-button:hover,
.fbws-references .fbws-reference-card__footer .fbws-button:focus-visible,
.fbws-references .fbws-ref-slide__content .fbws-button:hover,
.fbws-references .fbws-ref-slide__content .fbws-button:focus-visible{
  border-color:#df0000!important;
  background:#df0000!important;
  color:#fff!important;
  transform:translateY(-2px);
}
/* No decorative guide lines in the reference slider facts. */
.fbws-references--slider .fbws-ref-slide__facts>div{
  padding-top:0!important;
  border-top:0!important;
}
@media(prefers-reduced-motion:reduce){
  .fbws-references .fbws-button:hover{transform:none;}
}

/* Elementor typography values for the listing widget remain authoritative even
   against older Suite !important rules. */
.fbws-references--grid .fbws-reference-card__title,
.fbws-references--grid .fbws-reference-card__title a,
.fbws-references--slider .fbws-ref-slide__content h3,
.fbws-references--slider .fbws-ref-slide__content h3 a{
  font-size:var(--fbws-ref-title-size-desktop,inherit)!important;
  line-height:var(--fbws-ref-title-line-desktop,1.01)!important;
  letter-spacing:var(--fbws-ref-title-letter-desktop,-.025em)!important;
}
.fbws-references--grid .fbws-reference-card__text,
.fbws-references--slider .fbws-ref-slide__content>p{
  font-size:var(--fbws-ref-text-size-desktop,17px)!important;
  line-height:var(--fbws-ref-text-line-desktop,1.48)!important;
}
.fbws-references .fbws-reference-card__kicker,
.fbws-references .fbws-ref-slide__content .fbws-card-kicker{
  font-size:var(--fbws-ref-kicker-size-desktop,13px)!important;
  line-height:var(--fbws-ref-kicker-line-desktop,1.2)!important;
  letter-spacing:var(--fbws-ref-kicker-letter-desktop,.10em)!important;
}
.fbws-references--slider .fbws-ref-slide__facts strong{
  font-size:var(--fbws-ref-fact-value-size-desktop,27px)!important;
}
.fbws-references--slider .fbws-ref-slide__facts span{
  font-size:var(--fbws-ref-fact-label-size-desktop,14px)!important;
}
.fbws-references .fbws-button{
  font-family:var(--fbws-ref-button-font,"Rajdhani",Arial,sans-serif)!important;
  font-weight:var(--fbws-ref-button-weight,700)!important;
  font-size:var(--fbws-ref-button-size-desktop,16px)!important;
  line-height:var(--fbws-ref-button-line-desktop,1.1)!important;
  letter-spacing:var(--fbws-ref-button-letter-desktop,.05em)!important;
}
@media(max-width:1024px){
  .fbws-references--grid .fbws-reference-card__title,
  .fbws-references--grid .fbws-reference-card__title a,
  .fbws-references--slider .fbws-ref-slide__content h3,
  .fbws-references--slider .fbws-ref-slide__content h3 a{
    font-size:var(--fbws-ref-title-size-tablet,var(--fbws-ref-title-size-desktop,inherit))!important;
    line-height:var(--fbws-ref-title-line-tablet,var(--fbws-ref-title-line-desktop,1.01))!important;
    letter-spacing:var(--fbws-ref-title-letter-tablet,var(--fbws-ref-title-letter-desktop,-.025em))!important;
  }
  .fbws-references--grid .fbws-reference-card__text,
  .fbws-references--slider .fbws-ref-slide__content>p{
    font-size:var(--fbws-ref-text-size-tablet,var(--fbws-ref-text-size-desktop,17px))!important;
    line-height:var(--fbws-ref-text-line-tablet,var(--fbws-ref-text-line-desktop,1.48))!important;
  }
  .fbws-references .fbws-reference-card__kicker,
  .fbws-references .fbws-ref-slide__content .fbws-card-kicker{
    font-size:var(--fbws-ref-kicker-size-tablet,var(--fbws-ref-kicker-size-desktop,13px))!important;
    line-height:var(--fbws-ref-kicker-line-tablet,var(--fbws-ref-kicker-line-desktop,1.2))!important;
    letter-spacing:var(--fbws-ref-kicker-letter-tablet,var(--fbws-ref-kicker-letter-desktop,.10em))!important;
  }
  .fbws-references--slider .fbws-ref-slide__facts strong{font-size:var(--fbws-ref-fact-value-size-tablet,var(--fbws-ref-fact-value-size-desktop,27px))!important;}
  .fbws-references--slider .fbws-ref-slide__facts span{font-size:var(--fbws-ref-fact-label-size-tablet,var(--fbws-ref-fact-label-size-desktop,14px))!important;}
  .fbws-references .fbws-button{
    font-size:var(--fbws-ref-button-size-tablet,var(--fbws-ref-button-size-desktop,16px))!important;
    line-height:var(--fbws-ref-button-line-tablet,var(--fbws-ref-button-line-desktop,1.1))!important;
    letter-spacing:var(--fbws-ref-button-letter-tablet,var(--fbws-ref-button-letter-desktop,.05em))!important;
  }
}
@media(max-width:767px){
  .fbws-references--grid .fbws-reference-card__title,
  .fbws-references--grid .fbws-reference-card__title a,
  .fbws-references--slider .fbws-ref-slide__content h3,
  .fbws-references--slider .fbws-ref-slide__content h3 a{
    font-size:var(--fbws-ref-title-size-mobile,var(--fbws-ref-title-size-tablet,var(--fbws-ref-title-size-desktop,32px)))!important;
    line-height:var(--fbws-ref-title-line-mobile,var(--fbws-ref-title-line-tablet,var(--fbws-ref-title-line-desktop,1.02)))!important;
    letter-spacing:var(--fbws-ref-title-letter-mobile,var(--fbws-ref-title-letter-tablet,var(--fbws-ref-title-letter-desktop,-.02em)))!important;
  }
  .fbws-references--grid .fbws-reference-card__text,
  .fbws-references--slider .fbws-ref-slide__content>p{
    font-size:var(--fbws-ref-text-size-mobile,var(--fbws-ref-text-size-tablet,var(--fbws-ref-text-size-desktop,16px)))!important;
    line-height:var(--fbws-ref-text-line-mobile,var(--fbws-ref-text-line-tablet,var(--fbws-ref-text-line-desktop,1.45)))!important;
  }
  .fbws-references .fbws-reference-card__kicker,
  .fbws-references .fbws-ref-slide__content .fbws-card-kicker{
    font-size:var(--fbws-ref-kicker-size-mobile,var(--fbws-ref-kicker-size-tablet,var(--fbws-ref-kicker-size-desktop,13px)))!important;
    line-height:var(--fbws-ref-kicker-line-mobile,var(--fbws-ref-kicker-line-tablet,var(--fbws-ref-kicker-line-desktop,1.2)))!important;
    letter-spacing:var(--fbws-ref-kicker-letter-mobile,var(--fbws-ref-kicker-letter-tablet,var(--fbws-ref-kicker-letter-desktop,.10em)))!important;
  }
  .fbws-references--slider .fbws-ref-slide__facts strong{font-size:var(--fbws-ref-fact-value-size-mobile,var(--fbws-ref-fact-value-size-tablet,var(--fbws-ref-fact-value-size-desktop,24px)))!important;}
  .fbws-references--slider .fbws-ref-slide__facts span{font-size:var(--fbws-ref-fact-label-size-mobile,var(--fbws-ref-fact-label-size-tablet,var(--fbws-ref-fact-label-size-desktop,14px)))!important;}
  .fbws-references .fbws-button{
    font-size:var(--fbws-ref-button-size-mobile,var(--fbws-ref-button-size-tablet,var(--fbws-ref-button-size-desktop,15px)))!important;
    line-height:var(--fbws-ref-button-line-mobile,var(--fbws-ref-button-line-tablet,var(--fbws-ref-button-line-desktop,1.1)))!important;
    letter-spacing:var(--fbws-ref-button-letter-mobile,var(--fbws-ref-button-letter-tablet,var(--fbws-ref-button-letter-desktop,.05em)))!important;
  }
}

/* Correct default sizes when no Elementor typography value is saved yet. */
.fbws-references--grid .fbws-reference-card__title,
.fbws-references--grid .fbws-reference-card__title a{
  font-size:var(--fbws-ref-title-size-desktop,clamp(30px,2.45vw,42px))!important;
}
.fbws-references--slider .fbws-ref-slide__content h3,
.fbws-references--slider .fbws-ref-slide__content h3 a{
  font-size:var(--fbws-ref-title-size-desktop,clamp(40px,4.25vw,66px))!important;
}
@media(max-width:767px){
  .fbws-references--grid .fbws-reference-card__title,
  .fbws-references--grid .fbws-reference-card__title a{
    font-size:var(--fbws-ref-title-size-mobile,var(--fbws-ref-title-size-tablet,var(--fbws-ref-title-size-desktop,clamp(28px,8.5vw,36px))))!important;
  }
  .fbws-references--slider .fbws-ref-slide__content h3,
  .fbws-references--slider .fbws-ref-slide__content h3 a{
    font-size:var(--fbws-ref-title-size-mobile,var(--fbws-ref-title-size-tablet,var(--fbws-ref-title-size-desktop,clamp(32px,10vw,42px))))!important;
  }
}
