/* --- Grundcontainer --- */
.ech_text_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;
}

/* Hellmodus – Container */
/* Hellmodus – Container (Glass) */
@media (prefers-color-scheme: light) {
  .ech_text_bild {
    background: rgba(240, 240, 240, 0.55);     /* 👈 Transparenz */
    color: rgb(0, 0, 0);
    backdrop-filter: blur(40px);               /* 👈 Glass-Effekt */
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(0, 84, 134, 0.25);  /* optional weich */
  }
}

/* Dunkelmodus – Container (Glass) */
@media (prefers-color-scheme: dark) {
  .ech_text_bild {
    background: rgba(60, 60, 60, 0.55);        /* 👈 Transparenz */
    color: rgb(242, 242, 242);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(242, 242, 242, 0.18);
  }
}

.ech_text_bild::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  border-radius: 15px; /* gleich wie Container */

  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%
  );
}

@media (prefers-color-scheme: dark){
  .ech_text_bild::after{
    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_text_bild__left, .ech_text_bild__right {
    flex: 1 1 50%;
    min-width: 300px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* --- H3 Ribbon --- */
.ech_text_bild__title {
    background-color: rgb(0, 84, 134);
    color: rgb(240, 240, 240);
    margin: 0 0 20px -35px; 
    padding: 10px 20px 10px 35px; /* Fluchtet mit Text */
    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;
}

/* --- Listen mit Check-Icons --- */
.ech_text_bild__text-inner ul {
    list-style: none !important;
    padding-left: 0;
    margin: 15px 0;
}
.ech_text_bild__text-inner li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
    line-height: 1.5;
}
.ech_text_bild__text-inner li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
}
@media (prefers-color-scheme: light) {
    .ech_text_bild__text-inner li::before { background-image: url('https://data.ech.group/icons/svg/check_circle_blue_30x30.svg'); }
}
@media (prefers-color-scheme: dark) {
    .ech_text_bild__text-inner li::before { background-image: url('https://data.ech.group/icons/svg/check_circle_white_30x30.svg'); }
}

/* --- Links & Icons --- */
.ech_text_bild__text-inner a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}
.ech_text_bild__text-inner a:hover { text-decoration: underline; }

.ech_text_bild__text-inner a::before {
    content: '';
    display: inline-block;
    width: var(--icon-size, 20px);
    height: var(--icon-size, 20px);
    margin-right: 8px;
    background-size: contain;
    background-repeat: no-repeat;
}

/* Logik für Icons (Extern, PDF, Intern Fallback) */
.ech_text_bild__text-inner a[href^="http"]::before { background-image: var(--icon-ext-l); }
.ech_text_bild__text-inner a[href$=".pdf"]::before { background-image: var(--icon-pdf-l); }
/* Interner Link Fix: Alles was nicht http und nicht pdf ist */
.ech_text_bild__text-inner a:not([href^="http"]):not([href$=".pdf"])::before { background-image: var(--icon-int-l); }

@media (prefers-color-scheme: dark) {
    .ech_text_bild__text-inner a[href^="http"]::before { background-image: var(--icon-ext-d); }
    .ech_text_bild__text-inner a[href$=".pdf"]::before { background-image: var(--icon-pdf-d); }
    .ech_text_bild__text-inner a:not([href^="http"]):not([href$=".pdf"])::before { background-image: var(--icon-int-d); }
}

/* --- Rechte Spalte & Zentrierung --- */
.ech_text_bild__right {
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 250px;
}
.ech_text_bild__media img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* --- Bildbeschreibung --- */
.ech_text_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;
}

/* --- Viewer / HTML-Embed Fix (damit 360-Viewer in Flex-Layouts korrekt Platz bekommt) --- */
.ech_text_bild__media {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Viewer darf nicht in Flex schrumpfen */
.ech_text_bild__media .viewer-container {
    width: 100% !important;
    max-width: 700px;
}

/* Falls der Viewer per background-image arbeitet, braucht er eine echte Hoehe */
.ech_text_bild__media .viewer {
    width: 100%;
    height: 500px;
    min-height: 500px;
}
