.m28_studio_trio {
    background: #252525;
    color: #ffffff;
    padding: 110px 0 90px;
    overflow-x: clip;
}

.m28_header {
    text-align: center;
    margin: 0 auto 60px;
    max-width: 1520px;
    padding: 0 20px;
}

.m28_topline {
    margin: 0 0 0.6em;
    font-family: 'Nexa-Black-Italic', 'Nexa', system-ui, sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: clamp(16px, 1.4vw, 22px);
    text-transform: uppercase;
    color: #d4d4d4;
}

.m28_topline--bottom { margin: 0.6em 0 0; }

.m28_title {
    margin: 0;
    font-family: 'Nexa-Black-Italic', 'Nexa', system-ui, sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: clamp(28px, 3.2vw, 50px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: #d4d4d4;
}

.m28_title strong,
.m28_title .m28_title_accent {
    color: #ffffff;
    font-weight: inherit;
}

/* Card grid (≤3) vs. slider (≥4) */
.m28_cards {
    position: relative;
}

.m28_cards--grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.m28_cards--slider:not(.slick-initialized) {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
}

.m28_cards--slider:not(.slick-initialized) .m28_card {
    flex: 0 0 calc(25% - 18px);
}

.m28_studio_trio .m28_card {
    background: #353434;
    border-radius: 20px;
    height: 400px;
    display: flex !important;
    flex-direction: column;
    box-sizing: border-box;
    overflow: hidden;
    padding: 10px;
    transition: background 0.4s ease;
}

.m28_studio_trio .m28_card--detail:hover {
    background: var(--card-hover-bg, #353434);
}

.m28_studio_trio .m28_card_media {
    flex: 0 0 280px;
    border-radius: 12px;
    overflow: hidden;
    transition: flex-basis 0.4s ease;
}

.m28_card_media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.m28_studio_trio .m28_card_body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0;
    color: #ffffff;
}

.m28_card_title {
    margin: 0;
    font-family: 'Nexa-Black-Italic', 'Nexa', system-ui, sans-serif;
    font-style: italic;
    font-weight: 900;
    font-size: 22px;
    line-height: 1.15;
    color: #ffffff;
}

.m28_card_desc {
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    font-family: 'Nexa-Regular', 'Nexa', system-ui, sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.7);
    transition: max-height 0.4s ease, opacity 0.3s ease 0.1s, margin-top 0.4s ease;
}

/* Media shrinks more aggressively on hover so the description block has
   enough vertical room for longer texts (the previous 200px left too
   little, causing 4-5+ line descriptions to clip out of the 400px card). */
.m28_studio_trio .m28_card--detail:hover .m28_card_media {
    flex: 0 0 110px;
}

.m28_studio_trio .m28_card--detail:hover .m28_card_desc {
    max-height: 250px;
    opacity: 1;
    margin-top: 12px;
}

/* Slick polish: flex tracks, peek fade on the right, navigation arrows */
.m28_cards--slider .slick-list { overflow: visible; }
.m28_cards--slider .slick-track { display: flex; }
.m28_cards--slider .slick-slide { margin: 0 12px; float: none; }
.m28_cards--slider .slick-slide:first-child { margin-left: 0; }

/* Container is the positioning context for the absolute arrow buttons. */
.m28_studio_trio .mM_container { position: relative; }

/* Peek-card overlay — only non-active (peek) slides get a darkening gradient
   layered over them so they fade visually into the page background where
   the slider runs off-screen. Active slides stay fully visible.
   The gradient mirrors the Figma reference for node 59:143:
     - uniform 60% dark layer
     - plus a 270deg fade where the side that touches the viewport edge is
       fully #252525 and the opposite side is transparent.
   We mirror the gradient direction for left vs right peek cards via the
   slick `data-slick-index` not being adjacent — Slick tags peek cards on
   both sides with `:not(.slick-active)`, so we use the `~ .slick-active`
   sibling selector trick to detect "to the right of the active set". */
.m28_studio_trio .m28_card { position: relative; }

/* Peek overlay always exists so opacity can crossfade smoothly when slick
   toggles .slick-active on/off. The base rule sits on every slide with
   opacity:0; the :not(.slick-active) variant lifts it to 1, so going
   active↔inactive animates instead of snapping. */
.m28_studio_trio .m28_card.slick-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg,   rgba(37, 37, 37, 0.60) 0%, rgba(37, 37, 37, 0.60) 100%),
        linear-gradient(270deg, #252525 51%, rgba(37, 37, 37, 0) 100%);
    border-radius: inherit;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.5s ease;     /* matches slick `speed: 500` */
}

.m28_studio_trio .m28_card.slick-slide:not(.slick-active)::after {
    opacity: 1;
}

/* Peek cards on the LEFT of the active window get the horizontal fade
   flipped (so the darkening starts from the LEFT edge where the card
   runs off into the background). */
