/* Trending Software Carousel */
.trending-section {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 20px;
}

.trending-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.trending-title {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 12px;
}

.trending-title i {
    color: #02AAD3;
    font-size: 1.8rem;
}

.trending-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #e2e8f0;
    background: white;
    color: #4a5568;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #02AAD3;
    color: #02AAD3;
    transform: translateY(-2px);
}

.filter-btn.active {
    background: linear-gradient(135deg, #02AAD3 0%, #0189A8 100%);
    color: white;
    border-color: transparent;
}

.trending-carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #f7fafc;
    padding: 20px 0;
}

.trending-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 20px 20px 20px;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.trending-carousel::-webkit-scrollbar {
    height: 8px;
}

.trending-carousel::-webkit-scrollbar-track {
    background: #edf2f7;
    border-radius: 10px;
}

.trending-carousel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #02AAD3 0%, #0189A8 100%);
    border-radius: 10px;
}

.trending-card {
    min-width: 320px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.trending-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(2, 170, 211, 0.2);
}

.trending-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.trending-image-container {
    position: relative;
    height: 180px;
    background: linear-gradient(135deg, #02AAD3 0%, #0189A8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.trending-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #02AAD3;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.trending-badge i {
    font-size: 0.8rem;
}

.trending-image {
    width: 100px;
    height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.trending-card:hover .trending-image {
    transform: scale(1.1) rotate(5deg);
}

.trending-content {
    padding: 16px;
}

.trending-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6rem;
}

.trending-category {
    display: inline-block;
    background: #E6F7FB;
    color: #02AAD3;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.trending-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: #718096;
}

.trending-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trending-stat i {
    color: #02AAD3;
}

.trending-rating-stars {
    color: #f59e0b;
}

.trending-description {
    font-size: 0.85rem;
    color: #718096;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
    min-height: 2.6rem;
}

.trending-download-btn {
    width: 100%;
    background: linear-gradient(135deg, #02AAD3 0%, #0189A8 100%);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.trending-download-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(2, 170, 211, 0.4);
    background: linear-gradient(135deg, #0189A8 0%, #016B88 100%);
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.carousel-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.carousel-btn:hover {
    background: linear-gradient(135deg, #02AAD3 0%, #0189A8 100%);
    color: white;
    border-color: transparent;
    transform: scale(1.1);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.carousel-btn:disabled:hover {
    background: white;
    color: #4a5568;
    border-color: #e2e8f0;
    transform: scale(1);
}

.loading-trending {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #E6F7FB;
    border-top-color: #02AAD3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .trending-title {
        font-size: 1.5rem;
    }
    
    .trending-card {
        min-width: 280px;
    }
    
    .trending-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .trending-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }
    
    .filter-btn {
        font-size: 0.85rem;
        padding: 6px 16px;
    }
}

@media (max-width: 480px) {
    .trending-card {
        min-width: 260px;
    }
    
    .trending-image-container {
        height: 150px;
    }
    
    .trending-image {
        width: 80px;
        height: 80px;
    }
}