/* WHATSAPP INTEGRATION - A&G SYSTEM SOLUTIONS */

/* Botón flotante de WhatsApp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.4);
    background: #20C55A;
}

.whatsapp-float::before {
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.3) 0%, transparent 70%);
    animation: pulse 2s infinite;
    position: absolute;
}

.whatsapp-float::after {
    content: none;
}

.whatsapp-float i {
    font-size: 28px;
    color: white;
    position: relative;
    z-index: 2;
}

/* Animación de pulso */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(1);
        opacity: 0.7;
    }
}

/* Badge con mensaje de notificación */
.whatsapp-float .notification {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    z-index: 3;
    animation: bounce 2s infinite;
}

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

/* Tooltip del botón */
.whatsapp-float .tooltip,
.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    background: #2C3E50;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 4;
}

.whatsapp-float .tooltip::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #2C3E50;
}

.whatsapp-float:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Botón de WhatsApp en sección de contacto */
.whatsapp-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #25D366 0%, #20C55A 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    margin-top: 20px;
}

.whatsapp-contact-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    background: linear-gradient(135deg, #20C55A 0%, #1EA952 100%);
}

.whatsapp-contact-btn::before {
    content: '📱';
    font-size: 20px;
}

/* WhatsApp Card para servicios */
.whatsapp-service-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.whatsapp-service-card:hover {
    border-color: #25D366;
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.2);
}

.whatsapp-service-card .btn-whatsapp {
    width: 100%;
    background: #25D366;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.whatsapp-service-card .btn-whatsapp:hover {
    background: #20C55A;
    transform: scale(1.02);
}

.whatsapp-service-card .btn-whatsapp::before {
    content: '💬';
    font-size: 16px;
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float::after {
        font-size: 24px;
    }
    
    .whatsapp-float .tooltip {
        right: 60px;
        font-size: 12px;
        padding: 6px 10px;
    }
    
    .whatsapp-contact-btn {
        width: 100%;
        justify-content: center;
        font-size: 14px;
        padding: 12px 20px;
    }
    
    .whatsapp-service-card {
        padding: 15px;
    }
    
    .whatsapp-service-card .btn-whatsapp {
        padding: 10px 15px;
        font-size: 14px;
    }
}

/* Animación de entrada */
.whatsapp-float {
    animation: slideInUp 0.8s ease-out;
}

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

/* Estados de loading */
.whatsapp-float.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.whatsapp-float.loading::after {
    content: '⏳';
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mejoras de accesibilidad */
.whatsapp-float:focus {
    outline: 3px solid #25D366;
    outline-offset: 3px;
}

.whatsapp-contact-btn:focus,
.whatsapp-service-card .btn-whatsapp:focus {
    outline: 2px solid #25D366;
    outline-offset: 2px;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float,
    .whatsapp-contact-btn,
    .whatsapp-service-card {
        animation: none;
        transition: none;
    }
    
    .whatsapp-float::before {
        animation: none;
    }
    
    .whatsapp-float .notification {
        animation: none;
    }
}