/* ============================================
   MODERN REFERENCES SECTION STYLES
   Auto-scrolling Carousel
   ============================================ */

.references-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.references-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(58, 166, 245, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(58, 166, 245, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.section-header {
    margin-bottom: 70px;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: 'Sen', sans-serif;
    font-size: 48px;
    font-weight: 700;
    color: #1a1a2e;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #0d3a5c, #0a2d4a);
    border-radius: 2px;
}

.section-subtitle {
    font-family: 'Sen', sans-serif;
    font-size: 16px;
    font-weight: 300;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 25px;
    opacity: 0.8;
}

/* Carousel Wrapper */
.references-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 50px 0;
    mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
    -webkit-mask-image: linear-gradient(
        to right,
        transparent 0%,
        black 8%,
        black 92%,
        transparent 100%
    );
}

.references-carousel-track {
    display: flex;
    gap: 30px;
    width: fit-content;
    animation: scroll-right 30s linear infinite;
    will-change: transform;
}

.references-carousel-track:hover {
    animation-play-state: paused;
}

/* Reference Item */
.reference-item {
    flex-shrink: 0;
    width: 350px;
}

/* Reference Card */
.reference-card {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 280px;
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: transparent;
    box-shadow: none; /* kart gölgesini kaldır */
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    padding: 40px;
}

/* kartların arka plan parıltısını kapat */
.reference-card::before {
    content: '';
    display: none;
}

.reference-card:hover {
    transform: scale(1.05);
}

.reference-logo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.reference-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
}

.reference-card:hover .reference-logo img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.2);
}

/* Scroll Animation - Infinite Loop */
@keyframes scroll-right {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-350px * 10 - 30px * 10));
    }
}

/* Ensure smooth infinite scroll */
.references-carousel-track {
    animation: scroll-right 45s linear infinite;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .reference-item {
        width: 320px;
    }
    
    .reference-card {
        height: 260px;
    }
    
    @keyframes scroll-right {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-320px * 10 - 30px * 10));
        }
    }
}

@media (max-width: 1200px) {
    .reference-item {
        width: 300px;
    }
    
    .reference-card {
        height: 240px;
        padding: 35px;
    }
    
    @keyframes scroll-right {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-300px * 10 - 30px * 10));
        }
    }
}

@media (max-width: 992px) {
    .references-section {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 40px;
    }
    
    .reference-item {
        width: 280px;
    }
    
    .reference-card {
        height: 220px;
        padding: 30px;
    }
    
    .references-carousel-track {
        gap: 25px;
    }
    
    @keyframes scroll-right {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-280px * 10 - 25px * 10));
        }
    }
}

@media (max-width: 768px) {
    .references-section {
        padding: 60px 0;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-subtitle {
        font-size: 14px;
    }
    
    .reference-item {
        width: 250px;
    }
    
    .reference-card {
        height: 200px;
        padding: 25px;
    }
    
    .references-carousel-track {
        gap: 20px;
    }
    
    .references-carousel-wrapper {
        padding: 30px 0;
    }
    
    @keyframes scroll-right {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-250px * 10 - 20px * 10));
        }
    }
}

@media (max-width: 576px) {
    .section-title {
        font-size: 28px;
    }
    
    .reference-item {
        width: 220px;
    }
    
    .reference-card {
        height: 180px;
        padding: 20px;
    }
    
    .references-carousel-track {
        gap: 15px;
    }
    
    @keyframes scroll-right {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(calc(-220px * 10 - 15px * 10));
        }
    }
}
