/* انیمیشن‌ها */
.animate-fade-in {
    opacity: 0;
    animation: fadeIn 1s ease forwards;
}

.animate-slide-up {
    opacity: 0;
    transform: translateY(30px);
    animation: slideUp 0.8s ease forwards;
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(-30px);
    animation: slideRight 0.8s ease forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-bounce-in {
    opacity: 0;
    transform: scale(0.3);
    animation: bounceIn 1s ease forwards;
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(30px);
    animation: slideLeft 0.8s ease forwards;
}

.animate-zoom-in {
    opacity: 0;
    transform: scale(0.8);
    animation: zoomIn 0.8s ease forwards;
}

/* تعریف انیمیشن‌ها */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.7) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* تأخیر در انیمیشن‌ها */
.animate-delay-1 {
    animation-delay: 0.2s;
}

.animate-delay-2 {
    animation-delay: 0.4s;
}

.animate-delay-3 {
    animation-delay: 0.6s;
}

.animate-delay-4 {
    animation-delay: 0.8s;
}

.animate-delay-5 {
    animation-delay: 1s;
}

/* استایل‌های اضافی برای المان‌های انیمیشن‌دار */
.parallax {
    transition: transform 0.1s ease-out;
}

.project-card {
    transition: transform 0.3s ease;
}

.counter {
    font-variant-numeric: tabular-nums;
}

.section-hidden {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.section-visible {
    opacity: 1;
    transform: translateY(0);
}

.modal.active .modal-content {
    animation: modalFadeIn 0.5s ease forwards;
}

/* استایل‌های مدال پروژه */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.project-modal.active {
    display: flex;
}

.project-modal-content {
    background: var(--card-bg);
    border-radius: 15px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border-color);
}

.project-modal-header {
    padding: 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--header-bg);
    border-radius: 15px 15px 0 0;
}

.project-modal-title {
    font-size: 1.8rem;
    color: var(--primary);
    margin: 0;
    font-weight: 700;
}

.close-project-modal {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-project-modal:hover {
    color: var(--text-primary);
    background: var(--hover-bg);
}

.project-modal-body {
    padding: 25px;
}

.project-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 25px;
}

.project-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.project-info-list {
    margin-top: 20px;
}

.info-row {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.info-label {
    font-weight: 700;
    width: 120px;
    color: var(--primary);
    flex-shrink: 0;
}

.info-value {
    flex: 1;
    color: var(--text-primary);
}

.project-full-description {
    margin-top: 25px;
    line-height: 1.8;
    color: var(--text-primary);
}

.project-technologies {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.tech-badge {
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* ریسپانسیو برای مدال */
@media (max-width: 768px) {
    .project-details-grid {
        grid-template-columns: 1fr;
    }
    
    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .project-modal-content {
        margin: 10px;
    }
    
    .project-modal-header {
        padding: 20px;
    }
    
    .project-modal-body {
        padding: 20px;
    }
}