/* =======================================================
   Container (wie ech_text_bild)
======================================================= */

.ech_kacheln_bild {
  display: flex;
  flex-wrap: wrap;
  border-radius: 15px;
  margin: 20px 0;
  overflow: visible;
  box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.15);
  position: relative;
}

@media (prefers-color-scheme: light) {
  .ech_kacheln_bild {
    background: rgba(240, 240, 240, 0.55);
    color: rgb(0, 0, 0);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(0, 84, 134, 0.25);
  }
}

@media (prefers-color-scheme: dark) {
  .ech_kacheln_bild {
    background: rgba(60, 60, 60, 0.55);
    color: rgb(242, 242, 242);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(242, 242, 242, 0.18);
  }
}

.ech_kacheln_bild::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 15px;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.10) 0%,
    rgba(0,0,0,0.06) 40%,
    rgba(0,0,0,0.00) 100%
  );
}

/* =======================================================
   Spalten
======================================================= */

.ech_kacheln_bild__left,
.ech_kacheln_bild__right {
  flex: 1 1 50%;
  min-width: 300px;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* =======================================================
   Überschrift (Ribbon wie ech_text_bild)
======================================================= */

.ech_kacheln_bild__headline {
  background-color: rgb(0, 84, 134);
  color: rgb(240, 240, 240);
  margin: 0 0 20px -35px;
  padding: 10px 20px 10px 35px;
  border-radius: 0 5px 5px 0;
  width: calc(100% + 15px);
  box-shadow: 3px 3px 8px rgba(0, 0, 0, 0.3);
  font-size: 1.5rem;
  font-weight: bold;
}

/* =======================================================
   Linke Seite — Kacheln (wie ech_menukacheln)
   IMMER 2 nebeneinander
======================================================= */

.ech_kacheln_bild__tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}

.ech_kacheln_bild__tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  border-radius: 15px;
  padding: 14px 14px 12px 14px;
  text-decoration: none;
  position: relative;
  overflow: hidden;

  min-height: 120px;

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

@media (prefers-color-scheme: light) {
  .ech_kacheln_bild__tile {
    background: rgba(250, 250, 250);
    border: 1px solid rgba(0, 84, 134);
  }
}

@media (prefers-color-scheme: dark) {
  .ech_kacheln_bild__tile {
    background: rgba(47, 47, 47);
    border: 1px solid rgba(240, 240, 240);
  }
}

.ech_kacheln_bild__tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 18px rgba(0,0,0,0.14);
}

.ech_kacheln_bild__tile-top {
  font-weight: 800;
  line-height: 1.2;
  font-size: 15px;
  margin-bottom: 10px;
  white-space: pre-line;
}

.ech_kacheln_bild__tile-bottom {
  line-height: 1.35;
  font-size: 13.5px;
  opacity: 0.92;
  white-space: pre-line;
}

/* =======================================================
   Rechte Seite — Bild / HTML (wie ech_text_bild)
======================================================= */

.ech_kacheln_bild__right {
  justify-content: center;
  align-items: center;
  position: relative;
  min-height: 250px;
}

.ech_kacheln_bild__media {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ech_kacheln_bild__media img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.ech_kacheln_bild__html {
  width: 100%;
}

/* Beschreibung wie ech_text_bild */

.ech_kacheln_bild__description {
  position: absolute;
  bottom: 30px;
  left: 15px;
  background-color: rgba(0, 84, 134, var(--opacity, 1));
  color: #f2f2f2;
  padding: 8px 15px 8px 35px;
  border-radius: 0 5px 5px 0;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 10;
}
