/* Site-wide "back to top" floating button. Hidden until the page has been
   scrolled down a bit (see js/common/back-to-top.js), then fades/slides in.
   Circular, brand-blue (#3124A3 - the site's own navbar color), just the
   up-arrow icon per spec - no label text. */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 25px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #3929c2;
    color: #ffffff;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(49, 36, 163, 0.4);
    cursor: pointer;
    z-index: 1050;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s, background-color 0.2s ease;
}

    .back-to-top.is-visible {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .back-to-top:hover {
        background: #241b7a;
        color: #ffffff;
    }

    .back-to-top:active {
        transform: translateY(0) scale(0.94);
    }

/* Sit above the mobile bottom nav bar (58px + safe-area inset) instead of
   overlapping it. */
@media (max-width: 767.98px) {
    .back-to-top {
        right: 14px;
        bottom: calc(58px + env(safe-area-inset-bottom, 0px) + 14px);
        width: 40px;
        height: 40px;
        font-size: 1.05rem;
    }
}
