/* m28_objekte_slider */
.m28_objekte_slider {
    padding: clamp(80px, 8vw, 130px) 0;
    /* Kein eigener BG — uebernimmt body var(--hs-bg) damit der Uebergang von
       m27 (V-Cut nach unten gegen Body-BG) nahtlos in m28 weiterfliesst. */
    background: transparent;
    position: relative;
    overflow-x: clip;
}

/* Layout: Text-Spalte (matched intro_left Breite) + Gap + Cards-Spalte bis Viewport-Right
   align-items: start — sonst zentriert center die hohen Karten vertikal zur
   kurzen Text-Spalte und sie ragen aus der Section nach oben heraus. */
.m28_grid {
    display: grid;
    grid-template-columns:
        calc((min(100vw, 1480px) - 2 * var(--hs-container-px) - 120px) / 2)
        120px
        minmax(0, 1fr);
    align-items: start;
}
.m28_text_col {
    grid-column: 1;
    min-width: 0;
    position: relative;
    z-index: 2;
}
.m28_cards_col {
    grid-column: 3;
    min-width: 0;
    margin-right: -40px;
    /* overflow-x:clip schneidet nach links geblutete Slick-Slides ab.
       clip (nicht hidden) vermeidet BFC — overflow-y bleibt visible fuer
       den translateY(-19px) der aktiven Karte. */
    overflow-x: clip;
    position: relative;
    z-index: 1;
}

/* === Text-Spalte === */
.m28_headline {
    color: var(--hs-dark);
    font-size: clamp(28px, 3vw, 40px);
    line-height: 1.12;
    margin: 0 0 24px;
}
.m28_headline em {
    font-style: italic;
    font-family: var(--hs-font-display);
    font-weight: 600;
}
.m28_text {
    color: var(--hs-text);
    margin-bottom: 40px;
    max-width: 560px;
}

