/* =============== PULSANTE "TORNA SU" =============== */
.tornasu {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    width: 60px;
    height: 60px;
    font-size: 24px;
    border: 2px solid var(--blu-chiaro);
    background: rgba(255, 255, 255, 0.9);
    color: var(--blu-chiaro);
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

/* Bottone visibile */
.tornasu.visible {
    display: block;
    animation: fadeInUp 0.3s ease-out;
}

/* Effetti hover */
.tornasu:hover {
    background: var(--blu-chiaro);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Effetto click */
.tornasu:active {
    transform: translateY(-1px) scale(0.98);
}

/* Animazione entrata */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .tornasu {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Per schermi piccolissimi */
@media (max-width: 375px) {
    .tornasu {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

/* Accessibilità - focus state */
.tornasu:focus {
    outline: 3px solid var(--blu-medio);
    outline-offset: 2px;
}

/* Riduzione movimento per preferenze utente */
@media (prefers-reduced-motion: reduce) {
    .tornasu {
        transition: none;
        animation: none;
    }
    
    .tornasu:hover {
        transform: none;
    }
}