/* ═══════════════════════════════════════════════════════════
   BACK TO TOP BUTTON
   Brand: Red (#D55436) with Yellow (#FFD21F) focus states
   ═══════════════════════════════════════════════════════════ */

.back-to-top {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 1000;

    /* Button styling */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #D55436;
    color: #ffffff;
    border: none;
    cursor: pointer;

    /* Shadow for depth */
    box-shadow: 0 8px 24px rgba(213, 84, 54, 0.4);

    /* Visibility states */
    opacity: 0;
    visibility: hidden;

    /* Smooth transitions */
    transition: opacity 0.3s ease,
                visibility 0.3s ease,
                transform 0.3s ease,
                background-color 0.2s ease,
                box-shadow 0.3s ease;
}

/* Visible state */
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* Hover state */
.back-to-top:hover {
    background-color: #c44c31;
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(213, 84, 54, 0.5);
}

/* Active/click state */
.back-to-top:active {
    transform: translateY(-2px);
}

/* Focus state for accessibility */
.back-to-top:focus-visible {
    outline: 2px solid #FFD21F;
    outline-offset: 2px;
}

/* Icon styling */
.back-to-top svg {
    width: 24px;
    height: 24px;
    stroke-width: 2.5;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
    }

    .back-to-top svg {
        width: 22px;
        height: 22px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .back-to-top {
        transition-duration: 0.01ms !important;
    }
}

/* Print - hide button */
@media print {
    .back-to-top {
        display: none !important;
    }
}
