/**
 * Lab Flip Box - Styles
 */

/* Container */
.lfb-container {
    perspective: 1000px;
    height: 350px;
    width: 100%;
}

/* Flipper */
.lfb-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

/* Front and Back */
.lfb-front,
.lfb-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    overflow: hidden;
    border-radius: 8px;
}

/* Front Side */
.lfb-front {
    background: #333;
}

.lfb-front-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.lfb-front.has-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    pointer-events: none;
}

.lfb-front-content {
    position: absolute;
    z-index: 2;
    padding: 25px;
    width: 100%;
    box-sizing: border-box;
}

/* Text positions */
.lfb-text-top .lfb-front-content {
    top: 0;
}

.lfb-text-center .lfb-front-content {
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
}

.lfb-text-bottom .lfb-front-content {
    bottom: 0;
}

.lfb-front-subtitle {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
}

.lfb-front-title {
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.3;
}

/* Flip icon */
.lfb-flip-icon {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 24px;
    height: 24px;
    opacity: 0.6;
    z-index: 3;
    transition: opacity 0.3s ease;
}

.lfb-flip-icon svg {
    width: 100%;
    height: 100%;
    stroke: #fff;
}

.lfb-container:hover .lfb-flip-icon {
    opacity: 1;
}

/* Back Side */
.lfb-back {
    background: #222;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lfb-back-content {
    padding: 30px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

.lfb-back-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 15px 0;
}

.lfb-back-desc {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin: 0 0 20px 0;
}

/* Details list */
.lfb-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    text-align: left;
}

.lfb-list-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    font-size: 13px;
}

.lfb-list-item:last-child {
    border-bottom: none;
}

.lfb-list-label {
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
}

.lfb-list-value {
    color: #fff;
    font-weight: 500;
}

/* Button */
.lfb-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: 2px solid;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.lfb-btn.style-outline {
    background: transparent;
    border-color: #fff;
    color: #fff;
}

.lfb-btn.style-outline:hover {
    background: #fff;
    color: #222;
}

.lfb-btn.style-filled {
    background: #fff;
    border-color: #fff;
    color: #222;
}

.lfb-btn.style-filled:hover {
    background: transparent;
    color: #fff;
}

/* ========================================
   FLIP ANIMATIONS
   ======================================== */

/* Horizontal Flip (default) */
.lfb-flip-horizontal .lfb-back {
    transform: rotateY(180deg);
}

.lfb-flip-horizontal.lfb-trigger-hover:hover .lfb-flipper,
.lfb-flip-horizontal.lfb-trigger-click.is-flipped .lfb-flipper {
    transform: rotateY(180deg);
}

/* Vertical Flip */
.lfb-flip-vertical .lfb-back {
    transform: rotateX(180deg);
}

.lfb-flip-vertical.lfb-trigger-hover:hover .lfb-flipper,
.lfb-flip-vertical.lfb-trigger-click.is-flipped .lfb-flipper {
    transform: rotateX(180deg);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 767px) {
    .lfb-container {
        height: 300px;
    }

    .lfb-front-content {
        padding: 20px;
    }

    .lfb-front-title {
        font-size: 18px;
    }

    .lfb-back-content {
        padding: 20px;
    }

    .lfb-back-title {
        font-size: 18px;
    }

    .lfb-back-desc {
        font-size: 13px;
    }

    .lfb-list-item {
        font-size: 12px;
    }

    .lfb-btn {
        padding: 10px 20px;
        font-size: 11px;
    }
}

/* Touch device hint */
@media (hover: none) {
    .lfb-trigger-hover .lfb-flip-icon {
        opacity: 1;
    }
}
