/* ===== USE CASES SECTION STYLES ===== */
/* Carousel with embedded YouTube videos */

.use-cases-container {
    padding: 6rem 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

.use-cases-container .section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.use-cases-container .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 1rem;
}

.use-cases-container .section-subtitle {
    font-size: 1.25rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* Carousel Structure */
.use-cases-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.carousel-track-container {
    flex: 1;
    overflow: visible;
    position: relative;
    /* Mask for fade effect on sides */
    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%);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem 0;
}

/* Use Case Card */
.use-case-card {
    flex: 0 0 70%;
    min-width: 70%;
    margin: 0 2%;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
    transform: scale(0.92);
}

.use-case-card.active {
    opacity: 1;
    transform: scale(1);
    box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.2);
}

/* Video Container */
.use-case-video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    overflow: hidden;
}

.use-case-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.use-case-thumbnail:hover {
    transform: scale(1.02);
}

.use-case-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play Button Overlay */
.play-button-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.use-case-thumbnail:hover .play-button-overlay {
    transform: translate(-50%, -50%) scale(1.1);
}

.play-icon {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
}

.play-icon .play-bg {
    transition: fill 0.2s ease;
}

.use-case-thumbnail:hover .play-icon .play-bg {
    fill: #cc0000;
}

/* Embedded Player */
.use-case-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.use-case-player iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Card Content */
.use-case-content {
    padding: 1.5rem 2rem 2rem;
}

.use-case-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4a5568;
    background: #e2e8f0;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.use-case-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.use-case-subtitle {
    font-size: 1rem;
    color: #4b5563;
    margin: 0 0 0.75rem 0;
    font-weight: 500;
}

.use-case-description {
    font-size: 0.9375rem;
    color: #6b7280;
    margin: 0 0 1.25rem 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Action Buttons */
.use-case-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-watch-fullscreen,
.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-watch-fullscreen {
    background: #2d3748;
    color: #ffffff;
    border: none;
}

.btn-watch-fullscreen:hover {
    background: #1a202c;
    transform: translateY(-1px);
}

.btn-download-pdf {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-download-pdf:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

/* Navigation Arrows */
.carousel-nav {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    color: #374151;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.carousel-nav:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    transform: scale(1.05);
}

.carousel-nav:active {
    transform: scale(0.95);
}

.carousel-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Navigation Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.carousel-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    /* Ensure 44x44 touch target with padding */
    position: relative;
}

.carousel-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.carousel-dot:hover {
    background: #9ca3af;
}

.carousel-dot.active {
    background: #2d3748;
    transform: scale(1.2);
}

/* Video Modal (Fullscreen) */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    visibility: visible;
}

.video-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 1;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.video-modal-close:hover {
    transform: scale(1.1);
}

.video-modal-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
}

.video-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Loading State */
.use-cases-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.use-cases-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #2d3748;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.use-cases-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 16px;
    border: 2px dashed #e5e7eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .use-cases-container {
        padding: 4rem 0;
    }
    
    .use-cases-container .section-title {
        font-size: 2rem;
    }
    
    .use-cases-container .section-subtitle {
        font-size: 1rem;
    }
    
    .carousel-wrapper {
        flex-direction: column;
    }
    
    .carousel-nav {
        display: none; /* Hide arrows on mobile, use swipe/dots */
    }
    
    .carousel-track-container {
        width: 100%;
        /* Adjust mask for mobile */
        mask-image: linear-gradient(to right, 
            transparent 0%, 
            black 5%, 
            black 95%, 
            transparent 100%);
        -webkit-mask-image: linear-gradient(to right, 
            transparent 0%, 
            black 5%, 
            black 95%, 
            transparent 100%);
    }
    
    .use-case-card {
        flex: 0 0 85%;
        min-width: 85%;
        margin: 0 auto;
    }
    
    .carousel-track {
        justify-content: center;
    }
    
    .use-case-content {
        padding: 1.25rem 1.5rem 1.5rem;
    }
    
    .use-case-title {
        font-size: 1.25rem;
    }
    
    .use-case-actions {
        flex-direction: column;
    }
    
    .btn-watch-fullscreen,
    .btn-download-pdf {
        justify-content: center;
        width: 100%;
    }
    
    .video-modal-close {
        top: -40px;
        right: 0;
    }
}

@media (max-width: 480px) {
    .use-cases-carousel {
        padding: 0 0.5rem;
    }
    
    .use-case-card {
        flex: 0 0 90%;
        min-width: 90%;
        margin: 0 auto;
    }
    
    .use-case-content {
        padding: 1rem;
    }
    
    .use-case-title {
        font-size: 1.125rem;
    }
    
    .use-case-subtitle {
        font-size: 0.9375rem;
    }
    
    .use-case-description {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
    }
}
