/* Use Cases Section - Premium Project Cards */

.use-cases {
    padding: 6rem 0;
    background: var(--background-light);
}

.use-cases .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.use-cases-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
}

.use-cases-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.use-cases-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Project Cards Container - Match Hero Section Layout */
.project-cards {
    display: flex;
    overflow-x: auto;
    gap: 2rem;
    padding: 2rem 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    margin-top: 3rem;
    position: relative;
}

.project-cards::-webkit-scrollbar {
    display: none; /* Chrome/Safari/Opera */
}

/* Ensure first and last items have proper spacing */
.project-cards::after {
    content: '';
    min-width: 1.5rem;
    height: 1px;
    display: block;
    flex-shrink: 0;
}

/* Individual Project Card - Wider Cards, Same Height */
.project-card {
    width: 480px;
    min-width: 480px;
    max-width: 500px;
    flex: 0 0 auto;
    scroll-snap-align: center;
    background: var(--background-light);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 780px; /* Fixed height for equal cards */
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

/* Project Image Carousel - Fixed Height, Maintain Aspect Ratio */
.project-image-carousel {
    width: 100%;
    height: 420px;
    min-height: 420px;
    max-height: 420px;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
    flex-shrink: 0;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-track img:first-child {
    position: relative;
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    opacity: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.carousel-prev {
    left: 10px;
}

.carousel-next {
    right: 10px;
}

.project-card:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.carousel-btn i {
    color: var(--text-primary);
    font-size: 0.875rem;
}

/* Carousel Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicators .indicator.active {
    background: rgba(255, 255, 255, 1);
    width: 24px;
    border-radius: 4px;
}

.carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

/* Project Content - Optimized Text Layout */
.project-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0; /* Allow flex shrinking */
}

.project-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.project-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 0 1 auto;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Project Facts - Optimized Spacing */
.project-facts {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    min-height: 0;
}

.project-facts li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.project-facts li i {
    color: var(--primary-color);
    font-size: 0.875rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
    width: 16px;
}

.project-facts li strong {
    color: var(--text-primary);
    font-weight: 600;
    margin-right: 0.25rem;
}

/* Project Button */
.project-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1.5rem;
    background: var(--gradient-accent);
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    margin-top: auto;
    width: 100%;
    flex-shrink: 0;
}

.project-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.project-btn:active {
    transform: translateY(0);
}

.project-btn i {
    transition: transform 0.3s ease;
}

.project-btn:hover i {
    transform: translateX(4px);
}

/* Responsive Design */
@media (max-width: 1400px) {
    .project-card {
        width: 440px;
        min-width: 440px;
        max-width: 460px;
        height: 740px;
    }
    
    .project-image-carousel {
        height: 420px;
        min-height: 420px;
        max-height: 420px;
    }
}

@media (max-width: 1024px) {
    .project-cards {
        padding: 2rem 0;
    }
    
    .project-card {
        width: 400px;
        min-width: 400px;
        max-width: 420px;
        height: 720px;
    }
    
    .project-image-carousel {
        height: 360px;
        min-height: 360px;
        max-height: 360px;
    }
    
    .use-cases-header h2 {
        font-size: 2rem;
    }
    
    .use-cases-header p {
        font-size: 1.125rem;
    }
}

@media (max-width: 768px) {
    .use-cases {
        padding: 4rem 0;
    }
    
    .use-cases-header {
        margin-bottom: 3rem;
        padding: 0 1rem;
    }
    
    .use-cases-header h2 {
        font-size: 1.75rem;
    }
    
    .use-cases-header p {
        font-size: 1rem;
    }
    
    .project-cards {
        padding: 2rem 0;
    }
    
    .project-card {
        width: 320px;
        min-width: 320px;
        max-width: 340px;
        height: 680px;
    }
    
    .project-image-carousel {
        height: 320px;
        min-height: 320px;
        max-height: 320px;
    }
    
    .project-content {
        padding: 1.25rem;
    }
    
    .project-content h3 {
        font-size: 1.125rem;
    }
    
    .project-description {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }
    
    .project-facts li {
        font-size: 0.8125rem;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .use-cases {
        padding: 3rem 0;
    }
    
    .project-card {
        width: 280px;
        min-width: 280px;
        max-width: 300px;
        height: 640px;
    }
    
    .project-image-carousel {
        height: 280px;
        min-height: 280px;
        max-height: 280px;
    }
    
    .project-content {
        padding: 1rem;
    }
}

