/* ===========================
   Shared Navigation Styles
   Floating Back to Home Button (Bottom Right)
   =========================== */

.back-to-home {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #ff9933, #f97316);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.8rem;
    border: 3px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4), 
                0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.back-to-home:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 15px 40px rgba(249, 115, 22, 0.5), 
                0 8px 20px rgba(0, 0, 0, 0.2);
    background: linear-gradient(135deg, #f97316, #ff9933);
    border-color: #ffd7a3;
}

.back-to-home:active {
    transform: translateY(-4px) scale(1.05);
}

.back-to-home i {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.back-to-home:hover i {
    transform: scale(1.15);
}

.back-to-home-text {
    display: none; /* Hidden for FAB design */
}

/* Tooltip on hover - desktop only */
.back-to-home::before {
    content: '🏠 Bhagavad Gita Home';
    position: absolute;
    right: 80px;
    background: rgba(107, 79, 42, 0.95);
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateX(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.back-to-home::after {
    content: '';
    position: absolute;
    right: 70px;
    border: 8px solid transparent;
    border-left-color: rgba(107, 79, 42, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.back-to-home:hover::before,
.back-to-home:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* Pulse animation for attention */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4), 
                    0 4px 12px rgba(0, 0, 0, 0.15),
                    0 0 0 0 rgba(249, 115, 22, 0.7);
    }
    50% {
        box-shadow: 0 8px 25px rgba(249, 115, 22, 0.4), 
                    0 4px 12px rgba(0, 0, 0, 0.15),
                    0 0 0 15px rgba(249, 115, 22, 0);
    }
}

.back-to-home {
    animation: pulse 3s ease-in-out infinite;
}

.back-to-home:hover {
    animation: none;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .back-to-home {
        bottom: 20px;
        right: 20px;
        width: 58px;
        height: 58px;
        font-size: 1.6rem;
        border-width: 2.5px;
    }

    /* Hide tooltip on mobile */
    .back-to-home::before,
    .back-to-home::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .back-to-home {
        bottom: 15px;
        right: 15px;
        width: 54px;
        height: 54px;
        font-size: 1.5rem;
    }
}

/* Ensure FAB doesn't overlap with page content */
body {
    padding-bottom: 30px;
}

@media (max-width: 768px) {
    body {
        padding-bottom: 20px;
    }
}
