/* ════════════════════════════════════════════════════════════════
   Story Premium – 3D Cube Carousel
   assets/css/story-cube.css
   ════════════════════════════════════════════════════════════════ */

.story-cube-wrap {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

/* Scene: Perspektive-Container */
.story-cube-scene {
    width: 100%;
    padding-bottom: 100%;
    position: relative;
    perspective: 900px;
    perspective-origin: 50% 50%;
    margin-bottom: 20px;
}

/* Der Würfel – preserve-3d ist KRITISCH */
.story-cube {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
    /* Startposition: translateZ negativ = halbe Kantenlänge, wird per JS überschrieben */
    transform: translateZ(-240px) rotateY(0deg) rotateX(0deg);
    transition: transform 1.0s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Alle 6 Faces */
.story-cube__face {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(22,25,34,0.22);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.story-cube__face img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Gradient Overlay für Text-Lesbarkeit */
.story-cube__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(22,25,34,0.78) 0%, transparent 55%);
    border-radius: 16px;
    pointer-events: none;
    z-index: 1;
}

/* Text-Info auf der Face */
.story-cube__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 16px;
    z-index: 2;
    pointer-events: none;
}
.story-cube__info-title {
    font-family: 'Ropa Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 3px;
}
.story-cube__info-text {
    font-size: 15px;
    color: rgba(255,255,255,0.82);
    line-height: 1.4;
}

/* Klickbarer Link über die ganze Face */
.story-cube__face-link {
    position: absolute;
    inset: 0;
    z-index: 3;
    border-radius: 16px;
}

/* Face-Positionen – werden per JS mit korrektem translateZ überschrieben */
.story-cube__face--front  { transform: rotateY(  0deg) translateZ(240px); }
.story-cube__face--right  { transform: rotateY( 90deg) translateZ(240px); }
.story-cube__face--back   { transform: rotateY(180deg) translateZ(240px); }
.story-cube__face--left   { transform: rotateY(-90deg) translateZ(240px); }
.story-cube__face--top    { transform: rotateX( 90deg) translateZ(240px); }
.story-cube__face--bottom { transform: rotateX(-90deg) translateZ(240px); }

/* Leere Faces: transparent, kein Inhalt */

/* ── Navigation (Pfeile + Dots) ── */
.story-cube-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

.story-cube-nav__btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(22,25,34,0.07);
    border: 1.5px solid rgba(22,25,34,0.14);
    color: #161922;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 16px;
    line-height: 1;
    flex-shrink: 0;
    padding: 0;
}
.story-cube-nav__btn:hover {
    background: #d4121c;
    border-color: #d4121c;
    color: #fff;
}

.story-cube-nav__dots {
    display: flex;
    gap: 6px;
    align-items: center;
}
.story-cube-nav__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(22,25,34,0.18);
    cursor: pointer;
    transition: all 0.25s ease;
    border: none;
    padding: 0;
}
.story-cube-nav__dot.active {
    background: #d4121c;
    width: 22px;
    border-radius: 4px;
}

/* ── Caption unter Würfel (Titel + Link) ── */
.story-cube-caption {
    display: none;
}
.story-cube-caption__title {
    font-family: 'Ropa Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #161922;
    margin-bottom: 2px;
}
.story-cube-caption__link {
    font-size: 13px;
    color: #d4121c;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: opacity 0.2s;
    text-decoration: none;
}
.story-cube-caption__link:hover { opacity: 0.7; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .story-cube-wrap { max-width: 360px; }
}
@media (max-width: 768px) {
    .story-cube-wrap { max-width: 290px; }
}