.m28_studio_trio .m28_card.slick-slide:has(~ .slick-slide.slick-active)::after {
    background:
        linear-gradient(0deg,  rgba(37, 37, 37, 0.60) 0%, rgba(37, 37, 37, 0.60) 100%),
        linear-gradient(90deg, #252525 51%, rgba(37, 37, 37, 0) 100%);
}

.m28_studio_trio .m28_card.slick-slide:not(.slick-active) {
    pointer-events: none;
}

/* Slider arrows (Figma node 59:131): 55x55 light-grey round buttons with
   a horizontal arrow (→) inside. Positioned OUTSIDE the 1400px content
   container in the viewport gutter. `max()` keeps them visible: just
   outside the container on wide screens, snapping to a 20px viewport
   margin once the gutter gets too small. */
.m28_studio_trio .m28_arrow {
    position: absolute;
    top: 50%;
    width: 55px;
    height: 55px;
    background: #d4d4d4 no-repeat center / 18px 18px;
    border: 1px solid #d4d4d4;
    border-radius: 30px;
    cursor: pointer;
    z-index: 5;
    color: transparent;
    font-size: 0;
    padding: 0;
    transition: background-color .2s ease, transform .2s ease;
}
.m28_studio_trio .m28_arrow_next {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23353434' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 12h14M13 6l6 6-6 6'/></svg>");
    right: -70px;
    transform: translateY(-50%);
}
.m28_studio_trio .m28_arrow_prev {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23353434' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M19 12H5M11 6l-6 6 6 6'/></svg>");
    left: -70px;
    transform: translateY(-50%);
}
.m28_studio_trio .m28_arrow:hover { background-color: #ffffff; }
.m28_studio_trio .m28_arrow_prev:hover { transform: translateY(-50%) scale(1.05); }
.m28_studio_trio .m28_arrow_next:hover { transform: translateY(-50%) scale(1.05); }
.m28_studio_trio .m28_arrow.slick-disabled { opacity: 0.35; pointer-events: none; }

/* When the viewport gets too narrow to keep both arrows in the gutter
   without going off-screen, snap them back to just inside the container. */
@media (max-width: 1500px) {
    .m28_studio_trio .m28_arrow_next { right: 8px; }
    .m28_studio_trio .m28_arrow_prev { left: 8px; }
}

@media (max-width: 768px) {
    /* Auf Mobile rücken die Pfeile nach innen + Mitten-Höhe der Card
       (eine Card pro View). Kleinere Buttons. */
    .m28_studio_trio .m28_arrow {
        width: 44px;
        height: 44px;
        background-size: 16px 16px;
    }
    .m28_studio_trio .m28_arrow_prev { left: 8px; }
    .m28_studio_trio .m28_arrow_next { right: 8px; }
}

/* Same styling for BTW custom arrow markup if mm-slick-ui-inline kicks in */
.m28_studio_trio .mM_arrows {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 5;
}
.m28_studio_trio .mM_arrows .mM_arrow {
    pointer-events: auto;
    width: 55px; height: 55px;
    background: #d4d4d4;
    border: 1px solid #d4d4d4;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s ease, transform .2s ease;
}
.m28_studio_trio .mM_arrows .mM_arrow svg { width: 18px; fill: #353434; }
.m28_studio_trio .mM_arrows .mM_arrow_prev {
    position: absolute;
    top: 50%;
    left: -70px;
    transform: translateY(-50%) rotate(180deg);
}
.m28_studio_trio .mM_arrows .mM_arrow_next {
    position: absolute;
    top: 50%;
    right: -70px;
    transform: translateY(-50%);
}
@media (max-width: 1500px) {
    .m28_studio_trio .mM_arrows .mM_arrow_prev { left: 8px; }
    .m28_studio_trio .mM_arrows .mM_arrow_next { right: 8px; }
}
.m28_studio_trio .mM_arrows .mM_arrow:hover { background: #ffffff; }
.m28_studio_trio .mM_arrows .mM_arrow_prev:hover { transform: translateY(-50%) rotate(180deg) scale(1.05); }
.m28_studio_trio .mM_arrows .mM_arrow_next:hover { transform: translateY(-50%) scale(1.05); }
.m28_studio_trio .mM_arrows .mM_arrow.slick-disabled { opacity: 0.35; pointer-events: none; }

@media (max-width: 1500px) {
    .m28_cards--slider:not(.slick-initialized) .m28_card { flex: 0 0 calc(33.333% - 16px); }
}
@media (max-width: 1100px) {
    .m28_cards--grid { grid-template-columns: repeat(2, 1fr); }
    .m28_cards--slider:not(.slick-initialized) .m28_card { flex: 0 0 calc(50% - 12px); }
}
@media (max-width: 768px) {
    .m28_studio_trio { padding: 70px 0; }
    .m28_cards--grid { grid-template-columns: 1fr; }
    .m28_card { height: auto; min-height: 360px; }
    .m28_card--simple .m28_card_media,
    .m28_card--detail .m28_card_media { height: 220px; }
    .m28_cards--slider:not(.slick-initialized) .m28_card { flex: 0 0 280px; }
    .m28_cards--slider .slick-prev { left: 8px; }
    .m28_cards--slider .slick-next { right: 8px; }
}

/* Touch devices without hover (mobile/tablets): show the description
   permanently below the title since there's no hover trigger there.
   Card grows in height to fit the content via min-height + auto. */
@media (hover: none) {
    .m28_studio_trio .m28_card_desc {
        max-height: 500px;
        opacity: 1;
        margin-top: 10px;
    }
    .m28_studio_trio .m28_card--detail .m28_card_media {
        flex: 0 0 200px;
    }
    .m28_studio_trio .m28_card { height: auto; min-height: 400px; }
}
