/* ============================================
   Floating Contact Buttons - Attractive Design
   ============================================ */

.floating-contact {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    animation: slideInRight 0.6s ease;
    pointer-events: none;
}

.floating-btn {
    pointer-events: auto;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 0;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: visible;
    cursor: pointer;
    pointer-events: auto;
}

/* Icons are defined individually for each button type below */

.floating-btn:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

.floating-btn:active {
    transform: scale(0.95);
}

/* Call Button - Apple iOS Blue */
.btn-call-float {
    background: linear-gradient(135deg, #007AFF 0%, #0051D5 100%);
    animation: pulse-call 2s ease infinite;
}

/* Phone icon using SVG background */
.btn-call-float::before {
    content: '';
    width: 28px;
    height: 28px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20.01 15.38c-1.23 0-2.42-.2-3.53-.56a.977.977 0 0 0-1.01.24l-1.57 1.97c-2.83-1.35-5.48-3.9-6.89-6.83l1.95-1.66c.27-.28.35-.67.24-1.02-.37-1.11-.56-2.3-.56-3.53 0-.54-.45-.99-.99-.99H4.19C3.65 3 3 3.24 3 3.99 3 13.28 10.73 21 20.01 21c.71 0 .99-.63.99-1.18v-3.45c0-.54-.45-.99-.99-.99z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    z-index: 1;
}

@keyframes pulse-call {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(0, 122, 255, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(0, 122, 255, 0.6), 0 0 0 10px rgba(0, 122, 255, 0.15);
    }
}

.btn-call-float:hover {
    background: linear-gradient(135deg, #0051D5 0%, #007AFF 100%);
}

/* WhatsApp Button - Official WhatsApp Green */
.btn-whatsapp-float {
    background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
    animation: pulse-whatsapp 2s ease infinite 0.5s;
}

/* WhatsApp icon using SVG background */
.btn-whatsapp-float::before {
    content: '';
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    z-index: 1;
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(37, 211, 102, 0.6), 0 0 0 10px rgba(37, 211, 102, 0.1);
    }
}

.btn-whatsapp-float:hover {
    background: linear-gradient(135deg, #1DA851 0%, #25D366 100%);
}

/* Calculator Button - Apple Calculator Orange */
.btn-calculator-float {
    background: linear-gradient(135deg, #FF9500 0%, #FF6B00 100%);
    animation: pulse-calculator 2s ease infinite 1s;
}

/* Calculator icon using SVG background */
.btn-calculator-float::before {
    content: '';
    width: 28px;
    height: 28px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-2h2v2zm0-4H7v-2h2v2zm0-4H7V7h2v2zm4 8h-2v-2h2v2zm0-4h-2v-2h2v2zm0-4h-2V7h2v2zm4 8h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    z-index: 1;
}

@keyframes pulse-calculator {
    0%, 100% {
        box-shadow: 0 8px 25px rgba(255, 149, 0, 0.4);
    }
    50% {
        box-shadow: 0 8px 35px rgba(255, 149, 0, 0.6), 0 0 0 10px rgba(255, 149, 0, 0.15);
    }
}

.btn-calculator-float:hover {
    background: linear-gradient(135deg, #FF6B00 0%, #FF9500 100%);
}

/* Tooltip on hover */
.floating-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: rgba(26, 26, 46, 0.95);
    color: #fff;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.floating-btn:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Ripple effect on click */
.floating-btn.ripple {
    animation: ripple-effect 0.6s ease;
}

@keyframes ripple-effect {
    0% {
        box-shadow: 0 0 0 0 rgba(255,255,255,0.5);
    }
    100% {
        box-shadow: 0 0 0 20px rgba(255,255,255,0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .floating-contact {
        right: 15px;
        bottom: 15px;
        gap: 12px;
    }
    
    .floating-btn {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
    
    .floating-btn::after {
        display: none;
    }
}

@media (max-width: 480px) {
    .floating-contact {
        right: 10px;
        bottom: 10px;
        gap: 10px;
    }
    
    .floating-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

/* Accessibility - Focus states */
.floating-btn:focus {
    outline: 3px solid rgba(255,255,255,0.5);
    outline-offset: 3px;
}

/* Print - hide floating buttons */
@media print {
    .floating-contact {
        display: none;
    }
}

/* Smooth entrance animation for each button */
.floating-btn:nth-child(1) {
    animation: slideInRight 0.6s ease 0.1s backwards;
}

.floating-btn:nth-child(2) {
    animation: slideInRight 0.6s ease 0.2s backwards;
}

.floating-btn:nth-child(3) {
    animation: slideInRight 0.6s ease 0.3s backwards;
}

/* Glow effect on hover for extra attractiveness */
.btn-call-float:hover {
    filter: brightness(1.1);
    box-shadow: 0 12px 40px rgba(0, 122, 255, 0.5), 0 0 20px rgba(0, 122, 255, 0.4);
}

.btn-whatsapp-float:hover {
    filter: brightness(1.1);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5), 0 0 20px rgba(37, 211, 102, 0.4);
}

.btn-calculator-float:hover {
    filter: brightness(1.1);
    box-shadow: 0 12px 40px rgba(255, 149, 0, 0.5), 0 0 20px rgba(255, 149, 0, 0.4);
}
