/* ===================================
   FLOATING ACTION BUTTONS
   =================================== */

/* Container */
.floating-buttons {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none; /* Allow clicks to pass through container */
    margin: 0;
    padding: 0;
    transition: all 0.3s ease;
}

/* Individual Button Base */
.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 22px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    pointer-events: auto; /* Re-enable clicks on buttons */
    border: none;
    outline: none;
    backdrop-filter: blur(10px);
}

/* Hover Effects */
.floating-btn:hover {
    transform: scale(1.15) translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.floating-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Shimmer Effect */
.floating-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.3), 
        transparent
    );
    transition: left 0.6s ease;
}

.floating-btn:hover::before {
    left: 100%;
}

/* WhatsApp Button */
.whatsapp-btn {
    background: linear-gradient(135deg, #25D366 0%, #1ea952 50%, #128C7E 100%);
    animation: whatsapp-pulse 4s infinite;
}

.whatsapp-btn:hover {
    background: linear-gradient(135deg, #1ea952 0%, #128C7E 50%, #0d6d5f 100%);
    animation: whatsapp-shake 0.6s ease-in-out;
}

.whatsapp-btn i {
    animation: whatsapp-icon-bounce 3s infinite;
}

/* Call Button */
.call-btn {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 50%, #2e7d32 100%);
    animation: call-pulse 4s infinite 2s;
}

.call-btn:hover {
    background: linear-gradient(135deg, #388e3c 0%, #2e7d32 50%, #1b5e20 100%);
    animation: call-ring 0.6s ease-in-out;
}

.call-btn i {
    animation: call-icon-ring 3s infinite 1.5s;
}

/* Tooltip */
.btn-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1001;
}

.btn-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.9);
}

.floating-btn:hover .btn-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* Pulse Animations */
@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(37, 211, 102, 0.8);
    }
    50% {
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 0 0 18px rgba(37, 211, 102, 0);
    }
}

@keyframes call-pulse {
    0%, 100% {
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(76, 175, 80, 0.8);
    }
    50% {
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2), 0 0 0 18px rgba(76, 175, 80, 0);
    }
}

/* Enhanced Icon Animations */
@keyframes whatsapp-icon-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

@keyframes call-icon-ring {
    0%, 10%, 20% {
        transform: rotate(0deg);
    }
    5%, 15% {
        transform: rotate(-10deg);
    }
    25%, 35% {
        transform: rotate(10deg);
    }
    30%, 40%, 100% {
        transform: rotate(0deg);
    }
}

@keyframes whatsapp-shake {
    0%, 100% {
        transform: scale(1.1) translateX(0);
    }
    25% {
        transform: scale(1.1) translateX(-2px);
    }
    75% {
        transform: scale(1.1) translateX(2px);
    }
}

@keyframes call-ring {
    0%, 100% {
        transform: scale(1.1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(5deg);
    }
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Tablet */
@media (max-width: 1024px) {
    .floating-buttons {
        bottom: 30px;
        right: 25px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .floating-buttons {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }
    
    .floating-btn {
        width: 52px;
        height: 52px;
        font-size: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    }
    
    .btn-tooltip {
        right: 65px;
        font-size: 12px;
        padding: 6px 10px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .floating-buttons {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }
    
    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .btn-tooltip {
        right: 60px;
        font-size: 11px;
        padding: 5px 8px;
    }
}

/* ===================================
   ACCESSIBILITY & PERFORMANCE
   =================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .floating-btn {
        animation: none;
        transition: none;
    }
    
    .floating-btn:hover {
        transform: scale(1.05);
    }
    
    .floating-btn::before {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .floating-btn {
        border: 2px solid white;
    }
    
    .btn-tooltip {
        background: black;
        border: 1px solid white;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .btn-tooltip {
        background: rgba(255, 255, 255, 0.95);
        color: black;
    }
    
    .btn-tooltip::after {
        border-left-color: rgba(255, 255, 255, 0.95);
    }
}

/* ===================================
   INTEGRATION WITH BACK-TO-TOP
   =================================== */

/* Ensure proper spacing with back-to-top button */
/* Note: Back-to-top positioning is handled in style.css */

/* Adjust floating buttons when back-to-top is visible - handled by JavaScript */

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .floating-buttons {
        display: none;
    }
}