/* --- СНОСКИ (Кликабельные индексы) --- */
.spanFootNote {
    cursor: pointer;
    color: #cce2f5;
    transform: none !important;
    display: inline !important;
    vertical-align: text-bottom;
}

.spanFootNoteNone {
    display: none;
}

/* --- СТИЛИ УНИФИЦИРОВАННОГО МОДАЛЬНОГО ОКНА --- */

/*body.modal-open {
    overflow: hidden !important;
}*/

.modal-overlay {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay .modal-content {
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(221, 205, 179, 0.3);
    max-height: 85vh;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Кнопка закрытия модального окна */
.modal-close-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: transparent;
    border: none;
    color: #888;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s, background-color 0.2s;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.modal-close-btn:hover {
    color: var(--accent-gold);
    background-color: rgba(255, 255, 255, 0.08);
}

.modal-close-btn:active {
    transform: rotate(90deg) scale(0.95);
}

.buttonContainer {
    position: fixed;
    display: none;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    flex-direction: column;
}

.buttonContainer>button:nth-child(-n + 2) {
    border-bottom: 1px solid darkgray;
    padding-bottom: 5px;
    margin-bottom: 0;
}

.buttonContainer button {
    margin: 5px;
    padding: 0px 10px;
    cursor: pointer;
    background: #ffffff;
    border: 0;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.imageModal {
    max-width: 80%;
    max-height: 80%;
    overflow: auto;
    background: #fff;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    position: relative;
}

.imageModal img {
    width: 100%;
    height: auto;
    max-height: 100%;
    max-width: 100%;
}

.imageModal a {
    display: block;
    margin-top: 10px;
    text-align: center;
    color: #fff;
    background-color: #007bff;
    padding: 8px 12px;
    text-decoration: none;
    border-radius: 5px;
}

.modal {
    position: fixed;
    left: 15%;
    top: 5%;
    max-width: 70%;
    max-height: 90%;
    z-index: 1000;
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    overflow-y: scroll;
}

.modal::-webkit-scrollbar {
    display: none;
}

.modal img {
    max-width: 100%;
    max-height: 100%;
}

.modal .caption {
    text-align: center;

}

.caption * {
    text-align: center;
}

.overlayModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 900;
}

.caption a {
    margin: 10px;
}

@media screen and (max-width: 767px) {
    .modal {
        left: 4%;
        transform: translate(-2%, -50%);
        max-width: 100%;
        padding: 2%;
    }

    .caption {
        display: flex;
        flex-direction: column;
    }
        .footNote {
        width: 86%;
        left: 3%;
        padding: 5px 10px;
    }

}