.gallery-page {
    text-align: center;
}

.gallery-page__title {
    margin: 50px 0;
    font-size: 2em;
}

.gallery-page__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 80%;
    margin: 0 auto;
    margin-bottom: 80px;
}

.gallery-page__item {
    display: block;
    overflow: hidden;
    width: 100%;
    height: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
}

.gallery-page__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    transition: transform 0.3s ease-in-out;
}

.gallery-page__item:hover .gallery-page__image,
.gallery-page__item:focus .gallery-page__image {
    transform: scale(1.05);
}


.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox:target {
    display: flex;
}


.lightbox__close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 40px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    cursor: pointer;
}

.lightbox__close::after {
    content: '×';
}


.lightbox__image {
    max-width: 90%;
    max-height: 90%;
    display: block;
    margin: auto;
    border-radius: 8px;
}


#footer:target,
#footer:focus {
    display: block;
    outline: none;
    user-select: none;
}
@media screen and (max-width: 768px) {
    .gallery-page__grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
    }
}
