.flip-box-86ce0137 {
    position: relative;
    width: 100%;
    perspective: 1000px;
    background-color: transparent;
}

.flip-box-86ce0137 .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Axis-specific rotation setups */
.flip-box-86ce0137.axis-y .face.front {
    transform: rotateY(0deg);
}
.flip-box-86ce0137.axis-y .face.back {
    transform: rotateY(180deg);
}

.flip-box-86ce0137.axis-x .face.front {
    transform: rotateX(0deg);
}
.flip-box-86ce0137.axis-x .face.back {
    transform: rotateX(180deg);
}

/* Hover-trigger animations */
.flip-box-86ce0137.trigger-hover.axis-y:hover .card-inner {
    transform: rotateY(180deg);
}

.flip-box-86ce0137.trigger-hover.axis-x:hover .card-inner {
    transform: rotateX(180deg);
}

/* Active/Flipped classes for touch/click handling */
.flip-box-86ce0137.flipped.axis-y .card-inner {
    transform: rotateY(180deg);
}

.flip-box-86ce0137.flipped.axis-x .card-inner {
    transform: rotateX(180deg);
}

/* Card faces */
.flip-box-86ce0137 .face {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    transform-style: preserve-3d;
}

.flip-box-86ce0137 .face.front {
    background-color: #222;
}

.flip-box-86ce0137 .face.front img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Localized fading overlay at the bottom for readability (keeps the main image bright) */
.flip-box-86ce0137 .front-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 45%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 100%);
    z-index: 2;
    pointer-events: none;
}

/* Position front title at the bottom exactly like the reference design */
.flip-box-86ce0137 .front-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 3;
    text-align: center;
    padding: 20px 15px;
    box-sizing: border-box;
}

.flip-box-86ce0137 .front-title {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.flip-box-86ce0137 .front-subtitle {
    margin: 4px 0 0 0;
    font-size: 13px;
    opacity: 0.85;
}

/* Back Side face styles */
.flip-box-86ce0137 .face.back {
    justify-content: center;
}

.flip-box-86ce0137 .back-content-inner {
    width: 100%;
}

.flip-box-86ce0137 .back-icon-wrapper {
    margin-bottom: 15px;
    line-height: 1;
}

.flip-box-86ce0137 .back-title {
    margin: 0 0 10px 0;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.flip-box-86ce0137 .back-desc {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.flip-box-86ce0137 .back-btn {
    display: inline-block;
    padding: 10px 24px;
    border: 2px solid;
    text-decoration: none;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.flip-box-86ce0137 .back-btn:hover {
    background-color: rgba(220, 20, 60, 0.1);
}
