.gallery-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    overflow: auto;
}



/* استایل گالری */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-gap: 20px;
    padding: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background: #fff;
    cursor: pointer;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .caption {
    transform: translateY(0);
}

/* استایل مودال بزرگنمایی */
.modal {
    display: none;
    position: fixed;
    z-index: 2;
    padding-top: 70px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    text-align: center;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: auto;
    width: auto;
    /* max-height: 80vh; */
    max-height: 600px;
    animation-name: zoom;
    animation-duration: 0.3s;
}

@keyframes zoom {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1);
        opacity: 1;}
}

.close {
    position: absolute;
    top: 55px;
    right: 45px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover {
    color: #bbb;
    transform: scale(1.2);
}

#modalCaption {
    margin: 15px auto;
    display: block;
    width: 80%;
    text-align: center;
    color: #fff;
    font-size: 1.2em;
    padding: 10px 0;
}

/* رسپانسیو برای دستگاه‌های کوچک */
@media (max-width: 600px) {
    .gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-gap: 10px;
        padding: 10px;  
    }
    
    .gallery-item img {
        height: 150px;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 70vh;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
}


