/* ── Article body images ─────────────────────────────────── */
/* All images inside the article must stay within content area */
.article-body-jats img {
    display: block;
    margin: 1rem auto;
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.article-body-jats figure,
.article-body-jats .article-figure {
    text-align: center;
    margin: 1.5rem 0;
    padding: 0;
}

.article-body-jats figure img,
.article-body-jats .article-figure img {
    display: block;
    margin: 0 auto 0.5rem;
    max-width: 100%;
    height: auto;
}

.article-body-jats figcaption,
.article-body-jats .article-figure figcaption {
    font-size: 0.9em;
    color: #555;
    text-align: center;
    margin-top: 0.5rem;
    padding: 0 1rem;
    line-height: 1.4;
}

/* Tables inside article body */
.article-body-jats table {
    max-width: 100%;
    overflow-x: auto;
    display: block;
    margin: 1rem 0;
}

.article-body-jats .table-responsive {
    margin: 1rem 0;
}

/* Highlight style for targeted reference */
.article-body-jats [id]:target {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px;
    margin-left: -10px;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    animation: highlightFade 3s ease-in-out;
}

/* Animation for highlight effect */
@keyframes highlightFade {
    0% {
        background-color: #fff3cd;
        border-left-color: #ffc107;
    }

    100% {
        background-color: transparent;
        border-left-color: transparent;
    }
}

/* Alternative: Keep highlight persistent (remove animation) */
.reference-highlight {
    background-color: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    padding: 10px !important;
    margin-left: -10px !important;
    transition: all 0.3s ease !important;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Back to Top Button */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #274aab 0%, #06265b 100%);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(39, 74, 171, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 24px;
}

#backToTop:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(39, 74, 171, 0.4);
    background: linear-gradient(135deg, #06265b 0%, #274aab 100%);
}

#backToTop.show {
    display: flex;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustment */
@media (max-width: 768px) {
    #backToTop {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

.share-icon {
    width: 28px;
    height: 28px;
    display: block;
    color: #ffffff;
    fill: currentColor;
}

.share-icon path {
    fill: currentColor;
}
