/* Premium Reference Slider Styles */
.references-slider { 
    position: relative; 
    overflow: hidden; 
    padding: 0 2rem; 
    background: transparent;
    border-radius: 16px;
    margin: 2rem 0;
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.references-section-title { 
    text-align: center; 
    margin-bottom: 2rem; 
    font-size: 1.8rem; 
    font-weight: 800;
    background: linear-gradient(90deg, #389033, #06c120, #077a00);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
    animation: text-shine 3s linear infinite;
}

@keyframes text-shine {
    to { background-position: 200% center; }
}

.references-viewport { 
    overflow: hidden; 
    /* Masking for a smooth fade-in/out at the edges */
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    padding: 1rem 0;
}

.references-track { 
    display: flex; 
    gap: 1.5rem; 
    align-items: stretch;
}

/* Container is purely for the image now */
.references-slide { 
    flex: 0 0 auto; 
    width: calc((100% - 6rem) / 10);
    aspect-ratio: 1 / 1;
    position: relative;
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.references-slider:hover .references-slide:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.25);
    z-index: 2;
}

/* The image fills the slide */
.references-bg-image {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: transform 0.5s ease;
}

.references-slider:hover .references-slide:hover .references-bg-image {
    transform: scale(1.05);
}

/* The centered box */
.references-center-box {
    position: relative;
    z-index: 2;
    width: 70%;
    aspect-ratio: 1 / 1;
    perspective: 1000px;
}

.references-box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

/* Flip on hover over the center box */
.references-center-box.has-back:hover .references-box-inner {
    transform: rotateY(180deg);
}

.references-box-front, .references-box-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 12px; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.references-box-front {
    background: rgba(0, 0, 0, 0.2); 
    border: 1px solid rgba(255,255,255,0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    /* Pushed forward in 3D space */
    transform: rotateY(0deg) translateZ(30px);
}

.references-box-back {
    background: rgba(0, 0, 0, 0.2); 
    border: 1px solid rgba(255,255,255,0.2);
    /* Rotated and pushed backward (in local rotated space, this pushes it "out" the other way) */
    transform: rotateY(180deg) translateZ(30px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.references-title { 
    margin: 0; 
    font-size: 1.15rem; 
    font-weight: 800;
    color: #fff; 
    text-shadow: 0 1px 4px rgba(0,0,0,0.8);
    letter-spacing: 0.5px;
}

.references-desc { 
    margin: 0; 
    font-size: 0.8rem; 
    color: #fff; 
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    line-height: 1.4;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
  .references-slide { width: calc((100% - 3rem) / 6); }
}
@media (max-width: 600px) {
  .references-slide { width: calc((100% - 1.5rem) / 4); }
}
