/**
 * Back to Top Button Styles
 * Fixed position button that appears when scrolling down
 */
.back-to-top {
    /* Fixed positioning at bottom-right corner */
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 9999;

    /* Button dimensions and shape */
    width: 50px;
    height: 50px;
    border-radius: 50%;

    /* Center the icon */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Color scheme - Orange theme */
    background: linear-gradient(135deg, #ea5a2d 0%, #f0744a 100%);
    color: #ffffff;

    /* Remove default link styles */
    text-decoration: none;
    border: none;
    outline: none;

    /* Shadow for depth */
    box-shadow: 0 4px 12px rgba(234, 90, 45, 0.4);

    /* Smooth transitions for all state changes */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Initial state: hidden and slightly offset */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

/* Icon styling */
.back-to-top i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

/* Visible state: shown when scrolled past threshold */
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hover state: enhanced visual feedback */
.back-to-top:hover {
    background: linear-gradient(135deg, #f0744a 0%, #f58e6a 100%);
    box-shadow: 0 6px 20px rgba(234, 90, 45, 0.5);
    transform: translateY(-3px);
}

/* Icon animation on hover */
.back-to-top:hover i {
    transform: translateY(-2px);
}

/* Active/Click state: pressed effect */
.back-to-top:active {
    transform: translateY(-1px) scale(0.95);
    box-shadow: 0 2px 8px rgba(234, 90, 45, 0.4);
}

/* Focus state for accessibility */
.back-to-top:focus {
    outline: 2px solid #4a90d9;
    outline-offset: 3px;
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    .back-to-top {
        width: 44px;
        height: 44px;
        bottom: 20px;
        right: 20px;
    }

    .back-to-top i {
        font-size: 18px;
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {

    .back-to-top,
    .back-to-top i {
        transition: none;
    }
}