/* لایت‌بکس فول اسکرین با ناوبری - آفلاین */
.famad-gallery-lightbox-trigger {
    cursor: pointer;
}

.famad-custom-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 999999;
    text-align: center;
    cursor: pointer;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
    position: relative;
}

.famad-custom-lightbox img {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    cursor: default;
}

.famad-custom-lightbox .close-lightbox {
    position: absolute;
    top: 20px;
    right: 25px;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;
    margin: 0;

    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;

    background: rgba(0, 0, 0, 0.55);
    color: #fff;

    font-size: 34px;
    font-family: Arial, sans-serif;
    font-weight: 300;
    line-height: 1;

    cursor: pointer;
    z-index: 20;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.famad-custom-lightbox .close-lightbox:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

.famad-custom-lightbox .close-lightbox:active {
    transform: rotate(90deg) scale(0.92);
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 40px;
    font-weight: bold;
    padding: 7px 20px;
    cursor: pointer;
    border-radius: 50%;
    transition: 0.2s;
    z-index: 10;
}

.lightbox-prev {
    right: 20px;
}

.lightbox-next {
    left: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(0, 0, 0, 0.9);
    color: #ffcc00;
}

.lightbox-counter {
    margin-top: 20px;
    color: #fff;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 12px;
    border-radius: 20px;
    display: inline-block;
    font-family: sans-serif;
}

/* ریسپانسیو برای موبایل */
@media (max-width: 768px) {

    .lightbox-prev,
    .lightbox-next {
        font-size: 28px;
        padding: 6px 12px;
    }

    .famad-custom-lightbox img {
        max-width: 95%;
        max-height: 80%;
    }

    .close-lightbox {
        top: 15px;
        right: 20px;
        font-size: 35px;
    }
}