/* ===== MODERN TRENDING UI DESIGN ===== */

/* Skeuomorphic Trending Header */
.modern-trending-header {
    background: linear-gradient(145deg, #f0f2f5, #e8eaed, #ddd);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.25),
        0 5px 15px rgba(0, 0, 0, 0.12),
        inset 0 3px 6px rgba(255, 255, 255, 0.9),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        inset 1px 0 2px rgba(255, 255, 255, 0.7),
        inset -1px 0 2px rgba(0, 0, 0, 0.1);
    border: 3px solid #c0c4c8;
    position: relative;
}

.modern-trending-header::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 18px 18px 0 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.trending-title-section {
    flex: 1;
    min-width: 300px;
}

.trending-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-family: 'Baloo 2', cursive;
}

.trending-subtitle {
    font-size: 1.2rem;
    color: #64748b;
    margin: 0;
    font-weight: 500;
}

.header-stats {
    display: flex;
    gap: 20px;
}

/* Skeuomorphic Trending Stats */
.trending-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    background: linear-gradient(145deg, #ff6b35, #f7931e, #ff8c42);
    border-radius: 12px;
    box-shadow: 
        0 8px 20px rgba(255, 107, 53, 0.3),
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.3),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid #e55a00;
    min-width: 140px;
    position: relative;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), rgba(255,255,255,0.2), rgba(255,255,255,0.6));
    border-radius: 10px 10px 0 0;
}

.stat-icon {
    font-size: 1.5rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.2rem;
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Featured Trending Banner */
.featured-trending-banner {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 50%, #ff8c42 100%);
    border-radius: 18px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 
        0 12px 30px rgba(255, 107, 53, 0.3),
        0 6px 15px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    border: 2px solid #e55a00;
    position: relative;
    overflow: visible;
    min-height: 140px;
}

.featured-trending-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
    pointer-events: none;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 1;
    min-height: 120px;
}

.banner-text {
    flex: 1;
    min-width: 300px;
}

.banner-text h2 {
    font-size: 1.8rem;
    color: white;
    margin: 0 0 8px 0;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.banner-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.trending-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.info-icon {
    font-size: 1.1rem;
}

.refresh-btn {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.refresh-btn:hover {
    background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    transform: translateY(1px);
}

.refresh-btn:active {
    background: linear-gradient(145deg, #d9d9d9, #f0f0f0);
    box-shadow: 
        inset 0 2px 4px rgba(0,0,0,0.2),
        inset 0 -2px 4px rgba(255,255,255,0.8);
    transform: translateY(2px);
}

.btn-icon {
    font-size: 1.1rem;
}

/* Trending Navigation Tabs */
.trending-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.trending-tab {
    background: linear-gradient(145deg, #ffffff, #e6e6e6);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.2),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
}

.trending-tab::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.8), rgba(255,255,255,0.4), rgba(255,255,255,0.8));
    border-radius: 10px 10px 0 0;
}

.trending-tab:hover {
    background: linear-gradient(145deg, #f0f0f0, #d9d9d9);
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.3),
        inset 0 2px 4px rgba(255,255,255,0.9),
        inset 0 -2px 4px rgba(0,0,0,0.1);
    transform: translateY(1px);
}

.trending-tab.active {
    background: linear-gradient(145deg, #ff6b35, #f7931e);
    color: white;
    border-color: #e55a00;
    box-shadow: 
        0 6px 15px rgba(255, 107, 53, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.2),
        inset 0 -2px 4px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.tab-icon {
    font-size: 1.1rem;
}

.tab-text {
    font-size: 0.9rem;
}

/* Trending Content Grid */
.trending-content-grid {
    background: linear-gradient(145deg, #f9fafb, #f3f4f6);
    border: 2px solid #d4d4d4;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 
        0 6px 12px rgba(0,0,0,0.12),
        inset 0 2px 4px rgba(255,255,255,0.8),
        inset 0 -2px 4px rgba(0,0,0,0.08);
    position: relative;
    margin-bottom: 20px;
}

.trending-content-grid::before {
    content: '';
    position: absolute;
    top: 1px;
    left: 1px;
    right: 1px;
    height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.9), rgba(255,255,255,0.5), rgba(255,255,255,0.9));
    border-radius: 14px 14px 0 0;
}

.trending-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Trending Project Cards */
.trending-project-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border: 2px solid #d4d4d4;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
    box-shadow: 
        0 4px 8px rgba(0,0,0,0.1),
        inset 0 1px 2px rgba(255,255,255,0.9);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.trending-project-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 8px 20px rgba(0,0,0,0.15),
        inset 0 1px 2px rgba(255,255,255,0.9);
    border-color: #ff6b35;
}

.trending-project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #f7931e);
    border-radius: 10px 10px 0 0;
}

.project-thumbnail {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.project-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trending-project-card:hover .project-thumbnail img {
    transform: scale(1.05);
}

.project-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.project-category {
    font-size: 0.9rem;
    color: #6b7280;
    background: linear-gradient(145deg, #e9ecef, #dee2e6);
    border: 1px solid #d1d5db;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-bottom: 10px;
    box-shadow: 
        0 2px 4px rgba(0,0,0,0.1),
        inset 0 1px 2px rgba(255,255,255,0.8);
}

.project-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
}

.stat-group {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #6b7280;
    font-size: 0.9rem;
}

.stat-icon {
    font-size: 1rem;
}

.trending-rank {
    background: linear-gradient(145deg, #ff6b35, #f7931e);
    color: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(255, 107, 53, 0.3);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.spinner-icon {
    font-size: 3rem;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
    display: block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    font-size: 1.1rem;
    margin: 0;
    color: #6b7280;
}

/* No Trending Message */
.no-trending {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-trending-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.6;
    display: block;
}

.no-trending h3 {
    font-size: 1.5rem;
    color: #495057;
    margin: 0 0 10px 0;
}

.no-trending p {
    font-size: 1rem;
    margin: 0;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .trending-list {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .trending-title {
        font-size: 2.4rem;
    }
    
    .header-stats {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .trending-title {
        font-size: 2rem;
    }
    
    .trending-subtitle {
        font-size: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .trending-stats {
        justify-content: center;
    }
    
    .banner-content {
        flex-direction: column;
        text-align: center;
        min-height: auto;
    }
    
    .banner-text {
        min-width: auto;
        width: 100%;
    }
    
    .banner-text h2 {
        font-size: 1.5rem;
    }
    
    .trending-nav {
        flex-direction: column;
        align-items: center;
    }
    
    .trending-tab {
        width: 200px;
        justify-content: center;
    }
    
    .trending-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .modern-trending-header,
    .featured-trending-banner,
    .trending-content-grid {
        padding: 20px;
    }
    
    .trending-title {
        font-size: 1.8rem;
    }
    
    .stat-item {
        padding: 12px 16px;
        min-width: 120px;
    }
    
    .trending-tab {
        width: 100%;
        max-width: 200px;
    }
}