/* ============ استایل‌های صفحه دانلود ============ */

.downloads-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 80px 0 !important;
    margin-bottom: 30px;
}

.download-stats {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 10px;
}

.stat-item i {
    color: var(--accent-color);
}

.download-icon {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ============ دسته‌بندی‌ها ============ */
.categories-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.category-btn {
    padding: 12px 24px;
    border: none;
    background: white;
    border-radius: 50px;
    color: #495057;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-btn i {
    font-size: 1.1rem;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44,75,77,0.3);
}

/* ============ جستجو ============ */
.search-section {
    background: white;
}

.search-form .form-control {
    border-radius: 50px 0 0 50px;
    padding: 15px 25px;
    border: 2px solid #e9ecef;
    border-left: none;
}

.search-form .btn {
    border-radius: 0 50px 50px 0;
    padding: 15px 30px;
    border: 2px solid var(--primary-color);
}

/* ============ کارت دانلود ============ */
.download-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.download-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(44,75,77,0.15);
}

.download-header {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    gap: 15px;
}

.download-icon {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.download-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.download-type {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
    width: fit-content;
}

.product-badge {
    background: rgba(44,75,77,0.1);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.85rem;
}

.product-badge a {
    color: var(--primary-color);
}

.download-body {
    padding: 20px;
    flex: 1;
}

.download-title {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
    line-height: 1.4;
}

.download-description {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #495057;
    font-size: 0.85rem;
}

.meta-item i {
    color: var(--primary-color);
}

.version-info {
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.download-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.download-btn {
    border-radius: 50px;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-group {
    display: flex;
    gap: 5px;
}

.btn-group .btn {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============ محبوب‌ترین دانلودها ============ */
.popular-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
    position: relative;
    height: 100%;
}

.popular-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.popular-rank {
    position: absolute;
    top: -10px;
    left: -10px;
}

.rank-badge {
    width: 30px;
    height: 30px;
    background: var(--accent-color);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}

.popular-icon {
    width: 60px;
    height: 60px;
    background: rgba(44,75,77,0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.popular-info {
    flex: 1;
}

.popular-info h6 {
    color: var(--primary-color);
    margin-bottom: 5px;
    font-weight: 600;
}

.popular-meta {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.popular-download-btn {
    width: 40px;
    height: 40px;
    background: rgba(44,75,77,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s;
}

.popular-download-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* ============ صفحه‌بندی ============ */
.pagination {
    gap: 5px;
}

.page-item .page-link {
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    margin: 0 3px;
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: white;
}

.page-item .page-link:hover {
    background: var(--primary-light);
    color: white;
}

/* ============ حالت خالی ============ */
.empty-state {
    background: white;
    border-radius: 15px;
    padding: 50px 20px;
}

.empty-state i {
    color: #dee2e6;
}

/* ============ مودال اطلاعات فایل ============ */
.file-info {
    padding: 10px;
}

.file-info > div {
    border-bottom: 1px solid #e9ecef;
    padding: 10px 0;
}

.file-info > div:last-child {
    border-bottom: none;
}

.file-info strong {
    color: var(--primary-color);
    min-width: 120px;
    display: inline-block;
}

/* ============ ریسپانسیو ============ */
@media (max-width: 768px) {
    .downloads-header {
        padding: 60px 0 !important;
        text-align: center;
    }
    
    .download-stats {
        justify-content: center;
    }
    
    .categories-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .category-btn {
        flex-shrink: 0;
    }
    
    .download-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .download-btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-group {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .download-header {
        flex-direction: column;
        text-align: center;
    }
    
    .download-info {
        align-items: center;
    }
    
    .download-meta {
        justify-content: center;
    }
}