/* Perspective container for 3D effect */
.budi-career-stories-card__wrapper {
    height: 300px;
    border-radius: 18px;
    perspective: 1000px;
    cursor: pointer;
    transition: transform 0.6s;
}

/* Front card styling */
.budi-career-stories-card__front {
    border-radius: 18px;
    overflow: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
}

.budi-career-stories-card__front::before,
.budi-career-stories-card__back::before {
    content: '';
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(180deg, rgba(11, 55, 83, 0) 0%, rgba(11, 55, 83, 1) 150%);
}

.budi-career-stories-card__front-content {
    bottom: 0;
    padding: 20px 20px 25px;
    z-index: 1;
}

/* Back card styling */
.budi-career-stories-card__back {
    border-radius: 18px;
    overflow: hidden;
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: rotateY(180deg);
    transition: transform 0.6s;
    transform-style: preserve-3d;
    border-radius: 18px;
    top: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: top center;
    left: 0;
}

.budi-career-stories-card__back::before {
    background: rgba(224, 22, 60, 0.9);
}

.budi-career-stories-card__back-content {
    padding: 25px 15px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 1;
}

/* Text styles */
.budi-career-stories-card__name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.budi-career-stories-card__position {
    font-size: 16px;
    opacity: 0.9;
}

.budi-career-stories__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.budi-career-stories__desc {
    font-size: 16px;
    line-height: 1.2em;
}

/* Flip animation classes */
.budi-career-stories-card__wrapper.is-flipped .budi-career-stories-card__front {
    transform: rotateY(180deg);
}

.budi-career-stories-card__wrapper.is-flipped .budi-career-stories-card__back {
    transform: rotateY(360deg);
}

@media screen and (max-width: 1200px) and (min-width: 768px) {
    .budi-career-stories-card__wrapper {
        height: 340px;
    }

    .budi-career-stories-card__back-content {
        padding-block: 15px;
    }

    .budi-career-stories__title {
        margin-bottom: 10px;
    }
}

@media screen and (max-width: 767px) {
    .budi-career-stories-card__wrapper {
        height: 320px;
    }

    .budi-career-stories-card__back-content {
        padding-inline: 23px;
    }
}