/* استایل‌های صفحه نمونه کارها */

/* هدر نمونه کارها */
.portfolio-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 70px;
}

.portfolio-title {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1rem;
    font-family: 'Vazir', 'Tanha', sans-serif;
    font-weight: bold;
}

.portfolio-subtitle {
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* بخش دسته‌بندی‌ها */
.categories-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    font-size: 2.8rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1rem;
    font-family: 'Vazir', 'Tanha', sans-serif;
    font-weight: bold;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* گرید دسته‌بندی‌ها */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.category-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.category-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.category-content {
    padding: 1.5rem;
    text-align: center;
}

.category-title {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-family: 'Vazir', 'Tanha', sans-serif;
    font-weight: 600;
}

.category-count {
    font-size: 0.9rem;
    color: #666;
    background: #f8f9fa;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
}

.category-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #FFD700;
    color: #2c3e50;
    border: none;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazir', 'Tanha', sans-serif;
    margin-top: 1rem;
}

.category-btn:hover {
    background: #FFC400;
}

/* گالری تصاویر */
.portfolio-gallery {
    padding: 80px 0;
    background: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.gallery-category {
    font-size: 0.9rem;
    color: #FFD700;
    background: rgba(255, 215, 0, 0.1);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
}

/* دکمه مشاهده بیشتر */
.view-more-container {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

#loadMoreBtn {
    padding: 15px 40px;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #FFD700;
    color: #2c3e50;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

#loadMoreBtn:hover {
    background: #FFC400;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3);
}

.arrow-icon {
    transition: transform 0.3s ease;
}

#loadMoreBtn:hover .arrow-icon {
    transform: translateY(3px);
}

/* مودال نمایش عکس */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.image-modal-content {
    position: relative;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 80vh;
    overflow: hidden;
}

.image-modal-content img {
    width: 100%;
    max-height: 60vh;
    object-fit: contain;
    border-radius: 10px;
    display: block;
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 25px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: rotate(90deg);
}

.image-info {
    background: white;
    padding: 1.5rem;
    border-radius: 0 0 10px 10px;
    text-align: right;
    direction: rtl;
}

.image-info h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-family: 'Vazir', 'Tanha', sans-serif;
}

.image-info p {
    color: #666;
    line-height: 1.6;
}

/* استایل‌های واکنش‌گرا */
@media (max-width: 768px) {
    .portfolio-hero {
        padding: 100px 0 60px;
    }
    
    .portfolio-title {
        font-size: 2.5rem;
    }
    
    .portfolio-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1rem;
    }
    
    .image-modal-content {
        margin: 10% auto;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .portfolio-title {
        font-size: 2rem;
    }
    
    .portfolio-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        margin: 0 auto;
        max-width: 320px;
    }
}

/* انیمیشن‌های ظریف */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-card, .gallery-item {
    animation: slideUp 0.5s ease;
    animation-fill-mode: both;
}

.category-card:nth-child(1) { animation-delay: 0.1s; }
.category-card:nth-child(2) { animation-delay: 0.2s; }
.category-card:nth-child(3) { animation-delay: 0.3s; }
.category-card:nth-child(4) { animation-delay: 0.4s; }
.category-card:nth-child(5) { animation-delay: 0.5s; }
.category-card:nth-child(6) { animation-delay: 0.6s; }

/* فیلترهای دسته‌بندی */
.category-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 25px;
    border: 2px solid #FFD700;
    background: transparent;
    color: #2c3e50;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Vazir', 'Tanha', sans-serif;
}

.filter-btn:hover, .filter-btn.active {
    background: #FFD700;
    transform: translateY(-2px);
}

/* لودر */
.loader {
    text-align: center;
    padding: 2rem;
    display: none;
}

.loader.active {
    display: block;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #FFD700;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

/* پیام خالی */
.empty-message {
    text-align: center;
    padding: 4rem;
    color: #666;
    background: #f8f9fa;
    border-radius: 10px;
    grid-column: 1 / -1;
}

.empty-message h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
}