
#section-1-3 .client-box {
    backdrop-filter: blur(42px);
    border: solid 2px #0f0;
    box-sizing: border-box;
    border-radius: 15px;
    border-image-slice: 110;
    border-image-repeat: stretch;
    border-image-width: 500px;
    border-image-source: url(../images/home/glass-card.png);
    text-align: center;
    height: 100%;
}

#section-1-3 .client-box img {
    padding: 25px 35px;
}

.new-box {
    backdrop-filter: blur(40px);
    border-radius: 15px;
    -webkit-backdrop-filter: blur(40px);
    height: 8vw;
    width: 100%;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (max-width: 768px) {
    .new-box {
        border-radius: 10px;
        height: 18vw;
        margin-bottom: 15px;
    }

    .client-company-name {
        font-size: 1rem;
        margin-bottom: 4px;
        line-height: 1.1;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    }

    .client-description {
        font-size: 0.8rem;
        line-height: 1.2;
        opacity: 0.95;
    }

    .box-front {
        background-size: 75%;
    }

    .box-back {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .new-box {
        border-radius: 8px;
        height: 22vw;
        margin-bottom: 10px;
    }

    .client-company-name {
        font-size: 0.75rem;
        margin-bottom: 3px;
        line-height: 1.1;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }

    .client-description {
        font-size: 0.55rem;
        line-height: 1.2;
        opacity: 0.95;
    }

    .box-front {
        background-size: 70%;
    }

    .box-back {
        padding: 8px 6px;
    }
}

@media (max-width: 375px) {
    .new-box {
        height: 24vw;
        border-radius: 6px;
    }

    .client-company-name {
        font-size: 0.7rem;
        margin-bottom: 2px;
        line-height: 1.0;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }

    .client-description {
        font-size: 0.5rem;
        line-height: 1.1;
        opacity: 0.95;
    }

    .box-back {
        padding: 6px 4px;
    }

    .box-front {
        background-size: 65%;
    }
}

@media screen and (min-width: 769px) and (max-width: 1366px) {
    .new-box {
        border-radius: 12px;
        height: 7vw;
    }

    .client-company-name {
        font-size: 1.1rem;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .client-description {
        font-size: 0.85rem;
        line-height: 1.3;
    }
}

@media screen and (min-width: 1367px) {
    .new-box {
        height: 8vw;
    }

    .client-company-name {
        font-size: 1.4rem;
        margin-bottom: 8px;
        line-height: 1.2;
    }

    .client-description {
        font-size: 1.1rem;
        line-height: 1.3;
    }
}

.ball {
    position: absolute;
    border-radius: 100%;
    opacity: 0.3;
    z-index: 1000;
}

.box-front {
    border: none;
    box-sizing: border-box;
    border-radius: 15px;
    background-size: 80%;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: white;
    box-shadow: none;
}

.box-back {
    border: none;
    box-sizing: border-box;
    border-radius: 6px;
    background: linear-gradient(135deg, rgba(162, 23, 23, 0.95), rgba(162, 23, 23, 0.85));
    transform: rotateY(180deg);
    color: white;
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.box-back-center {
    position: relative;
    float: left;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.client-company-name {
    font-size: 1.3rem;
    font-weight: bold;
    margin-bottom: 8px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.client-description {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.3;
    font-weight: 300;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

@media screen and (max-width: 950px) {
    .box-back h5 {
        font-size: 0.8rem;
    }
}

.box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -webkit-transform-style: preserve-3d;
    -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -o-transform-style: preserve-3d;
    -o-transition: -o-transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    -moz-transform-style: preserve-3d;
    -moz-transition: -moz-transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/*.new-box:hover .box-inner {*/
/*    transform: rotateY(180deg);*/
/*}*/

/*.new-box:hover {*/
/*    box-shadow: 0 8px 25px rgba(162, 23, 23, 0.2);*/
/*    border: 1px solid rgba(162, 23, 23, 0.3);*/
/*}*/

/*.new-box:hover .box-back {*/
/*    box-shadow: 0 8px 25px rgba(162, 23, 23, 0.3);*/
/*}*/

.box-front,
.box-back {
    position: absolute;
    width: 100%;
    height: 100%;
    /* -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  visibility: visible;
  -webkit-perspective: 0;
  -webkit-tranform: translate3d(0, 0, 0);
  opacity: 1; */
    display: block;
    backface-visibility: hidden;
    -moz-backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -o-backface-visibility: hidden;
}

/* 3D Flip Card Enhancements */
.new-box {
    perspective: 1000px;
}

/* Smooth loading animation */
.new-box .box-front {
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced focus states for accessibility */
.new-box:focus,
.new-box:focus-visible {
    outline: 2px solid rgba(162, 23, 23, 0.6);
    outline-offset: 2px;
}

/* Flip animation with subtle depth */
.new-box:hover {
    transform: translateY(-2px);
    transition: transform 0.3s ease;
}

/* Prevent text selection during flip */
.box-back * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .new-box {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    /* Auto-flip on touch devices since hover doesn't work well */
    .new-box:active .box-inner,
    .new-box:focus .box-inner {
        transform: rotateY(180deg);
    }

    /* Reduce animation complexity on mobile for better performance */
    .box-inner {
        transition: transform 0.4s ease;
    }

    /* Better spacing for touch targets */
    .new-box {
        min-height: 60px;
    }

    /* Fix potential overflow issues */
    .box-front,
    .box-back {
        overflow: hidden;
    }

    /* Ensure proper grid alignment on mobile */
    .mobile-mx-auto {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}
