/* show-m: dark variant of m2_text_and_image (used for Mike Story etc.) */

section.m2_text_and_image.is_dark {
    background: #353434;
    color: #d4d4d4;
}

section.m2_text_and_image.is_dark[data-innerer-abstand="innerer_abstand_oben_und_unten"] {
    padding: 110px 0;
}
section.m2_text_and_image.is_dark[data-innerer-abstand="innerer_abstand_nur_oben"]   { padding-top: 110px; }
section.m2_text_and_image.is_dark[data-innerer-abstand="innerer_abstand_nur_unten"]  { padding-bottom: 110px; }

/* Vertically center the text column with the image; widen the column gap
   to ~10% (Figma 59:170: ~148px gap between image and text columns). */
section.m2_text_and_image.is_dark .mM_row {
    align-items: center;
    gap: 0 clamp(40px, 9%, 148px);
}

section.m2_text_and_image.is_dark .mM_col_50 {
    flex: 0 1 calc(50% - clamp(20px, 4.5%, 74px));
    max-width: calc(50% - clamp(20px, 4.5%, 74px));
}

section.m2_text_and_image.is_dark .m2_titel,
section.m2_text_and_image.is_dark h2.m2_titel,
section.m2_text_and_image.is_dark .m2_titel_container h2,
section.m2_text_and_image.is_dark .m2_titel_container .m2_titel {
    margin: 0 0 1.5rem;
    font-family: 'Nexa-Black-Italic', 'Nexa', system-ui, sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #d4d4d4;
    max-width: 600px;
}

section.m2_text_and_image.is_dark .m2_title_accent {
    color: #ffffff;
}

section.m2_text_and_image.is_dark .m2_text_container,
section.m2_text_and_image.is_dark .m2_text_container_inner,
section.m2_text_and_image.is_dark .m2_text_container p {
    color: #d4d4d4;
    font-family: 'Nexa-Regular', 'Nexa', system-ui, sans-serif;
    font-size: 22px;
    line-height: 30px;
    font-weight: 400;
    max-width: 590px;
}

section.m2_text_and_image.is_dark .m2_galerie_container,
section.m2_text_and_image.is_dark .m2_galerie_item {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 750 / 523;
}

section.m2_text_and_image.is_dark .m2_image,
section.m2_text_and_image.is_dark .m2_video_player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

/* Video poster + play button overlay (any m2 with video set) */
section.m2_text_and_image .m2_video_item {
    position: relative;
    cursor: pointer;
}

section.m2_text_and_image .m2_video_play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 71px;
    height: 71px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
    z-index: 2;
    transition: transform .2s ease;
}

section.m2_text_and_image .m2_video_play:hover {
    transform: translate(-50%, -50%) scale(1.06);
}

/* Inner circle — semi-transparent grey with backdrop blur (Figma 59:170) */
section.m2_text_and_image .m2_video_play_circle {
    width: 71px;
    height: 71px;
    border-radius: 50%;
    background: rgba(217, 217, 217, 0.70);
    -webkit-backdrop-filter: blur(7.5px);
    backdrop-filter: blur(7.5px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

section.m2_text_and_image .m2_video_play svg {
    width: 24px;
    height: 24px;
    display: block;
}

section.m2_text_and_image .m2_video_player {
    background: #000;
}

/* CTAs use the shared .showm_cta classes (primary-light on dark bg). */
section.m2_text_and_image.is_dark .m2_ctas {
    margin-top: 2.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 991px) {
    section.m2_text_and_image.is_dark[data-innerer-abstand] {
        padding: 70px 0;
    }
    section.m2_text_and_image.is_dark .m2_galerie_wrapper { margin-bottom: 40px; }
}

/* Force image/video on top, text below at <767px regardless of the
   "Anordnung" setting (m_mike_story uses text_links_bild_rechts which
   would otherwise put text first on stacked mobile via flex-row-reverse).
   Parent BtW-theme hat `.is_dark .mM_col_50 { flex: 0 1 calc(50% - clamp(...)) }`
   mit höherer Spezifität — wir kontern mit identischem Selector + !important
   weil das die EINZIGE Möglichkeit ist, eine non-inline-style Override durch-
   zusetzen ohne den Parent-Theme zu fork'en. */
@media (max-width: 767px) {
    section.m2_text_and_image .mM_row,
    section.m2_text_and_image .mM_row.flex_row_reverse {
        flex-direction: column;
    }
    section.m2_text_and_image .m2_galerie_wrapper,
    section.m2_text_and_image .m2_content_wrapper,
    section.m2_text_and_image.is_dark .m2_galerie_wrapper,
    section.m2_text_and_image.is_dark .m2_content_wrapper,
    section.m2_text_and_image .mM_col_50,
    section.m2_text_and_image.is_dark .mM_col_50 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
    }
    section.m2_text_and_image .m2_galerie_wrapper { order: 0; }
    section.m2_text_and_image .m2_content_wrapper { order: 1; }
}
