﻿p {
    text-align: justify;
}
.image-box {
    position: relative;
    display: inline-block; /* اندازه figure با img یکی میشه */
    margin: 0; /* مطمئن شدن از نبود فاصله اضافی */
    padding: 0;
}

    .image-box img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 8px;
        cursor: zoom-in;
    }

    /* آیکون 🔍 روی عکس */
    .image-box .zoom-icon {
        position: absolute;
        top: 8px;
        right: 8px;
        background: rgb(0 0 0 / 21%);
        color: white;
        border-radius: 50%;
        width: 28px;
        height: 28px;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 15px;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .image-box:hover .zoom-icon {
        opacity: 1;
    }

@media (max-width: 768px) {
    .image-box .zoom-icon {
        opacity: 1;
    }
}
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.85);
    overflow: hidden;
}

/* لایه داخلی برای مرکز‌چینی */
.modal-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* عکس */
.modal-content {
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90%;
    cursor: grab;
    touch-action: none;
    transition: transform 0.2s ease;
}

/* دکمه بستن */
.close {
    position: fixed;
    top: 20px;
    right: 25px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1100;
}

.zoom-hint {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    color: #ddd;
    font-size: 14px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 12px;
    border-radius: 12px;
    animation: fadeout 3s ease forwards;
}
@media (min-width: 769px) {
    .zoom-hint {
        display: none; /* دسکتاپ مخفی باشه */
    }
}

@keyframes fadeout {
    0% {
        opacity: 1;
    }

    60% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}
