/* CONTENEDOR */
.banner {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #e43618;
}

/* TEXTO IZQUIERDA */
.left-text {
    position: absolute;
    left: 5%;
    top: 50%;
    transform: translateY(-50%);
    color: #ffc400;
    font-weight: 900;
    font-size: clamp(26px, 5vw, 48px);
    line-height: 1.1;
    z-index: 5;
}

/* BLOQUE DERECHO BASE */
.right-base {
    position: absolute;
    right: 0;
    top: 0;
    width: 60%;
    height: 100%;
    background: #e43618;
    z-index: 1;
}

/* TEXTO BASE DERECHO */
.right-base-text {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    color: #ffc400;
    font-weight: 900;
    font-size: clamp(26px, 5vw, 48px);
    line-height: 1.1;
    text-align: right;
    z-index: 2;
}

/* PIEZA QUE CAE (con texto incluido) */
.falling {
    position: absolute;
    right: 0;
    top: 0;
    width: 60%;
    height: 100%;
    background: #e43618;

    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
    z-index: 4;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 5%;
}

/* TEXTO DENTRO DE LA PIEZA */
.falling span {
    color: #ffc400;
    font-weight: 900;
    font-size: clamp(26px, 5vw, 48px);
    line-height: 1.1;
    text-align: right;
}

/* SOMBRA */
.falling::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: -20px 30px 40px rgba(0,0,0,0.5);
    opacity: 0;
}

/* CORTE */
.slice {
    position: absolute;
    width: 200%;
    height: 18px;
    background: #000;
    top: 50%;
    left: -50%;
    transform: rotate(-20deg) scaleX(0);
    z-index: 6;
}

/* FRANJA */
.bottom {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 20px;
    background: #ffc400;
    z-index: 7;
}

/* ANIMACIÓN */

.banner.active .slice {
    animation: slice 0.25s ease-out forwards;
}

.banner.active .falling {
    animation: fall 0.7s cubic-bezier(.2,.8,.2,1) forwards;
}

.banner.active .falling::after {
    animation: shadow 0.7s forwards;
}

/* KEYFRAMES */

@keyframes slice {
    to { transform: rotate(-20deg) scaleX(1); }
}

@keyframes fall {
    0% { transform: translateY(0) rotate(0); }
    70% { transform: translateY(35px) rotate(-4deg); }
    100% { transform: translateY(25px) rotate(-2deg); }
}

@keyframes shadow {
    to { opacity: 1; }
}