/* === Slider-Footer (Progress + Arrows) === */
.m28_slider_footer {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 30px;
    margin-top: 60px;
}
.m28_progress {
    position: relative;
    width: 265px;
    height: 4px;
}
.m28_progress_track { position: absolute; inset: 0; background: #eaebed; }
.m28_progress_bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 4px;
    background: var(--hs-dark);
    transition: width 0.3s;
    min-width: 20px;
}
.m28_slider_nav { display: flex; gap: 25px; position: relative; z-index: 10; }
.m28_slider_prev,
.m28_slider_next {
    /* Figma 9:153 / 9:157: 91 breit x 60 hoch (kompakte Proportion) */
    width: 91px;
    height: 60px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
}
.m28_slider_prev { background: #e5e6e7; color: #bbbec2; }
/* Kein Hover-Effekt im Inactive-Zustand (auf Slide 1) — der Klick passiert eh nichts. */
/* Aktiver Zustand: sobald der Slider nicht mehr auf Slide 1 ist, wird der
   Zurueck-Button gold (= gleiches Styling wie der Next-Button). */
.m28_slider_prev.is-active { background: var(--hs-gold); color: #fff; }
.m28_slider_prev.is-active:hover { background: var(--hs-gold-dark); color: #fff; }
.m28_slider_prev svg, .m28_slider_next svg {
    width: 36px;
    height: 12px;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.m28_slider_prev.is-active:hover svg { transform: translateX(-4px); }
.m28_slider_next { background: var(--hs-gold); color: #fff; }
.m28_slider_next:hover { background: var(--hs-gold-dark); }
.m28_slider_next:hover svg { transform: translateX(4px); }

/* === Cards-Slider === */
.m28_cards_slider .slick-list { overflow: visible; }
.m28_cards_slider .slick-slide {
    background: transparent;
    transition: opacity 0.4s ease;
}

/* Vorschau-Kachel(n) rechts: WEISSER Fade-from-Right Gradient (Figma 5:60) —
   die Karte verblasst zur rechten Section-Kante hin in die Body-BG.
   Inaktive Karte bekommt KEINEN Hover-Effekt (nur die aktuelle Card hat Hover). */
.m28_cards_slider .slick-slide:not(.slick-current) .m28_card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(270deg, #F7F7F7 0%, rgba(247, 247, 247, 0) 100%);
    pointer-events: none;
    z-index: 3;
}
/* Inaktive Karte: nicht klickbar (kein Link-Aufruf), kein Hover-Effekt. */
.m28_cards_slider .slick-slide:not(.slick-current) .m28_card_anchor {
    cursor: default;
    pointer-events: none;
}
.m28_cards_slider .slick-slide:not(.slick-current) .m28_card:hover .m28_card_media img {
    transform: none;
}
.m28_cards_slider .slick-slide:not(.slick-current) .m28_card:hover .m28_card_more {
    gap: 20px;
}
.m28_cards_slider .slick-slide:not(.slick-current) .m28_card:hover .m28_card_more_mark {
    width: 30px;
}

/* Nur aktive Kachel zeigt Beschreibungstext + Gold-Frame.
   Titel und Link bleiben auf allen sichtbaren Karten sichtbar; nur die
   Description-Paragraph wird auf inaktiven Karten ausgeblendet.
   Bild der aktiven Kachel wird leicht nach oben transformiert. */
.m28_card_frame {
    opacity: 0;
    pointer-events: none;
    /* Frame bleibt statisch — nur die Karte selbst hebt sich um -12px. So entsteht
       die "Karte hebt ab, Rahmen bleibt liegen"-Optik und der Frame fluchtet auf
       gleicher Hoehe mit den inaktiven Kacheln. */
    transition: opacity 0.4s ease;
}
.m28_cards_slider .slick-current .m28_card_frame {
    opacity: 1;
}
/* Beschreibungstext nur bei aktiver Karte */
.m28_card_text {
    opacity: 0;
    transition: opacity 0.4s ease, max-height 0.4s ease, margin 0.4s ease;
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0 !important;
    pointer-events: none;
}
.m28_cards_slider .slick-current .m28_card_text {
    opacity: 1;
    max-height: 200px;
    margin: 0 0 24px !important;
    pointer-events: auto;
}
.m28_cards_slider .slick-current .m28_card {
    transform: translateY(-19px);
}
.m28_card {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Filler-Slot unsichtbar — haelt Platz im Slick-Layout, sodass die letzte
   echte Karte auch active werden kann (ohne infinite-Loop). */
.m28_card_slot--filler {
    visibility: hidden;
}
.m28_card_slot--filler .m28_card,
.m28_card_slot--filler .m28_card_frame { display: none; }

.m28_card_slot {
    position: relative;
    padding: 0 40px 19px 0;
}

.m28_card {
    position: relative;
    width: 100%;
    height: 560px;
    overflow: hidden;
    background: var(--hs-dark);
    z-index: 1;
}
.m28_card_anchor {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    position: relative;
    z-index: 2;
}

/* Gold-Outline-Frame: vertikal auf der gleichen Hoehe wie die inaktiven Kacheln
   (top=0, bottom=18px = slot padding-bottom). Versatz nur horizontal —
   Frame steht 18px nach rechts ueber die Karte hinaus (peek). Wenn die aktive
   Karte sich um -12px hebt, fluchtet der Frame weiter mit den inaktiven Karten. */
.m28_card_frame {
    position: absolute;
    top: 0;
    left: 18px;
    right: calc(40px - 18px);
    bottom: 19px;
    border: 1px solid var(--hs-gold);
    pointer-events: none;
    z-index: 0;
}

.m28_card_media {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.m28_card_media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
}
.m28_card:hover .m28_card_media img { transform: scale(1.08); }
.m28_card_more {
    transition: gap 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.m28_card:hover .m28_card_more { gap: 30px; }
.m28_card_more_mark {
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.m28_card:hover .m28_card_more_mark { width: 45px; }

/* Dunkler Verlauf: obere Haelfte komplett klar, untere Haelfte fast solide dunkel */
.m28_card_overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(47, 58, 70, 0) 0%,
        rgba(47, 58, 70, 0) 50%,
        rgba(47, 58, 70, 0.96) 88%,
        rgba(47, 58, 70, 0.98) 100%
    );
    pointer-events: none;
}

.m28_card_content {
    position: absolute;
    /* Figma: Title bei x=50 vom Card-Linksrand, Body bis ~75% Cardbreite */
    left: 50px;
    right: 50px;
    bottom: 50px;
    color: #fff;
    z-index: 1;
}
.m28_card_title {
    font-family: var(--hs-font-display);
    font-weight: 600;
    font-size: clamp(22px, 2vw, 30px);
    line-height: 1.1;
    letter-spacing: 0.01em;
    margin: 0 0 16px;
    color: #fff;
}
.m28_card_text {
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.5;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.92);
    margin: 0 0 24px;
}
.m28_card_more {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    font-family: var(--hs-font-body);
    font-weight: 300;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.075em;
    color: var(--hs-gold);
}
.m28_card_more_mark {
    display: inline-block;
    width: 30px;
    height: 2px;
    background: var(--hs-gold);
}

@media (max-width: 1199.98px) {
    .m28_grid { grid-template-columns: 1fr; align-items: start; }
    .m28_text_col, .m28_cards_col { grid-column: 1; }

    /* Symmetrische Container-Raender — Text fluchtet links wie rechts */
    .m28_text_col { padding-right: var(--hs-container-px); }
    /* max-width aufheben — Desktop-Spalte ist schmal genug, Stacked nicht */
    .m28_text { max-width: none; }
    /* margin-right:-40px (Desktop-Bleed) zuruecksetzen; cards_col mit sym. Padding */
    .m28_cards_col { margin-top: 40px; margin-right: 0; padding-right: var(--hs-container-px); }

    /* Slot-Padding, Frame und Transform: exakt wie Desktop — kein Override.
       translateY(-19px) aus Basisregel macht Frame-Oberkante sichtbar (19px Luecke).
       Im Stacked-Layout sind Pfeile im text_col darueber — kein Ueberlappungsproblem. */
    .m28_card_content { left: 24px; right: 24px; bottom: 28px; }
    .m28_slider_footer { gap: 16px; margin-top: 40px; }
    .m28_progress { width: auto; min-width: 0; }
    .m28_slider_prev,
    .m28_slider_next { width: 56px; height: 64px; }
}
@media (max-width: 767.98px) {
    .m28_card { height: 420px; }
}
@media (max-width: 500px) {
    .m28_card { height: 420px; }
    .m28_slider_prev,
    .m28_slider_next {
        width: 48px;
        height: 56px;
    }
}
