/* --- استایل اصلی گالری (واکنش‌گرا برای موبایل و دسکتاپ) --- */
.my-nice-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
    margin: 20px 0;
    direction: rtl;
}

.my-gallery-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.my-gallery-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.my-gallery-card a {
    display: block;
    text-decoration: none;
}

.my-gallery-img-wrap {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f4f4f4;
}

.my-gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.my-gallery-card:hover .my-gallery-img-wrap img {
    transform: scale(1.05);
}

.my-gallery-caption {
    padding: 12px 15px;
    font-size: 14px;
    color: #444;
    background: #fff;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    font-weight: 500;
}

/* --- بهینه‌سازی و استایل‌دهی به کپشن در حالت لایت‌باکس (بزرگ‌نمایی) --- */
.lb-data .lb-caption {
    font-family: Tahoma, Arial, sans-serif !important;
    font-size: 15px !important;
    font-weight: bold !important;
    color: #ffd700 !important; /* رنگ زرد زیبا برای خوانایی بهتر روی پس‌زمینه تیره */
    line-height: 1.6 !important;
}

.lb-data .lb-number {
    font-family: Tahoma, Arial, sans-serif !important;
    color: #ccc !important;
    font-size: 13px !important;
}

/* --- تنظیمات مخصوص موبایل برای لایت‌باکس و گالری --- */
@media (max-width: 768px) {
    .my-nice-gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* در موبایل عکس‌ها دوتا دوتا کنار هم باشند */
        gap: 10px;
    }
    
    .my-gallery-caption {
        font-size: 12px;
        padding: 8px 10px;
    }
}