/* --- Grundcontainer & Farbmodi --- */
.ech_bild_text {
    display: flex;
    flex-wrap: wrap;
    border-radius: 15px;
    margin: 20px 0;
    overflow: visible !important; /* Erlaubt Ribbon-Überstand */
    box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: background-color 0.3s ease;
}

/* Responsives Verhalten: Mobil & Tablet (bis 768px) */
@media (max-width: 768px) {
    .ech_bild_text {
        flex-direction: column-reverse; /* Tauscht die Anzeige: Erst Rechts (Text), dann Links (Bild) */
        overflow: hidden !important;   /* Verhindert horizontales Scrollen durch das Ribbon auf Handys */
    }
    
    .ech_bild_text__title {
        margin: 0 -20px 20px 0 !important; /* Weniger Überstand auf Mobilgeräten */
        width: calc(100% + 20px) !important;
    }
}

/* Hellmodus – Container */
/* Hellmodus – Container (Glass) */
@media (prefers-color-scheme: light) {
  .ech_bild_text {
    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_bild_text {
    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_bild_text::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_bild_text::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-Layout --- */
.ech_bild_text__left, 
.ech_bild_text__right {
    flex: 1 1 50%;
    min-width: 300px;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

/* --- Linke Spalte (Bild/Media) --- */
.ech_bild_text__left {
    justify-content: center;
    align-items: center;
    position: relative;
}

.ech_bild_text__media {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ech_bild_text__media img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Bildbeschreibung (Blauer Balken) */
.ech_bild_text__description {
    position: absolute;
    bottom: 30px;
    right: 0;
    background-color: rgba(0, 84, 134, var(--opacity, 1));
    color: #f2f2f2;
    padding: 8px 15px 8px 25px;
    border-radius: 5px 0 0 5px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 5;
}

/* --- Rechte Spalte (Text & H3 Ribbon) --- */
.ech_bild_text__right {
    position: relative;
}

/* H3 Ribbon: Überstand nach RECHTS */
.ech_bild_text__title {
    background-color: rgb(0, 84, 134);
    color: rgb(240, 240, 240);
    margin: 0 -35px 20px 0 !important; 
    padding: 10px 35px 10px 20px;
    width: calc(100% + 35px); 
    border-radius: 5px 0 0 5px;
    box-shadow: -3px 3px 8px rgba(0, 0, 0, 0.3);
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 10;
}

.ech_bild_text__text-inner {
    border: none !important;
    padding: 0;
}

/* --- Listen & Links (wie bisher) --- */
.ech_bild_text__text-inner ul {
    list-style: none !important;
    padding-left: 0;
}

.ech_bild_text__text-inner li {
    position: relative;
    padding-left: 35px;
    margin-bottom: 12px;
}

.ech_bild_text__text-inner li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
}

@media (prefers-color-scheme: light) {
    .ech_bild_text__text-inner li::before { background-image: url('https://data.ech.group/icons/svg/check_circle_blue_30x30.svg'); }
}
@media (prefers-color-scheme: dark) {
    .ech_bild_text__text-inner li::before { background-image: url('https://data.ech.group/icons/svg/check_circle_white_30x30.svg'); }
}

.ech_bild_text__text-inner a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.ech_bild_text__text-inner a:hover {
    text-decoration: underline; /* Unterstreichen bei Hover */
}

.ech_bild_text__text-inner a::before {
    content: '';
    display: inline-block;
    width: var(--icon-size, 20px);
    height: var(--icon-size, 20px);
    margin-right: 8px;
    background-size: contain;
}

/* Link-Icons Logik */
.ech_bild_text__text-inner a[href^="http"]::before { background-image: var(--icon-ext-l); }
.ech_bild_text__text-inner a[href$=".pdf"]::before { background-image: var(--icon-pdf-l); }
.ech_bild_text__text-inner a:not([href^="http"]):not([href$=".pdf"])::before { background-image: var(--icon-int-l); }

@media (prefers-color-scheme: dark) {
    .ech_bild_text__text-inner a[href^="http"]::before { background-image: var(--icon-ext-d); }
    .ech_bild_text__text-inner a[href$=".pdf"]::before { background-image: var(--icon-pdf-d); }
    .ech_bild_text__text-inner a:not([href^="http"]):not([href$=".pdf"])::before { background-image: var(--icon-int-d); }
}