/* ===========================================================
   Forum Attachments - Image Gallery
   =========================================================== */

.forum-image-gallery {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}


/* ===========================================================
   Image Item
   =========================================================== */

.forum-image-item {
    min-width: 0;
    transition: transform .2s ease;
}

    .forum-image-item:hover {
        transform: translateY(-2px);
    }


/* ===========================================================
   Image Wrapper
   =========================================================== */

.forum-image-wrapper {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: #f8f9fa;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

    .forum-image-wrapper a {
        display: block;
    }


/* ===========================================================
   Image
   =========================================================== */

.forum-image {
    display: block;
    width: 100%;
    height: auto;
}


/* ===========================================================
   Image Information
   =========================================================== */

.forum-image-item .image-info {
    margin-top: 8px;
    text-align: center;
    min-width: 0;
}

.forum-image-item .image-name {
    color: var(--bs-gray-700);
    font-size: .9rem;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.forum-image-item .image-size {
    margin-top: 4px;
    font-size: .8rem;
}


/* ===========================================================
   Single Image
   =========================================================== */

.gallery-one {
    display: flex;
    justify-content: center;
}

    .gallery-one .forum-image-item {
        width: 100%;
        max-width: 550px;
    }

    .gallery-one .forum-image {
        max-height: 500px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        margin: auto;
    }


/* ===========================================================
   Two Images
   =========================================================== */

.gallery-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


/* ===========================================================
   Three Images
   =========================================================== */

.gallery-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


/* ===========================================================
   Four+ Images
   =========================================================== */

.gallery-many {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}


/* ===========================================================
   Tablet
   =========================================================== */

@media (max-width: 991.98px) {

    .forum-image-gallery {
        gap: 12px;
    }

    .gallery-three,
    .gallery-many {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* ===========================================================
   Mobile
   =========================================================== */

@media (max-width: 767.98px) {

    .forum-image-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .gallery-one {
        display: flex;
    }

        .gallery-one .forum-image-item {
            max-width: 100%;
        }

        .gallery-one .forum-image {
            max-height: 350px;
        }
}


/* ===========================================================
   Small Mobile
   =========================================================== */

@media (max-width: 400px) {

    .forum-image-gallery {
        gap: 8px;
    }

    .forum-image-item .image-name {
        font-size: .8rem;
    }
}
