/* Modern Back-to-Top CTA */
#backToTop {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(39, 49, 99, 0.8); /* Corporate Blue Glass */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    transform: scale(1.1);
    background: #273163;
    box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
}

#backToTop i {
    color: #D4AF37; /* Gold Arrow */
    font-size: 18px;
    transition: 0.3s;
}

#backToTop:hover i {
    transform: translateY(-3px);
}

/* Progress indicator ring */
#backToTop svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}

#backToTop svg circle {
    fill: none;
    stroke: #D4AF37;
    stroke-width: 2;
    stroke-dasharray: 157; /* 2 * PI * R where R is ~25 */
    stroke-dashoffset: 157;
    transition: stroke-dashoffset 0.1s linear;
}

/* Tooltip */
.btt-tooltip {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: #273163;
    color: #fff;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s;
    pointer-events: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#backToTop:hover .btt-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-5px);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    #backToTop {
        bottom: 150px; /* Stay above mobile bottom bars/OpenWidget */
        right: 20px;
        width: 45px;
        height: 45px;
    }
}
