/* Grid */
.lfc-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:24px;
}

@media (max-width: 1024px){
  .lfc-grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .lfc-grid{ grid-template-columns:1fr; }
}

/* Card 3D */
.lfc-card{
  perspective: 1200px;
}

.lfc-inner{
  position:relative;
  width:100%;
  min-height: 700px;
  transform-style:preserve-3d;
  transition:transform .7s cubic-bezier(.2,.8,.2,1);
  outline: none;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .lfc-card:hover .lfc-inner,
  .lfc-inner:focus {
    transform: rotateY(180deg);
  }
}

/* JS toggled state (mobile tap) */
.lfc-card.is-flipped .lfc-inner{
  transform: rotateY(180deg);
}

.lfc-face{
  position:absolute;
  inset:0;
  backface-visibility:hidden;
  -webkit-backface-visibility:hidden;
  border-radius: 10px;
  overflow:hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.10);
  background:#fff;
}

.lfc-front{
  display:flex;
  flex-direction:column;
}

.lfc-back{
  transform: rotateY(180deg);
  display:flex;
  flex-direction:column;
  background:#fff;
}

/* Front media like your first image */
.lfc-media{
  flex: 0 0 68%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.lfc-media-fallback{
  display:block;
  width:100%;
  height:100%;
  background: #e9e9e9;
}

/* Panel */
.lfc-panel{
  flex: 1 1 auto;
  padding: 22px 22px 24px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap: 12px;
}

.lfc-panel-back{
  padding: 34px 28px 28px;
  justify-content:flex-start;
}

/* Typography */
.lfc-title{
  margin:0;
  letter-spacing: .02em;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  text-transform: uppercase;
}

.lfc-text{
  margin:0;
  font-size: 18px;
  line-height: 1.45;
  opacity: .9;
}

/* Back content */
.lfc-richtext{
  width:100%;
  font-size: 15px !important;
  line-height: 1.55;
  opacity: .95;
}

.lfc-richtext p{ margin: 0 0 10px; }
.lfc-richtext p:last-child{ margin-bottom: 0; }

/* Button like "HIER BUCHEN" */
.lfc-btn{
  margin-top: 18px;
  display:inline-block;
  font-weight: 800;
  letter-spacing: .02em;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-transform: uppercase;
  color: inherit;
}

.lfc-btn:hover{
  opacity: .8;
}




/* MOBILE: Slider + kleinere Texte (Flip bleibt) */
@media (max-width: 768px) {
  .lfc-grid{
    display: flex;
    gap: 16px;

    overflow-x: scroll;
    overflow-y: visible;

    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;

    padding: 0 16px 12px;
    scroll-padding-left: 16px;
    scroll-padding-right: 16px;

    /* GANZ WICHTIG: kein touch-action hier! */
  }

  .lfc-card{
    flex: 0 0 92%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    perspective: 1200px;
  }

  /* mehr Platz für Text */
  .lfc-panel{
    padding: 16px 16px 18px;
    gap: 8px;
  }
  .lfc-panel-back{
    padding: 18px 16px 16px;
  }

  /* Typo kleiner */
  .lfc-title{ font-size: 18px; }
  .lfc-text{ font-size: 15px; line-height: 1.35; }
  .lfc-richtext{ font-size: 12px !important; line-height: 1.3; }

  /* weniger Absatz-Abstände */
  .lfc-text p{ margin: 0; }
  .lfc-text p + p{ margin-top: 6px; }
  .lfc-richtext p{ margin: 0 0 8px; }

  /* Button kompakter */
  .lfc-btn{ margin-top: 12px; font-size: 14px; }

  /* Bild etwas kleiner -> mehr Textfläche */
  .lfc-media{ flex: 0 0 62%; }

  /* Kartenhöhe passend */
  .lfc-inner{ min-height: 560px; }
}
