.image-gallery {
    margin-bottom: 30px
}

.gallery-title {
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-gap: 15px;
    gap: 15px
}

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: 8px;
    overflow: hidden
}

.gallery-item img {
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
    width: 100%
}

@media (max-width:1080px) {
    .gallery-grid {
        gap: 12px;
        grid-template-columns: repeat(2, 1fr)
    }
}

@media (max-width:768px) {
    .gallery-grid {
        gap: 10px;
        grid-template-columns: 1fr
    }

    .gallery-item {
        flex: 0 0 50%;
        padding: 0 3px
    }

    .gallery-btn {
        font-size: 14px;
        margin: 0 8px;
        padding: 10px 20px
    }

    .gallery-controls {
        margin-top: 20px
    }

    .image-gallery {
        margin-bottom: 20px
    }

    .gallery-title {
        font-size: 16px;
        margin-bottom: 12px
    }
}

@media (min-width:769px) {
    .gallery-item {
        cursor: pointer;
        transition: transform .2s ease
    }

    .gallery-item:hover {
        transform: scale(1.02)
    }
}

.gallery-pagination {
    margin-top: 10px;
    padding: 20px 0
}

.gallery-pagination .pagination .page-link.disabled {
    cursor: not-allowed;
    opacity: .5;
    pointer-events: none
}

.gallery-pagination .pagination .page-link.disabled:hover {
    background: #fff;
    border-color: #ddd;
    box-shadow: none;
    color: #666;
    transform: none
}

.modal {
    align-items: center;
    animation: fadeIn .3s ease;
    background-color: rgba(0, 0, 0, .9);
    display: none;
    height: 100%;
    justify-content: center;
    left: 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 99999
}

@keyframes fadeIn {
    0% {
        opacity: 0
    }

    to {
        opacity: 1
    }
}

.modal-content {
    animation: zoomIn .3s ease;
    border-radius: 10px;
    max-height: 90%;
    max-width: 90%;
    overflow: visible;
    position: relative
}

@keyframes zoomIn {
    0% {
        transform: scale(.8)
    }

    to {
        transform: scale(1)
    }
}

.modal-content img {
    display: block;
    height: auto;
    max-height: 80vh;
    max-width: 90vw;
    -o-object-fit: contain;
    object-fit: contain;
    width: auto
}

.modal-close {
    align-items: center;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
    color: #333;
    cursor: pointer;
    display: flex;
    font-size: 24px;
    font-weight: 700;
    height: 36px;
    justify-content: center;
    line-height: 1;
    position: absolute;
    right: -15px;
    top: -15px;
    transition: all .3s ease;
    width: 36px;
    z-index: 100001
}

.modal-close:hover {
    background: #007bff;
    color: #fff;
    transform: scale(1.1)
}

@media (max-width:480px) {
    .gallery-item {
        flex: 0 0 100%;
        padding: 0 2px
    }

    .gallery-btn {
        font-size: 13px;
        margin: 0 4px;
        padding: 8px 16px
    }

    .modal-close {
        font-size: 18px;
        height: 30px;
        right: -10px;
        top: -10px;
        width: 30px
    }
}

@media (max-width:768px) {
    .modal-close {
        font-size: 20px;
        height: 32px;
        right: -12px;
        top: -12px;
        width: 32px
    }

    .modal-content {
        max-height: 85%;
        max-width: 95%
    }
}