/* WhatsApp and Call Floating Buttons */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: var(--z-fixed);
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.floating-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    animation: slideInLeft 0.6s ease-out, bounce 2s infinite;
}

.floating-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.floating-button:hover::before {
    left: 100%;
}

.floating-button:hover {
    transform: scale(1.15) rotate(5deg);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.floating-button.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
}

.floating-button.whatsapp:hover {
    background: linear-gradient(135deg, #128C7E 0%, #0A5F54 100%);
}

.floating-button.call {
    background: linear-gradient(135deg, #FF6B35 0%, #F7931E 50%, #FFC107 100%);
    animation: slideInLeft 0.8s ease-out, callPulse 2.5s infinite, bounce 3s infinite;
}

.floating-button.call:hover {
    background: linear-gradient(135deg, #E55100 0%, #FF6B35 50%, #FFB300 100%);
    transform: scale(1.15) rotate(-5deg);
}

/* Tooltip */
.floating-button .tooltip {
    position: absolute;
    left: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text);
    color: var(--bg);
    padding: 8px 12px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    pointer-events: none;
}

.floating-button .tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -4px;
    transform: translateY(-50%);
    border: 4px solid transparent;
    border-right-color: var(--text);
}

.floating-button:hover .tooltip {
    opacity: 1;
    visibility: visible;
    left: 75px;
}

/* Pulse animation for WhatsApp */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.floating-button.whatsapp {
    animation: pulse 2s infinite;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 20px;
        left: 20px;
        gap: 12px;
    }
    
    .floating-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .floating-button .tooltip {
        display: none; /* Hide tooltips on mobile for better UX */
    }
}

@media (max-width: 480px) {
    .floating-buttons {
        bottom: 15px;
        left: 15px;
        gap: 10px;
    }
    
    .floating-button {
        width: 45px;
        height: 45px;
        font-size: 1.1rem;
    }
}

/* Slide in from left animation */
@keyframes slideInLeft {
    0% {
        transform: translateX(-100px);
        opacity: 0;
    }
    50% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Bounce animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Call button pulse animation */
@keyframes callPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 107, 53, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
    }
}

/* Ring animation for call button */
@keyframes ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-15deg);
    }
    20%, 40% {
        transform: rotate(15deg);
    }
    50% {
        transform: rotate(0deg);
    }
}

/* Apply ring animation to call button icon on hover */
.floating-button.call:hover i {
    animation: ring 0.6s ease-in-out;
}

/* Stagger the animations for each button */
.floating-button.whatsapp {
    animation-delay: 0.2s;
}

.floating-button.call {
    animation-delay: 0.4s;
}
