.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-title {
    margin-top: 100px;
    text-align: center;
    margin-bottom: 40px;
    color: rgb(107, 39, 55);
    font-family: Philosopher;
    font-size: 32px;
    font-weight: 700;
    line-height: 36px;
    letter-spacing: 0%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 154px); /* Фиксированная ширина */
    justify-content: center; /* Центрируем всю сетку */
    gap: 15px;
    max-width: 999px;
    margin: 0 auto;
}

.gallery-item {
    width: 154px;
    height: 212px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.back-to-main {
    text-align: center;
    margin-top: 40px;
}

.back-link {
    display: inline-block;
    padding: 10px 20px;
    background-color: #f0f0f0;
    color: rgb(33, 33, 33);
    font-family: 'Work Sans', sans-serif;
    font-size: 16px;
    font-weight: 100;
    line-height: 19px;
    letter-spacing: 0%;

    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.back-link:hover {
    background-color: #e0e0e0;
}
/* Fullscreen Gallery Modal */
.fullscreen-gallery-modal {
    display: none;
    position: fixed;
    z-index: 2001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.gallery-window .close-modal-gallery {
    position: absolute;
    top : 10px;
    right: 7px;
    height: 25px;
    width: 25px;
    color: #fff;

    font-weight: bold;
    cursor: pointer;
    z-index: 2002;
}
.close-modal-gallery img {
    position: relative;
    height: 25px;
    width: 25px;
}
.fullscreen-gallery-modal .close-modal-gallery:hover,
.fullscreen-gallery-modal .close-modal-gallery:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.fullscreen-gallery-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgb(245, 245, 245, 0.3);
    width: 100%;
    height: 100%;
}
.gallery-window{
    display: inline-flex;

    position: relative;
    width:440px;
    max-height: 580px;

    box-sizing: border-box;
    border: 1px solid rgb(107, 39, 55);
    padding: 2% 2% 2% 2%;
    border-radius: 10px;

    background: rgb(255, 254, 254);
}
#fullscreenImage {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}
.nav-btn.prev-btn {
    position: absolute;
    background: none;
    border: none;
    left: -45px;
    top: 50%;
    transform: translateY(-50%);
}
.nav-btn.next-btn{
    right: -45px;
    background: none;
    position: absolute;
    border: none;
    top: 50%;
    transform: translateY(-50%);
}
.fullscreen-gallery-content .nav-buttons-gallery {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: #fff;
    font-size: 50px;
    z-index: 2002;
}

.fullscreen-gallery-content .nav-btn img {
    width: 50px;
    height: 50px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.fullscreen-gallery-content .nav-btn:hover img {
    opacity: 1;
}


