﻿/* استایل lightbox */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}
.lightbox-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 95%;
    max-height: 95%;
    padding: 20px;
    text-align: center;
    position: relative; /* برای position فلش‌ها */
}
.lightbox-number {
    background: rgba(139, 0, 0, 0.8); /* قرمز تیره */
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 18px; /* فونت درشت‌تر */
    font-weight: bold;
    margin-bottom: 15px;
    min-width: 60px;
    direction: rtl; /* راست به چپ برای فارسی */
    text-align: center; /* وسط کادر */
    unicode-bidi: embed; /* برای RTL بهتر */
}
.lightbox-img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
    display: block;
    margin-bottom: 15px;
    transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out; /* ترانزیشن اسلاید + fade */
    transform: translateX(0);
    position: relative;
}
.lightbox-img.slide-out-next {
    transform: translateX(-100%);
    opacity: 0;
}
.lightbox-img.slide-in-prev {
    transform: translateX(100%);
    opacity: 0;
}
.lightbox-img.slide-out-prev {
    transform: translateX(100%);
    opacity: 0;
}
.lightbox-img.slide-in-next {
    transform: translateX(0);
    opacity: 1;
}
.lightbox-title {
    background: white;
    color: black;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 16px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    overflow: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    direction: rtl; /* راست به چپ برای فارسی */
    font-family: 'Byekan', sans-serif; /* فونت Byekan با fallback */
    unicode-bidi: embed; /* برای RTL بهتر */
    transition: opacity 0.4s ease; /* fade برای title */
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    color: black;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: background 0.3s;
}
.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.4);
}
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1)); /* گرادیان فانتزی */
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    transition: all 0.3s ease; /* انیمیشن hover */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.2); /* سایه و درخشش فانتزی */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* سایه متن برای عمق */
}
.lightbox-arrow:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2));
    transform: translateY(-50%) scale(1.1); /* بزرگ شدن در hover */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.lightbox-prev {
    left: -70px;
}
.lightbox-next {
    right: -70px;
}
.lightbox-prev::before {
    content: '◀'; /* آیکون فانتزی فلش چپ (دایره‌ای یا مثلثی) */
    font-size: 24px;
    color: white;
}
.lightbox-next::before {
    content: '▶'; /* آیکون فانتزی فلش راست */
    font-size: 24px;
    color: white;
}
@media (max-width: 768px) {
    .lightbox-number {
        font-size: 16px; /* درشت‌تر در موبایل */
        padding: 6px 12px;
        direction: rtl; /* RTL در موبایل هم */
        background: rgba(139, 0, 0, 0.8); /* قرمز تیره در موبایل هم */
        text-align: center; /* وسط کادر در موبایل هم */
    }
    .lightbox-title {
        font-size: 14px;
        padding: 8px 12px;
        max-height: 100px;
        direction: rtl; /* RTL برای title اگر فارسی باشه */
        font-family: 'Byekan', sans-serif; /* فونت Byekan در موبایل هم */
    }
    .lightbox-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    .lightbox-arrow {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    .lightbox-prev {
        left: 10px;
    }
    .lightbox-next {
        right: 10px;
    }
    .lightbox-prev::before, .lightbox-next::before {
        font-size: 20px;
    }
}