.ascen-flip-box {
    perspective: 1000px;
    display: block;
    position: relative;
    box-sizing: border-box;
    margin: 0 auto;
    width: 100%;
    height: 450px; /* Fallback height ensures the container is visible and styled initially */
}

.ascen-flip-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;
}

.ascen-front, .ascen-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

/* Fallback default design background colors (with low selector specificity so Elementor selectors easily override them) */
.ascen-front {
    background-color: #ffffff;
    color: #333333;
    z-index: 2;
    transform: rotateY(0deg);
}

.ascen-back {
    background-color: #f7f7f7;
    color: #333333;
    z-index: 1;
}

/* Direction-based rotations */

/* Flip Left */
.ascen-flip-direction-left .ascen-back {
    transform: rotateY(-180deg);
}
.ascen-flip-direction-left.flipped .ascen-flip-inner {
    transform: rotateY(-180deg);
}
@media (hover: hover) {
    .ascen-flip-direction-left:hover .ascen-flip-inner {
        transform: rotateY(-180deg);
    }
}

/* Flip Right */
.ascen-flip-direction-right .ascen-back {
    transform: rotateY(180deg);
}
.ascen-flip-direction-right.flipped .ascen-flip-inner {
    transform: rotateY(180deg);
}
@media (hover: hover) {
    .ascen-flip-direction-right:hover .ascen-flip-inner {
        transform: rotateY(180deg);
    }
}

/* Flip Up */
.ascen-flip-direction-up .ascen-back {
    transform: rotateX(180deg);
}
.ascen-flip-direction-up.flipped .ascen-flip-inner {
    transform: rotateX(180deg);
}
@media (hover: hover) {
    .ascen-flip-direction-up:hover .ascen-flip-inner {
        transform: rotateX(180deg);
    }
}

/* Flip Down */
.ascen-flip-direction-down .ascen-back {
    transform: rotateX(-180deg);
}
.ascen-flip-direction-down.flipped .ascen-flip-inner {
    transform: rotateX(-180deg);
}
@media (hover: hover) {
    .ascen-flip-direction-down:hover .ascen-flip-inner {
        transform: rotateX(-180deg);
    }
}

/* Front element spacings */
.ascen-front img {
    max-width: 100%;
    height: auto;
    display: block;
}

.ascen-front h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.ascen-front h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Back Table styling */
.table-design {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.table-design th, .table-design td {
    padding: 10px;
    text-align: left;
    vertical-align: middle;
}

.table-design tr:first-child th {
    background-color: #333333;
    color: #ffffff;
    font-weight: 700;
}

.ascen-label {
    background-color: #e9e9e9;
    color: #333333;
    font-weight: 600;
    width: 40%;
}

.ascen-value {
    background-color: #ffffff;
    color: #555555;
    width: 60%;
}
