.modal-photo-from-letter {
    font-family: Lexend, serif;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: transparent;
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.3s, opacity 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
}

.modal-photo-from-letter.visible {
    visibility: visible;
    opacity: 1;
}

.modal-photo-from-letter .modal-photo-img {
    max-width: 80vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 14px;
}

.modal-photo-from-letter .modal-photo-close {
    position: absolute;
    top: 20px;
    right: 25px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 10;

    @media (min-width: 769px) and (max-width: 1360px) {
        width: 20px;
        height: 20px;
    }

    @media (max-width: 768px) {
        width: 15px;
        height: 15px;
        top: 15px;
        right: 20px;
    }
}

.modal-photo-from-letter .modal-photo-close:hover {
    transform: scale(1.1);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.visible {
    visibility: visible;
    opacity: 1;
}
.show-prev-photo, .show-next-photo {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    padding: 35px 15px;
    width: 40px;
    height: 90px;
    border-radius: 10px;
    color: white;
    font-size: 20px;
    font-weight: 600;
}
@media (min-width: 993px) {
    .show-prev-photo:hover, .show-next-photo:hover {
        background: rgba(0, 0, 0, 1);
    }
}
.show-prev-photo {
    left: 15px;
}
.show-next-photo {
    right: 15px;
}
