/* ==========================================================
   RF Portrait Contact Widget – Komplettes CSS
   ========================================================== */

/* ----------------------------------------------------------
   Widget-Layout (Grid-tauglich)
   ---------------------------------------------------------- */
.rf-portrait-widget{
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

/* ----------------------------------------------------------
   Textblock oberhalb des Portraits
   ---------------------------------------------------------- */
.rf-portrait-text{
  width: 100%;
  margin-bottom: 12px; /* Abstand zum Portrait */
}

/* Name: Vorname + Name untereinander */
.rf-portrait-name{
  display: flex;
  flex-direction: column;
  hyphens: auto;
}

.rf-portrait-firstname,
.rf-portrait-lastname{
  display: block;
  hyphens: auto;
}

/* ----------------------------------------------------------
   Funktion/Bereich: immer Platz für 2 Zeilen
   ---------------------------------------------------------- */
.rf-portrait-subtitle{
  line-height: 1.2em;
  min-height: 3.6em !important;

  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  
  /* hyphens: auto; */
}

/* ----------------------------------------------------------
   Portrait
   ---------------------------------------------------------- */
.rf-portrait-image{
  width: 100%;
  cursor: pointer;
  margin-bottom: 12px; /* Abstand zum Button */
}

.rf-portrait-image img{
  width: 100%;
  height: auto;        /* KEINE Höhen-Skalierung */
  display: block;
  object-fit: cover;
}

/* ----------------------------------------------------------
   Button
   ---------------------------------------------------------- */
.rf-open-popup-btn{
  width: 100%;
  display: inline-block;
  text-align: center;
  border: none;
  cursor: pointer;
  margin-top: 0; /* nicht am Bild kleben */
}

/* Button unten ausrichten (für gleichmäßige Grids) */
.rf-portrait-widget.rf-align-bottom .rf-open-popup-btn{
  margin-top: auto;
}

/* ----------------------------------------------------------
   Popup
   ---------------------------------------------------------- */
.rf-popup{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}

.rf-popup.active{
  display: flex;
}

/* Overlay */
.rf-popup-overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  cursor: pointer;
}

/* Popup Content */
.rf-popup-content{
  position: relative;
  background: #ffffff;
  padding: 30px;
  width: 95%;
  max-width: 480px;
  z-index: 10;
}

/* Close Button */
.rf-popup-close{
  position: absolute;
  top: 10px;
  right: 12px;
  font-size: 28px;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
}

/* Formular Wrapper */
.rf-popup-form-wrapper{
  width: 100%;
}

/* Erfolgsmeldung */
.rf-popup-success{
  font-size: 18px;
  text-align: center;
  padding: 20px;
}

/* ----------------------------------------------------------
   Contact Form 7 – Textarea im Popup verkleinern
   ---------------------------------------------------------- */
.rf-popup .wpcf7 textarea,
.rf-popup .wpcf7-form textarea{
  min-height: 120px;
  height: 120px;
  resize: vertical;
  line-height: 1.4;
  padding: 10px 12px;
  font-size: 14px;
}

@media (max-width: 767px){
  .rf-popup .wpcf7 textarea,
  .rf-popup .wpcf7-form textarea{
    min-height: 70px;
    height: 70px;
  }
}