/* Gallery design in all */
.main_gallery {
    height: 220px;
}

.main__gallery-inner {
    cursor: pointer;
    position: relative;
    width: 300px;
    height: 250px;
}

.main__gallery-text {
    position: relative;
}

.main__gallery-text::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-purple));
    bottom: -3px;
    border-radius: 10px;
}

.gallery-text-date::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: var(--primary-blue);
    border-radius: 50%;
    bottom: -17px;
    left: 0;
}

.gallery-text-title::before {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: var(--primary-purple);
    border-radius: 50%;
    bottom: -17px;
    right: 0;
}

.main__gallery-img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
    transition: all 0.3s ease;
    transform: translateY(0px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    filter: brightness(0.5) contrast(0.8);
}

.main__gallery-inner:hover .main__gallery-img,
.main__gallery-inner:hover .main__gallery-text,
.main__gallery-inner:focus .main__gallery-text,
.main__gallery-inner:focus .main__gallery-img {
    transform: translateY(-10px);
}

.main__gallery-inner:hover .main__gallery-img,
.main__gallery-inner:focus .main__gallery-img {
    filter: none;
}

.main__gallery-inner:focus .main__gallery-text,
.main__gallery-inner:hover .main__gallery-text {
    opacity: 0;
    visibility: hidden;
}

/* استایل‌های سفارشی گالری */
.gallery-item {
    margin-bottom: 20px !important;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

.gallery-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.5s ease;
}

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

.image-max-height{
    max-height: 100vh !important;
}
/* مودال تصاویر */
#modalImage {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.image-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.image-modal.show {
    display: flex;
    animation: fadeIn 0.4s ease forwards;
}

/* محتوای مودال */
.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    max-width: 1500px;
}

.image-max-height {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 10px;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.6);
    transition: transform 0.3s ease;
}

.image-max-height:hover {
    transform: scale(1.02);
}

/* دکمه بستن */
.close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.2s ease;
}
.close-btn:hover {
    color: #ff4d4d;
}

/* دکمه‌های ناوبری */
.btn-nav {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: background 0.3s ease;
}

.btn-nav:hover,
.btn-nav:active {
    background: rgba(255, 255, 255, 0.3);
}

#prevBtn {
    padding: 6px 10px 6px 14px;
    margin-left: 10px;
}

#nextBtn {
    padding: 6px 14px 6px 10px;
    margin-right: 10px;
}

/* افکت fade */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 767px) {
    .close-btn {
        font-size: 2rem !important;
    }
}