.gallery-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.category-card {
    position: relative;
    height: 250px;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
}

.category-card:hover .category-overlay {
    background-color: rgba(0, 0, 0, 0.7);
}

.category-name {
    position: relative;
    z-index: 1;
    font-size: 1.5rem;
    font-weight: bold;
    color: #FFFFFF;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    margin: 2px;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.gallery-item {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    margin: auto;
    display: block;
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 95%;
    top: 50%;
    transform: translateY(-50%);
}

.close-modal, .prev-image, .next-image {
    position: absolute;
    color: white;
    font-size: 35px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close-modal {
    top: 15px;
    right: 35px;
}

.prev-image, .next-image {
    top: 50%;
    transform: translateY(-50%);
}

.prev-image {
    left: 15px;
}

.next-image {
    right: 15px;
}

.close-modal:hover, .close-modal:focus,
.prev-image:hover, .prev-image:focus,
.next-image:hover, .next-image:focus {
    color: #bbb;
    text-decoration: none;
}
