
.accessible-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.accessible-gallery figure {
    margin: 0;
    outline: none;
    cursor: pointer;
    width: 100%;
}

.accessible-gallery img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.ag-modal {
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.ag-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    width: 1100px;
    height: 700px;
    text-align: center;
}

.ag-modal-content img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 75vh;
    display: block;
    border-radius: 4px;
    margin: 0 auto;
    box-shadow: 0 0 10px #000;
}

.ag-modal-close,
.ag-modal-prev,
.ag-modal-next {
    position: absolute;
    background: white;
    color: black;
    font-size: 2rem;
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 10;
}

.ag-modal-prev,
.ag-modal-next {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    width: 40px;
    padding: 0.25rem 0.5rem 0.5rem;
}

.ag-modal-close {
    display: flex;
    justify-content: center;
    font-size: 32px;
    width: 30px;
    height: 30px;
    border-radius: 100%;
    align-items: center;
    line-height: 32px;
    top: 20px;
    right: 20px;
}

.ag-modal-prev { top: 50%; left: 10px; transform: translateY(-50%); }
.ag-modal-next { top: 50%; right: 10px; transform: translateY(-50%); }

.ag-modal-counter,
.ag-modal-caption {
    margin-top: 0.5rem;
    color: white;
    font-size: 1rem;
}

.ag-modal[hidden] {
    display: none !important;
}

.accessible-gallery.slick-carousel .slick-track {
    display: flex !important;
    max-width: none;
    align-items: stretch;
}

.accessible-gallery.slick-carousel .slick-slide {
    height: 300px;
    display: flex !important;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.accessible-gallery.slick-carousel .slick-slide > div {
    width: 100%;
}

.accessible-gallery.slick-carousel .slick-slide img {
    width: 100%;
    max-width: none;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.accessible-gallery.slick-carousel {
    position: relative;
    display: block;
    box-sizing: border-box;
    margin: 2rem auto;
    max-width: 100%;
}

.accessible-gallery .slick-prev,
.accessible-gallery .slick-next {
    background: rgb(0 0 0 / 15%);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    cursor: pointer;
    border-radius: 4px;
}

.accessible-gallery .slick-prev {
    left: 10px;
}
.accessible-gallery .slick-next {
    right: 10px;
}

.accessible-gallery .slick-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    list-style: none;
    gap: 12px;
    bottom: -25px;
    padding: 0;
    flex-wrap: wrap;
}

.accessible-gallery .slick-dots li {
    background-color: transparent;
    border: 2px solid #7e0926;
    min-width: 10px;
    min-height: 10px;
    width: 10px;
    height: 10px;
    border-radius: 100%;
    font-size: 12px;
    cursor: pointer;
}

.accessible-gallery .slick-dots li.slick-active {
    background-color: #7e0926;
}

.ag-grid-cols-1 > div {
    width: 100%;
}

.ag-grid-cols-2 > div {
    width: 49%;
}

.ag-grid-cols-3 > div {
    width: 32%;
}

.ag-grid-cols-4 > div {
    width: 24%;
}

.ag-grid-cols-1,
.ag-grid-cols-2,
.ag-grid-cols-3,
.ag-grid-cols-4 {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.ag-modal-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.ag-modal-loader__spinner {
    width: 32px;
    height: 32px;
    border: 4px solid #ccc;
    border-top-color: #7e0926;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

body.ag-modal-open > *:not(#ag-modal):not(main) {
    z-index: 0 !important;
    position: relative;
}

@media only screen and (max-width: 992px) {
    .ag-grid-cols-2 > div,
    .ag-grid-cols-3 > div,
    .ag-grid-cols-4 > div {
        width: 100%;
    }
}

@media only screen and (max-width: 767px) {
    .ag-modal-counter,
    .ag-modal-caption {
        font-size: 0.8rem;
    }

    .ag-modal-close {
        top: 10px;
        right: 10px;
    }


    .ag-modal-prev,
    .ag-modal-next {
        width: 30px;
        height: 30px;
        font-size: 24px;
        padding: 0.25rem 0.5rem;
    }

    .ag-modal-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        max-width: 100%;
        width: 95%;
        height: auto;
    }

    .ag-modal-prev {
        left: 0;
    }

    .ag-modal-next {
        right: 0;
    }

    .ag-modal-content .slick-track {
        align-items: center;
    }
}

